0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 02:02:38 +01:00

Generate include/serno.h from git information, if available.

This commit is contained in:
Jilles Tjoelker 2011-06-18 13:22:57 +02:00
parent 0531ae63b6
commit d3cfd0324a

View file

@ -64,7 +64,10 @@ build:
echo "Doing so now."; \
sh configure; \
fi
@if [ -d .hg ] ; then \
@if [ -d .git ] ; then \
revh=`git log -1 --date=short --pretty=format:%cd_%h 2>/dev/null | sed -e s/-//g -e s/_/-/`;\
[ -z "$$revh" ] || echo '#define SERNO "'$$revh'"' >include/serno.h ; \
elif [ -d .hg ] ; then \
revh=`hg parents --template '{date|shortdate}_{node|short}' 2>/dev/null | sed -e s/-//g -e s/_/-/`;\
[ -z "$$revh" ] || echo '#define SERNO "'$$revh'"' >include/serno.h ; \
fi