]> jfr.im git - solanum.git/blobdiff - Makefile.am
cap: allow modules to return client-specific responses for capability inquiries
[solanum.git] / Makefile.am
index b33c5df303c6c1bb64a43eab17bf2f2d8b146cee..78fb7b562d4c9d0d4003743c02f336e215175cac 100644 (file)
@@ -7,8 +7,9 @@ if BUILD_LTDL
 SUBDIRS += libltdl
 endif
 
-SUBDIRS += src \
+SUBDIRS += ircd \
            ssld \
+           authd \
            bandb \
            tools \
            modules \
@@ -18,5 +19,17 @@ SUBDIRS += src \
 
 logdir = @prefix@/logs
 
+BUILT_SOURCES = include/serno.h
+
+include/serno.h:
+       @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
+
 install-data-hook:
-       test -d ${logdir} || mkdir -p ${logdir}
+       test -d ${DESTDIR}${logdir} || mkdir -p ${DESTDIR}${logdir}