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."; \
|
echo "Doing so now."; \
|
||||||
sh configure; \
|
sh configure; \
|
||||||
fi
|
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/_/-/`;\
|
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 ; \
|
[ -z "$$revh" ] || echo '#define SERNO "'$$revh'"' >include/serno.h ; \
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue