]> jfr.im git - solanum.git/blobdiff - Makefile.am
blacklist: clean up some of my old code
[solanum.git] / Makefile.am
index b8b3e227bdf4b9134c4d0fe532136adb3e1ab746..34e152871c43caf71157225a608c1eeb9720f770 100644 (file)
@@ -1,7 +1,7 @@
 AUTOMAKE_OPTIONS = foreign
 ACLOCAL_AMFLAGS = -I m4
 
-SUBDIRS = libratbox
+SUBDIRS = librb
 
 if BUILD_LTDL
 SUBDIRS += libltdl
@@ -9,6 +9,7 @@ endif
 
 SUBDIRS += ircd \
            ssld \
+           authd \
            bandb \
            tools \
            modules \
@@ -18,5 +19,21 @@ SUBDIRS += ircd \
 
 logdir = @prefix@/logs
 
+BUILT_SOURCES = include/serno.h
+
+include/serno.h:
+       @if [ -d .git ]; then \
+               revh=`git log -1 --date=format:%Y%m%d --pretty=format:%cd-%h`; \
+               datecode=`git log -1 --pretty=format:%ct`; \
+               if [ -n "$$revh" ]; then \
+                       echo '#define SERNO "'$$revh'"' >include/serno.h ; \
+                       echo "#define DATECODE $${datecode}UL" >>include/serno.h; \
+               fi \
+       fi
+       @if [ ! -f include/serno.h ]; then \
+               echo '#define SERNO "unknown"' >include/serno.h; \
+               echo '#define DATECODE 0UL' >>include/serno.h; \
+       fi
+
 install-data-hook:
-       test -d ${logdir} || mkdir -p ${logdir}
+       test -d ${DESTDIR}${logdir} || mkdir -p ${DESTDIR}${logdir}