From 49fb69d823cf3f62609841feee358384e719669f Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sat, 8 Dec 2012 20:11:39 +0100 Subject: [PATCH] docs: add rule to generate manuals for www.gnu.org Less clerical work to do by hand. * Makefile.am (web-manuals): New rule. (clean_texinfo_clutter): New macro. * clean-web-manuals, clean-texinfo-clutter: New cleaning rules. (clean-local): Depend on them. * .gitignore: Update. * HACKING: Adjust instructions for generation of manuals. Signed-off-by: Stefano Lattarini --- .gitignore | 1 + HACKING | 9 +++------ Makefile.am | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 9ead89c2f..3773d9499 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ /doc/amhello/depcomp /doc/amhello/install-sh /doc/amhello/missing +/doc/web-manuals /lib/Automake/Config.pm /test-suite.log /t/wrap/aclocal-1.* diff --git a/HACKING b/HACKING index 118a2e322..27eec31fd 100644 --- a/HACKING +++ b/HACKING @@ -259,12 +259,9 @@ use "make GNUPLOADFLAGS='--user KEY' git-upload-release". * For stable releases, update the manuals at www.gnu.org: - - Generate manuals: - cd doc - export GENDOCS_TEMPLATE_DIR=../lib - sh ../lib/gendoc.sh --email bug-automake@gnu.org automake "GNU Automake" - - copy manuals recursively to web cvs, - - commit. + - Generate manuals, running "make web-manuals". + - Copy manuals recursively to web CVS. + - Commit in CVS. - Check for link errors, fix them, recheck until convergence: diff --git a/Makefile.am b/Makefile.am index 8c5fa7198..870c6a9a8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1001,6 +1001,39 @@ fetch: exit $$stat .PHONY: fetch +## --------------------------------------------------------------------- ## +## Generate manuals in several formats, for upload on the GNU website. ## +## --------------------------------------------------------------------- ## + +# The gendocs.sh script sadly leaves TeX and Texinfo auxiliary files +# in the directory where it's invoked. +clean_texinfo_clutter_cmd = \ + cd doc && rm -f *.ac *.aux *.cm *.cp *.cps *.fn *.fns *.ky \ + *.log *.op *.pg *.toc *.tp *.tr *.vr *.vrs + +clean-web-manuals: + $(AM_V_at)rm -rf doc/web-manuals +clean-texinfo-clutter: + $(AM_V_at)$(clean_texinfo_clutter_cmd) +clean-local: clean-web-manuals clean-texinfo-clutter +.PHONY: clean-web-manuals clean-texinfo-clutter + +web-manuals: + $(AM_V_at)rm -rf doc/web-manuals + $(AM_V_GEN): \ +## The gendocs.sh script only works from the srcdir, sadly. + && cd $(srcdir)/doc \ + && GENDOCS_TEMPLATE_DIR=../lib \ + && export GENDOCS_TEMPLATE_DIR \ +## Try to respect silent rules. + && if $(AM_V_P); then :; else exec >/dev/null 2>&1; fi \ +## Finally generate the manual in several formats. + && $(SHELL) ../lib/gendocs.sh -o web-manuals \ + --email $(PACKAGE_BUGREPORT) $(PACKAGE) '$(PACKAGE_NAME)' + $(AM_V_at)$(clean_texinfo_clutter_cmd) + $(AM_V_at)if $(AM_V_P); then ls -l doc/web-manuals; else :; fi +.PHONY: web-manuals + EXTRA_DIST += lib/gendocs.sh lib/gendocs_template ## ------------------------------------------------ ## -- 2.47.2