Use Unix time for the date code.

This is easier to deal with than YYYYMMDD.
This commit is contained in:
Elizabeth Myers 2016-03-07 17:40:50 -06:00
parent 749d697c98
commit d0a28c6a94

View file

@ -24,7 +24,7 @@ BUILT_SOURCES = include/serno.h
include/serno.h: include/serno.h:
@if [ -d .git ]; then \ @if [ -d .git ]; then \
revh=`git log -1 --date=format:%Y%m%d --pretty=format:%cd-%h`; \ revh=`git log -1 --date=format:%Y%m%d --pretty=format:%cd-%h`; \
datecode=`git log -1 --date=format:%Y%m%d --pretty=format:%cd`; \ datecode=`git log -1 --pretty=format:%ct`; \
if [ -n "$$revh" ]; then \ if [ -n "$$revh" ]; then \
echo '#define SERNO "'$$revh'"' >include/serno.h ; \ echo '#define SERNO "'$$revh'"' >include/serno.h ; \
echo "#define DATECODE $${datecode}UL" >>include/serno.h; \ echo "#define DATECODE $${datecode}UL" >>include/serno.h; \