From 0208d5f64b2cb9b67d5ab6070f411cf45cea1fc4 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 3 Jun 2020 12:33:50 +1200 Subject: [PATCH] Add docs build to CI We did not check we could actually build the HTML of the Samba Developers guide and HTML of the manpages previously. Signed-off-by: Andrew Bartlett Reviewed-by: David Disseldorp Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Wed Jun 10 07:11:59 UTC 2020 on sn-devel-184 --- .gitlab-ci.yml | 1 + docs-xml/Makefile | 11 ++--------- docs-xml/Makefile.settings.in | 2 -- docs-xml/README | 4 ++-- docs-xml/configure.ac | 2 -- script/autobuild.py | 11 ++++++++++- 6 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7177d3b5c44..68e1a52bf1e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -125,6 +125,7 @@ others: - script/autobuild.py tdb $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase - script/autobuild.py tevent $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase - script/autobuild.py samba-xc $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase + - script/autobuild.py docs-xml $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase samba: extends: .shared_template diff --git a/docs-xml/Makefile b/docs-xml/Makefile index 769e46bdde6..c614097f6c0 100644 --- a/docs-xml/Makefile +++ b/docs-xml/Makefile @@ -36,7 +36,7 @@ help: @echo " release - Build the docs needed for a Samba release" @echo " all - Build all docs that can be build using the utilities found by configure" @echo " everything - Build all of the above" - @echo " pdf,tex,ps,manpages,txt,htmlhelp - Build specific output format" + @echo " pdf,tex,ps,manpages,htmlhelp - Build specific output format" @echo " html - Build multi-file HTML versions" @echo " html-single - Build single-file HTML versions" @echo " htmlman - Build HTML version of manpages" @@ -45,7 +45,7 @@ $(PDFDIR)/Samba3-Developers-Guide.pdf $(PSDIR)/Samba3-Developers-Guide.ps $(DOCB # Pseudo targets all:: $(TARGETS) -everything:: manpages pdf html-single html htmlman txt ps fo htmlhelp +everything:: manpages pdf html-single html htmlman ps fo htmlhelp release:: manpages htmlman html pdf clean:: @echo "Cleaning up..." @@ -61,7 +61,6 @@ clean:: # Output format targets pdf:: $(patsubst %,$(PDFDIR)/%.pdf,$(MAIN_DOCS)) ps:: $(patsubst %,$(PSDIR)/%.ps,$(MAIN_DOCS)) -txt:: $(patsubst %,$(TXTDIR)/%.txt,$(MAIN_DOCS)) tex:: $(addsuffix .tex,$(MAIN_DOCS)) manpages:: $(patsubst $(MANPAGEDIR)/%.xml,$(OUTPUTDIR)/manpages/%,$(MANPAGES)) htmlman:: $(patsubst $(MANPAGEDIR)/%.xml,$(HTMLDIR)/manpages/%.html,$(MANPAGES)) $(HTMLDIR)/manpages/index.html @@ -117,11 +116,6 @@ $(HTMLDIR)/%.html: $(DOCBOOKDIR)/%.xml $(HTMLDIR)/samba.css xslt/html.xsl $(XSLT @cp -f templates/attributions.xml $@ @$(XSLTPROC) --xinclude -o $@ xslt/generate-attributions.xsl $*/index.xml -# Text files -$(TXTDIR)/%.txt: $(HTMLDIR)/%.html - @mkdir -p $(@D) - $(HTML2TEXT) -nobs -style pretty -o $@ $< - # Tex files %.tex: %/index.xml xslt/latex.xsl @echo "Generating $@..." @@ -132,7 +126,6 @@ $(TXTDIR)/%.txt: $(HTMLDIR)/%.html %.d: $(DOCBOOKDIR)/%.xml xslt/generate-dependencies.xsl $(XSLTPROC_DEPS) @echo "Generating dependency file for $*" @$(XSLTPROC) --novalid \ - --stringparam txtbasedir "$(TXTDIR)/$*/" \ --stringparam target "$*" \ -o $@ xslt/generate-dependencies.xsl $< @echo "$*-images-latex-eps: \$$(addsuffix .eps, \$$($*-images-latex))" >> $@ diff --git a/docs-xml/Makefile.settings.in b/docs-xml/Makefile.settings.in index b619292c88c..7898b6bb4d0 100644 --- a/docs-xml/Makefile.settings.in +++ b/docs-xml/Makefile.settings.in @@ -3,7 +3,6 @@ XSLTPROC = @XSLTPROC@ --nonet XMLLINT = @XMLLINT@ PNGTOPNM = @PNGTOPNM@ PNMTOPS = @PNMTOPS@ -HTML2TEXT = @HTML2TEXT@ MAKEINFO = @MAKEINFO@ DBLATEX = @DBLATEX@ RM = @RM@ @@ -20,7 +19,6 @@ DOCBOOKDIR = tmp PSDIR = $(OUTPUTDIR) PDFDIR = $(OUTPUTDIR) HTMLHELPDIR = $(OUTPUTDIR)/htmlhelp -TXTDIR = $(OUTPUTDIR)/textdocs HTMLDIR=$(OUTPUTDIR)/htmldocs DB2LATEX_ARGS = --stringparam latex.documentclass.book @LATEX_DOCUMENTCLASS_OPTIONS@ diff --git a/docs-xml/README b/docs-xml/README index a1caae3d9b5..4affbeec538 100644 --- a/docs-xml/README +++ b/docs-xml/README @@ -35,8 +35,8 @@ The format ---------- If you are new to xml, regard an xml file as 'source code'. You don't -read it directly, but use it to create other formats (like the txt and html -included in ../txtdocs and ../htmldocs). +read it directly, but use it to create other formats (like the html +included in ../htmldocs). Docbook is a particular XML style, particularly suited to producing technical manuals. diff --git a/docs-xml/configure.ac b/docs-xml/configure.ac index 196ab883def..aaec457d817 100644 --- a/docs-xml/configure.ac +++ b/docs-xml/configure.ac @@ -12,7 +12,6 @@ DOCS_TARGET_REQUIRE_PROGRAM(RM, rm, ALL) DOCS_TARGET_REQUIRE_PROGRAM(PNGTOPNM, pngtopnm, PS) DOCS_TARGET_REQUIRE_PROGRAM(PNMTOPS, pnmtops, PS) DOCS_TARGET_REQUIRE_PROGRAM(DBLATEX, dblatex, LATEX) -DOCS_TARGET_REQUIRE_PROGRAM(HTML2TEXT, html2text, TXT) DOCS_TARGET_REQUIRE_PROGRAM(XMLLINT, xmllint, VALIDATE) AC_MSG_RESULT([]) @@ -26,7 +25,6 @@ DOCS_DEFINE_TARGET(HTMLHELP, ALL, [HTML Help versions], [htmlhelp]) DOCS_DEFINE_TARGET(HTMLMAN, ALL, [HTML versions of the manpages], [htmlman]) DOCS_DEFINE_TARGET(MANPAGES, ALL, [manpages], [manpages]) DOCS_DEFINE_TARGET(VALIDATE, ALL, [validating docbook output], []) -DOCS_DEFINE_TARGET(TXT, HTML, [text versions], [txt]) if test x"$TARGETS" = x; then AC_MSG_ERROR([You won't be able to build any of the docs]) diff --git a/script/autobuild.py b/script/autobuild.py index 1d63111f992..0ab04eb7c26 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -126,7 +126,8 @@ builddirs = { "talloc": "lib/talloc", "replace": "lib/replace", "tevent": "lib/tevent", - "pidl": "pidl" + "pidl": "pidl", + "docs-xml": "docs-xml" } ctdb_configure_params = " --enable-developer ${PREFIX}" @@ -190,6 +191,14 @@ tasks = { ("clean", "make clean"), ], + "docs-xml": [ + ("random-sleep", random_sleep(300, 900)), + ("autoconf", "autoconf"), + ("configure", "./configure"), + ("make", "make html htmlman"), + ("clean", "make clean"), + ], + # We have 'test' before 'install' because, 'test' should work without 'install (runs all the other envs)' "samba": [ ("random-sleep", random_sleep(300, 900)), -- 2.34.1