0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-31 19:08:59 +01:00
construct/Makefile.am
Elizabeth Myers 749d697c98 Fix generation of serno.h
Due to reversed conditionals, it wasn't being generated properly.

This also actually fixes its generation in librb by just copying the
Charybdis version. Unbundlers will want to take note of this.
2016-03-07 17:15:39 -06:00

38 lines
867 B
Makefile

AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = librb
if BUILD_LTDL
SUBDIRS += libltdl
endif
SUBDIRS += ircd \
ssld \
authd \
bandb \
tools \
modules \
extensions \
help \
doc
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 --date=format:%Y%m%d --pretty=format:%cd`; \
if [ -n "$$revh" ]; then \
echo '#define SERNO "'$$revh'"' >include/serno.h ; \
echo "#define DATECODE $${datecode}UL" >>include/serno.h; \
fi \
else \
echo '#define SERNO "unknown"' >include/serno.h; \
echo '#define DATECODE 0UL' >>include/serno.h; \
fi
install-data-hook:
test -d ${DESTDIR}${logdir} || mkdir -p ${DESTDIR}${logdir}