X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/212380e3f42f585dc1ea927402252eb943f91f7b..c5bbc6037579a3c4b72b2a9910138950c628a8d8:/Makefile.in diff --git a/Makefile.in b/Makefile.in index cf5061b0..7a555d84 100644 --- a/Makefile.in +++ b/Makefile.in @@ -46,12 +46,10 @@ CFLAGS = @CFLAGS@ # the system one. #CFLAGS= -DNDEBUG -g -O2 -D"FD_SETSIZE=1024" SHELL=/bin/sh -SUBDIRS=modules extensions libcharybdis src tools servlink doc help +SUBDIRS=libratbox modules extensions src tools ssld bandb doc help CLEANDIRS = ${SUBDIRS} RSA_FILES=rsa_respond/README rsa_respond/respond.c rsa_respond/Makefile -MAKE = make ${MFLAGS} - all: build @@ -66,10 +64,18 @@ build: echo "Doing so now."; \ sh configure; \ fi + @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 + @[ -f include/serno.h ] || echo '#define SERNO "unknown"' >include/serno.h @for i in $(SUBDIRS); do \ echo "build ==> $$i";\ cd $$i;\ - ${MAKE} build || exit; cd ..;\ + ${MAKE} || exit; cd ..;\ done clean: @@ -94,6 +100,7 @@ distclean: done depend: + @[ -f include/serno.h ] || echo '#define SERNO "unknown"' >include/serno.h @for i in $(SUBDIRS); do \ echo "depend ==> $$i";\ cd $$i;\