Code

build system: Define the 'version' target in the toplevel Makefile.
authorSebastian Harl <sh@tokkee.org>
Wed, 8 Feb 2012 18:28:26 +0000 (19:28 +0100)
committerSebastian Harl <sh@tokkee.org>
Wed, 8 Feb 2012 18:28:26 +0000 (19:28 +0100)
… and let the manpage depend on that as well.

Makefile.am
doc/Makefile.am
src/Makefile.am

index 9baf3dabd11cf10887911c2408337a89636b0c03..76a10167110337ae3d8bc6bc14fccf5f39df88ba 100644 (file)
@@ -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 )
+
index 70a76cfc6104ea3cf4006aff7bee4812536d40f1..c07bab1f9f6b7a4c59811f7bd87bf0ada1cb08c1 100644 (file)
@@ -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) $<
index 4787460c94a618241a765019907c7dca76d8883a..86e78ee586f511a7c64fb41cbe161ca3712f117f 100644 (file)
@@ -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" \