The code is inspired by the code in atheme-services, but
* it uses 'hg parents' instead of 'hg tip' so it will
also work if the working directory is not updated
to the latest version in the local repository
* the format is different (date-shorthash instead of
revnum:shorthash)
* some sort of serno.h is always generated, be it
"unknown" only
echo "Doing so now."; \
sh configure; \
fi
echo "Doing so now."; \
sh configure; \
fi
+ @if [ -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
+ @[ -f include/serno.h ] || echo '#define SERNO "unknown"' >include/serno.h
@for i in $(SUBDIRS); do \
echo "build ==> $$i";\
cd $$i;\
@for i in $(SUBDIRS); do \
echo "build ==> $$i";\
cd $$i;\
+ @[ -f include/serno.h ] || echo '#define SERNO "unknown"' >include/serno.h
@for i in $(SUBDIRS); do \
echo "depend ==> $$i";\
cd $$i;\
@for i in $(SUBDIRS); do \
echo "depend ==> $$i";\
cd $$i;\
+++ /dev/null
-#define SERNO "20071120-3584"