From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
Cc: | Christopher Browne <cbbrowne(at)gmail(dot)com>, Greg Smith <greg(at)2ndquadrant(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Formatting Curmudgeons WAS: MMAP Buffers |
Date: | 2011-04-17 08:26:21 |
Message-ID: | 4DAAA42D.20309@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 04/17/2011 02:16 AM, Jeff Janes wrote:
> On 4/16/11, Andrew Dunstan<andrew(at)dunslane(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2011-04-17 08:31:59 | Re: Formatting Curmudgeons WAS: MMAP Buffers |
Previous Message | Greg Smith | 2011-04-17 08:15:53 | Re: Formatting Curmudgeons WAS: MMAP Buffers |