[Git][NTPsec/ntpsec][master] Add option for only building documentation.

Amar Takhar gitlab at mg.gitlab.com
Mon Nov 23 16:41:35 UTC 2015


Amar Takhar pushed to branch master at NTPsec / ntpsec


Commits:
c7f10b57 by Amar Takhar at 2015-11-23T11:40:22Z
Add option for only building documentation.

- - - - -


2 changed files:

- pylib/configure.py
- wscript


Changes:

=====================================
pylib/configure.py
=====================================
--- a/pylib/configure.py
+++ b/pylib/configure.py
@@ -82,11 +82,12 @@ def cmd_configure(ctx):
 	ctx.find_program("asciidoc", var="BIN_ASCIIDOC", mandatory=False)
 	ctx.find_program("a2x", var="BIN_A2X", mandatory=False)
 
-	if ctx.options.enable_doc and not ctx.env.BIN_ASCIIDOC:
+	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")
-	elif ctx.options.enable_doc:
+	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
+		ctx.env.ENABLE_DOC_ONLY = ctx.options.enable_doc_only
 
 	# XXX: conditionally build this with --disable-man?  Should it build without docs enabled?
 	ctx.env.A2X_FLAGS = ["--format", "manpage", "--asciidoc-opts=--conf-file=%s/docs/asciidoc.conf" % ctx.srcnode.abspath()]


=====================================
wscript
=====================================
--- a/wscript
+++ b/wscript
@@ -41,6 +41,7 @@ def options(ctx):
 	grp.add_option('--enable-debug', action='store_true', default=False, help="Enable debugging code")
 	grp.add_option('--enable-debug-gdb', action='store_true', default=False, help="Enable GDB debugging symbols")
 	grp.add_option('--enable-doc', action='store_true', default=False, help="Build NTP documentation")
+	grp.add_option('--enable-doc-only', action='store_true', default=False, help="Only build NTP documentation")
 	grp.add_option('--enable-a2x-xmllint', action='store_true', default=False, help="Build NTP documentation with a2x XML lint")
 	grp.add_option('--enable-crypto', action='store_true', default=False, help="Enable OpenSSL.")
 	grp.add_option('--disable-droproot', action='store_true', default=False, help="Disable dropping root.")
@@ -122,6 +123,9 @@ def build(ctx):
 	if ctx.env.ENABLE_DOC:
 		ctx.recurse("docs")
 
+	if ctx.env.ENABLE_DOC_ONLY:
+		return
+
 	ctx.recurse("libisc")
 	if ctx.env.REFCLOCK_PARSE: # Only required by the parse refclock
 		ctx.recurse("libparse")



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/c7f10b57905f0c22f6378c22c2fa0588ff60458f
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20151123/0f08fe7e/attachment.html>


More information about the vc mailing list