[libxslt] Rework documentation build system
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxslt] Rework documentation build system
- Date: Wed, 30 Mar 2022 22:04:45 +0000 (UTC)
commit b3fdf8a96688ab28e26e7ad104072787e47c9853
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Wed Mar 30 23:45:55 2022 +0200
Rework documentation build system
Since several generated files are under version control, their
timestamps are essentially random and rebuilding documentation using
Makefile dependencies can't work reliably. Simply add a phony rebuild
target that regenerates the whole documentation and other files
unconditionally.
make -C doc rebuild
configure.ac | 7 -------
doc/EXSLT/devhelp/Makefile.am | 13 ++-----------
doc/Makefile.am | 43 ++++++++++---------------------------------
doc/devhelp/Makefile.am | 13 ++-----------
4 files changed, 14 insertions(+), 62 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7748cf98..9cc5af8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,13 +90,6 @@ AC_ARG_WITH(html-subdir, AS_HELP_STRING([--with-html-subdir=path],
AC_SUBST(HTML_DIR)
-AC_ARG_ENABLE(rebuild-docs,
-[ --enable-rebuild-docs[[=yes/no]] rebuild some generated docs [[default=no]]])
-if test "$enable_rebuild_docs" = "yes" -a "$srcdir" != "."; then
- AC_MSG_ERROR([cannot rebuild docs when builddir != srcdir])
-fi
-AM_CONDITIONAL([REBUILD_DOCS], [test "$enable_rebuild_docs" = "yes"])
-
dnl
dnl Check the environment
dnl
diff --git a/doc/EXSLT/devhelp/Makefile.am b/doc/EXSLT/devhelp/Makefile.am
index b55fba5f..0d34ce5d 100644
--- a/doc/EXSLT/devhelp/Makefile.am
+++ b/doc/EXSLT/devhelp/Makefile.am
@@ -23,16 +23,7 @@ EXTRA_FORMAT= \
EXTRA_DIST = devhelp2.xsl html.xsl
-if REBUILD_DOCS
+rebuild:
+ cd $(srcdir) && $(XSLTPROC) --nonet -o libexslt.devhelp2 devhelp2.xsl ../libexslt-api.xml
-rebuild: libexslt.devhelp2
.PHONY: rebuild
-
-$(HTML_FILES): libexslt.devhelp2
-
-libexslt.devhelp2: devhelp2.xsl html.xsl $(top_srcdir)/doc/EXSLT/libexslt-api.xml
- -@(if [ -x $(XSLTPROC) ] ; then \
- echo Rebuilding devhelp2 files ; \
- $(XSLTPROC) --nonet -o $(srcdir)/libexslt.devhelp2 $(srcdir)/devhelp2.xsl
$(top_srcdir)/doc/EXSLT/libexslt-api.xml ; fi );
-
-endif
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 1d58affc..f18c72fd 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -37,37 +37,16 @@ EXTRA_DIST = \
man_MANS = xsltproc.1
-if REBUILD_DOCS
-
-all-local: $(man_MANS) xsltproc.html
-
-libxslt-api.xml libxslt-refs.xml EXSLT/libexslt-api.xml \
- EXSLT/libexslt-refs.xml ../libxslt/libxslt.syms : $(srcdir)/apibuild.py $(top_srcdir)/libxslt/*.h \
- $(top_srcdir)/libxslt/*.c $(top_srcdir)/libexslt/*.h \
- $(top_srcdir)/libexslt/*.c
- -(cd $(srcdir) && ./apibuild.py)
- ($(XSLTPROC) $(srcdir)/checkapisym.xsl $(srcdir)/libxslt-api.xml)
- ($(XSLTPROC) -o ../libxslt/libxslt.syms $(srcdir)/syms.xsl $(srcdir)/symbols.xml)
-
-xsltproc.html: xsltproc.xml
- -@($(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
xsltproc.xml)
-
-xsltproc.1: $(srcdir)/xsltproc.xml
- -@(if [ -x $(XSLTPROC) ] ; then \
- echo "Rebuilding the man pages from the xml" ; \
- $(XSLTPROC) --nonet $(srcdir)/xsltproc.xml ; fi)
-
-$(WIN32_DIR)/libxslt.def.src: libxslt-api.xml
- -@(if [ -x $(XSLTPROC) ] ; then \
- $(XSLTPROC) -o $(WIN32_DIR)/libxslt.def.src \
- --nonet $(WIN32_DIR)/defgen.xsl $(srcdir)/libxslt-api.xml ; fi )
-
-$(WIN32_DIR)/libexslt.def.src: EXSLT/libexslt-api.xml
- -@(if [ -x $(XSLTPROC) ] ; then \
- $(XSLTPROC) -o $(WIN32_DIR)/libexslt.def.src \
- --nonet $(WIN32_DIR)/defgen.xsl $(srcdir)/EXSLT/libexslt-api.xml ; fi )
-
-rebuild: all
+rebuild:
+ cd $(srcdir) && ./apibuild.py
+ cd $(srcdir) && $(XSLTPROC) checkapisym.xsl libxslt-api.xml
+ cd $(srcdir) && $(XSLTPROC) -o ../libxslt/libxslt.syms syms.xsl symbols.xml
+ cd $(srcdir) && $(XSLTPROC) --nonet xsltproc.xml
+ cd $(srcdir) && $(XSLTPROC) --nonet -o xsltproc.html
http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl xsltproc.xml
+ cd $(srcdir) && $(XSLTPROC) -o $(WIN32_DIR)/libxslt.def.src \
+ --nonet $(WIN32_DIR)/defgen.xsl libxslt-api.xml
+ cd $(srcdir) && $(XSLTPROC) -o $(WIN32_DIR)/libexslt.def.src \
+ --nonet $(WIN32_DIR)/defgen.xsl EXSLT/libexslt-api.xml
wildcards = \
*.1 \
@@ -93,8 +72,6 @@ check-extra-dist:
test -n "$$present" || echo "not in EXTRA_DIST: $$a" ; \
done
-endif
-
install-data-local:
$(MKDIR_P) $(DESTDIR)$(HTML_DIR)
-$(INSTALL) -m 0644 $(srcdir)/xsltproc.html $(DESTDIR)$(HTML_DIR)
diff --git a/doc/devhelp/Makefile.am b/doc/devhelp/Makefile.am
index 66bc761b..33d21de7 100644
--- a/doc/devhelp/Makefile.am
+++ b/doc/devhelp/Makefile.am
@@ -41,16 +41,7 @@ EXTRA_FORMAT= \
EXTRA_DIST = devhelp2.xsl html.xsl
-if REBUILD_DOCS
+rebuild:
+ cd $(srcdir) && $(XSLTPROC) --nonet -o libxslt.devhelp2 devhelp2.xsl ../libxslt-api.xml
-rebuild: libxslt.devhelp2
.PHONY: rebuild
-
-$(HTML_FILES): libxslt.devhelp2
-
-libxslt.devhelp2: devhelp2.xsl html.xsl $(top_srcdir)/doc/libxslt-api.xml
- -@(if [ -x $(XSLTPROC) ] ; then \
- echo Rebuilding devhelp2 files ; \
- $(XSLTPROC) --nonet -o $(srcdir)/libxslt.devhelp2 $(srcdir)/devhelp2.xsl
$(top_srcdir)/doc/libxslt-api.xml ; fi );
-
-endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]