mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
buildsystem: build serno.h before anything else
This commit is contained in:
parent
0c32811863
commit
b5e4f39625
2 changed files with 32 additions and 5 deletions
12
Makefile.am
12
Makefile.am
|
@ -19,5 +19,17 @@ SUBDIRS += ircd \
|
||||||
|
|
||||||
logdir = @prefix@/logs
|
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:
|
install-data-hook:
|
||||||
test -d ${logdir} || mkdir -p ${logdir}
|
test -d ${logdir} || mkdir -p ${logdir}
|
||||||
|
|
25
Makefile.in
25
Makefile.in
|
@ -403,7 +403,9 @@ AUTOMAKE_OPTIONS = foreign
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
SUBDIRS = libratbox $(am__append_1) ircd ssld authd bandb tools \
|
SUBDIRS = libratbox $(am__append_1) ircd ssld authd bandb tools \
|
||||||
modules extensions help doc
|
modules extensions help doc
|
||||||
all: all-recursive
|
BUILT_SOURCES = include/serno.h
|
||||||
|
all: $(BUILT_SOURCES)
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
am--refresh: Makefile
|
am--refresh: Makefile
|
||||||
|
@ -759,11 +761,13 @@ distcleancheck: distclean
|
||||||
$(distcleancheck_listfiles) ; \
|
$(distcleancheck_listfiles) ; \
|
||||||
exit 1; } >&2
|
exit 1; } >&2
|
||||||
check-am: all-am
|
check-am: all-am
|
||||||
check: check-recursive
|
check: $(BUILT_SOURCES)
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) check-recursive
|
||||||
all-am: Makefile
|
all-am: Makefile
|
||||||
installdirs: installdirs-recursive
|
installdirs: installdirs-recursive
|
||||||
installdirs-am:
|
installdirs-am:
|
||||||
install: install-recursive
|
install: $(BUILT_SOURCES)
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) install-recursive
|
||||||
install-exec: install-exec-recursive
|
install-exec: install-exec-recursive
|
||||||
install-data: install-data-recursive
|
install-data: install-data-recursive
|
||||||
uninstall: uninstall-recursive
|
uninstall: uninstall-recursive
|
||||||
|
@ -793,6 +797,7 @@ distclean-generic:
|
||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||||
clean: clean-recursive
|
clean: clean-recursive
|
||||||
|
|
||||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
@ -864,8 +869,8 @@ ps-am:
|
||||||
|
|
||||||
uninstall-am:
|
uninstall-am:
|
||||||
|
|
||||||
.MAKE: $(am__recursive_targets) install-am install-data-am \
|
.MAKE: $(am__recursive_targets) all check install install-am \
|
||||||
install-strip
|
install-data-am install-strip
|
||||||
|
|
||||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
|
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
|
||||||
am--refresh check check-am clean clean-cscope clean-generic \
|
am--refresh check check-am clean clean-cscope clean-generic \
|
||||||
|
@ -887,6 +892,16 @@ uninstall-am:
|
||||||
.PRECIOUS: Makefile
|
.PRECIOUS: Makefile
|
||||||
|
|
||||||
|
|
||||||
|
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:
|
install-data-hook:
|
||||||
test -d ${logdir} || mkdir -p ${logdir}
|
test -d ${logdir} || mkdir -p ${logdir}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue