[Git][NTPsec/ntpsec][master] Check for xsltproc in order to build manpages / docs.

Amar Takhar gitlab at mg.gitlab.com
Wed Mar 23 15:37:21 UTC 2016


Amar Takhar pushed to branch master at NTPsec / ntpsec


Commits:
dc3fe2f1 by Amar Takhar at 2016-03-23T11:09:23-04:00
Check for xsltproc in order to build manpages / docs.

- - - - -


2 changed files:

- pylib/configure.py
- pylib/waf.py


Changes:

=====================================
pylib/configure.py
=====================================
--- a/pylib/configure.py
+++ b/pylib/configure.py
@@ -67,9 +67,10 @@ def cmd_configure(ctx, config):
 	# used to make man and html pages
 	ctx.find_program("asciidoc", var="BIN_ASCIIDOC", mandatory=False)
 	ctx.find_program("a2x", var="BIN_A2X", mandatory=False)
+	ctx.find_program("xsltproc", var="BIN_XSLTPROC", mandatory=False)
 
-	if (ctx.options.enable_doc or ctx.options.enable_doc_only) and not ctx.env.BIN_ASCIIDOC:
-		ctx.fatal("asciidoc is required in order to build documentation")
+	if (ctx.options.enable_doc or ctx.options.enable_doc_only) and not ctx.env.BIN_ASCIIDOC and not BIN_XSLTPROC:
+		ctx.fatal("asciidoc and xsltproc are required in order to build documentation")
 	elif (ctx.options.enable_doc or ctx.options.enable_doc_only):
 		ctx.env.ASCIIDOC_FLAGS = ["-f", "%s/docs/asciidoc.conf" % ctx.srcnode.abspath()]
 		ctx.env.ENABLE_DOC = True
@@ -569,7 +570,7 @@ def cmd_configure(ctx, config):
 	msg_setting("PREFIX", ctx.env.PREFIX)
 	msg_setting("Debug Support", yesno(not ctx.options.disable_debug))
 	msg_setting("Refclocks", ", ".join(ctx.env.REFCLOCK_LIST))
-	msg_setting("Build Manpages", yesno(ctx.env.BIN_A2X and not ctx.env.DISABLE_MANPAGE))
+	msg_setting("Build Manpages", yesno((ctx.env.BIN_XSLTPROC and ctx.env.BIN_A2X) and not ctx.env.DISABLE_MANPAGE))
 
 	if ctx.options.enable_debug:
 		msg("")


=====================================
pylib/waf.py
=====================================
--- a/pylib/waf.py
+++ b/pylib/waf.py
@@ -60,7 +60,7 @@ def manpage(ctx, section, source):
 		ctx.install_files("${PREFIX}/man%s/" % section, source.replace("-man.txt", ".%s" % section))
 		return
 
-	if (not ctx.env.BIN_A2X) or ctx.env.DISABLE_MANPAGE:
+	if (not ctx.env.BIN_A2X and not BIN_XSLTPROC) or ctx.env.DISABLE_MANPAGE:
 		return
 
 	ctx(



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/dc3fe2f1a04c92c73affffca2a4d4270dd2cf46e
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160323/31627ab5/attachment.html>


More information about the vc mailing list