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:
parent
0531ae63b6
commit
d3cfd0324a
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue