]> jfr.im git - solanum.git/blame - Makefile.am
Use Unix time for the date code.
[solanum.git] / Makefile.am
CommitLineData
c52df125
AC
1AUTOMAKE_OPTIONS = foreign
2ACLOCAL_AMFLAGS = -I m4
3
c83f2f5e 4SUBDIRS = librb
c52df125
AC
5
6if BUILD_LTDL
7SUBDIRS += libltdl
8endif
9
ff12cc94 10SUBDIRS += ircd \
c52df125 11 ssld \
0c328118 12 authd \
c52df125
AC
13 bandb \
14 tools \
15 modules \
16 extensions \
17 help \
18 doc
19
20logdir = @prefix@/logs
21
b5e4f396
AC
22BUILT_SOURCES = include/serno.h
23
24include/serno.h:
749d697c
EM
25 @if [ -d .git ]; then \
26 revh=`git log -1 --date=format:%Y%m%d --pretty=format:%cd-%h`; \
d0a28c6a 27 datecode=`git log -1 --pretty=format:%ct`; \
749d697c
EM
28 if [ -n "$$revh" ]; then \
29 echo '#define SERNO "'$$revh'"' >include/serno.h ; \
30 echo "#define DATECODE $${datecode}UL" >>include/serno.h; \
31 fi \
32 else \
33 echo '#define SERNO "unknown"' >include/serno.h; \
34 echo '#define DATECODE 0UL' >>include/serno.h; \
b5e4f396 35 fi
b5e4f396 36
c52df125 37install-data-hook:
62a09666 38 test -d ${DESTDIR}${logdir} || mkdir -p ${DESTDIR}${logdir}