From: Sebastian Harl Date: Wed, 8 Feb 2012 18:28:26 +0000 (+0100) Subject: build system: Define the 'version' target in the toplevel Makefile. X-Git-Url: https://git.tokkee.org/?p=template.git;a=commitdiff_plain;h=e0f3c4635f1b7fa0be85eb624884fdfe1f17f801 build system: Define the 'version' target in the toplevel Makefile. … and let the manpage depend on that as well. --- diff --git a/Makefile.am b/Makefile.am index 9baf3da..76a1016 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,3 +2,7 @@ SUBDIRS = doc src EXTRA_DIST = autogen.sh version-gen.sh +version: FORCE + @# As a side-effect, this updates version. + @echo Building $(PACKAGE_NAME) version $$( cd .. && ./version-gen.sh ) + diff --git a/doc/Makefile.am b/doc/Makefile.am index 70a76cf..c07bab1 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -3,7 +3,7 @@ CLEANFILES = fb.1 man_MANS = fb.1 -fb.1: fb.txt +fb.1: fb.txt ../version .txt.1: a2x -d manpage -f manpage -apackage_version=$(PACKAGE_VERSION) $< diff --git a/src/Makefile.am b/src/Makefile.am index 4787460..86e78ee 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,10 +14,6 @@ fb_SOURCES = fb.c foobar.h fb_CFLAGS = $(AM_CFLAGS) -DBUILD_DATE="\"$$( date --utc '+%F %T' ) (UTC)\"" fb_LDADD = libfoobar.la -../version: FORCE - @# As a side-effect, this updates ../version. - @echo Building $(PACKAGE_NAME) version $$( cd .. && ./version-gen.sh ) - fb_features.h: fb_features.h.in ../version source ../version; sed \ -e "s/@FB_VERSION_MAJOR@/$$VERSION_MAJOR/g" \