From e0f3c4635f1b7fa0be85eb624884fdfe1f17f801 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Wed, 8 Feb 2012 19:28:26 +0100 Subject: [PATCH] build system: Define the 'version' target in the toplevel Makefile. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit … and let the manpage depend on that as well. --- Makefile.am | 4 ++++ doc/Makefile.am | 2 +- src/Makefile.am | 4 ---- 3 files changed, 5 insertions(+), 5 deletions(-) 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" \ -- 2.30.2