-----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' >> $@
> echo ';' >> $@
Actually, the "hg" line ought to be:
-hg log -r . --template='" ({node|short})"\n' >> $@
As the user may not necessarily be building from tip. If closing stderr
or directing it to the equivalent of /dev/null ("2>NULL"?) is possible,
that should also be included.
- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHFUQu7M8hyUobTrERCJORAJ4uOqqiuBCyjqGJMnBWIy8xlOeZ/wCggYTt
Saas407pZa3Xpb9joJcxEts=
=kX7O
-----END PGP SIGNATURE-----