From bb8b6697d419a9ed48b96470844aa0b6c84435e3 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 27 Feb 2012 20:35:43 +0000 Subject: Automatically generate version number in manual; omit edition / updated date. --- manual/Makefile | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'manual/Makefile') 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 -- cgit 1.4.1