From 1d1a3a78111f6204f60649119d53856f27da8ae3 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Tue, 8 Feb 2011 04:30:06 +0100 Subject: Makefile: Extract version from layman/version.py (was hardcoded before) --- doc/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 93d8180..b5dbaf3 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -17,6 +17,8 @@ HTML_PAGES = layman.8.html TMPFILE=./layman.man +PACKAGE_VERSION = `fgrep "VERSION = " ../layman/version.py | sed 's|^VERSION = '"'"'\(.\+\)'"'"'$$|\1|'` + all: man html html: $(HTML_PAGES) @@ -27,10 +29,10 @@ clean: rm -f $(MAN_PAGES) rm -f $(HTML_PAGES) -%.html: %.txt +%.html: %.txt ../layman/version.py @echo HTML $@ - a2x --conf-file=asciidoc.conf --attribute="laymanversion=1.4.1" --format=xhtml "$<" + a2x --conf-file=asciidoc.conf --attribute="laymanversion=$(PACKAGE_VERSION)" --format=xhtml "$<" -%: %.txt +%: %.txt ../layman/version.py @echo MAN $@ - a2x --conf-file=asciidoc.conf --attribute="laymanversion=1.4.1" --format=manpage "$<" + a2x --conf-file=asciidoc.conf --attribute="laymanversion=$(PACKAGE_VERSION)" --format=manpage "$<" -- cgit v1.2.3-1-g7c22