diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-12-14 09:50:27 +0100 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-12-14 09:50:27 +0100 |
commit | 33263a0fec525a7dfb0b0b0c0c21bb9d35b1d12f (patch) | |
tree | be91137e7529d1b320b31caeee9db9cd6c09ff52 /Makefile.am | |
parent | c1d820e6fe73ae727fedf4908249801922de5750 (diff) | |
parent | 4c550df0e1c78141a807d7b5303c57fa7fc04c7a (diff) | |
download | automake-33263a0fec525a7dfb0b0b0c0c21bb9d35b1d12f.tar.gz |
Merge branch 'improve-release-process' into maint
* improve-release-process:
HACKING: update instructions to update the manuals at www.gnu.org
maint: add an explicative comment in Makefile
maint: factor out the name of the dir where web manuals are generated
maint: rename rules to build/upload web manuals
cosmetic: minor variable and rules reordering in Makefile.am
docs: build the web manuals for CVS in the builddir, not in the srcdir
release: automate uploading of web manuals in CVS
docs: AM_CFLAGS: remove reference to non-existing "more detailed" desc
tests: avoid two spurious failures on FreeBSD
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 99 |
1 files changed, 71 insertions, 28 deletions
diff --git a/Makefile.am b/Makefile.am index c800b9e30..3f2c3dedd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -993,38 +993,81 @@ fetch: $(AM_V_at)rm -rf Fetchdir .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 = \ - $(am__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. - && $(am__cd) $(srcdir)/doc \ - && GENDOCS_TEMPLATE_DIR=../lib \ +## ---------------------------------------------------------------------- ## +## Generate and upload manuals in several formats, for the GNU website. ## +## ---------------------------------------------------------------------- ## + +web_manual_dir = doc/web-manual + +RSYNC = rsync +CVS = cvs +CVSU = cvsu +CVS_USER = $${USER} +WEBCVS_ROOT = cvs.savannah.gnu.org:/web + +web-manual: + $(AM_V_at)rm -rf $(web_manual_dir) + $(AM_V_GEN)tmp=$@.dir \ + && rm -rf $$tmp \ + && mkdir $$tmp \ + && $(am__cd) $$tmp \ + && GENDOCS_TEMPLATE_DIR='$(abs_srcdir)/lib' \ && export GENDOCS_TEMPLATE_DIR \ +## Needed to pacify extra checks from gendocs.sh. + && $(LN_S) '$(abs_srcdir)/doc/$(PACKAGE).texi' . \ ## 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 + && $(SHELL) '$(abs_srcdir)/lib/gendocs.sh' \ + -I '$(abs_srcdir)/doc' --email $(PACKAGE_BUGREPORT) \ + $(PACKAGE) '$(PACKAGE_NAME)' + $(AM_V_at)tmp=$@.dir \ + && mkdir $(web_manual_dir) \ + && mv -f $$tmp/manual/* $(web_manual_dir) \ + && rm -rf $$tmp \ + && { ! $(AM_V_P) || ls -l $(web_manual_dir); } +.PHONY: web-manual + +web-manual-update: + $(AM_V_at)fatal () { echo "$@: $$*" >&2; exit 1; }; \ + $(determine_release_type); \ + case $$release_type in \ + [Mm]ajor\ release|[Mm]inor\ release);; \ + *) echo "Cannot upload manuals from a \"$$release_type\"" >&2; \ + exit 1;; \ + esac + $(AM_V_at)test -f $(web_manual_dir)/$(PACKAGE).html || { \ + echo 'You have to run "$(MAKE) web-manuals" before' \ + 'invoking "$(MAKE) $@"' >&2; \ + exit 1; \ + } + $(AM_V_GEN): \ + && CVS_RSH=ssh && export CVS_RSH=ssh \ + && tmp=$@.dir \ + && rm -rf $$tmp \ + && mkdir $$tmp \ + && $(am__cd) $$tmp \ + && $(CVS) -z3 -d :ext:$(CVS_USER)@$(WEBCVS_ROOT)/$(PACKAGE) \ + co $(PACKAGE) \ + && cd .. \ +## According to the rsync manpage, "a trailing slash on the source [...] +## avoids creating an additional directory level at the destination". +## So the trailing '/' after '$(web_manual_dir)' below is intended. + && $(RSYNC) -avP $(web_manual_dir)/ $$tmp/$(PACKAGE)/manual \ + && ( \ + cd $$tmp/$(PACKAGE)/manual \ + && new_files=`$(CVSU) --types='?'` \ + && new_files=`echo "$$new_files" | sed s/^..//` \ + && { test -z "$$new_files" || $(CVS) add -ko $$new_files; } \ + && $(CVS) ci -m $(VERSION) \ + ) \ + && rm -rf $$tmp +.PHONY: web-manual-update + +clean-web-manual: + $(AM_V_at)rm -rf $(web_manual_dir) +.PHONY: clean-web-manual +clean-local: clean-web-manual EXTRA_DIST += lib/gendocs.sh lib/gendocs_template |