Re: Formatting Curmudgeons WAS: MMAP Buffers - Mailing list pgsql-hackers

From Greg Smith
Subject Re: Formatting Curmudgeons WAS: MMAP Buffers
Date
Msg-id 4DABC286.3070102@2ndquadrant.com
Whole thread Raw
In response to Re: Formatting Curmudgeons WAS: MMAP Buffers  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Formatting Curmudgeons WAS: MMAP Buffers  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan wrote:
> 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.

I think the script I submitted upthread has most of the additional 
slickness needed here.  Looks like we both were working on documenting a 
reasonable way to do this at the same time the other day.  The idea of 
any program here relying on being able to write to /usr/local/bin as 
your example did makes this harder for people to run; that's why I made 
everything in the build tree and just pushed the appropriate directories 
into the PATH.

Since I see providing a script to automate this whole thing as the 
preferred way to make this easier, re-packaging the indent source 
tarball to extract to a directory doesn't seem worth the backwards 
compatibility trouble it will introduce.  Improving the entab makefile I 
don't have an opinion on.

> 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".

OK, so I need to update my script to handle either indenting a single 
file, or doing all of them.

-- 
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us




pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: MMAP Buffers
Next
From: Jesper Krogh
Date:
Subject: Re: Evaluation of secondary sort key.