On 04/17/2011 02:16 AM, Jeff Janes wrote:
On 4/16/11, Andrew Dunstan<and...@dunslane.net>  wrote:

What makes you think this isn't possible to run pgindent? There are no
secret incantations.
A while ago I spent a few hours trying to run it and gave up.  I think
it was something about needing some obscure BSD version of some tool
which conflicted with just about everything else on the system.  I can
try again and report back if anyone cares.


A few hours? Seriously?

Here's what I just did, starting from scratch. It took me a few minutes.

   * wget ftp://ftp.postgresql.org/pub/dev/indent.netbsd.patched.tgz
   * mkdir bsdindent && cd bdsindent && tar -z -xf
     .../indent.netbsd.patched.tgz
   * make
   * mv indent indent_for_pg
   * sudo install -s -o bin -g bin indent_for_pg /usr/local/bin
   * cd ../pg_head/src/tools/entab
   * sudo make install
   * cd ../pgindent
   * sed -i 's/INDENT=indent/INDENT=indent_for_pg/' pgindent
   * sudo  install -s -o bin -g bin pgindent /usr/local/bin


Now we could certainly make this quite a bit slicker. Apart from anything else, we should change the indent source code tarball so it unpacks into its own directory. Having it unpack into the current directory is ugly and unfriendly. And we should get rid of the "make clean" line in the install target of entab's makefile, which just seems totally ill-conceived.

It might also be worth setting it up so that instead of having to pass a path to a typedefs file on the command line, we default to a file sitting in, say, /usr/local/etc. Then you'd just be able to say "pgindent my_file.c".

But it shouldn't take anyone hours to set up.

cheers

andrew





--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to