doc: Make use of 'faketime' configurable with configure.ac. Default to 'no'
authorKeith Packard <keithp@keithp.com>
Sun, 7 Oct 2018 00:17:20 +0000 (17:17 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 7 Oct 2018 00:18:14 +0000 (17:18 -0700)
This ensures that older a2x versions don't simply wedge while building
the docs.

Signed-off-by: Keith Packard <keithp@keithp.com>
configure.ac
doc/Makefile.am

index 0a5a76ecd8a4fb8462274d8a93ebea5873f464f0..1705745d794c01f7192ab42625a68736cc09e1b8 100644 (file)
@@ -184,6 +184,12 @@ else
        HAVE_GOOGLE_KEY="no"
 fi
 
        HAVE_GOOGLE_KEY="no"
 fi
 
+AC_ARG_ENABLE(faketime, AS_HELP_STRING([--enable-faketime],
+              [Use faketime program to ensure pdf files are reproducible (default=no)]),
+             [FAKETIME=$enableval], [FAKETIME=no])
+
+AM_CONDITIONAL(FAKETIME, [test x$FAKETIME = xyes])
+
 AC_SUBST(GOOGLEKEY)
 
 AC_PROG_CC
 AC_SUBST(GOOGLEKEY)
 
 AC_PROG_CC
index 5f2ab026dff0d447cb4689ecc435021da6876bf1..450053f1a04fd556ee80d3b562439f2410091a34 100644 (file)
@@ -2,7 +2,9 @@
 #      http://docbook.sourceforge.net/release/xsl/current/README
 #
 
 #      http://docbook.sourceforge.net/release/xsl/current/README
 #
 
-FAKETIME=$(RELEASE_DATE) 00:00:00
+if FAKETIME
+FAKETIME=TZ=UTC faketime -f '$(RELEASE_DATE) 00:00:00 i0'
+endif
 
 RELNOTES_INC=\
        release-notes-1.8.7.inc \
 
 RELNOTES_INC=\
        release-notes-1.8.7.inc \
@@ -264,9 +266,10 @@ SUFFIXES = .dot .svg .tmpl .xsl .inc .txt .raw .pdf .html
 .raw.html:
        a2x -a docinfo -f xhtml --xsltproc-opts "--stringparam toc.section.depth 2" --xsl-file $(HTML_STYLE) --stylesheet=$(STYLESHEET) $*.raw
        case $* in release-notes*) ./fix-html $*.html ;; esac
 .raw.html:
        a2x -a docinfo -f xhtml --xsltproc-opts "--stringparam toc.section.depth 2" --xsl-file $(HTML_STYLE) --stylesheet=$(STYLESHEET) $*.raw
        case $* in release-notes*) ./fix-html $*.html ;; esac
+       $(FAKETIME) a2x -a docinfo -f pdf --xsltproc-opts "--stringparam toc.section.depth 2" --xsl-file $(FOP_STYLE) --fop --fop-opts="-c $(FOP_XCONF)" $*.raw
 
 .html.pdf:
 
 .html.pdf:
-       TZ=UTC faketime -f '$(FAKETIME) i0' a2x -a docinfo -f pdf --xsltproc-opts "--stringparam toc.section.depth 2" --xsl-file $(FOP_STYLE) --fop --fop-opts="-c $(FOP_XCONF)" $*.raw
+       echo $@
 
 .tmpl.xsl:
        xsltproc --output $@ /usr/share/xml/docbook/stylesheet/docbook-xsl/template/titlepage.xsl $*.tmpl
 
 .tmpl.xsl:
        xsltproc --output $@ /usr/share/xml/docbook/stylesheet/docbook-xsl/template/titlepage.xsl $*.tmpl