[Git][NTPsec/ntpsec][master] Add support for installing documentation.
Amar Takhar
gitlab at mg.gitlab.com
Mon Nov 23 17:11:31 UTC 2015
Amar Takhar pushed to branch master at NTPsec / ntpsec
Commits:
300a3768 by Amar Takhar at 2015-11-23T12:10:48Z
Add support for installing documentation.
* Docs go into $PREFIX/share/ntpsec/docs/
- - - - -
1 changed file:
- docs/wscript
Changes:
=====================================
docs/wscript
=====================================
--- a/docs/wscript
+++ b/docs/wscript
@@ -9,26 +9,35 @@ def build(ctx):
source = doc_source
)
+ image_source = []
ctx.path.get_bld().make_node("hints").mkdir() # create 'hints' directory
for dir in ["icons", "pic"]:
files = ctx.path.ant_glob('%s/*' % dir) # Find images
ctx.path.get_bld().make_node(dir).mkdir() # create 'pic' directory
+ image_source += files
- # Copy images
- ctx(
- features = "subst",
- is_copy = True,
- source = files,
- target = [ctx.path.find_node(dir).get_bld().make_node(x.name) for x in files]
- )
+ # Copy images
+ ctx(
+ features = "subst",
+ is_copy = True,
+ source = image_source,
+ target = [ctx.path.find_node(dir).get_bld().make_node(x.name) for x in image_source]
+ )
+ extra = ["asciidoc.js"]
# Copy extra files
ctx(
features = "subst",
is_copy = True,
- source = ["asciidoc.js"],
- target = ["asciidoc.js"]
+ source = extra,
+ target = extra
)
+
+ # Install docs
+ 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)
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/300a376885cbcd2b97d2f0698da93bbf2f01d1d0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20151123/7d085c3f/attachment.html>
More information about the vc
mailing list