On 04/18/2011 12:48 AM, Greg Smith wrote:
> 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.
Personally, I want pgindent installed in /usr/local/ or similar. That
way I can have multiple trees and it will work in all of them without my
having to build it for each. What I don't want is for the installed
patched BSD indent to conflict with the system's indent, which is why I
renamed it. If you still think that's a barrier to easy use, then I
think we need a way to provide hooks in the makefiles for specifying the
install location, so we can both be satisfied.
Since there's no script I know of other than your prototype, I don't
think repackaging is likely to break anything. That makes it worth doing
*now* rather than later.
But frankly, I'd rather do without an extra script if possible.
>
>> 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.
Yes, very much.
cheers
andrew