[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-dev] [PATCH] Added option to disable build of documentation.
From: |
Andrey Mazo |
Subject: |
[gpsd-dev] [PATCH] Added option to disable build of documentation. |
Date: |
Thu, 26 Sep 2013 21:08:52 +0400 |
Documentation has little use when cross-compiling for an embedded system.
But xsltproc and/or xmlto may still be available on a build machine
which triggers the documentation build.
So added an option to forcefully disable build of documentation even if
xsltproc and/or xmlto are present.
Signed-off-by: Andrey Mazo <address@hidden>
diff --git a/SConstruct b/SConstruct
index e79c0da..456b047 100644
--- a/SConstruct
+++ b/SConstruct
@@ -155,6 +155,7 @@ boolopts = (
("coveraging", False, "build with code coveraging enabled"),
("strip", True, "build with stripping of binaries enabled"),
("chrpath", True, "use chrpath to edit library load paths"),
+ ("manbuild", True, "build help in man and HTML formats"),
)
for (name, default, help) in boolopts:
opts.Add(BoolVariable(name, help, default))
@@ -642,18 +643,21 @@ size_t strlcpy(/address@hidden@*/char *dst,
/address@hidden@*/const char *src, size_t size);
manbuilder = mangenerator = htmlbuilder = None
-if config.CheckXsltproc():
- mangenerator = 'xsltproc'
- build = "xsltproc --nonet %s $SOURCE >$TARGET"
- htmlbuilder = build % docbook_html_uri
- manbuilder = build % docbook_man_uri
-elif WhereIs("xmlto"):
- mangenerator = 'xmlto'
- xmlto = "xmlto %s $SOURCE || mv `basename $TARGET` `dirname $TARGET`"
- htmlbuilder = xmlto % "html-nochunks"
- manbuilder = xmlto % "man"
+if env['manbuild']:
+ if config.CheckXsltproc():
+ mangenerator = 'xsltproc'
+ build = "xsltproc --nonet %s $SOURCE >$TARGET"
+ htmlbuilder = build % docbook_html_uri
+ manbuilder = build % docbook_man_uri
+ elif WhereIs("xmlto"):
+ mangenerator = 'xmlto'
+ xmlto = "xmlto %s $SOURCE || mv `basename $TARGET` `dirname $TARGET`"
+ htmlbuilder = xmlto % "html-nochunks"
+ manbuilder = xmlto % "man"
+ else:
+ announce("Neither xsltproc nor xmlto found, documentation cannot be
built.")
else:
- announce("Neither xsltproc nor xmlto found, documentation cannot be
built.")
+ announce("Build of man and HTML documentation is disabled.")
if manbuilder:
env['BUILDERS']["Man"] = Builder(action=manbuilder)
env['BUILDERS']["HTML"] = Builder(action=htmlbuilder,
--
1.8.1.5
- [gpsd-dev] [PATCH] Added option to disable build of documentation.,
Andrey Mazo <=