[Git][NTPsec/ntpsec][master] Add option to force documentation install path

Amar Takhar gitlab at mg.gitlab.com
Mon Nov 23 18:34:25 UTC 2015


Amar Takhar pushed to branch master at NTPsec / ntpsec


Commits:
627e1fe8 by Amar Takhar at 2015-11-23T13:33:37Z
Add option to force documentation install path

  * Move all documentation options to their own group.

- - - - -


3 changed files:

- docs/wscript
- pylib/configure.py
- wscript


Changes:

=====================================
docs/wscript
=====================================
--- a/docs/wscript
+++ b/docs/wscript
@@ -37,7 +37,10 @@ def build(ctx):
 
 
 	# Install docs
-	install_prefix = "%s/share/ntpsec/docs/" % ctx.env.PREFIX
+	if ctx.env.PATH_DOC:
+		install_prefix = ctx.env.PATH_DOC
+	else:
+		install_prefix = "%s/share/ntpsec/docs/" % ctx.env.PREFIX
 
 	ctx.install_files(install_prefix, extra + [x.change_ext(".html").name for x in doc_source])
 	ctx.install_files(install_prefix, image_source, relative_trick=True)


=====================================
pylib/configure.py
=====================================
--- a/pylib/configure.py
+++ b/pylib/configure.py
@@ -88,6 +88,7 @@ def cmd_configure(ctx):
 		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
+		ctx.env.PATH_DOC = ctx.options.path_doc
 
 	# 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
@@ -40,15 +40,11 @@ def options(ctx):
 	grp = ctx.add_option_group("NTP build options")
 	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.")
 	grp.add_option('--disable-dns-lookup', action='store_true', default=False, help="Disable DNS lookups.")
 	grp.add_option('--disable-dns-retry', action='store_true', default=False, help="Disable DNS lookups.")
 	grp.add_option('--disable-mdns-registration', action='store_true', default=False, help="Disable DNS lookups.")
-	grp.add_option('--disable-manpage', action='store_true', default=False, help="Disable Manpage building.")
 
 
 	grp = ctx.add_option_group("NTP features")
@@ -69,6 +65,12 @@ def options(ctx):
 	grp.add_option('--fortify-flags', type='string', action='store', help="Fortify flags.")
 	grp.add_option('--check', action='store_true', default=False, help="Run tests")
 
+	grp = ctx.add_option_group("NTP documentation options")
+	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('--disable-manpage', action='store_true', default=False, help="Disable Manpage building.")
+	grp.add_option('--path-doc', type='string', action='store', default=None, help="Force doc install directory.")
 
 
 def configure(ctx):



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


More information about the vc mailing list