RE: version.c take two

2007-10-17 Thread Christopher G. Lewis
: version.c take two -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Micah Cowan wrote: Gisle and Chris, you should be able to write this rule in your Makefiles. Something like: version.c: $(SOURCES) echo 'const char *version_string = @VERSION@' $@ -hg log -r tip --template

Re: version.c take two

2007-10-17 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Guess I was forgetting to hit Reply-All today... resent to list. Christopher G. Lewis wrote: Micah - I haven't tested this yet, but I've been pondering on the impact of having a dependency on Hg for the actual build process of Wget. Seems

Re: version.c take two

2007-10-16 Thread Hrvoje Niksic
Micah Cowan [EMAIL PROTECTED] writes: version.c: $(wget_SOURCES) $(LDADD) printf '%s' 'const char *version_string = @VERSION@' $@ -hg log -r tip --template=' ({node|short})' $@ printf '%s\n' ';' $@ printf is not portable to older systems, but that may not be a

Re: version.c take two

2007-10-16 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hrvoje Niksic wrote: Micah Cowan [EMAIL PROTECTED] writes: version.c: $(wget_SOURCES) $(LDADD) printf '%s' 'const char *version_string = @VERSION@' $@ -hg log -r tip --template=' ({node|short})' $@ printf '%s\n' ';'

Re: version.c take two

2007-10-16 Thread Maciej W. Rozycki
On Tue, 16 Oct 2007, Micah Cowan wrote: I may take liberties with the Make environment, and assume the presence of a GNU toolset, though I'll try to avoid that where it's possible. Well, the issue has been resolved one way or another with many GNU packages, including the core ones such as

Re: version.c take two

2007-10-16 Thread Hrvoje Niksic
Micah Cowan [EMAIL PROTECTED] writes: I may take liberties with the Make environment, and assume the presence of a GNU toolset, though I'll try to avoid that where it's possible. Requiring the GNU toolset puts a large burden on the users of non-GNU systems (both free and non-free ones).

Re: version.c take two

2007-10-16 Thread Micah Cowan
Micah Cowan wrote: I've improved the generation of version.c, removing the intermediate generation of an hg-id file and using a more portable replacement for hg id | cut -d ' ' -f 1 (can be used on Windows and MS-DOS). The relevant lines in src/Makefile.am are now: version.c:

Re: version.c take two

2007-10-16 Thread Micah Cowan
Hrvoje Niksic wrote: Micah Cowan [EMAIL PROTECTED] writes: I may take liberties with the Make environment, and assume the presence of a GNU toolset, though I'll try to avoid that where it's possible. Requiring the GNU toolset puts a large burden on the users of non-GNU systems (both free

Re: version.c take two

2007-10-16 Thread Hrvoje Niksic
Micah Cowan [EMAIL PROTECTED] writes: Alright; I'll make an extra effort to avoid non-portable Make assumptions then. It's just... portable Make _sucks_ (not that non-portable Make doesn't). It might be fine to require GNU make if there is a good reason for it -- many projects do. But

Re: version.c take two

2007-10-16 Thread Micah Cowan
Hrvoje Niksic wrote: Micah Cowan [EMAIL PROTECTED] writes: Alright; I'll make an extra effort to avoid non-portable Make assumptions then. It's just... portable Make _sucks_ (not that non-portable Make doesn't). It might be fine to require GNU make if there is a good reason for it --

Re: version.c take two

2007-10-16 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Micah Cowan wrote: Gisle and Chris, you should be able to write this rule in your Makefiles. Something like: version.c: $(SOURCES) echo 'const char *version_string = @VERSION@' $@ -hg log -r tip --template=' ({node|short})\n' $@

version.c take two

2007-10-15 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 I've improved the generation of version.c, removing the intermediate generation of an hg-id file and using a more portable replacement for hg id | cut -d ' ' -f 1 (can be used on Windows and MS-DOS). The relevant lines in src/Makefile.am are now: