aboutsummaryrefslogtreecommitdiff
path: root/manual/Makefile
diff options
context:
space:
mode:
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