[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/8] docs: build the web manuals for CVS in the builddir, not in
From: |
Stefano Lattarini |
Subject: |
[PATCH 2/8] docs: build the web manuals for CVS in the builddir, not in the srcdir |
Date: |
Thu, 13 Dec 2012 16:17:44 +0100 |
We can do so using the '-I' option of the gendocs.sh script.
Inspired by the 'web-manual' rule in the 'top/maint.mk' file provided
by gnulib (as of commit v0.0-7741-g4a8c422) as customized by Bison in
its 'cfg.mk' file (as of commit v2.6.5-1007-gf5fceda).
* Makefile.am (web-manuals): Modify and simplify to take advantage
of gendocs.sh's '-I' option.
(upload-we-manuals): Accordingly adjust sanity checks and the rsync
invocation in the recipe.
(clean_texinfo_clutter_cmd): Delete this variable, it's no longer
required.
(clean-texinfo-clutter): Delete this phony target, it's no longer
required.
(clean-local): Don't depend on it.
* configure.ac: Invoke AC_PROG_LN_S, since we want to use $(LN_S)
in the new 'web-manuals' recipe.
Signed-off-by: Stefano Lattarini <address@hidden>
---
Makefile.am | 39 +++++++++++++++++++--------------------
configure.ac | 2 ++
2 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index a573ff2..8bcb6ed 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -997,33 +997,32 @@ fetch:
## Generate and upload manuals in several formats, for 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
+.PHONY: clean-web-manuals
+clean-local: clean-web-manuals
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 \
+ $(AM_V_GEN)address@hidden \
+ && 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
+ && $(SHELL) '$(abs_srcdir)/lib/gendocs.sh' \
+ -I '$(abs_srcdir)/doc' --email $(PACKAGE_BUGREPORT) \
+ $(PACKAGE) '$(PACKAGE_NAME)'
+ $(AM_V_at)address@hidden \
+ && mkdir doc/web-manuals \
+ && mv -f $$tmp/manual/* doc/web-manuals \
+ && rm -rf $$tmp \
+ && { ! $(AM_V_P) || ls -l doc/web-manuals; }
.PHONY: web-manuals
RSYNC = rsync
@@ -1040,7 +1039,7 @@ upload-web-manuals:
*) echo "Cannot upload manuals from a \"$$release_type\"" >&2; \
exit 1;; \
esac
- $(AM_V_at)test -f $(srcdir)/doc/web-manuals/$(PACKAGE).html || { \
+ $(AM_V_at)test -f doc/web-manuals/$(PACKAGE).html || { \
echo 'You have to run "$(MAKE) web-manuals" before' \
'invoking "$(MAKE) $@"' >&2; \
exit 1; \
@@ -1054,7 +1053,7 @@ upload-web-manuals:
&& $(CVS) -z3 -d :ext:$(CVS_USER)@$(WEBCVS_ROOT)/$(PACKAGE) \
co $(PACKAGE) \
&& cd .. \
- && $(RSYNC) -avP $(srcdir)/doc/web-manuals/ $$tmp/$(PACKAGE)/manual \
+ && $(RSYNC) -avP doc/web-manuals/ $$tmp/$(PACKAGE)/manual \
&& ( \
cd $$tmp/$(PACKAGE)/manual \
&& new_files=`$(CVSU) --types='?'` \
diff --git a/configure.ac b/configure.ac
index 7f126c4..5582a51 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,6 +70,8 @@ AC_SUBST([system_acdir], ["\${datadir}/aclocal"])
ACLOCAL="\"`pwd`/t/wrap/aclocal-$APIVERSION\""
AUTOMAKE="\"`pwd`/t/wrap/automake-$APIVERSION\""
+AC_PROG_LN_S
+
AC_PATH_PROG([PERL], [perl])
if test -z "$PERL"; then
AC_MSG_ERROR([perl not found])
--
1.8.0.1.347.gf94c325
- [PATCH 0/8] More automation in generation/upload of web manuals, Stefano Lattarini, 2012/12/13
- [PATCH 3/8] cosmetic: minor variable and rules reordering in Makefile.am, Stefano Lattarini, 2012/12/13
- [PATCH 2/8] docs: build the web manuals for CVS in the builddir, not in the srcdir,
Stefano Lattarini <=
- [PATCH 7/8] HACKING: update instructions to update the manuals at www.gnu.org, Stefano Lattarini, 2012/12/13
- [PATCH 1/8] release: automate uploading of web manuals in CVS, Stefano Lattarini, 2012/12/13
- [PATCH 8/8] HACKING: minor formatting changes, for better clarity, Stefano Lattarini, 2012/12/13
- [PATCH 4/8] maint: rename rules to build/upload web manuals, Stefano Lattarini, 2012/12/13
- [PATCH 6/8] maint: add an explicative comment in Makefile, Stefano Lattarini, 2012/12/13
- [PATCH 5/8] maint: factor out the name of the dir where web manuals are generated, Stefano Lattarini, 2012/12/13
- Re: [PATCH 0/8] More automation in generation/upload of web manuals, Stefano Lattarini, 2012/12/14