diff options
Diffstat (limited to 'BuildTools')
-rw-r--r-- | BuildTools/DocBook/SCons/DocBook.py | 10 | ||||
-rw-r--r-- | BuildTools/SCons/SConstruct | 14 |
2 files changed, 22 insertions, 2 deletions
diff --git a/BuildTools/DocBook/SCons/DocBook.py b/BuildTools/DocBook/SCons/DocBook.py index eb6473a..be3d4f6 100644 --- a/BuildTools/DocBook/SCons/DocBook.py +++ b/BuildTools/DocBook/SCons/DocBook.py @@ -10,8 +10,14 @@ def generate(env) : docbook_dir = "#/BuildTools/DocBook" docbook_xsl_style_dir = env.Dir(docbook_dir + "/Stylesheets").abspath docbook_xml_catalog = env.File("catalog.xml").abspath - docbook_xml_dir = env.Dir("#/3rdParty/DocBook/XML").abspath - docbook_xsl_dir = env.Dir("#/3rdParty/DocBook/XSL").abspath + if "DOCBOOK_XML_DIR" in env : + docbook_xml_dir = env.Dir("$DOCBOOK_XML_DIR").abspath + else : + docbook_xml_dir = env.Dir("#/3rdParty/DocBook/XML").abspath + if "DOCBOOK_XSL_DIR" in env : + docbook_xsl_dir = env.Dir("$DOCBOOK_XSL_DIR").abspath + else : + docbook_xsl_dir = env.Dir("#/3rdParty/DocBook/XSL").abspath fop_fonts_dir = env.Dir(docbook_dir + "/Fonts").abspath # Generates a catalog from paths to external tools diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct index c3ad8d1..0a76ddf 100644 --- a/BuildTools/SCons/SConstruct +++ b/BuildTools/SCons/SConstruct @@ -29,6 +29,8 @@ if os.name == "nt" : vars.Add(PackageVariable("bonjour", "Bonjour SDK location", "yes")) vars.Add(PackageVariable("openssl", "OpenSSL location", "yes")) vars.Add(PathVariable("qt", "Qt location", "", PathVariable.PathAccept)) +vars.Add(PathVariable("docbook_xml", "DocBook XML", None, PathVariable.PathAccept)) +vars.Add(PathVariable("docbook_xsl", "DocBook XSL", None, PathVariable.PathAccept)) ################################################################################ # Set up default build & configure environment @@ -404,6 +406,18 @@ elif env.get("bonjour", False) : env["BONJOUR_FLAGS"]["LIBS"] = ["dnssd"] bonjour_conf.Finish() + +################################################################################ +# DocBook setup +################################################################################ + +if env.get("docbook_xml") : + env["DOCBOOK_XML_DIR"] = env["docbook_xml"] +if env.get("docbook_xsl") : + env["DOCBOOK_XSL_DIR"] = env["docbook_xsl"] +print env["DOCBOOK_XSL_DIR"] + + ################################################################################ # Set up git hooks ################################################################################ |