Add docs build to CI
authorAndrew Bartlett <abartlet@samba.org>
Wed, 3 Jun 2020 00:33:50 +0000 (12:33 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 10 Jun 2020 07:11:59 +0000 (07:11 +0000)
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 <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jun 10 07:11:59 UTC 2020 on sn-devel-184

.gitlab-ci.yml
docs-xml/Makefile
docs-xml/Makefile.settings.in
docs-xml/README
docs-xml/configure.ac
script/autobuild.py

index 7177d3b5c444c591199a50031f1969f8b55199f9..68e1a52bf1eddb776ed72fca433e0204648363d1 100644 (file)
@@ -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
index 769e46bdde6bb616775d7357b9f1c67e2a2590ba..c614097f6c0ecd2b43a9dd72874903a880d6d7a2 100644 (file)
@@ -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))" >> $@
index b619292c88ca8d5434c8064122a8c8cd5f3bd735..7898b6bb4d035f88fbf30b850e792cfc3b73da5a 100644 (file)
@@ -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@
 
index a1caae3d9b5ecf2e763e9050c46dc18d5c04cb94..4affbeec5384e9d1cb5d28dd7ec1d483d0dee637 100644 (file)
@@ -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. 
index 196ab883def8d1bf5b87d095fa45835702e196c6..aaec457d817202fd8f6cae3339422802ac6ffb32 100644 (file)
@@ -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])
index 1d63111f992bffcacd80ab274e7d92fcb99c9fbc..0ab04eb7c26778d9c4f76829af991c595a7ef7f1 100755 (executable)
@@ -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)),