about summary refs log tree commit diff
path: root/manual/Makefile
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-02-27 20:35:43 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-02-27 20:35:43 +0000
commitbb8b6697d419a9ed48b96470844aa0b6c84435e3 (patch)
tree1a28b46e51bf177dfd21dde045dd96c2fca13b12 /manual/Makefile
parent12e5c3b9e513e61b48284603f631bb8ce3b95fc0 (diff)
downloadglibc-bb8b6697d419a9ed48b96470844aa0b6c84435e3.tar.gz
glibc-bb8b6697d419a9ed48b96470844aa0b6c84435e3.tar.xz
glibc-bb8b6697d419a9ed48b96470844aa0b6c84435e3.zip
Automatically generate version number in manual; omit edition / updated date.
Diffstat (limited to 'manual/Makefile')
-rw-r--r--manual/Makefile22
1 files changed, 16 insertions, 6 deletions
diff --git a/manual/Makefile b/manual/Makefile
index df96abcafb..0137afddd7 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -76,12 +76,15 @@ chapters.% top-menu.%: libc-texinfo.sh $(texis) Makefile
 			       '$(add-chapters)' \
 			       '$(appendices) $(licenses)'
 
-libc.dvi libc.pdf libc.info: chapters.texi top-menu.texi dir-add.texi \
-			     libm-err.texi
+# Generated files directly included from libc.texinfo.
+libc-texi-generated = chapters.texi top-menu.texi dir-add.texi \
+		      libm-err.texi version.texi
+
+libc.dvi libc.pdf libc.info: $(libc-texi-generated)
 libc.dvi libc.pdf: texinfo.tex
 
 html: libc/index.html
-libc/index.html: chapters.texi top-menu.texi dir-add.texi libm-err.texi
+libc/index.html: $(libc-texi-generated)
 	$(MAKEINFO) --html libc.texinfo
 
 # Generate the summary from the Texinfo source files for each chapter.
@@ -110,6 +113,13 @@ stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
 	$(move-if-change) libm-err-tmp libm-err.texi
 	touch $@
 
+# Generate a file with the version number.
+version.texi: stamp-version ;
+stamp-version: $(common-objpfx)config.make
+	echo "@set VERSION $(version)" > version-tmp
+	$(move-if-change) version-tmp version.texi
+	touch $@
+
 # Generate Texinfo files from the C source for the example programs.
 %.c.texi: examples/%.c
 	sed -e 's,[{}],@&,g'				\
@@ -173,10 +183,10 @@ clean: mostlyclean
 distclean: clean
 indices = cp fn pg tp vr ky
 realclean: distclean
-	-rm -f texis summary.texi stamp-summary *.c.texi dir-add.texi
+	-rm -f texis summary.texi stamp-summary *.c.texi
 	-rm -f $(foreach index,$(indices),libc.$(index) libc.$(index)s)
-	-rm -f libc.log libc.aux libc.toc dir-add.texinfo
-	-rm -f top-menu.texi chapters.texi
+	-rm -f libc.log libc.aux libc.toc
+	-rm -f $(libc-texi-generated)
 
 .PHONY: install subdir_install installdirs install-data
 install-data subdir_install: install