summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool/docbook
diff options
context:
space:
mode:
authorDirk Baechle <dl9obn@darc.de>2013-05-03 23:17:54 (GMT)
committerDirk Baechle <dl9obn@darc.de>2013-05-03 23:17:54 (GMT)
commit2fbab041df44f30a342fc7c0b43bb0808638c7e0 (patch)
treed0af9a1d5bab726ac6f3a402b2bd715f36fb969c /src/engine/SCons/Tool/docbook
parent0947775a51fa7bdb446b40c08f417fe6ce1ebbdc (diff)
downloadSCons-2fbab041df44f30a342fc7c0b43bb0808638c7e0.zip
SCons-2fbab041df44f30a342fc7c0b43bb0808638c7e0.tar.gz
SCons-2fbab041df44f30a342fc7c0b43bb0808638c7e0.tar.bz2
- added documentation and tests for the new Docbook tool
Diffstat (limited to 'src/engine/SCons/Tool/docbook')
-rw-r--r--src/engine/SCons/Tool/docbook/__init__.xml576
-rw-r--r--src/engine/SCons/Tool/docbook/test/basedir/htmlchunked/image/SConstruct3
-rw-r--r--src/engine/SCons/Tool/docbook/test/basedir/htmlchunked/image/html.xsl56
-rw-r--r--src/engine/SCons/Tool/docbook/test/basedir/htmlchunked/image/manual.xml388
-rw-r--r--src/engine/SCons/Tool/docbook/test/basedir/htmlchunked/sconstest-htmlchunked.py50
-rw-r--r--src/engine/SCons/Tool/docbook/test/basedir/htmlhelp/image/SConstruct3
-rw-r--r--src/engine/SCons/Tool/docbook/test/basedir/htmlhelp/image/htmlhelp.xsl56
-rw-r--r--src/engine/SCons/Tool/docbook/test/basedir/htmlhelp/image/manual.xml388
-rw-r--r--src/engine/SCons/Tool/docbook/test/basedir/htmlhelp/sconstest-htmlhelp.py54
-rw-r--r--src/engine/SCons/Tool/docbook/test/basedir/slideshtml/image/SConstruct3
-rw-r--r--src/engine/SCons/Tool/docbook/test/basedir/slideshtml/image/slides.xsl56
-rw-r--r--src/engine/SCons/Tool/docbook/test/basedir/slideshtml/image/virt.xml33
-rw-r--r--src/engine/SCons/Tool/docbook/test/basedir/slideshtml/sconstest-slideshtml.py56
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/html/image/SConstruct3
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/html/image/manual.xml388
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/html/sconstest-html.py50
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/htmlchunked/image/SConstruct3
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/htmlchunked/image/manual.xml388
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/htmlchunked/sconstest-htmlchunked.py50
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/htmlhelp/image/SConstruct3
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/htmlhelp/image/manual.xml388
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/htmlhelp/sconstest-htmlhelp.py54
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/man/image/SConstruct3
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/man/image/refdb.xml82
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/man/sconstest-man.py52
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/pdf/image/SConstruct3
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/pdf/image/manual.xml388
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/pdf/sconstest-pdf.py52
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/slideshtml/image/SConstruct3
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/slideshtml/image/virt.xml33
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/slideshtml/sconstest-slideshtml.py56
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/slidespdf/image/SConstruct3
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/slidespdf/image/virt.xml33
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/slidespdf/sconstest-slidespdf.py52
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/xinclude/image/SConstruct3
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/xinclude/image/include.txt1
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/xinclude/image/manual.xml45
-rw-r--r--src/engine/SCons/Tool/docbook/test/basic/xinclude/sconstest-xinclude.py52
-rw-r--r--src/engine/SCons/Tool/docbook/test/dependencies/xinclude/image/SConstruct3
-rw-r--r--src/engine/SCons/Tool/docbook/test/dependencies/xinclude/image/include.txt1
-rw-r--r--src/engine/SCons/Tool/docbook/test/dependencies/xinclude/image/manual.xml45
-rw-r--r--src/engine/SCons/Tool/docbook/test/dependencies/xinclude/sconstest-xinclude.py58
-rw-r--r--src/engine/SCons/Tool/docbook/test/rootname/htmlchunked/image/SConstruct3
-rw-r--r--src/engine/SCons/Tool/docbook/test/rootname/htmlchunked/image/html.xsl56
-rw-r--r--src/engine/SCons/Tool/docbook/test/rootname/htmlchunked/image/manual.xml388
-rw-r--r--src/engine/SCons/Tool/docbook/test/rootname/htmlchunked/sconstest-htmlchunked.py50
-rw-r--r--src/engine/SCons/Tool/docbook/test/rootname/htmlhelp/image/SConstruct3
-rw-r--r--src/engine/SCons/Tool/docbook/test/rootname/htmlhelp/image/htmlhelp.xsl56
-rw-r--r--src/engine/SCons/Tool/docbook/test/rootname/htmlhelp/image/manual.xml388
-rw-r--r--src/engine/SCons/Tool/docbook/test/rootname/htmlhelp/sconstest-htmlhelp.py54
-rw-r--r--src/engine/SCons/Tool/docbook/test/rootname/slideshtml/image/SConstruct3
-rw-r--r--src/engine/SCons/Tool/docbook/test/rootname/slideshtml/image/slides.xsl56
-rw-r--r--src/engine/SCons/Tool/docbook/test/rootname/slideshtml/image/virt.xml33
-rw-r--r--src/engine/SCons/Tool/docbook/test/rootname/slideshtml/sconstest-slideshtml.py56
54 files changed, 576 insertions, 4587 deletions
diff --git a/src/engine/SCons/Tool/docbook/__init__.xml b/src/engine/SCons/Tool/docbook/__init__.xml
new file mode 100644
index 0000000..be2f2ca
--- /dev/null
+++ b/src/engine/SCons/Tool/docbook/__init__.xml
@@ -0,0 +1,576 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+__COPYRIGHT__
+
+This file is processed by the bin/SConsDoc.py module.
+See its __doc__ string for a discussion of the format.
+-->
+
+<!DOCTYPE sconsdoc [
+<!ENTITY % scons SYSTEM '../../../../../doc/scons.mod'>
+%scons;
+<!ENTITY % builders-mod SYSTEM '../../../../../doc/generated/builders.mod'>
+%builders-mod;
+<!ENTITY % functions-mod SYSTEM '../../../../../doc/generated/functions.mod'>
+%functions-mod;
+<!ENTITY % tools-mod SYSTEM '../../../../../doc/generated/tools.mod'>
+%tools-mod;
+<!ENTITY % variables-mod SYSTEM '../../../../../doc/generated/variables.mod'>
+%variables-mod;
+]>
+
+<sconsdoc xmlns="http://www.scons.org/dbxsd/v1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0/scons.xsd scons.xsd">
+
+<tool name="docbook">
+<summary>
+<para>This tool tries to make working with Docbook in SCons a little easier.
+It provides several toolchains for creating different output formats,
+like HTML or PDF. Contained in the package is
+a distribution of the Docbook XSL stylesheets as of version 1.76.1.
+As long as you don't specify your own stylesheets for customization,
+these official versions are picked as default...which should reduce
+the inevitable setup hassles for you.
+</para>
+<para>Implicit dependencies to images and XIncludes are detected automatically
+if you meet the HTML requirements. The additional
+stylesheet <filename>utils/xmldepend.xsl</filename> by Paul DuBois is used for this purpose.
+</para>
+<para>Note, that there is no support for XML catalog resolving offered! This tool calls
+the XSLT processors and PDF renderers with the stylesheets you specified, that's it.
+The rest lies in your hands and you still have to know what you're doing when
+resolving names via a catalog.
+</para>
+<para>For activating the tool "docbook", you have to add its name to the Environment constructor,
+like this
+</para>
+<screen>env = Environment(tools=['docbook'])
+</screen>
+<para>On its startup, the Docbook tool tries to find a required <literal>xsltproc</literal> processor, and
+a PDF renderer, e.g. <literal>fop</literal>. So make sure that these are added to your system's environment
+<literal>PATH</literal> and can be called directly, without specifying their full path.
+</para>
+<para>For the most basic processing of Docbook to HTML, you need to have installed
+</para>
+<itemizedlist><listitem><para>the Python <literal>lxml</literal> binding to <literal>libxml2</literal>, or
+</para>
+</listitem>
+<listitem><para>the direct Python bindings for <literal>libxml2/libxslt</literal>, or
+</para>
+</listitem>
+<listitem><para>a standalone XSLT processor, currently detected are <literal>xsltproc</literal>, <literal>saxon</literal>, <literal>saxon-xslt</literal>
+and <literal>xalan</literal>.
+</para>
+</listitem>
+</itemizedlist>
+<para>Rendering to PDF requires you to have one of the applications
+<literal>fop</literal> or <literal>xep</literal> installed.
+</para>
+
+<para>Creating a HTML or PDF document is very simple and straightforward. Say
+</para>
+<screen>env = Environment(tools=['docbook'])
+env.DocbookHtml('manual.html', 'manual.xml')
+env.DocbookPdf('manual.pdf', 'manual.xml')
+</screen>
+<para>to get both outputs from your XML source <filename>manual.xml</filename>. As a shortcut, you can
+give the stem of the filenames alone, like this:
+</para>
+<screen>env = Environment(tools=['docbook'])
+env.DocbookHtml('manual')
+env.DocbookPdf('manual')
+</screen>
+<para>and get the same result. Target and source lists are also supported:
+</para>
+<screen>env = Environment(tools=['docbook'])
+env.DocbookHtml(['manual.html','reference.html'], ['manual.xml','reference.xml'])
+</screen>
+<para>or even
+</para>
+<screen>env = Environment(tools=['docbook'])
+env.DocbookHtml(['manual','reference'])
+</screen>
+<important><para>Whenever you leave out the list of sources, you may not specify a file extension! The
+Tool uses the given names as file stems, and adds the suffixes for target and source files
+accordingly.
+</para>
+</important>
+<para>The rules given above are valid for the Builders &b-link-DocbookHtml;,
+&b-link-DocbookPdf;, &b-link-DocbookSlidesPdf; and &b-link-DocbookXInclude;. For the
+&b-link-DocbookMan; transformation you
+can specify a target name, but the actual output names are automatically
+set from the <literal>refname</literal> entries in your XML source.
+</para>
+
+<para>The Builders &b-link-DocbookHtmlChunked;, &b-link-DocbookHtmlhelp; and
+&b-link-DocbookSlidesHtml; are special, in that:
+</para>
+<orderedlist><listitem><para>they create a large set of files, where the exact names and their number depend
+on the content of the source file, and
+</para>
+</listitem>
+<listitem><para>the main target is always named <filename>index.html</filename>, i.e. the output name for the
+XSL transformation is not picked up by the stylesheets.
+</para>
+</listitem>
+</orderedlist>
+<para>As a result, there is simply no use in specifying a target HTML name.
+So the basic syntax for these builders is always:
+</para>
+<screen>env = Environment(tools=['docbook'])
+env.DocbookHtmlhelp('manual')
+</screen>
+
+<para>If you want to use a specific XSL file, you can set the
+additional <literal>xsl</literal> parameter to your
+Builder call as follows:
+</para>
+<screen>env.DocbookHtml('other.html', 'manual.xml', xsl='html.xsl')
+</screen>
+<para>Since this may get tedious if you always use the same local naming for your customized XSL files,
+e.g. <filename>html.xsl</filename> for HTML and <filename>pdf.xsl</filename> for PDF output, a set of
+variables for setting the default XSL name is provided. These are:
+</para>
+<screen>DOCBOOK_DEFAULT_XSL_HTML
+DOCBOOK_DEFAULT_XSL_HTMLCHUNKED
+DOCBOOK_DEFAULT_XSL_HTMLHELP
+DOCBOOK_DEFAULT_XSL_PDF
+DOCBOOK_DEFAULT_XSL_MAN
+DOCBOOK_DEFAULT_XSL_SLIDESPDF
+DOCBOOK_DEFAULT_XSL_SLIDESHTML
+</screen>
+<para>and you can set them when constructing your environment:
+</para>
+<screen>env = Environment(tools=['docbook'],
+ DOCBOOK_DEFAULT_XSL_HTML='html.xsl',
+ DOCBOOK_DEFAULT_XSL_PDF='pdf.xsl')
+env.DocbookHtml('manual') # now uses html.xsl
+</screen>
+</summary>
+<sets>
+<item>DOCBOOK_DEFAULT_XSL_HTML</item>
+<item>DOCBOOK_DEFAULT_XSL_HTMLCHUNKED</item>
+<item>DOCBOOK_DEFAULT_XSL_HTMLHELP</item>
+<item>DOCBOOK_DEFAULT_XSL_PDF</item>
+<item>DOCBOOK_DEFAULT_XSL_MAN</item>
+<item>DOCBOOK_DEFAULT_XSL_SLIDESPDF</item>
+<item>DOCBOOK_DEFAULT_XSL_SLIDESHTML</item>
+<item>DOCBOOK_XSLTPROC</item>
+<item>DOCBOOK_XMLLINT</item>
+<item>DOCBOOK_FOP</item>
+<item>DOCBOOK_XSLTPROCFLAGS</item>
+<item>DOCBOOK_XMLLINTFLAGS</item>
+<item>DOCBOOK_FOPFLAGS</item>
+<item>DOCBOOK_XSLTPROCPARAMS</item>
+<item>DOCBOOK_XSLTPROCCOM</item>
+<item>DOCBOOK_XMLLINTCOM</item>
+<item>DOCBOOK_FOPCOM</item>
+</sets>
+<uses>
+<item>DOCBOOK_XSLTPROCCOMSTR</item>
+<item>DOCBOOK_XMLLINTCOMSTR</item>
+<item>DOCBOOK_FOPCOMSTR</item>
+</uses>
+</tool>
+
+
+<cvar name="DOCBOOK_DEFAULT_XSL_HTML">
+<summary>
+<para>
+The default XSLT file for the &b-link-DocbookHtml; builder within the
+current environment, if no other XSLT gets specified via keyword.
+</para>
+</summary>
+</cvar>
+
+
+<cvar name="DOCBOOK_DEFAULT_XSL_HTMLCHUNKED">
+<summary>
+<para>
+The default XSLT file for the &b-link-DocbookHtmlChunked; builder within the
+current environment, if no other XSLT gets specified via keyword.
+</para>
+</summary>
+</cvar>
+
+<cvar name="DOCBOOK_DEFAULT_XSL_HTMLHELP">
+<summary>
+<para>
+The default XSLT file for the &b-link-DocbookHtmlhelp; builder within the
+current environment, if no other XSLT gets specified via keyword.
+</para>
+</summary>
+</cvar>
+
+<cvar name="DOCBOOK_DEFAULT_XSL_PDF">
+<summary>
+<para>
+The default XSLT file for the &b-link-DocbookPdf; builder within the
+current environment, if no other XSLT gets specified via keyword.
+</para>
+</summary>
+</cvar>
+
+<cvar name="DOCBOOK_DEFAULT_XSL_MAN">
+<summary>
+<para>
+The default XSLT file for the &b-link-DocbookMan; builder within the
+current environment, if no other XSLT gets specified via keyword.
+</para>
+</summary>
+</cvar>
+
+<cvar name="DOCBOOK_DEFAULT_XSL_SLIDESPDF">
+<summary>
+<para>
+The default XSLT file for the &b-link-DocbookSlidesPdf; builder within the
+current environment, if no other XSLT gets specified via keyword.
+</para>
+</summary>
+</cvar>
+
+<cvar name="DOCBOOK_DEFAULT_XSL_SLIDESHTML">
+<summary>
+<para>
+The default XSLT file for the &b-link-DocbookSlidesHtml; builder within the
+current environment, if no other XSLT gets specified via keyword.
+</para>
+</summary>
+</cvar>
+
+<cvar name="DOCBOOK_XSLTPROC">
+<summary>
+<para>
+The path to the external executable <literal>xsltproc</literal>
+(or <literal>saxon</literal>, <literal>xalan</literal>), if one of them
+is installed.
+Note, that this is only used as last fallback for XSL transformations, if
+no libxml2 or lxml Python binding can be imported in the current system.
+</para>
+</summary>
+</cvar>
+
+<cvar name="DOCBOOK_XMLLINT">
+<summary>
+<para>
+The path to the external executable <literal>xmllint</literal>, if it's installed.
+Note, that this is only used as last fallback for resolving
+XIncludes, if no libxml2 or lxml Python binding can be imported
+in the current system.
+</para>
+</summary>
+</cvar>
+
+<cvar name="DOCBOOK_FOP">
+<summary>
+<para>
+The path to the PDF renderer <literal>fop</literal> or <literal>xep</literal>,
+if one of them is installed (<literal>fop</literal> gets checked first).
+</para>
+</summary>
+</cvar>
+
+<cvar name="DOCBOOK_XSLTPROCFLAGS">
+<summary>
+<para>
+Additonal command-line flags for the external executable
+<literal>xsltproc</literal> (or <literal>saxon</literal>,
+<literal>xalan</literal>).
+</para>
+</summary>
+</cvar>
+
+<cvar name="DOCBOOK_XMLLINTFLAGS">
+<summary>
+<para>
+Additonal command-line flags for the external executable
+<literal>xmllint</literal>.
+</para>
+</summary>
+</cvar>
+
+<cvar name="DOCBOOK_FOPFLAGS">
+<summary>
+<para>
+Additonal command-line flags for the
+PDF renderer <literal>fop</literal> or <literal>xep</literal>.
+</para>
+</summary>
+</cvar>
+
+<cvar name="DOCBOOK_XSLTPROCPARAMS">
+<summary>
+<para>
+Additonal parameters that are not intended for the XSLT processor executable, but
+the XSL processing itself. By default, they get appended at the end of the command line
+for <literal>saxon</literal> and <literal>saxon-xslt</literal>, respectively.
+</para>
+</summary>
+</cvar>
+
+<cvar name="DOCBOOK_XSLTPROCCOM">
+<summary>
+<para>
+The full command-line for the external executable
+<literal>xsltproc</literal> (or <literal>saxon</literal>,
+<literal>xalan</literal>).
+</para>
+</summary>
+</cvar>
+
+<cvar name="DOCBOOK_XMLLINTCOM">
+<summary>
+<para>
+The full command-line for the external executable
+<literal>xmllint</literal>.
+</para>
+</summary>
+</cvar>
+
+<cvar name="DOCBOOK_FOPCOM">
+<summary>
+<para>
+The full command-line for the
+PDF renderer <literal>fop</literal> or <literal>xep</literal>.
+</para>
+</summary>
+</cvar>
+
+<cvar name="DOCBOOK_XSLTPROCCOMSTR">
+<summary>
+<para>
+The string displayed when <literal>xsltproc</literal> is used to transform
+an XML file via a given XSLT stylesheet.
+</para>
+</summary>
+</cvar>
+
+<cvar name="DOCBOOK_XMLLINTCOMSTR">
+<summary>
+<para>
+The string displayed when <literal>xmllint</literal> is used to resolve
+XIncludes for a given XML file.
+</para>
+</summary>
+</cvar>
+
+<cvar name="DOCBOOK_FOPCOMSTR">
+<summary>
+<para>
+The string displayed when a renderer like <literal>fop</literal> or
+<literal>xep</literal> is used to create PDF output from an XML file.
+</para>
+</summary>
+</cvar>
+
+<builder name="DocbookHtml">
+<summary>
+<para>
+A pseudo-Builder, providing a Docbook toolchain for HTML output.
+</para>
+<example_commands>env = Environment(tools=['docbook'])
+env.DocbookHtml('manual.html', 'manual.xml')
+</example_commands>
+<para>
+or simply
+</para>
+<example_commands>env = Environment(tools=['docbook'])
+env.DocbookHtml('manual')
+</example_commands>
+</summary>
+</builder>
+
+<builder name="DocbookHtmlChunked">
+<summary>
+<para>
+A pseudo-Builder, providing a Docbook toolchain for chunked HTML output.
+It supports the <literal>base.dir</literal> parameter. The
+<filename>chunkfast.xsl</filename> file (requires &quot;EXSLT&quot;) is used as the
+default stylesheet. Basic syntax:
+</para>
+
+<example_commands>env = Environment(tools=['docbook'])
+env.DocbookHtmlChunked('manual')
+</example_commands>
+<para>
+where <filename>manual.xml</filename> is the input file.
+</para>
+<para>If you use the <literal>root.filename</literal>
+parameter in your own stylesheets you have to specify the new target name.
+This ensures that the dependencies get correct, especially for the cleanup via <quote><literal>scons -c</literal></quote>:
+</para>
+<screen>env = Environment(tools=['docbook'])
+env.DocbookHtmlChunked('mymanual.html', 'manual', xsl='htmlchunk.xsl')
+</screen>
+<para>Some basic support for the <literal>base.dir</literal> is provided. You
+can add the <literal>base_dir</literal> keyword to your Builder
+call, and the given prefix gets prepended to all the created filenames:
+</para>
+<screen>env = Environment(tools=['docbook'])
+env.DocbookHtmlChunked('manual', xsl='htmlchunk.xsl', base_dir='output/')
+</screen>
+<para>Make sure that you don't forget the trailing slash for the base folder, else
+your files get renamed only!
+</para>
+</summary>
+</builder>
+
+<builder name="DocbookHtmlhelp">
+<summary>
+<para>
+A pseudo-Builder, providing a Docbook toolchain for HTMLHELP output.
+Its basic syntax is:
+</para>
+
+<example_commands>env = Environment(tools=['docbook'])
+env.DocbookHtmlhelp('manual')
+</example_commands>
+<para>
+where <filename>manual.xml</filename> is the input file.
+</para>
+
+<para>If you use the <literal>root.filename</literal>
+parameter in your own stylesheets you have to specify the new target name.
+This ensures that the dependencies get correct, especially for the cleanup via <quote><literal>scons -c</literal></quote>:
+</para>
+<screen>env = Environment(tools=['docbook'])
+env.DocbookHtmlhelp('mymanual.html', 'manual', xsl='htmlhelp.xsl')
+</screen>
+<para>Some basic support for the <literal>base.dir</literal> parameter
+is provided. You can add the <literal>base_dir</literal> keyword to
+your Builder call, and the given prefix gets prepended to all the
+created filenames:
+</para>
+<screen>env = Environment(tools=['docbook'])
+env.DocbookHtmlhelp('manual', xsl='htmlhelp.xsl', base_dir='output/')
+</screen>
+<para>Make sure that you don't forget the trailing slash for the base folder, else
+your files get renamed only!
+</para>
+
+</summary>
+</builder>
+
+<builder name="DocbookPdf">
+<summary>
+<para>
+A pseudo-Builder, providing a Docbook toolchain for PDF output.
+</para>
+
+<example_commands>env = Environment(tools=['docbook'])
+env.DocbookPdf('manual.pdf', 'manual.xml')
+</example_commands>
+
+<para>
+or simply
+</para>
+
+<example_commands>env = Environment(tools=['docbook'])
+env.DocbookPdf('manual')
+</example_commands>
+
+</summary>
+</builder>
+
+<builder name="DocbookMan">
+<summary>
+<para>
+A pseudo-Builder, providing a Docbook toolchain for Man page output.
+Its basic syntax is:
+</para>
+
+<example_commands>env = Environment(tools=['docbook'])
+env.DocbookMan('manual')
+</example_commands>
+<para>
+where <filename>manual.xml</filename> is the input file. Note, that
+you can specify a target name, but the actual output names are automatically
+set from the <literal>refname</literal> entries in your XML source.
+</para>
+</summary>
+</builder>
+
+<builder name="DocbookSlidesPdf">
+<summary>
+<para>
+A pseudo-Builder, providing a Docbook toolchain for PDF slides output.
+</para>
+
+<example_commands>env = Environment(tools=['docbook'])
+env.DocbookSlidesPdf('manual.pdf', 'manual.xml')
+</example_commands>
+
+<para>
+or simply
+</para>
+
+<example_commands>env = Environment(tools=['docbook'])
+env.DocbookSlidesPdf('manual')
+</example_commands>
+</summary>
+</builder>
+
+<builder name="DocbookSlidesHtml">
+<summary>
+<para>
+A pseudo-Builder, providing a Docbook toolchain for HTML slides output.
+</para>
+
+<example_commands>env = Environment(tools=['docbook'])
+env.DocbookSlidesHtml('manual')
+</example_commands>
+
+<para>If you use the <literal>titlefoil.html</literal> parameter in
+your own stylesheets you have to give the new target name. This ensures
+that the dependencies get correct, especially for the cleanup via
+<quote><literal>scons -c</literal></quote>:
+</para>
+<screen>env = Environment(tools=['docbook'])
+env.DocbookSlidesHtml('mymanual.html','manual', xsl='slideshtml.xsl')
+</screen>
+
+<para>Some basic support for the <literal>base.dir</literal> parameter
+is provided. You
+can add the <literal>base_dir</literal> keyword to your Builder
+call, and the given prefix gets prepended to all the created filenames:
+</para>
+<screen>env = Environment(tools=['docbook'])
+env.DocbookSlidesHtml('manual', xsl='slideshtml.xsl', base_dir='output/')
+</screen>
+<para>Make sure that you don't forget the trailing slash for the base folder, else
+your files get renamed only!
+</para>
+
+</summary>
+</builder>
+
+<builder name="DocbookXInclude">
+<summary>
+<para>
+A pseudo-Builder, for resolving XIncludes in a separate processing step.
+</para>
+
+<example_commands>env = Environment(tools=['docbook'])
+env.DocbookXInclude('manual_xincluded.xml', 'manual.xml')
+</example_commands>
+</summary>
+</builder>
+
+<builder name="DocbookXslt">
+<summary>
+<para>
+A pseudo-Builder, applying a given XSL transformation to the input file.
+</para>
+
+<example_commands>env = Environment(tools=['docbook'])
+env.DocbookXslt('manual_transformed.xml', 'manual.xml', xsl='transform.xslt')
+</example_commands>
+
+<para>Note, that this builder requires the <literal>xsl</literal> parameter
+to be set.
+</para>
+</summary>
+</builder>
+
+</sconsdoc>
diff --git a/src/engine/SCons/Tool/docbook/test/basedir/htmlchunked/image/SConstruct b/src/engine/SCons/Tool/docbook/test/basedir/htmlchunked/image/SConstruct
deleted file mode 100644
index 0066271..0000000
--- a/src/engine/SCons/Tool/docbook/test/basedir/htmlchunked/image/SConstruct
+++ /dev/null
@@ -1,3 +0,0 @@
-env = Environment(tools=['docbook'])
-env.DocbookHtmlChunked('manual', xsl='html.xsl', base_dir='output/')
-
diff --git a/src/engine/SCons/Tool/docbook/test/basedir/htmlchunked/image/html.xsl b/src/engine/SCons/Tool/docbook/test/basedir/htmlchunked/image/html.xsl
deleted file mode 100644
index eac0a67..0000000
--- a/src/engine/SCons/Tool/docbook/test/basedir/htmlchunked/image/html.xsl
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Copyright (c) 2001-2010 The SCons Foundation
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--->
-<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- version="1.0">
-
- <xsl:import href="file:///usr/share/xml/docbook/stylesheet/docbook-xsl/html/chunkfast.xsl"/>
-
-<xsl:param name="l10n.gentext.default.language" select="'en'"/>
-<xsl:param name="section.autolabel" select="1"/>
-<xsl:param name="base.dir" select="'output/'"/>
-<xsl:param name="html.stylesheet" select="'scons.css'"/>
-<xsl:param name="generate.toc">
-/appendix toc,title
-article/appendix nop
-/article toc,title
-book toc,title,figure,table,example,equation
-/chapter toc,title
-part toc,title
-/preface toc,title
-reference toc,title
-/sect1 toc
-/sect2 toc
-/sect3 toc
-/sect4 toc
-/sect5 toc
-/section toc
-set toc,title
-</xsl:param>
-
-</xsl:stylesheet>
-
diff --git a/src/engine/SCons/Tool/docbook/test/basedir/htmlchunked/image/manual.xml b/src/engine/SCons/Tool/docbook/test/basedir/htmlchunked/image/manual.xml
deleted file mode 100644
index ca12e0e..0000000
--- a/src/engine/SCons/Tool/docbook/test/basedir/htmlchunked/image/manual.xml
+++ /dev/null
@@ -1,388 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (c) 2001-2010 The SCons Foundation
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--->
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<article>
- <title>The SCons qt4 tool</title>
-
- <articleinfo>
- <author>
- <surname>Dirk Baechle</surname>
- </author>
-
- <pubdate>2010-12-06</pubdate>
- </articleinfo>
-
- <section id="basics">
- <title>Basics</title>
-
- <para>This tool can be used to compile Qt projects, designed for versions
- 4.x.y and higher. It is not usable for Qt3 and older versions, since some
- of the helper tools (<literal>moc</literal>, <literal>uic</literal>)
- behave different.</para>
-
- <section id="install">
- <title>Install</title>
-
- <para>Installing it, requires you to copy (or, even better: checkout)
- the contents of the package's <literal>qt4</literal> folder to</para>
-
- <orderedlist>
- <listitem>
- <para><quote><literal>/path_to_your_project/site_scons/site_tools/qt4</literal></quote>,
- if you need the Qt4 Tool in one project only, or</para>
- </listitem>
-
- <listitem>
- <para><quote><literal>~/.scons/site_scons/site_tools/qt4</literal></quote>,
- for a system-wide installation under your current login.</para>
- </listitem>
- </orderedlist>
-
- <para>For more infos about this, please refer to</para>
-
- <itemizedlist>
- <listitem>
- <para>the SCons User's Guide, chap. 17.7 "Where to put your custom
- Builders and Tools" and</para>
- </listitem>
-
- <listitem>
- <para>the SCons Tools Wiki page at <ulink
- url="http://scons.org/wiki/ToolsIndex">http://scons.org/wiki/ToolsIndex</ulink>.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="activation">
- <title>How to activate</title>
-
- <para>For activating the tool "qt4", you have to add its name to the
- Environment constructor, like this</para>
-
- <screen>env = Environment(tools=['default','qt4'])
-</screen>
-
- <para>On its startup, the Qt4 tool tries to read the variable
- <literal>QT4DIR</literal> from the current Environment and
- <literal>os.environ</literal>. If it is not set, the value of
- <literal>QTDIR</literal> (in Environment/<literal>os.environ</literal>)
- is used as a fallback.</para>
-
- <para>So, you either have to explicitly give the path of your Qt4
- installation to the Environment with</para>
-
- <screen>env['QT4DIR'] = '/usr/local/Trolltech/Qt-4.2.3'
-</screen>
-
- <para>or set the <literal>QT4DIR</literal> as environment variable in
- your shell.</para>
- </section>
-
- <section id="requirements">
- <title>Requirements</title>
-
- <para>Under Linux, "qt4" uses the system tool
- <literal>pkg-config</literal> for automatically setting the required
- compile and link flags of the single Qt4 modules (like QtCore,
- QtGui,...). This means that</para>
-
- <orderedlist>
- <listitem>
- <para>you should have <literal>pkg-config</literal> installed,
- and</para>
- </listitem>
-
- <listitem>
- <para>you additionally have to set
- <literal>PKG_CONFIG_PATH</literal> in your shell environment, such
- that it points to $<literal>QT4DIR/lib/pkgconfig</literal> (or
- $<literal>QT4DIR/lib</literal> for some older versions).</para>
- </listitem>
- </orderedlist>
-
- <para>Based on these two environment variables
- (<literal>QT4DIR</literal> and <literal>PKG_CONFIG_PATH</literal>), the
- "qt4" tool initializes all <literal>QT4_*</literal> construction
- variables listed in the Reference manual. This happens when the tool is
- "detected" during Environment construction. As a consequence, the setup
- of the tool gets a two-stage process, if you want to override the values
- provided by your current shell settings:</para>
-
- <screen># Stage 1: create plain environment
-qtEnv = Environment()
-# Set new vars
-qtEnv['QT4DIR'] = '/usr/local/Trolltech/Qt-4.2.3
-qtEnv['ENV']['PKG_CONFIG_PATH'] = '/usr/local/Trolltech/Qt-4.2.3/lib/pkgconfig'
-# Stage 2: add qt4 tool
-qtEnv.Tool('qt4')
-</screen>
- </section>
- </section>
-
- <section id="boilerplate">
- <title>Suggested boilerplate</title>
-
- <para>Based on the requirements above, we suggest a simple ready-to-go
- setup as follows:</para>
-
- <para>SConstruct</para>
-
- <screen># Detect Qt version
-qtdir = detectLatestQtDir()
-
-# Create base environment
-baseEnv = Environment()
-#...further customization of base env
-
-# Clone Qt environment
-qtEnv = baseEnv.Clone()
-# Set QT4DIR and PKG_CONFIG_PATH
-qtEnv['ENV']['PKG_CONFIG_PATH'] = os.path.join(qtdir, 'lib/pkgconfig')
-qtEnv['QT4DIR'] = qtdir
-# Add qt4 tool
-qtEnv.Tool('qt4')
-#...further customization of qt env
-
-# Export environments
-Export('baseEnv qtEnv')
-
-# Your other stuff...
-# ...including the call to your SConscripts
-</screen>
-
- <para>In a SConscript</para>
-
- <screen># Get the Qt4 environment
-Import('qtEnv')
-# Clone it
-env = qtEnv.clone()
-# Patch it
-env.Append(CCFLAGS=['-m32']) # or whatever
-# Use it
-env.StaticLibrary('foo', Glob('*.cpp'))
-</screen>
-
- <para>The detection of the Qt directory could be as simple as directly
- assigning a fixed path</para>
-
- <screen>def detectLatestQtDir():
- return "/usr/local/qt4.3.2"
-</screen>
-
- <para>or a little more sophisticated</para>
-
- <screen># Tries to detect the path to the installation of Qt with
-# the highest version number
-def detectLatestQtDir():
- if sys.platform.startswith("linux"):
- # Simple check: inspect only '/usr/local/Trolltech'
- paths = glob.glob('/usr/local/Trolltech/*')
- if len(paths):
- paths.sort()
- return paths[-1]
- else:
- return ""
- else:
- # Simple check: inspect only 'C:\Qt'
- paths = glob.glob('C:\\Qt\\*')
- if len(paths):
- paths.sort()
- return paths[-1]
- else:
- return os.environ.get("QTDIR","")
-</screen>
- </section>
-
- <section id="firstproject">
- <title>A first project</title>
-
- <para>The following SConscript is for a simple project with some cxx
- files, using the QtCore, QtGui and QtNetwork modules:</para>
-
- <screen>Import('qtEnv')
-env = qtEnv.Clone()
-env.EnableQt4Modules([
- 'QtGui',
- 'QtCore',
- 'QtNetwork'
- ])
-# Add your CCFLAGS and CPPPATHs to env here...
-
-env.Program('foo', Glob('*.cpp'))
-</screen>
- </section>
-
- <section id="mocup">
- <title>MOC it up</title>
-
- <para>For the basic support of automocing, nothing needs to be done by the
- user. The tool usually detects the <literal>Q_OBJECT</literal> macro and
- calls the <quote><literal>moc</literal></quote> executable
- accordingly.</para>
-
- <para>If you don't want this, you can switch off the automocing by
- a</para>
-
- <screen>env['QT4_AUTOSCAN'] = 0
-</screen>
-
- <para>in your SConscript file. Then, you have to moc your files
- explicitly, using the Moc4 builder.</para>
-
- <para>You can also switch to an extended automoc strategy with</para>
-
- <screen>env['QT4_AUTOSCAN_STRATEGY'] = 1
-</screen>
-
- <para>Please read the description of the
- <literal>QT4_AUTOSCAN_STRATEGY</literal> variable in the Reference manual
- for details.</para>
-
- <para>For debugging purposes, you can set the variable
- <literal>QT4_DEBUG</literal> with</para>
-
- <screen>env['QT4_DEBUG'] = 1
-</screen>
-
- <para>which outputs a lot of messages during automocing.</para>
- </section>
-
- <section id="forms">
- <title>Forms (.ui)</title>
-
- <para>The header files with setup code for your GUI classes, are not
- compiled automatically from your <literal>.ui</literal> files. You always
- have to call the Uic4 builder explicitly like</para>
-
- <screen>env.Uic4(Glob('*.ui'))
-env.Program('foo', Glob('*.cpp'))
-</screen>
- </section>
-
- <section id="resources">
- <title>Resource files (.qrc)</title>
-
- <para>Resource files are not built automatically, you always have to add
- the names of the <literal>.qrc</literal> files to the source list for your
- program or library:</para>
-
- <screen>env.Program('foo', Glob('*.cpp')+Glob('*.qrc'))
-</screen>
-
- <para>For each of the Resource input files, its prefix defines the name of
- the resulting resource. An appropriate
- <quote><literal>-name</literal></quote> option is added to the call of the
- <literal>rcc</literal> executable by default.</para>
-
- <para>You can also call the Qrc4 builder explicitly as</para>
-
- <screen>qrccc = env.Qrc4('foo') # ['foo.qrc'] -&gt; ['qrc_foo.cc']
-</screen>
-
- <para>or (overriding the default suffix)</para>
-
- <screen>qrccc = env.Qrc4('myprefix_foo.cxx','foo.qrc') # -&gt; ['qrc_myprefix_foo.cxx']
-</screen>
-
- <para>and then add the resulting cxx file to the sources of your
- Program/Library:</para>
-
- <screen>env.Program('foo', Glob('*.cpp') + qrccc)
-</screen>
- </section>
-
- <section id="translation">
- <title>Translation files</title>
-
- <para>The update of the <literal>.ts</literal> files and the conversion to
- binary <literal>.qm</literal> files is not done automatically. You have to
- call the corresponding builders on your own.</para>
-
- <para>Example for updating a translation file:</para>
-
- <screen>env.Ts4('foo.ts','.') # -&gt; ['foo.ts']
-</screen>
-
- <para>By default, the <literal>.ts</literal> files are treated as
- <emphasis>precious</emphasis> targets. This means that they are not
- removed prior to a rebuild, but simply get updated. Additionally, they do
- not get cleaned on a <quote><literal>scons -c</literal></quote>. If you
- want to delete the translation files on the
- <quote><literal>-c</literal></quote> SCons command, you can set the
- variable <quote><literal>QT4_CLEAN_TS</literal></quote> like this</para>
-
- <screen>env['QT4_CLEAN_TS']=1
-</screen>
-
- <para>Example for releasing a translation file, i.e. compiling it to a
- <literal>.qm</literal> binary file:</para>
-
- <screen>env.Qm4('foo') # ['foo.ts'] -&gt; ['foo.qm']
-</screen>
-
- <para>or (overriding the output prefix)</para>
-
- <screen>env.Qm4('myprefix','foo') # ['foo.ts'] -&gt; ['myprefix.qm']
-</screen>
-
- <para>As an extension both, the Ts4() and Qm4 builder, support the
- definition of multiple targets. So, calling</para>
-
- <screen>env.Ts4(['app_en','app_de'], Glob('*.cpp'))
-</screen>
-
- <para>and</para>
-
- <screen>env.Qm4(['app','copy'], Glob('*.ts'))
-</screen>
-
- <para>should work fine.</para>
-
- <para>Finally, two short notes about the support of directories for the
- Ts4() builder. You can pass an arbitrary mix of cxx files and subdirs to
- it, as in</para>
-
- <screen>env.Ts4('app_en',['sub1','appwindow.cpp','main.cpp']))
-</screen>
-
- <para>where <literal>sub1</literal> is a folder that gets scanned
- recursively for cxx files by <literal>lupdate</literal>. But like this,
- you lose all dependency information for the subdir, i.e. if a file inside
- the folder changes, the .ts file is not updated automatically! In this
- case you should tell SCons to always update the target:</para>
-
- <screen>ts = env.Ts4('app_en',['sub1','appwindow.cpp','main.cpp'])
-env.AlwaysBuild(ts)
-</screen>
-
- <para>Last note: specifying the current folder
- <quote><literal>.</literal></quote> as input to Ts4() and storing the
- resulting .ts file in the same directory, leads to a dependency cycle! You
- then have to store the .ts and .qm files outside of the current folder, or
- use <literal>Glob('*.cpp'))</literal> instead.</para>
- </section>
-</article>
diff --git a/src/engine/SCons/Tool/docbook/test/basedir/htmlchunked/sconstest-htmlchunked.py b/src/engine/SCons/Tool/docbook/test/basedir/htmlchunked/sconstest-htmlchunked.py
deleted file mode 100644
index 8095c73..0000000
--- a/src/engine/SCons/Tool/docbook/test/basedir/htmlchunked/sconstest-htmlchunked.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2001-2010 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-"""
-Test the base_dir argument for the chunked HTML builder.
-"""
-
-import TestSCons
-
-test = TestSCons.TestSCons()
-
-test.dir_fixture('image')
-test.file_fixture('../../../__init__.py','site_scons/site_tools/docbook/__init__.py')
-test.dir_fixture('../../../docbook-xsl-1.76.1','site_scons/site_tools/docbook/docbook-xsl-1.76.1')
-test.dir_fixture('../../../utils','site_scons/site_tools/docbook/utils')
-
-# Normal invocation
-test.run(stderr=None)
-test.must_exist(test.workpath('output/index.html'))
-
-# Cleanup
-test.run(arguments='-c')
-test.must_not_exist(test.workpath('output/index.html'))
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/src/engine/SCons/Tool/docbook/test/basedir/htmlhelp/image/SConstruct b/src/engine/SCons/Tool/docbook/test/basedir/htmlhelp/image/SConstruct
deleted file mode 100644
index cb2893f..0000000
--- a/src/engine/SCons/Tool/docbook/test/basedir/htmlhelp/image/SConstruct
+++ /dev/null
@@ -1,3 +0,0 @@
-env = Environment(tools=['docbook'])
-env.DocbookHtmlhelp('manual', xsl='htmlhelp.xsl', base_dir='output/')
-
diff --git a/src/engine/SCons/Tool/docbook/test/basedir/htmlhelp/image/htmlhelp.xsl b/src/engine/SCons/Tool/docbook/test/basedir/htmlhelp/image/htmlhelp.xsl
deleted file mode 100644
index 1015ecc..0000000
--- a/src/engine/SCons/Tool/docbook/test/basedir/htmlhelp/image/htmlhelp.xsl
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Copyright (c) 2001-2010 The SCons Foundation
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--->
-<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- version="1.0">
-
- <xsl:import href="file:///usr/share/xml/docbook/stylesheet/docbook-xsl/htmlhelp/htmlhelp.xsl"/>
-
-<xsl:param name="l10n.gentext.default.language" select="'en'"/>
-<xsl:param name="section.autolabel" select="1"/>
-<xsl:param name="base.dir" select="'output/'"/>
-<xsl:param name="html.stylesheet" select="'scons.css'"/>
-<xsl:param name="generate.toc">
-/appendix toc,title
-article/appendix nop
-/article toc,title
-book toc,title,figure,table,example,equation
-/chapter toc,title
-part toc,title
-/preface toc,title
-reference toc,title
-/sect1 toc
-/sect2 toc
-/sect3 toc
-/sect4 toc
-/sect5 toc
-/section toc
-set toc,title
-</xsl:param>
-
-</xsl:stylesheet>
-
diff --git a/src/engine/SCons/Tool/docbook/test/basedir/htmlhelp/image/manual.xml b/src/engine/SCons/Tool/docbook/test/basedir/htmlhelp/image/manual.xml
deleted file mode 100644
index ca12e0e..0000000
--- a/src/engine/SCons/Tool/docbook/test/basedir/htmlhelp/image/manual.xml
+++ /dev/null
@@ -1,388 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (c) 2001-2010 The SCons Foundation
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--->
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<article>
- <title>The SCons qt4 tool</title>
-
- <articleinfo>
- <author>
- <surname>Dirk Baechle</surname>
- </author>
-
- <pubdate>2010-12-06</pubdate>
- </articleinfo>
-
- <section id="basics">
- <title>Basics</title>
-
- <para>This tool can be used to compile Qt projects, designed for versions
- 4.x.y and higher. It is not usable for Qt3 and older versions, since some
- of the helper tools (<literal>moc</literal>, <literal>uic</literal>)
- behave different.</para>
-
- <section id="install">
- <title>Install</title>
-
- <para>Installing it, requires you to copy (or, even better: checkout)
- the contents of the package's <literal>qt4</literal> folder to</para>
-
- <orderedlist>
- <listitem>
- <para><quote><literal>/path_to_your_project/site_scons/site_tools/qt4</literal></quote>,
- if you need the Qt4 Tool in one project only, or</para>
- </listitem>
-
- <listitem>
- <para><quote><literal>~/.scons/site_scons/site_tools/qt4</literal></quote>,
- for a system-wide installation under your current login.</para>
- </listitem>
- </orderedlist>
-
- <para>For more infos about this, please refer to</para>
-
- <itemizedlist>
- <listitem>
- <para>the SCons User's Guide, chap. 17.7 "Where to put your custom
- Builders and Tools" and</para>
- </listitem>
-
- <listitem>
- <para>the SCons Tools Wiki page at <ulink
- url="http://scons.org/wiki/ToolsIndex">http://scons.org/wiki/ToolsIndex</ulink>.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="activation">
- <title>How to activate</title>
-
- <para>For activating the tool "qt4", you have to add its name to the
- Environment constructor, like this</para>
-
- <screen>env = Environment(tools=['default','qt4'])
-</screen>
-
- <para>On its startup, the Qt4 tool tries to read the variable
- <literal>QT4DIR</literal> from the current Environment and
- <literal>os.environ</literal>. If it is not set, the value of
- <literal>QTDIR</literal> (in Environment/<literal>os.environ</literal>)
- is used as a fallback.</para>
-
- <para>So, you either have to explicitly give the path of your Qt4
- installation to the Environment with</para>
-
- <screen>env['QT4DIR'] = '/usr/local/Trolltech/Qt-4.2.3'
-</screen>
-
- <para>or set the <literal>QT4DIR</literal> as environment variable in
- your shell.</para>
- </section>
-
- <section id="requirements">
- <title>Requirements</title>
-
- <para>Under Linux, "qt4" uses the system tool
- <literal>pkg-config</literal> for automatically setting the required
- compile and link flags of the single Qt4 modules (like QtCore,
- QtGui,...). This means that</para>
-
- <orderedlist>
- <listitem>
- <para>you should have <literal>pkg-config</literal> installed,
- and</para>
- </listitem>
-
- <listitem>
- <para>you additionally have to set
- <literal>PKG_CONFIG_PATH</literal> in your shell environment, such
- that it points to $<literal>QT4DIR/lib/pkgconfig</literal> (or
- $<literal>QT4DIR/lib</literal> for some older versions).</para>
- </listitem>
- </orderedlist>
-
- <para>Based on these two environment variables
- (<literal>QT4DIR</literal> and <literal>PKG_CONFIG_PATH</literal>), the
- "qt4" tool initializes all <literal>QT4_*</literal> construction
- variables listed in the Reference manual. This happens when the tool is
- "detected" during Environment construction. As a consequence, the setup
- of the tool gets a two-stage process, if you want to override the values
- provided by your current shell settings:</para>
-
- <screen># Stage 1: create plain environment
-qtEnv = Environment()
-# Set new vars
-qtEnv['QT4DIR'] = '/usr/local/Trolltech/Qt-4.2.3
-qtEnv['ENV']['PKG_CONFIG_PATH'] = '/usr/local/Trolltech/Qt-4.2.3/lib/pkgconfig'
-# Stage 2: add qt4 tool
-qtEnv.Tool('qt4')
-</screen>
- </section>
- </section>
-
- <section id="boilerplate">
- <title>Suggested boilerplate</title>
-
- <para>Based on the requirements above, we suggest a simple ready-to-go
- setup as follows:</para>
-
- <para>SConstruct</para>
-
- <screen># Detect Qt version
-qtdir = detectLatestQtDir()
-
-# Create base environment
-baseEnv = Environment()
-#...further customization of base env
-
-# Clone Qt environment
-qtEnv = baseEnv.Clone()
-# Set QT4DIR and PKG_CONFIG_PATH
-qtEnv['ENV']['PKG_CONFIG_PATH'] = os.path.join(qtdir, 'lib/pkgconfig')
-qtEnv['QT4DIR'] = qtdir
-# Add qt4 tool
-qtEnv.Tool('qt4')
-#...further customization of qt env
-
-# Export environments
-Export('baseEnv qtEnv')
-
-# Your other stuff...
-# ...including the call to your SConscripts
-</screen>
-
- <para>In a SConscript</para>
-
- <screen># Get the Qt4 environment
-Import('qtEnv')
-# Clone it
-env = qtEnv.clone()
-# Patch it
-env.Append(CCFLAGS=['-m32']) # or whatever
-# Use it
-env.StaticLibrary('foo', Glob('*.cpp'))
-</screen>
-
- <para>The detection of the Qt directory could be as simple as directly
- assigning a fixed path</para>
-
- <screen>def detectLatestQtDir():
- return "/usr/local/qt4.3.2"
-</screen>
-
- <para>or a little more sophisticated</para>
-
- <screen># Tries to detect the path to the installation of Qt with
-# the highest version number
-def detectLatestQtDir():
- if sys.platform.startswith("linux"):
- # Simple check: inspect only '/usr/local/Trolltech'
- paths = glob.glob('/usr/local/Trolltech/*')
- if len(paths):
- paths.sort()
- return paths[-1]
- else:
- return ""
- else:
- # Simple check: inspect only 'C:\Qt'
- paths = glob.glob('C:\\Qt\\*')
- if len(paths):
- paths.sort()
- return paths[-1]
- else:
- return os.environ.get("QTDIR","")
-</screen>
- </section>
-
- <section id="firstproject">
- <title>A first project</title>
-
- <para>The following SConscript is for a simple project with some cxx
- files, using the QtCore, QtGui and QtNetwork modules:</para>
-
- <screen>Import('qtEnv')
-env = qtEnv.Clone()
-env.EnableQt4Modules([
- 'QtGui',
- 'QtCore',
- 'QtNetwork'
- ])
-# Add your CCFLAGS and CPPPATHs to env here...
-
-env.Program('foo', Glob('*.cpp'))
-</screen>
- </section>
-
- <section id="mocup">
- <title>MOC it up</title>
-
- <para>For the basic support of automocing, nothing needs to be done by the
- user. The tool usually detects the <literal>Q_OBJECT</literal> macro and
- calls the <quote><literal>moc</literal></quote> executable
- accordingly.</para>
-
- <para>If you don't want this, you can switch off the automocing by
- a</para>
-
- <screen>env['QT4_AUTOSCAN'] = 0
-</screen>
-
- <para>in your SConscript file. Then, you have to moc your files
- explicitly, using the Moc4 builder.</para>
-
- <para>You can also switch to an extended automoc strategy with</para>
-
- <screen>env['QT4_AUTOSCAN_STRATEGY'] = 1
-</screen>
-
- <para>Please read the description of the
- <literal>QT4_AUTOSCAN_STRATEGY</literal> variable in the Reference manual
- for details.</para>
-
- <para>For debugging purposes, you can set the variable
- <literal>QT4_DEBUG</literal> with</para>
-
- <screen>env['QT4_DEBUG'] = 1
-</screen>
-
- <para>which outputs a lot of messages during automocing.</para>
- </section>
-
- <section id="forms">
- <title>Forms (.ui)</title>
-
- <para>The header files with setup code for your GUI classes, are not
- compiled automatically from your <literal>.ui</literal> files. You always
- have to call the Uic4 builder explicitly like</para>
-
- <screen>env.Uic4(Glob('*.ui'))
-env.Program('foo', Glob('*.cpp'))
-</screen>
- </section>
-
- <section id="resources">
- <title>Resource files (.qrc)</title>
-
- <para>Resource files are not built automatically, you always have to add
- the names of the <literal>.qrc</literal> files to the source list for your
- program or library:</para>
-
- <screen>env.Program('foo', Glob('*.cpp')+Glob('*.qrc'))
-</screen>
-
- <para>For each of the Resource input files, its prefix defines the name of
- the resulting resource. An appropriate
- <quote><literal>-name</literal></quote> option is added to the call of the
- <literal>rcc</literal> executable by default.</para>
-
- <para>You can also call the Qrc4 builder explicitly as</para>
-
- <screen>qrccc = env.Qrc4('foo') # ['foo.qrc'] -&gt; ['qrc_foo.cc']
-</screen>
-
- <para>or (overriding the default suffix)</para>
-
- <screen>qrccc = env.Qrc4('myprefix_foo.cxx','foo.qrc') # -&gt; ['qrc_myprefix_foo.cxx']
-</screen>
-
- <para>and then add the resulting cxx file to the sources of your
- Program/Library:</para>
-
- <screen>env.Program('foo', Glob('*.cpp') + qrccc)
-</screen>
- </section>
-
- <section id="translation">
- <title>Translation files</title>
-
- <para>The update of the <literal>.ts</literal> files and the conversion to
- binary <literal>.qm</literal> files is not done automatically. You have to
- call the corresponding builders on your own.</para>
-
- <para>Example for updating a translation file:</para>
-
- <screen>env.Ts4('foo.ts','.') # -&gt; ['foo.ts']
-</screen>
-
- <para>By default, the <literal>.ts</literal> files are treated as
- <emphasis>precious</emphasis> targets. This means that they are not
- removed prior to a rebuild, but simply get updated. Additionally, they do
- not get cleaned on a <quote><literal>scons -c</literal></quote>. If you
- want to delete the translation files on the
- <quote><literal>-c</literal></quote> SCons command, you can set the
- variable <quote><literal>QT4_CLEAN_TS</literal></quote> like this</para>
-
- <screen>env['QT4_CLEAN_TS']=1
-</screen>
-
- <para>Example for releasing a translation file, i.e. compiling it to a
- <literal>.qm</literal> binary file:</para>
-
- <screen>env.Qm4('foo') # ['foo.ts'] -&gt; ['foo.qm']
-</screen>
-
- <para>or (overriding the output prefix)</para>
-
- <screen>env.Qm4('myprefix','foo') # ['foo.ts'] -&gt; ['myprefix.qm']
-</screen>
-
- <para>As an extension both, the Ts4() and Qm4 builder, support the
- definition of multiple targets. So, calling</para>
-
- <screen>env.Ts4(['app_en','app_de'], Glob('*.cpp'))
-</screen>
-
- <para>and</para>
-
- <screen>env.Qm4(['app','copy'], Glob('*.ts'))
-</screen>
-
- <para>should work fine.</para>
-
- <para>Finally, two short notes about the support of directories for the
- Ts4() builder. You can pass an arbitrary mix of cxx files and subdirs to
- it, as in</para>
-
- <screen>env.Ts4('app_en',['sub1','appwindow.cpp','main.cpp']))
-</screen>
-
- <para>where <literal>sub1</literal> is a folder that gets scanned
- recursively for cxx files by <literal>lupdate</literal>. But like this,
- you lose all dependency information for the subdir, i.e. if a file inside
- the folder changes, the .ts file is not updated automatically! In this
- case you should tell SCons to always update the target:</para>
-
- <screen>ts = env.Ts4('app_en',['sub1','appwindow.cpp','main.cpp'])
-env.AlwaysBuild(ts)
-</screen>
-
- <para>Last note: specifying the current folder
- <quote><literal>.</literal></quote> as input to Ts4() and storing the
- resulting .ts file in the same directory, leads to a dependency cycle! You
- then have to store the .ts and .qm files outside of the current folder, or
- use <literal>Glob('*.cpp'))</literal> instead.</para>
- </section>
-</article>
diff --git a/src/engine/SCons/Tool/docbook/test/basedir/htmlhelp/sconstest-htmlhelp.py b/src/engine/SCons/Tool/docbook/test/basedir/htmlhelp/sconstest-htmlhelp.py
deleted file mode 100644
index 3fc4759..0000000
--- a/src/engine/SCons/Tool/docbook/test/basedir/htmlhelp/sconstest-htmlhelp.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2001-2010 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-"""
-Test the base_dir argument for the HTMLHELP builder.
-"""
-
-import TestSCons
-
-test = TestSCons.TestSCons()
-
-test.dir_fixture('image')
-test.file_fixture('../../../__init__.py','site_scons/site_tools/docbook/__init__.py')
-test.dir_fixture('../../../docbook-xsl-1.76.1','site_scons/site_tools/docbook/docbook-xsl-1.76.1')
-test.dir_fixture('../../../utils','site_scons/site_tools/docbook/utils')
-
-# Normal invocation
-test.run(stderr=None)
-test.must_exist(test.workpath('output/index.html'))
-test.must_exist(test.workpath('htmlhelp.hhp'))
-test.must_exist(test.workpath('toc.hhc'))
-
-# Cleanup
-test.run(arguments='-c')
-test.must_not_exist(test.workpath('output/index.html'))
-test.must_not_exist(test.workpath('htmlhelp.hhp'))
-test.must_not_exist(test.workpath('toc.hhc'))
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/src/engine/SCons/Tool/docbook/test/basedir/slideshtml/image/SConstruct b/src/engine/SCons/Tool/docbook/test/basedir/slideshtml/image/SConstruct
deleted file mode 100644
index 0620efb..0000000
--- a/src/engine/SCons/Tool/docbook/test/basedir/slideshtml/image/SConstruct
+++ /dev/null
@@ -1,3 +0,0 @@
-env = Environment(tools=['docbook'])
-env.DocbookSlidesHtml('virt', xsl='slides.xsl', base_dir='output/')
-
diff --git a/src/engine/SCons/Tool/docbook/test/basedir/slideshtml/image/slides.xsl b/src/engine/SCons/Tool/docbook/test/basedir/slideshtml/image/slides.xsl
deleted file mode 100644
index e3f0f21..0000000
--- a/src/engine/SCons/Tool/docbook/test/basedir/slideshtml/image/slides.xsl
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Copyright (c) 2001-2010 The SCons Foundation
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--->
-<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- version="1.0">
-
- <xsl:import href="file:///usr/share/xml/docbook/stylesheet/docbook-xsl/slides/html/plain.xsl"/>
-
-<xsl:param name="l10n.gentext.default.language" select="'en'"/>
-<xsl:param name="section.autolabel" select="1"/>
-<xsl:param name="base.dir" select="'output/'"/>
-<xsl:param name="html.stylesheet" select="'scons.css'"/>
-<xsl:param name="generate.toc">
-/appendix toc,title
-article/appendix nop
-/article toc,title
-book toc,title,figure,table,example,equation
-/chapter toc,title
-part toc,title
-/preface toc,title
-reference toc,title
-/sect1 toc
-/sect2 toc
-/sect3 toc
-/sect4 toc
-/sect5 toc
-/section toc
-set toc,title
-</xsl:param>
-
-</xsl:stylesheet>
-
diff --git a/src/engine/SCons/Tool/docbook/test/basedir/slideshtml/image/virt.xml b/src/engine/SCons/Tool/docbook/test/basedir/slideshtml/image/virt.xml
deleted file mode 100644
index aec1fd7..0000000
--- a/src/engine/SCons/Tool/docbook/test/basedir/slideshtml/image/virt.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE slides PUBLIC "-//Norman Walsh//DTD Slides XML V3.3.1//EN"
-"file:///usr/share/xml/docbook/custom/slides/3.3.1/schema/dtd/slides.dtd">
-<slides>
- <slidesinfo>
- <title>Virtuelles Kopieren</title>
-
- <titleabbrev>Virtuelles Kopieren</titleabbrev>
-
- <copyright>
- <year>2007</year>
-
- <holder>Femutec GmbH</holder>
- </copyright>
-
- <author>
- <firstname>Dirk</firstname>
-
- <surname>Baechle</surname>
- </author>
-
- <pubdate>09.07.2007</pubdate>
- </slidesinfo>
-
-<foilgroup>
-<title>Group</title>
- <foil>
- <title>sfForming</title>
-
- </foil>
-</foilgroup>
-</slides>
-
diff --git a/src/engine/SCons/Tool/docbook/test/basedir/slideshtml/sconstest-slideshtml.py b/src/engine/SCons/Tool/docbook/test/basedir/slideshtml/sconstest-slideshtml.py
deleted file mode 100644
index 3dc8a7d..0000000
--- a/src/engine/SCons/Tool/docbook/test/basedir/slideshtml/sconstest-slideshtml.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2001-2010 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-"""
-Test the base_dir argument for the Slides HTML builder.
-"""
-
-import TestSCons
-
-test = TestSCons.TestSCons()
-
-test.dir_fixture('image')
-test.file_fixture('../../../__init__.py','site_scons/site_tools/docbook/__init__.py')
-test.dir_fixture('../../../docbook-xsl-1.76.1','site_scons/site_tools/docbook/docbook-xsl-1.76.1')
-test.dir_fixture('../../../utils','site_scons/site_tools/docbook/utils')
-
-# Normal invocation
-test.run(stderr=None)
-test.must_exist(test.workpath('output/index.html'))
-test.must_exist(test.workpath('output/toc.html'))
-test.must_exist(test.workpath('output/foil01.html'))
-test.must_exist(test.workpath('output/foilgroup01.html'))
-
-# Cleanup
-test.run(arguments='-c')
-test.must_not_exist(test.workpath('output/index.html'))
-test.must_not_exist(test.workpath('output/toc.html'))
-test.must_not_exist(test.workpath('output/foil01.html'))
-test.must_not_exist(test.workpath('output/foilgroup01.html'))
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/src/engine/SCons/Tool/docbook/test/basic/html/image/SConstruct b/src/engine/SCons/Tool/docbook/test/basic/html/image/SConstruct
deleted file mode 100644
index 954e639..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/html/image/SConstruct
+++ /dev/null
@@ -1,3 +0,0 @@
-env = Environment(tools=['docbook'])
-env.DocbookHtml('manual')
-
diff --git a/src/engine/SCons/Tool/docbook/test/basic/html/image/manual.xml b/src/engine/SCons/Tool/docbook/test/basic/html/image/manual.xml
deleted file mode 100644
index ca12e0e..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/html/image/manual.xml
+++ /dev/null
@@ -1,388 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (c) 2001-2010 The SCons Foundation
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--->
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<article>
- <title>The SCons qt4 tool</title>
-
- <articleinfo>
- <author>
- <surname>Dirk Baechle</surname>
- </author>
-
- <pubdate>2010-12-06</pubdate>
- </articleinfo>
-
- <section id="basics">
- <title>Basics</title>
-
- <para>This tool can be used to compile Qt projects, designed for versions
- 4.x.y and higher. It is not usable for Qt3 and older versions, since some
- of the helper tools (<literal>moc</literal>, <literal>uic</literal>)
- behave different.</para>
-
- <section id="install">
- <title>Install</title>
-
- <para>Installing it, requires you to copy (or, even better: checkout)
- the contents of the package's <literal>qt4</literal> folder to</para>
-
- <orderedlist>
- <listitem>
- <para><quote><literal>/path_to_your_project/site_scons/site_tools/qt4</literal></quote>,
- if you need the Qt4 Tool in one project only, or</para>
- </listitem>
-
- <listitem>
- <para><quote><literal>~/.scons/site_scons/site_tools/qt4</literal></quote>,
- for a system-wide installation under your current login.</para>
- </listitem>
- </orderedlist>
-
- <para>For more infos about this, please refer to</para>
-
- <itemizedlist>
- <listitem>
- <para>the SCons User's Guide, chap. 17.7 "Where to put your custom
- Builders and Tools" and</para>
- </listitem>
-
- <listitem>
- <para>the SCons Tools Wiki page at <ulink
- url="http://scons.org/wiki/ToolsIndex">http://scons.org/wiki/ToolsIndex</ulink>.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="activation">
- <title>How to activate</title>
-
- <para>For activating the tool "qt4", you have to add its name to the
- Environment constructor, like this</para>
-
- <screen>env = Environment(tools=['default','qt4'])
-</screen>
-
- <para>On its startup, the Qt4 tool tries to read the variable
- <literal>QT4DIR</literal> from the current Environment and
- <literal>os.environ</literal>. If it is not set, the value of
- <literal>QTDIR</literal> (in Environment/<literal>os.environ</literal>)
- is used as a fallback.</para>
-
- <para>So, you either have to explicitly give the path of your Qt4
- installation to the Environment with</para>
-
- <screen>env['QT4DIR'] = '/usr/local/Trolltech/Qt-4.2.3'
-</screen>
-
- <para>or set the <literal>QT4DIR</literal> as environment variable in
- your shell.</para>
- </section>
-
- <section id="requirements">
- <title>Requirements</title>
-
- <para>Under Linux, "qt4" uses the system tool
- <literal>pkg-config</literal> for automatically setting the required
- compile and link flags of the single Qt4 modules (like QtCore,
- QtGui,...). This means that</para>
-
- <orderedlist>
- <listitem>
- <para>you should have <literal>pkg-config</literal> installed,
- and</para>
- </listitem>
-
- <listitem>
- <para>you additionally have to set
- <literal>PKG_CONFIG_PATH</literal> in your shell environment, such
- that it points to $<literal>QT4DIR/lib/pkgconfig</literal> (or
- $<literal>QT4DIR/lib</literal> for some older versions).</para>
- </listitem>
- </orderedlist>
-
- <para>Based on these two environment variables
- (<literal>QT4DIR</literal> and <literal>PKG_CONFIG_PATH</literal>), the
- "qt4" tool initializes all <literal>QT4_*</literal> construction
- variables listed in the Reference manual. This happens when the tool is
- "detected" during Environment construction. As a consequence, the setup
- of the tool gets a two-stage process, if you want to override the values
- provided by your current shell settings:</para>
-
- <screen># Stage 1: create plain environment
-qtEnv = Environment()
-# Set new vars
-qtEnv['QT4DIR'] = '/usr/local/Trolltech/Qt-4.2.3
-qtEnv['ENV']['PKG_CONFIG_PATH'] = '/usr/local/Trolltech/Qt-4.2.3/lib/pkgconfig'
-# Stage 2: add qt4 tool
-qtEnv.Tool('qt4')
-</screen>
- </section>
- </section>
-
- <section id="boilerplate">
- <title>Suggested boilerplate</title>
-
- <para>Based on the requirements above, we suggest a simple ready-to-go
- setup as follows:</para>
-
- <para>SConstruct</para>
-
- <screen># Detect Qt version
-qtdir = detectLatestQtDir()
-
-# Create base environment
-baseEnv = Environment()
-#...further customization of base env
-
-# Clone Qt environment
-qtEnv = baseEnv.Clone()
-# Set QT4DIR and PKG_CONFIG_PATH
-qtEnv['ENV']['PKG_CONFIG_PATH'] = os.path.join(qtdir, 'lib/pkgconfig')
-qtEnv['QT4DIR'] = qtdir
-# Add qt4 tool
-qtEnv.Tool('qt4')
-#...further customization of qt env
-
-# Export environments
-Export('baseEnv qtEnv')
-
-# Your other stuff...
-# ...including the call to your SConscripts
-</screen>
-
- <para>In a SConscript</para>
-
- <screen># Get the Qt4 environment
-Import('qtEnv')
-# Clone it
-env = qtEnv.clone()
-# Patch it
-env.Append(CCFLAGS=['-m32']) # or whatever
-# Use it
-env.StaticLibrary('foo', Glob('*.cpp'))
-</screen>
-
- <para>The detection of the Qt directory could be as simple as directly
- assigning a fixed path</para>
-
- <screen>def detectLatestQtDir():
- return "/usr/local/qt4.3.2"
-</screen>
-
- <para>or a little more sophisticated</para>
-
- <screen># Tries to detect the path to the installation of Qt with
-# the highest version number
-def detectLatestQtDir():
- if sys.platform.startswith("linux"):
- # Simple check: inspect only '/usr/local/Trolltech'
- paths = glob.glob('/usr/local/Trolltech/*')
- if len(paths):
- paths.sort()
- return paths[-1]
- else:
- return ""
- else:
- # Simple check: inspect only 'C:\Qt'
- paths = glob.glob('C:\\Qt\\*')
- if len(paths):
- paths.sort()
- return paths[-1]
- else:
- return os.environ.get("QTDIR","")
-</screen>
- </section>
-
- <section id="firstproject">
- <title>A first project</title>
-
- <para>The following SConscript is for a simple project with some cxx
- files, using the QtCore, QtGui and QtNetwork modules:</para>
-
- <screen>Import('qtEnv')
-env = qtEnv.Clone()
-env.EnableQt4Modules([
- 'QtGui',
- 'QtCore',
- 'QtNetwork'
- ])
-# Add your CCFLAGS and CPPPATHs to env here...
-
-env.Program('foo', Glob('*.cpp'))
-</screen>
- </section>
-
- <section id="mocup">
- <title>MOC it up</title>
-
- <para>For the basic support of automocing, nothing needs to be done by the
- user. The tool usually detects the <literal>Q_OBJECT</literal> macro and
- calls the <quote><literal>moc</literal></quote> executable
- accordingly.</para>
-
- <para>If you don't want this, you can switch off the automocing by
- a</para>
-
- <screen>env['QT4_AUTOSCAN'] = 0
-</screen>
-
- <para>in your SConscript file. Then, you have to moc your files
- explicitly, using the Moc4 builder.</para>
-
- <para>You can also switch to an extended automoc strategy with</para>
-
- <screen>env['QT4_AUTOSCAN_STRATEGY'] = 1
-</screen>
-
- <para>Please read the description of the
- <literal>QT4_AUTOSCAN_STRATEGY</literal> variable in the Reference manual
- for details.</para>
-
- <para>For debugging purposes, you can set the variable
- <literal>QT4_DEBUG</literal> with</para>
-
- <screen>env['QT4_DEBUG'] = 1
-</screen>
-
- <para>which outputs a lot of messages during automocing.</para>
- </section>
-
- <section id="forms">
- <title>Forms (.ui)</title>
-
- <para>The header files with setup code for your GUI classes, are not
- compiled automatically from your <literal>.ui</literal> files. You always
- have to call the Uic4 builder explicitly like</para>
-
- <screen>env.Uic4(Glob('*.ui'))
-env.Program('foo', Glob('*.cpp'))
-</screen>
- </section>
-
- <section id="resources">
- <title>Resource files (.qrc)</title>
-
- <para>Resource files are not built automatically, you always have to add
- the names of the <literal>.qrc</literal> files to the source list for your
- program or library:</para>
-
- <screen>env.Program('foo', Glob('*.cpp')+Glob('*.qrc'))
-</screen>
-
- <para>For each of the Resource input files, its prefix defines the name of
- the resulting resource. An appropriate
- <quote><literal>-name</literal></quote> option is added to the call of the
- <literal>rcc</literal> executable by default.</para>
-
- <para>You can also call the Qrc4 builder explicitly as</para>
-
- <screen>qrccc = env.Qrc4('foo') # ['foo.qrc'] -&gt; ['qrc_foo.cc']
-</screen>
-
- <para>or (overriding the default suffix)</para>
-
- <screen>qrccc = env.Qrc4('myprefix_foo.cxx','foo.qrc') # -&gt; ['qrc_myprefix_foo.cxx']
-</screen>
-
- <para>and then add the resulting cxx file to the sources of your
- Program/Library:</para>
-
- <screen>env.Program('foo', Glob('*.cpp') + qrccc)
-</screen>
- </section>
-
- <section id="translation">
- <title>Translation files</title>
-
- <para>The update of the <literal>.ts</literal> files and the conversion to
- binary <literal>.qm</literal> files is not done automatically. You have to
- call the corresponding builders on your own.</para>
-
- <para>Example for updating a translation file:</para>
-
- <screen>env.Ts4('foo.ts','.') # -&gt; ['foo.ts']
-</screen>
-
- <para>By default, the <literal>.ts</literal> files are treated as
- <emphasis>precious</emphasis> targets. This means that they are not
- removed prior to a rebuild, but simply get updated. Additionally, they do
- not get cleaned on a <quote><literal>scons -c</literal></quote>. If you
- want to delete the translation files on the
- <quote><literal>-c</literal></quote> SCons command, you can set the
- variable <quote><literal>QT4_CLEAN_TS</literal></quote> like this</para>
-
- <screen>env['QT4_CLEAN_TS']=1
-</screen>
-
- <para>Example for releasing a translation file, i.e. compiling it to a
- <literal>.qm</literal> binary file:</para>
-
- <screen>env.Qm4('foo') # ['foo.ts'] -&gt; ['foo.qm']
-</screen>
-
- <para>or (overriding the output prefix)</para>
-
- <screen>env.Qm4('myprefix','foo') # ['foo.ts'] -&gt; ['myprefix.qm']
-</screen>
-
- <para>As an extension both, the Ts4() and Qm4 builder, support the
- definition of multiple targets. So, calling</para>
-
- <screen>env.Ts4(['app_en','app_de'], Glob('*.cpp'))
-</screen>
-
- <para>and</para>
-
- <screen>env.Qm4(['app','copy'], Glob('*.ts'))
-</screen>
-
- <para>should work fine.</para>
-
- <para>Finally, two short notes about the support of directories for the
- Ts4() builder. You can pass an arbitrary mix of cxx files and subdirs to
- it, as in</para>
-
- <screen>env.Ts4('app_en',['sub1','appwindow.cpp','main.cpp']))
-</screen>
-
- <para>where <literal>sub1</literal> is a folder that gets scanned
- recursively for cxx files by <literal>lupdate</literal>. But like this,
- you lose all dependency information for the subdir, i.e. if a file inside
- the folder changes, the .ts file is not updated automatically! In this
- case you should tell SCons to always update the target:</para>
-
- <screen>ts = env.Ts4('app_en',['sub1','appwindow.cpp','main.cpp'])
-env.AlwaysBuild(ts)
-</screen>
-
- <para>Last note: specifying the current folder
- <quote><literal>.</literal></quote> as input to Ts4() and storing the
- resulting .ts file in the same directory, leads to a dependency cycle! You
- then have to store the .ts and .qm files outside of the current folder, or
- use <literal>Glob('*.cpp'))</literal> instead.</para>
- </section>
-</article>
diff --git a/src/engine/SCons/Tool/docbook/test/basic/html/sconstest-html.py b/src/engine/SCons/Tool/docbook/test/basic/html/sconstest-html.py
deleted file mode 100644
index 6fc99e3..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/html/sconstest-html.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2001-2010 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-"""
-Test the HTML builder.
-"""
-
-import TestSCons
-
-test = TestSCons.TestSCons()
-
-test.dir_fixture('image')
-test.file_fixture('../../../__init__.py','site_scons/site_tools/docbook/__init__.py')
-test.dir_fixture('../../../docbook-xsl-1.76.1','site_scons/site_tools/docbook/docbook-xsl-1.76.1')
-test.dir_fixture('../../../utils','site_scons/site_tools/docbook/utils')
-
-# Normal invocation
-test.run()
-test.must_exist(test.workpath('manual.html'))
-
-# Cleanup
-test.run(arguments='-c')
-test.must_not_exist(test.workpath('manual.html'))
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/src/engine/SCons/Tool/docbook/test/basic/htmlchunked/image/SConstruct b/src/engine/SCons/Tool/docbook/test/basic/htmlchunked/image/SConstruct
deleted file mode 100644
index 0004f8b..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/htmlchunked/image/SConstruct
+++ /dev/null
@@ -1,3 +0,0 @@
-env = Environment(tools=['docbook'])
-env.DocbookHtmlChunked('manual')
-
diff --git a/src/engine/SCons/Tool/docbook/test/basic/htmlchunked/image/manual.xml b/src/engine/SCons/Tool/docbook/test/basic/htmlchunked/image/manual.xml
deleted file mode 100644
index ca12e0e..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/htmlchunked/image/manual.xml
+++ /dev/null
@@ -1,388 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (c) 2001-2010 The SCons Foundation
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--->
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<article>
- <title>The SCons qt4 tool</title>
-
- <articleinfo>
- <author>
- <surname>Dirk Baechle</surname>
- </author>
-
- <pubdate>2010-12-06</pubdate>
- </articleinfo>
-
- <section id="basics">
- <title>Basics</title>
-
- <para>This tool can be used to compile Qt projects, designed for versions
- 4.x.y and higher. It is not usable for Qt3 and older versions, since some
- of the helper tools (<literal>moc</literal>, <literal>uic</literal>)
- behave different.</para>
-
- <section id="install">
- <title>Install</title>
-
- <para>Installing it, requires you to copy (or, even better: checkout)
- the contents of the package's <literal>qt4</literal> folder to</para>
-
- <orderedlist>
- <listitem>
- <para><quote><literal>/path_to_your_project/site_scons/site_tools/qt4</literal></quote>,
- if you need the Qt4 Tool in one project only, or</para>
- </listitem>
-
- <listitem>
- <para><quote><literal>~/.scons/site_scons/site_tools/qt4</literal></quote>,
- for a system-wide installation under your current login.</para>
- </listitem>
- </orderedlist>
-
- <para>For more infos about this, please refer to</para>
-
- <itemizedlist>
- <listitem>
- <para>the SCons User's Guide, chap. 17.7 "Where to put your custom
- Builders and Tools" and</para>
- </listitem>
-
- <listitem>
- <para>the SCons Tools Wiki page at <ulink
- url="http://scons.org/wiki/ToolsIndex">http://scons.org/wiki/ToolsIndex</ulink>.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="activation">
- <title>How to activate</title>
-
- <para>For activating the tool "qt4", you have to add its name to the
- Environment constructor, like this</para>
-
- <screen>env = Environment(tools=['default','qt4'])
-</screen>
-
- <para>On its startup, the Qt4 tool tries to read the variable
- <literal>QT4DIR</literal> from the current Environment and
- <literal>os.environ</literal>. If it is not set, the value of
- <literal>QTDIR</literal> (in Environment/<literal>os.environ</literal>)
- is used as a fallback.</para>
-
- <para>So, you either have to explicitly give the path of your Qt4
- installation to the Environment with</para>
-
- <screen>env['QT4DIR'] = '/usr/local/Trolltech/Qt-4.2.3'
-</screen>
-
- <para>or set the <literal>QT4DIR</literal> as environment variable in
- your shell.</para>
- </section>
-
- <section id="requirements">
- <title>Requirements</title>
-
- <para>Under Linux, "qt4" uses the system tool
- <literal>pkg-config</literal> for automatically setting the required
- compile and link flags of the single Qt4 modules (like QtCore,
- QtGui,...). This means that</para>
-
- <orderedlist>
- <listitem>
- <para>you should have <literal>pkg-config</literal> installed,
- and</para>
- </listitem>
-
- <listitem>
- <para>you additionally have to set
- <literal>PKG_CONFIG_PATH</literal> in your shell environment, such
- that it points to $<literal>QT4DIR/lib/pkgconfig</literal> (or
- $<literal>QT4DIR/lib</literal> for some older versions).</para>
- </listitem>
- </orderedlist>
-
- <para>Based on these two environment variables
- (<literal>QT4DIR</literal> and <literal>PKG_CONFIG_PATH</literal>), the
- "qt4" tool initializes all <literal>QT4_*</literal> construction
- variables listed in the Reference manual. This happens when the tool is
- "detected" during Environment construction. As a consequence, the setup
- of the tool gets a two-stage process, if you want to override the values
- provided by your current shell settings:</para>
-
- <screen># Stage 1: create plain environment
-qtEnv = Environment()
-# Set new vars
-qtEnv['QT4DIR'] = '/usr/local/Trolltech/Qt-4.2.3
-qtEnv['ENV']['PKG_CONFIG_PATH'] = '/usr/local/Trolltech/Qt-4.2.3/lib/pkgconfig'
-# Stage 2: add qt4 tool
-qtEnv.Tool('qt4')
-</screen>
- </section>
- </section>
-
- <section id="boilerplate">
- <title>Suggested boilerplate</title>
-
- <para>Based on the requirements above, we suggest a simple ready-to-go
- setup as follows:</para>
-
- <para>SConstruct</para>
-
- <screen># Detect Qt version
-qtdir = detectLatestQtDir()
-
-# Create base environment
-baseEnv = Environment()
-#...further customization of base env
-
-# Clone Qt environment
-qtEnv = baseEnv.Clone()
-# Set QT4DIR and PKG_CONFIG_PATH
-qtEnv['ENV']['PKG_CONFIG_PATH'] = os.path.join(qtdir, 'lib/pkgconfig')
-qtEnv['QT4DIR'] = qtdir
-# Add qt4 tool
-qtEnv.Tool('qt4')
-#...further customization of qt env
-
-# Export environments
-Export('baseEnv qtEnv')
-
-# Your other stuff...
-# ...including the call to your SConscripts
-</screen>
-
- <para>In a SConscript</para>
-
- <screen># Get the Qt4 environment
-Import('qtEnv')
-# Clone it
-env = qtEnv.clone()
-# Patch it
-env.Append(CCFLAGS=['-m32']) # or whatever
-# Use it
-env.StaticLibrary('foo', Glob('*.cpp'))
-</screen>
-
- <para>The detection of the Qt directory could be as simple as directly
- assigning a fixed path</para>
-
- <screen>def detectLatestQtDir():
- return "/usr/local/qt4.3.2"
-</screen>
-
- <para>or a little more sophisticated</para>
-
- <screen># Tries to detect the path to the installation of Qt with
-# the highest version number
-def detectLatestQtDir():
- if sys.platform.startswith("linux"):
- # Simple check: inspect only '/usr/local/Trolltech'
- paths = glob.glob('/usr/local/Trolltech/*')
- if len(paths):
- paths.sort()
- return paths[-1]
- else:
- return ""
- else:
- # Simple check: inspect only 'C:\Qt'
- paths = glob.glob('C:\\Qt\\*')
- if len(paths):
- paths.sort()
- return paths[-1]
- else:
- return os.environ.get("QTDIR","")
-</screen>
- </section>
-
- <section id="firstproject">
- <title>A first project</title>
-
- <para>The following SConscript is for a simple project with some cxx
- files, using the QtCore, QtGui and QtNetwork modules:</para>
-
- <screen>Import('qtEnv')
-env = qtEnv.Clone()
-env.EnableQt4Modules([
- 'QtGui',
- 'QtCore',
- 'QtNetwork'
- ])
-# Add your CCFLAGS and CPPPATHs to env here...
-
-env.Program('foo', Glob('*.cpp'))
-</screen>
- </section>
-
- <section id="mocup">
- <title>MOC it up</title>
-
- <para>For the basic support of automocing, nothing needs to be done by the
- user. The tool usually detects the <literal>Q_OBJECT</literal> macro and
- calls the <quote><literal>moc</literal></quote> executable
- accordingly.</para>
-
- <para>If you don't want this, you can switch off the automocing by
- a</para>
-
- <screen>env['QT4_AUTOSCAN'] = 0
-</screen>
-
- <para>in your SConscript file. Then, you have to moc your files
- explicitly, using the Moc4 builder.</para>
-
- <para>You can also switch to an extended automoc strategy with</para>
-
- <screen>env['QT4_AUTOSCAN_STRATEGY'] = 1
-</screen>
-
- <para>Please read the description of the
- <literal>QT4_AUTOSCAN_STRATEGY</literal> variable in the Reference manual
- for details.</para>
-
- <para>For debugging purposes, you can set the variable
- <literal>QT4_DEBUG</literal> with</para>
-
- <screen>env['QT4_DEBUG'] = 1
-</screen>
-
- <para>which outputs a lot of messages during automocing.</para>
- </section>
-
- <section id="forms">
- <title>Forms (.ui)</title>
-
- <para>The header files with setup code for your GUI classes, are not
- compiled automatically from your <literal>.ui</literal> files. You always
- have to call the Uic4 builder explicitly like</para>
-
- <screen>env.Uic4(Glob('*.ui'))
-env.Program('foo', Glob('*.cpp'))
-</screen>
- </section>
-
- <section id="resources">
- <title>Resource files (.qrc)</title>
-
- <para>Resource files are not built automatically, you always have to add
- the names of the <literal>.qrc</literal> files to the source list for your
- program or library:</para>
-
- <screen>env.Program('foo', Glob('*.cpp')+Glob('*.qrc'))
-</screen>
-
- <para>For each of the Resource input files, its prefix defines the name of
- the resulting resource. An appropriate
- <quote><literal>-name</literal></quote> option is added to the call of the
- <literal>rcc</literal> executable by default.</para>
-
- <para>You can also call the Qrc4 builder explicitly as</para>
-
- <screen>qrccc = env.Qrc4('foo') # ['foo.qrc'] -&gt; ['qrc_foo.cc']
-</screen>
-
- <para>or (overriding the default suffix)</para>
-
- <screen>qrccc = env.Qrc4('myprefix_foo.cxx','foo.qrc') # -&gt; ['qrc_myprefix_foo.cxx']
-</screen>
-
- <para>and then add the resulting cxx file to the sources of your
- Program/Library:</para>
-
- <screen>env.Program('foo', Glob('*.cpp') + qrccc)
-</screen>
- </section>
-
- <section id="translation">
- <title>Translation files</title>
-
- <para>The update of the <literal>.ts</literal> files and the conversion to
- binary <literal>.qm</literal> files is not done automatically. You have to
- call the corresponding builders on your own.</para>
-
- <para>Example for updating a translation file:</para>
-
- <screen>env.Ts4('foo.ts','.') # -&gt; ['foo.ts']
-</screen>
-
- <para>By default, the <literal>.ts</literal> files are treated as
- <emphasis>precious</emphasis> targets. This means that they are not
- removed prior to a rebuild, but simply get updated. Additionally, they do
- not get cleaned on a <quote><literal>scons -c</literal></quote>. If you
- want to delete the translation files on the
- <quote><literal>-c</literal></quote> SCons command, you can set the
- variable <quote><literal>QT4_CLEAN_TS</literal></quote> like this</para>
-
- <screen>env['QT4_CLEAN_TS']=1
-</screen>
-
- <para>Example for releasing a translation file, i.e. compiling it to a
- <literal>.qm</literal> binary file:</para>
-
- <screen>env.Qm4('foo') # ['foo.ts'] -&gt; ['foo.qm']
-</screen>
-
- <para>or (overriding the output prefix)</para>
-
- <screen>env.Qm4('myprefix','foo') # ['foo.ts'] -&gt; ['myprefix.qm']
-</screen>
-
- <para>As an extension both, the Ts4() and Qm4 builder, support the
- definition of multiple targets. So, calling</para>
-
- <screen>env.Ts4(['app_en','app_de'], Glob('*.cpp'))
-</screen>
-
- <para>and</para>
-
- <screen>env.Qm4(['app','copy'], Glob('*.ts'))
-</screen>
-
- <para>should work fine.</para>
-
- <para>Finally, two short notes about the support of directories for the
- Ts4() builder. You can pass an arbitrary mix of cxx files and subdirs to
- it, as in</para>
-
- <screen>env.Ts4('app_en',['sub1','appwindow.cpp','main.cpp']))
-</screen>
-
- <para>where <literal>sub1</literal> is a folder that gets scanned
- recursively for cxx files by <literal>lupdate</literal>. But like this,
- you lose all dependency information for the subdir, i.e. if a file inside
- the folder changes, the .ts file is not updated automatically! In this
- case you should tell SCons to always update the target:</para>
-
- <screen>ts = env.Ts4('app_en',['sub1','appwindow.cpp','main.cpp'])
-env.AlwaysBuild(ts)
-</screen>
-
- <para>Last note: specifying the current folder
- <quote><literal>.</literal></quote> as input to Ts4() and storing the
- resulting .ts file in the same directory, leads to a dependency cycle! You
- then have to store the .ts and .qm files outside of the current folder, or
- use <literal>Glob('*.cpp'))</literal> instead.</para>
- </section>
-</article>
diff --git a/src/engine/SCons/Tool/docbook/test/basic/htmlchunked/sconstest-htmlchunked.py b/src/engine/SCons/Tool/docbook/test/basic/htmlchunked/sconstest-htmlchunked.py
deleted file mode 100644
index 5127ac6..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/htmlchunked/sconstest-htmlchunked.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2001-2010 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-"""
-Test the chunked HTML builder.
-"""
-
-import TestSCons
-
-test = TestSCons.TestSCons()
-
-test.dir_fixture('image')
-test.file_fixture('../../../__init__.py','site_scons/site_tools/docbook/__init__.py')
-test.dir_fixture('../../../docbook-xsl-1.76.1','site_scons/site_tools/docbook/docbook-xsl-1.76.1')
-test.dir_fixture('../../../utils','site_scons/site_tools/docbook/utils')
-
-# Normal invocation
-test.run(stderr=None)
-test.must_exist(test.workpath('index.html'))
-
-# Cleanup
-test.run(arguments='-c')
-test.must_not_exist(test.workpath('index.html'))
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/src/engine/SCons/Tool/docbook/test/basic/htmlhelp/image/SConstruct b/src/engine/SCons/Tool/docbook/test/basic/htmlhelp/image/SConstruct
deleted file mode 100644
index 0c793d4..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/htmlhelp/image/SConstruct
+++ /dev/null
@@ -1,3 +0,0 @@
-env = Environment(tools=['docbook'])
-env.DocbookHtmlhelp('manual')
-
diff --git a/src/engine/SCons/Tool/docbook/test/basic/htmlhelp/image/manual.xml b/src/engine/SCons/Tool/docbook/test/basic/htmlhelp/image/manual.xml
deleted file mode 100644
index ca12e0e..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/htmlhelp/image/manual.xml
+++ /dev/null
@@ -1,388 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (c) 2001-2010 The SCons Foundation
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--->
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<article>
- <title>The SCons qt4 tool</title>
-
- <articleinfo>
- <author>
- <surname>Dirk Baechle</surname>
- </author>
-
- <pubdate>2010-12-06</pubdate>
- </articleinfo>
-
- <section id="basics">
- <title>Basics</title>
-
- <para>This tool can be used to compile Qt projects, designed for versions
- 4.x.y and higher. It is not usable for Qt3 and older versions, since some
- of the helper tools (<literal>moc</literal>, <literal>uic</literal>)
- behave different.</para>
-
- <section id="install">
- <title>Install</title>
-
- <para>Installing it, requires you to copy (or, even better: checkout)
- the contents of the package's <literal>qt4</literal> folder to</para>
-
- <orderedlist>
- <listitem>
- <para><quote><literal>/path_to_your_project/site_scons/site_tools/qt4</literal></quote>,
- if you need the Qt4 Tool in one project only, or</para>
- </listitem>
-
- <listitem>
- <para><quote><literal>~/.scons/site_scons/site_tools/qt4</literal></quote>,
- for a system-wide installation under your current login.</para>
- </listitem>
- </orderedlist>
-
- <para>For more infos about this, please refer to</para>
-
- <itemizedlist>
- <listitem>
- <para>the SCons User's Guide, chap. 17.7 "Where to put your custom
- Builders and Tools" and</para>
- </listitem>
-
- <listitem>
- <para>the SCons Tools Wiki page at <ulink
- url="http://scons.org/wiki/ToolsIndex">http://scons.org/wiki/ToolsIndex</ulink>.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="activation">
- <title>How to activate</title>
-
- <para>For activating the tool "qt4", you have to add its name to the
- Environment constructor, like this</para>
-
- <screen>env = Environment(tools=['default','qt4'])
-</screen>
-
- <para>On its startup, the Qt4 tool tries to read the variable
- <literal>QT4DIR</literal> from the current Environment and
- <literal>os.environ</literal>. If it is not set, the value of
- <literal>QTDIR</literal> (in Environment/<literal>os.environ</literal>)
- is used as a fallback.</para>
-
- <para>So, you either have to explicitly give the path of your Qt4
- installation to the Environment with</para>
-
- <screen>env['QT4DIR'] = '/usr/local/Trolltech/Qt-4.2.3'
-</screen>
-
- <para>or set the <literal>QT4DIR</literal> as environment variable in
- your shell.</para>
- </section>
-
- <section id="requirements">
- <title>Requirements</title>
-
- <para>Under Linux, "qt4" uses the system tool
- <literal>pkg-config</literal> for automatically setting the required
- compile and link flags of the single Qt4 modules (like QtCore,
- QtGui,...). This means that</para>
-
- <orderedlist>
- <listitem>
- <para>you should have <literal>pkg-config</literal> installed,
- and</para>
- </listitem>
-
- <listitem>
- <para>you additionally have to set
- <literal>PKG_CONFIG_PATH</literal> in your shell environment, such
- that it points to $<literal>QT4DIR/lib/pkgconfig</literal> (or
- $<literal>QT4DIR/lib</literal> for some older versions).</para>
- </listitem>
- </orderedlist>
-
- <para>Based on these two environment variables
- (<literal>QT4DIR</literal> and <literal>PKG_CONFIG_PATH</literal>), the
- "qt4" tool initializes all <literal>QT4_*</literal> construction
- variables listed in the Reference manual. This happens when the tool is
- "detected" during Environment construction. As a consequence, the setup
- of the tool gets a two-stage process, if you want to override the values
- provided by your current shell settings:</para>
-
- <screen># Stage 1: create plain environment
-qtEnv = Environment()
-# Set new vars
-qtEnv['QT4DIR'] = '/usr/local/Trolltech/Qt-4.2.3
-qtEnv['ENV']['PKG_CONFIG_PATH'] = '/usr/local/Trolltech/Qt-4.2.3/lib/pkgconfig'
-# Stage 2: add qt4 tool
-qtEnv.Tool('qt4')
-</screen>
- </section>
- </section>
-
- <section id="boilerplate">
- <title>Suggested boilerplate</title>
-
- <para>Based on the requirements above, we suggest a simple ready-to-go
- setup as follows:</para>
-
- <para>SConstruct</para>
-
- <screen># Detect Qt version
-qtdir = detectLatestQtDir()
-
-# Create base environment
-baseEnv = Environment()
-#...further customization of base env
-
-# Clone Qt environment
-qtEnv = baseEnv.Clone()
-# Set QT4DIR and PKG_CONFIG_PATH
-qtEnv['ENV']['PKG_CONFIG_PATH'] = os.path.join(qtdir, 'lib/pkgconfig')
-qtEnv['QT4DIR'] = qtdir
-# Add qt4 tool
-qtEnv.Tool('qt4')
-#...further customization of qt env
-
-# Export environments
-Export('baseEnv qtEnv')
-
-# Your other stuff...
-# ...including the call to your SConscripts
-</screen>
-
- <para>In a SConscript</para>
-
- <screen># Get the Qt4 environment
-Import('qtEnv')
-# Clone it
-env = qtEnv.clone()
-# Patch it
-env.Append(CCFLAGS=['-m32']) # or whatever
-# Use it
-env.StaticLibrary('foo', Glob('*.cpp'))
-</screen>
-
- <para>The detection of the Qt directory could be as simple as directly
- assigning a fixed path</para>
-
- <screen>def detectLatestQtDir():
- return "/usr/local/qt4.3.2"
-</screen>
-
- <para>or a little more sophisticated</para>
-
- <screen># Tries to detect the path to the installation of Qt with
-# the highest version number
-def detectLatestQtDir():
- if sys.platform.startswith("linux"):
- # Simple check: inspect only '/usr/local/Trolltech'
- paths = glob.glob('/usr/local/Trolltech/*')
- if len(paths):
- paths.sort()
- return paths[-1]
- else:
- return ""
- else:
- # Simple check: inspect only 'C:\Qt'
- paths = glob.glob('C:\\Qt\\*')
- if len(paths):
- paths.sort()
- return paths[-1]
- else:
- return os.environ.get("QTDIR","")
-</screen>
- </section>
-
- <section id="firstproject">
- <title>A first project</title>
-
- <para>The following SConscript is for a simple project with some cxx
- files, using the QtCore, QtGui and QtNetwork modules:</para>
-
- <screen>Import('qtEnv')
-env = qtEnv.Clone()
-env.EnableQt4Modules([
- 'QtGui',
- 'QtCore',
- 'QtNetwork'
- ])
-# Add your CCFLAGS and CPPPATHs to env here...
-
-env.Program('foo', Glob('*.cpp'))
-</screen>
- </section>
-
- <section id="mocup">
- <title>MOC it up</title>
-
- <para>For the basic support of automocing, nothing needs to be done by the
- user. The tool usually detects the <literal>Q_OBJECT</literal> macro and
- calls the <quote><literal>moc</literal></quote> executable
- accordingly.</para>
-
- <para>If you don't want this, you can switch off the automocing by
- a</para>
-
- <screen>env['QT4_AUTOSCAN'] = 0
-</screen>
-
- <para>in your SConscript file. Then, you have to moc your files
- explicitly, using the Moc4 builder.</para>
-
- <para>You can also switch to an extended automoc strategy with</para>
-
- <screen>env['QT4_AUTOSCAN_STRATEGY'] = 1
-</screen>
-
- <para>Please read the description of the
- <literal>QT4_AUTOSCAN_STRATEGY</literal> variable in the Reference manual
- for details.</para>
-
- <para>For debugging purposes, you can set the variable
- <literal>QT4_DEBUG</literal> with</para>
-
- <screen>env['QT4_DEBUG'] = 1
-</screen>
-
- <para>which outputs a lot of messages during automocing.</para>
- </section>
-
- <section id="forms">
- <title>Forms (.ui)</title>
-
- <para>The header files with setup code for your GUI classes, are not
- compiled automatically from your <literal>.ui</literal> files. You always
- have to call the Uic4 builder explicitly like</para>
-
- <screen>env.Uic4(Glob('*.ui'))
-env.Program('foo', Glob('*.cpp'))
-</screen>
- </section>
-
- <section id="resources">
- <title>Resource files (.qrc)</title>
-
- <para>Resource files are not built automatically, you always have to add
- the names of the <literal>.qrc</literal> files to the source list for your
- program or library:</para>
-
- <screen>env.Program('foo', Glob('*.cpp')+Glob('*.qrc'))
-</screen>
-
- <para>For each of the Resource input files, its prefix defines the name of
- the resulting resource. An appropriate
- <quote><literal>-name</literal></quote> option is added to the call of the
- <literal>rcc</literal> executable by default.</para>
-
- <para>You can also call the Qrc4 builder explicitly as</para>
-
- <screen>qrccc = env.Qrc4('foo') # ['foo.qrc'] -&gt; ['qrc_foo.cc']
-</screen>
-
- <para>or (overriding the default suffix)</para>
-
- <screen>qrccc = env.Qrc4('myprefix_foo.cxx','foo.qrc') # -&gt; ['qrc_myprefix_foo.cxx']
-</screen>
-
- <para>and then add the resulting cxx file to the sources of your
- Program/Library:</para>
-
- <screen>env.Program('foo', Glob('*.cpp') + qrccc)
-</screen>
- </section>
-
- <section id="translation">
- <title>Translation files</title>
-
- <para>The update of the <literal>.ts</literal> files and the conversion to
- binary <literal>.qm</literal> files is not done automatically. You have to
- call the corresponding builders on your own.</para>
-
- <para>Example for updating a translation file:</para>
-
- <screen>env.Ts4('foo.ts','.') # -&gt; ['foo.ts']
-</screen>
-
- <para>By default, the <literal>.ts</literal> files are treated as
- <emphasis>precious</emphasis> targets. This means that they are not
- removed prior to a rebuild, but simply get updated. Additionally, they do
- not get cleaned on a <quote><literal>scons -c</literal></quote>. If you
- want to delete the translation files on the
- <quote><literal>-c</literal></quote> SCons command, you can set the
- variable <quote><literal>QT4_CLEAN_TS</literal></quote> like this</para>
-
- <screen>env['QT4_CLEAN_TS']=1
-</screen>
-
- <para>Example for releasing a translation file, i.e. compiling it to a
- <literal>.qm</literal> binary file:</para>
-
- <screen>env.Qm4('foo') # ['foo.ts'] -&gt; ['foo.qm']
-</screen>
-
- <para>or (overriding the output prefix)</para>
-
- <screen>env.Qm4('myprefix','foo') # ['foo.ts'] -&gt; ['myprefix.qm']
-</screen>
-
- <para>As an extension both, the Ts4() and Qm4 builder, support the
- definition of multiple targets. So, calling</para>
-
- <screen>env.Ts4(['app_en','app_de'], Glob('*.cpp'))
-</screen>
-
- <para>and</para>
-
- <screen>env.Qm4(['app','copy'], Glob('*.ts'))
-</screen>
-
- <para>should work fine.</para>
-
- <para>Finally, two short notes about the support of directories for the
- Ts4() builder. You can pass an arbitrary mix of cxx files and subdirs to
- it, as in</para>
-
- <screen>env.Ts4('app_en',['sub1','appwindow.cpp','main.cpp']))
-</screen>
-
- <para>where <literal>sub1</literal> is a folder that gets scanned
- recursively for cxx files by <literal>lupdate</literal>. But like this,
- you lose all dependency information for the subdir, i.e. if a file inside
- the folder changes, the .ts file is not updated automatically! In this
- case you should tell SCons to always update the target:</para>
-
- <screen>ts = env.Ts4('app_en',['sub1','appwindow.cpp','main.cpp'])
-env.AlwaysBuild(ts)
-</screen>
-
- <para>Last note: specifying the current folder
- <quote><literal>.</literal></quote> as input to Ts4() and storing the
- resulting .ts file in the same directory, leads to a dependency cycle! You
- then have to store the .ts and .qm files outside of the current folder, or
- use <literal>Glob('*.cpp'))</literal> instead.</para>
- </section>
-</article>
diff --git a/src/engine/SCons/Tool/docbook/test/basic/htmlhelp/sconstest-htmlhelp.py b/src/engine/SCons/Tool/docbook/test/basic/htmlhelp/sconstest-htmlhelp.py
deleted file mode 100644
index 8a1a988..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/htmlhelp/sconstest-htmlhelp.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2001-2010 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-"""
-Test the HTMLHELP builder.
-"""
-
-import TestSCons
-
-test = TestSCons.TestSCons()
-
-test.dir_fixture('image')
-test.file_fixture('../../../__init__.py','site_scons/site_tools/docbook/__init__.py')
-test.dir_fixture('../../../docbook-xsl-1.76.1','site_scons/site_tools/docbook/docbook-xsl-1.76.1')
-test.dir_fixture('../../../utils','site_scons/site_tools/docbook/utils')
-
-# Normal invocation
-test.run(stderr=None)
-test.must_exist(test.workpath('index.html'))
-test.must_exist(test.workpath('htmlhelp.hhp'))
-test.must_exist(test.workpath('toc.hhc'))
-
-# Cleanup
-test.run(arguments='-c')
-test.must_not_exist(test.workpath('index.html'))
-test.must_not_exist(test.workpath('htmlhelp.hhp'))
-test.must_not_exist(test.workpath('toc.hhc'))
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/src/engine/SCons/Tool/docbook/test/basic/man/image/SConstruct b/src/engine/SCons/Tool/docbook/test/basic/man/image/SConstruct
deleted file mode 100644
index ddfcfbc..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/man/image/SConstruct
+++ /dev/null
@@ -1,3 +0,0 @@
-env = Environment(tools=['docbook'])
-env.DocbookMan('refdb')
-
diff --git a/src/engine/SCons/Tool/docbook/test/basic/man/image/refdb.xml b/src/engine/SCons/Tool/docbook/test/basic/man/image/refdb.xml
deleted file mode 100644
index de5f94e..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/man/image/refdb.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<refentry id="refentry-refdb8">
- <refentryinfo><date>2005-10-15</date></refentryinfo>
- <refmeta>
- <refentrytitle>refdb</refentrytitle>
- <manvolnum>8</manvolnum>
- <refmiscinfo class="date">2005-10-15</refmiscinfo>
- <refmiscinfo class="manual">RefDB Manual</refmiscinfo>
- </refmeta>
- <refnamediv id="refdb-name">
- <refname>refdb</refname>
- <refname>refdb.sh</refname>
- <refpurpose>refdbd startup script</refpurpose>
- </refnamediv>
- <!-- body begins here -->
- <refsynopsisdiv id="refdb-synopsis">
- <cmdsynopsis>
- <command>refdb</command>
- <group choice="plain">
- <arg choice="plain"><replaceable>start</replaceable></arg>
- <arg choice="plain"><replaceable>stop</replaceable></arg>
- <arg choice="plain"><replaceable>restart</replaceable></arg>
- <arg choice="plain"><replaceable>force-reload</replaceable></arg>
- </group>
- </cmdsynopsis>
- </refsynopsisdiv>
-
-
- <refsect1 id="refdb-description">
- <title>Description</title>
- <para>refdb is a wrapper script for refdbd(1) to be used as a rc(8) or init(8) control script. The script is called refdb.sh on BSD-style systems. See the documentation of your system how to integrate refdb into the start process to run refdbd(1) automatically as a daemon.</para>
- </refsect1>
-
- <refsect1 id="refdb-options">
- <title>Options</title>
- <variablelist remap="TP">
- <varlistentry>
- <term><emphasis remap="I">start</emphasis></term>
- <listitem>
- <para>Starts the refdbd(1) daemon</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis remap="I">stop</emphasis></term>
- <listitem>
- <para>Stops the refdbd(1) daemon</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis remap="I">restart</emphasis></term>
- <listitem>
- <para>Restarts the refdbd(1) daemon</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis remap="I">force-reload</emphasis></term>
- <listitem>
- <para>Causes the refdbd(1) daemon to read its configuration file</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
-
- <refsect1 id="refdb-see_also">
- <title>See also</title>
- <para><emphasis remap="B">RefDB</emphasis> (7),
- <emphasis remap="B"><link linkend="refentry-refdbd">refdbd</link></emphasis> (1)
- <emphasis remap="B"><link linkend="refentry-refdbctl">refdbctl</link></emphasis> (1).</para>
-
- <para><emphasis remap="I">RefDB manual (local copy) </emphasis> &lt;prefix&gt;/share/doc/refdb-&lt;version&gt;/refdb-manual/index.html</para>
-
- <para><emphasis remap="I">RefDB manual (web) </emphasis> &lt;<ulink url="http://refdb.sourceforge.net/manual/index.html">http://refdb.sourceforge.net/manual/index.html</ulink>&gt;</para>
-
- <para><emphasis remap="I">RefDB on the web </emphasis> &lt;<ulink url="http://refdb.sourceforge.net/">http://refdb.sourceforge.net/</ulink>&gt;</para>
- </refsect1>
-
- <refsect1 id="refdb-author">
- <title>Author</title>
- <para>refdb was written by Markus Hoenicka &lt;markus@mhoenicka.de&gt;.</para>
-
- </refsect1>
-</refentry>
diff --git a/src/engine/SCons/Tool/docbook/test/basic/man/sconstest-man.py b/src/engine/SCons/Tool/docbook/test/basic/man/sconstest-man.py
deleted file mode 100644
index 79751f8..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/man/sconstest-man.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2001-2010 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-"""
-Test the Man builder.
-"""
-
-import TestSCons
-
-test = TestSCons.TestSCons()
-
-test.dir_fixture('image')
-test.file_fixture('../../../__init__.py','site_scons/site_tools/docbook/__init__.py')
-test.dir_fixture('../../../docbook-xsl-1.76.1','site_scons/site_tools/docbook/docbook-xsl-1.76.1')
-test.dir_fixture('../../../utils','site_scons/site_tools/docbook/utils')
-
-# Normal invocation
-test.run(stderr=None)
-test.must_exist(test.workpath('refdb.8'))
-test.must_exist(test.workpath('refdb.sh.8'))
-
-# Cleanup
-test.run(arguments='-c')
-test.must_not_exist(test.workpath('refdb.8'))
-test.must_not_exist(test.workpath('refdb.sh.8'))
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/src/engine/SCons/Tool/docbook/test/basic/pdf/image/SConstruct b/src/engine/SCons/Tool/docbook/test/basic/pdf/image/SConstruct
deleted file mode 100644
index 01b2c7f..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/pdf/image/SConstruct
+++ /dev/null
@@ -1,3 +0,0 @@
-env = Environment(tools=['docbook'])
-env.DocbookPdf('manual')
-
diff --git a/src/engine/SCons/Tool/docbook/test/basic/pdf/image/manual.xml b/src/engine/SCons/Tool/docbook/test/basic/pdf/image/manual.xml
deleted file mode 100644
index ca12e0e..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/pdf/image/manual.xml
+++ /dev/null
@@ -1,388 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (c) 2001-2010 The SCons Foundation
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--->
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<article>
- <title>The SCons qt4 tool</title>
-
- <articleinfo>
- <author>
- <surname>Dirk Baechle</surname>
- </author>
-
- <pubdate>2010-12-06</pubdate>
- </articleinfo>
-
- <section id="basics">
- <title>Basics</title>
-
- <para>This tool can be used to compile Qt projects, designed for versions
- 4.x.y and higher. It is not usable for Qt3 and older versions, since some
- of the helper tools (<literal>moc</literal>, <literal>uic</literal>)
- behave different.</para>
-
- <section id="install">
- <title>Install</title>
-
- <para>Installing it, requires you to copy (or, even better: checkout)
- the contents of the package's <literal>qt4</literal> folder to</para>
-
- <orderedlist>
- <listitem>
- <para><quote><literal>/path_to_your_project/site_scons/site_tools/qt4</literal></quote>,
- if you need the Qt4 Tool in one project only, or</para>
- </listitem>
-
- <listitem>
- <para><quote><literal>~/.scons/site_scons/site_tools/qt4</literal></quote>,
- for a system-wide installation under your current login.</para>
- </listitem>
- </orderedlist>
-
- <para>For more infos about this, please refer to</para>
-
- <itemizedlist>
- <listitem>
- <para>the SCons User's Guide, chap. 17.7 "Where to put your custom
- Builders and Tools" and</para>
- </listitem>
-
- <listitem>
- <para>the SCons Tools Wiki page at <ulink
- url="http://scons.org/wiki/ToolsIndex">http://scons.org/wiki/ToolsIndex</ulink>.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="activation">
- <title>How to activate</title>
-
- <para>For activating the tool "qt4", you have to add its name to the
- Environment constructor, like this</para>
-
- <screen>env = Environment(tools=['default','qt4'])
-</screen>
-
- <para>On its startup, the Qt4 tool tries to read the variable
- <literal>QT4DIR</literal> from the current Environment and
- <literal>os.environ</literal>. If it is not set, the value of
- <literal>QTDIR</literal> (in Environment/<literal>os.environ</literal>)
- is used as a fallback.</para>
-
- <para>So, you either have to explicitly give the path of your Qt4
- installation to the Environment with</para>
-
- <screen>env['QT4DIR'] = '/usr/local/Trolltech/Qt-4.2.3'
-</screen>
-
- <para>or set the <literal>QT4DIR</literal> as environment variable in
- your shell.</para>
- </section>
-
- <section id="requirements">
- <title>Requirements</title>
-
- <para>Under Linux, "qt4" uses the system tool
- <literal>pkg-config</literal> for automatically setting the required
- compile and link flags of the single Qt4 modules (like QtCore,
- QtGui,...). This means that</para>
-
- <orderedlist>
- <listitem>
- <para>you should have <literal>pkg-config</literal> installed,
- and</para>
- </listitem>
-
- <listitem>
- <para>you additionally have to set
- <literal>PKG_CONFIG_PATH</literal> in your shell environment, such
- that it points to $<literal>QT4DIR/lib/pkgconfig</literal> (or
- $<literal>QT4DIR/lib</literal> for some older versions).</para>
- </listitem>
- </orderedlist>
-
- <para>Based on these two environment variables
- (<literal>QT4DIR</literal> and <literal>PKG_CONFIG_PATH</literal>), the
- "qt4" tool initializes all <literal>QT4_*</literal> construction
- variables listed in the Reference manual. This happens when the tool is
- "detected" during Environment construction. As a consequence, the setup
- of the tool gets a two-stage process, if you want to override the values
- provided by your current shell settings:</para>
-
- <screen># Stage 1: create plain environment
-qtEnv = Environment()
-# Set new vars
-qtEnv['QT4DIR'] = '/usr/local/Trolltech/Qt-4.2.3
-qtEnv['ENV']['PKG_CONFIG_PATH'] = '/usr/local/Trolltech/Qt-4.2.3/lib/pkgconfig'
-# Stage 2: add qt4 tool
-qtEnv.Tool('qt4')
-</screen>
- </section>
- </section>
-
- <section id="boilerplate">
- <title>Suggested boilerplate</title>
-
- <para>Based on the requirements above, we suggest a simple ready-to-go
- setup as follows:</para>
-
- <para>SConstruct</para>
-
- <screen># Detect Qt version
-qtdir = detectLatestQtDir()
-
-# Create base environment
-baseEnv = Environment()
-#...further customization of base env
-
-# Clone Qt environment
-qtEnv = baseEnv.Clone()
-# Set QT4DIR and PKG_CONFIG_PATH
-qtEnv['ENV']['PKG_CONFIG_PATH'] = os.path.join(qtdir, 'lib/pkgconfig')
-qtEnv['QT4DIR'] = qtdir
-# Add qt4 tool
-qtEnv.Tool('qt4')
-#...further customization of qt env
-
-# Export environments
-Export('baseEnv qtEnv')
-
-# Your other stuff...
-# ...including the call to your SConscripts
-</screen>
-
- <para>In a SConscript</para>
-
- <screen># Get the Qt4 environment
-Import('qtEnv')
-# Clone it
-env = qtEnv.clone()
-# Patch it
-env.Append(CCFLAGS=['-m32']) # or whatever
-# Use it
-env.StaticLibrary('foo', Glob('*.cpp'))
-</screen>
-
- <para>The detection of the Qt directory could be as simple as directly
- assigning a fixed path</para>
-
- <screen>def detectLatestQtDir():
- return "/usr/local/qt4.3.2"
-</screen>
-
- <para>or a little more sophisticated</para>
-
- <screen># Tries to detect the path to the installation of Qt with
-# the highest version number
-def detectLatestQtDir():
- if sys.platform.startswith("linux"):
- # Simple check: inspect only '/usr/local/Trolltech'
- paths = glob.glob('/usr/local/Trolltech/*')
- if len(paths):
- paths.sort()
- return paths[-1]
- else:
- return ""
- else:
- # Simple check: inspect only 'C:\Qt'
- paths = glob.glob('C:\\Qt\\*')
- if len(paths):
- paths.sort()
- return paths[-1]
- else:
- return os.environ.get("QTDIR","")
-</screen>
- </section>
-
- <section id="firstproject">
- <title>A first project</title>
-
- <para>The following SConscript is for a simple project with some cxx
- files, using the QtCore, QtGui and QtNetwork modules:</para>
-
- <screen>Import('qtEnv')
-env = qtEnv.Clone()
-env.EnableQt4Modules([
- 'QtGui',
- 'QtCore',
- 'QtNetwork'
- ])
-# Add your CCFLAGS and CPPPATHs to env here...
-
-env.Program('foo', Glob('*.cpp'))
-</screen>
- </section>
-
- <section id="mocup">
- <title>MOC it up</title>
-
- <para>For the basic support of automocing, nothing needs to be done by the
- user. The tool usually detects the <literal>Q_OBJECT</literal> macro and
- calls the <quote><literal>moc</literal></quote> executable
- accordingly.</para>
-
- <para>If you don't want this, you can switch off the automocing by
- a</para>
-
- <screen>env['QT4_AUTOSCAN'] = 0
-</screen>
-
- <para>in your SConscript file. Then, you have to moc your files
- explicitly, using the Moc4 builder.</para>
-
- <para>You can also switch to an extended automoc strategy with</para>
-
- <screen>env['QT4_AUTOSCAN_STRATEGY'] = 1
-</screen>
-
- <para>Please read the description of the
- <literal>QT4_AUTOSCAN_STRATEGY</literal> variable in the Reference manual
- for details.</para>
-
- <para>For debugging purposes, you can set the variable
- <literal>QT4_DEBUG</literal> with</para>
-
- <screen>env['QT4_DEBUG'] = 1
-</screen>
-
- <para>which outputs a lot of messages during automocing.</para>
- </section>
-
- <section id="forms">
- <title>Forms (.ui)</title>
-
- <para>The header files with setup code for your GUI classes, are not
- compiled automatically from your <literal>.ui</literal> files. You always
- have to call the Uic4 builder explicitly like</para>
-
- <screen>env.Uic4(Glob('*.ui'))
-env.Program('foo', Glob('*.cpp'))
-</screen>
- </section>
-
- <section id="resources">
- <title>Resource files (.qrc)</title>
-
- <para>Resource files are not built automatically, you always have to add
- the names of the <literal>.qrc</literal> files to the source list for your
- program or library:</para>
-
- <screen>env.Program('foo', Glob('*.cpp')+Glob('*.qrc'))
-</screen>
-
- <para>For each of the Resource input files, its prefix defines the name of
- the resulting resource. An appropriate
- <quote><literal>-name</literal></quote> option is added to the call of the
- <literal>rcc</literal> executable by default.</para>
-
- <para>You can also call the Qrc4 builder explicitly as</para>
-
- <screen>qrccc = env.Qrc4('foo') # ['foo.qrc'] -&gt; ['qrc_foo.cc']
-</screen>
-
- <para>or (overriding the default suffix)</para>
-
- <screen>qrccc = env.Qrc4('myprefix_foo.cxx','foo.qrc') # -&gt; ['qrc_myprefix_foo.cxx']
-</screen>
-
- <para>and then add the resulting cxx file to the sources of your
- Program/Library:</para>
-
- <screen>env.Program('foo', Glob('*.cpp') + qrccc)
-</screen>
- </section>
-
- <section id="translation">
- <title>Translation files</title>
-
- <para>The update of the <literal>.ts</literal> files and the conversion to
- binary <literal>.qm</literal> files is not done automatically. You have to
- call the corresponding builders on your own.</para>
-
- <para>Example for updating a translation file:</para>
-
- <screen>env.Ts4('foo.ts','.') # -&gt; ['foo.ts']
-</screen>
-
- <para>By default, the <literal>.ts</literal> files are treated as
- <emphasis>precious</emphasis> targets. This means that they are not
- removed prior to a rebuild, but simply get updated. Additionally, they do
- not get cleaned on a <quote><literal>scons -c</literal></quote>. If you
- want to delete the translation files on the
- <quote><literal>-c</literal></quote> SCons command, you can set the
- variable <quote><literal>QT4_CLEAN_TS</literal></quote> like this</para>
-
- <screen>env['QT4_CLEAN_TS']=1
-</screen>
-
- <para>Example for releasing a translation file, i.e. compiling it to a
- <literal>.qm</literal> binary file:</para>
-
- <screen>env.Qm4('foo') # ['foo.ts'] -&gt; ['foo.qm']
-</screen>
-
- <para>or (overriding the output prefix)</para>
-
- <screen>env.Qm4('myprefix','foo') # ['foo.ts'] -&gt; ['myprefix.qm']
-</screen>
-
- <para>As an extension both, the Ts4() and Qm4 builder, support the
- definition of multiple targets. So, calling</para>
-
- <screen>env.Ts4(['app_en','app_de'], Glob('*.cpp'))
-</screen>
-
- <para>and</para>
-
- <screen>env.Qm4(['app','copy'], Glob('*.ts'))
-</screen>
-
- <para>should work fine.</para>
-
- <para>Finally, two short notes about the support of directories for the
- Ts4() builder. You can pass an arbitrary mix of cxx files and subdirs to
- it, as in</para>
-
- <screen>env.Ts4('app_en',['sub1','appwindow.cpp','main.cpp']))
-</screen>
-
- <para>where <literal>sub1</literal> is a folder that gets scanned
- recursively for cxx files by <literal>lupdate</literal>. But like this,
- you lose all dependency information for the subdir, i.e. if a file inside
- the folder changes, the .ts file is not updated automatically! In this
- case you should tell SCons to always update the target:</para>
-
- <screen>ts = env.Ts4('app_en',['sub1','appwindow.cpp','main.cpp'])
-env.AlwaysBuild(ts)
-</screen>
-
- <para>Last note: specifying the current folder
- <quote><literal>.</literal></quote> as input to Ts4() and storing the
- resulting .ts file in the same directory, leads to a dependency cycle! You
- then have to store the .ts and .qm files outside of the current folder, or
- use <literal>Glob('*.cpp'))</literal> instead.</para>
- </section>
-</article>
diff --git a/src/engine/SCons/Tool/docbook/test/basic/pdf/sconstest-pdf.py b/src/engine/SCons/Tool/docbook/test/basic/pdf/sconstest-pdf.py
deleted file mode 100644
index aacb5c5..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/pdf/sconstest-pdf.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2001-2010 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-"""
-Test the PDF builder.
-"""
-
-import TestSCons
-
-test = TestSCons.TestSCons()
-
-test.dir_fixture('image')
-test.file_fixture('../../../__init__.py','site_scons/site_tools/docbook/__init__.py')
-test.dir_fixture('../../../docbook-xsl-1.76.1','site_scons/site_tools/docbook/docbook-xsl-1.76.1')
-test.dir_fixture('../../../utils','site_scons/site_tools/docbook/utils')
-
-# Normal invocation
-test.run(stderr=None)
-test.must_exist(test.workpath('manual.fo'))
-test.must_exist(test.workpath('manual.pdf'))
-
-# Cleanup
-test.run(arguments='-c')
-test.must_not_exist(test.workpath('manual.fo'))
-test.must_not_exist(test.workpath('manual.pdf'))
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/src/engine/SCons/Tool/docbook/test/basic/slideshtml/image/SConstruct b/src/engine/SCons/Tool/docbook/test/basic/slideshtml/image/SConstruct
deleted file mode 100644
index 034a3c7..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/slideshtml/image/SConstruct
+++ /dev/null
@@ -1,3 +0,0 @@
-env = Environment(tools=['docbook'])
-env.DocbookSlidesHtml('virt')
-
diff --git a/src/engine/SCons/Tool/docbook/test/basic/slideshtml/image/virt.xml b/src/engine/SCons/Tool/docbook/test/basic/slideshtml/image/virt.xml
deleted file mode 100644
index aec1fd7..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/slideshtml/image/virt.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE slides PUBLIC "-//Norman Walsh//DTD Slides XML V3.3.1//EN"
-"file:///usr/share/xml/docbook/custom/slides/3.3.1/schema/dtd/slides.dtd">
-<slides>
- <slidesinfo>
- <title>Virtuelles Kopieren</title>
-
- <titleabbrev>Virtuelles Kopieren</titleabbrev>
-
- <copyright>
- <year>2007</year>
-
- <holder>Femutec GmbH</holder>
- </copyright>
-
- <author>
- <firstname>Dirk</firstname>
-
- <surname>Baechle</surname>
- </author>
-
- <pubdate>09.07.2007</pubdate>
- </slidesinfo>
-
-<foilgroup>
-<title>Group</title>
- <foil>
- <title>sfForming</title>
-
- </foil>
-</foilgroup>
-</slides>
-
diff --git a/src/engine/SCons/Tool/docbook/test/basic/slideshtml/sconstest-slideshtml.py b/src/engine/SCons/Tool/docbook/test/basic/slideshtml/sconstest-slideshtml.py
deleted file mode 100644
index 3f4fb76..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/slideshtml/sconstest-slideshtml.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2001-2010 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-"""
-Test the Slides HTML builder.
-"""
-
-import TestSCons
-
-test = TestSCons.TestSCons()
-
-test.dir_fixture('image')
-test.file_fixture('../../../__init__.py','site_scons/site_tools/docbook/__init__.py')
-test.dir_fixture('../../../docbook-xsl-1.76.1','site_scons/site_tools/docbook/docbook-xsl-1.76.1')
-test.dir_fixture('../../../utils','site_scons/site_tools/docbook/utils')
-
-# Normal invocation
-test.run(stderr=None)
-test.must_exist(test.workpath('index.html'))
-test.must_exist(test.workpath('toc.html'))
-test.must_exist(test.workpath('foil01.html'))
-test.must_exist(test.workpath('foilgroup01.html'))
-
-# Cleanup
-test.run(arguments='-c')
-test.must_not_exist(test.workpath('index.html'))
-test.must_not_exist(test.workpath('toc.html'))
-test.must_not_exist(test.workpath('foil01.html'))
-test.must_not_exist(test.workpath('foilgroup01.html'))
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/src/engine/SCons/Tool/docbook/test/basic/slidespdf/image/SConstruct b/src/engine/SCons/Tool/docbook/test/basic/slidespdf/image/SConstruct
deleted file mode 100644
index ab72a37..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/slidespdf/image/SConstruct
+++ /dev/null
@@ -1,3 +0,0 @@
-env = Environment(tools=['docbook'])
-env.DocbookSlidesPdf('slides','virt')
-
diff --git a/src/engine/SCons/Tool/docbook/test/basic/slidespdf/image/virt.xml b/src/engine/SCons/Tool/docbook/test/basic/slidespdf/image/virt.xml
deleted file mode 100644
index aec1fd7..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/slidespdf/image/virt.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE slides PUBLIC "-//Norman Walsh//DTD Slides XML V3.3.1//EN"
-"file:///usr/share/xml/docbook/custom/slides/3.3.1/schema/dtd/slides.dtd">
-<slides>
- <slidesinfo>
- <title>Virtuelles Kopieren</title>
-
- <titleabbrev>Virtuelles Kopieren</titleabbrev>
-
- <copyright>
- <year>2007</year>
-
- <holder>Femutec GmbH</holder>
- </copyright>
-
- <author>
- <firstname>Dirk</firstname>
-
- <surname>Baechle</surname>
- </author>
-
- <pubdate>09.07.2007</pubdate>
- </slidesinfo>
-
-<foilgroup>
-<title>Group</title>
- <foil>
- <title>sfForming</title>
-
- </foil>
-</foilgroup>
-</slides>
-
diff --git a/src/engine/SCons/Tool/docbook/test/basic/slidespdf/sconstest-slidespdf.py b/src/engine/SCons/Tool/docbook/test/basic/slidespdf/sconstest-slidespdf.py
deleted file mode 100644
index 27aa3ae..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/slidespdf/sconstest-slidespdf.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2001-2010 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-"""
-Test the Slides PDF builder.
-"""
-
-import TestSCons
-
-test = TestSCons.TestSCons()
-
-test.dir_fixture('image')
-test.file_fixture('../../../__init__.py','site_scons/site_tools/docbook/__init__.py')
-test.dir_fixture('../../../docbook-xsl-1.76.1','site_scons/site_tools/docbook/docbook-xsl-1.76.1')
-test.dir_fixture('../../../utils','site_scons/site_tools/docbook/utils')
-
-# Normal invocation
-test.run(stderr=None)
-test.must_exist(test.workpath('slides.fo'))
-test.must_exist(test.workpath('slides.pdf'))
-
-# Cleanup
-test.run(arguments='-c')
-test.must_not_exist(test.workpath('slides.fo'))
-test.must_not_exist(test.workpath('slides.pdf'))
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/src/engine/SCons/Tool/docbook/test/basic/xinclude/image/SConstruct b/src/engine/SCons/Tool/docbook/test/basic/xinclude/image/SConstruct
deleted file mode 100644
index abf7271..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/xinclude/image/SConstruct
+++ /dev/null
@@ -1,3 +0,0 @@
-env = Environment(tools=['docbook'])
-env.DocbookXInclude('manual')
-
diff --git a/src/engine/SCons/Tool/docbook/test/basic/xinclude/image/include.txt b/src/engine/SCons/Tool/docbook/test/basic/xinclude/image/include.txt
deleted file mode 100644
index 095a94b..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/xinclude/image/include.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is an included text.
diff --git a/src/engine/SCons/Tool/docbook/test/basic/xinclude/image/manual.xml b/src/engine/SCons/Tool/docbook/test/basic/xinclude/image/manual.xml
deleted file mode 100644
index 520d309..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/xinclude/image/manual.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (c) 2001-2010 The SCons Foundation
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--->
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<article xmlns:xi="http://www.w3.org/2001/XInclude">
- <title>The SCons qt4 tool</title>
-
- <articleinfo>
- <author>
- <surname>Dirk Baechle</surname>
- </author>
-
- <pubdate>2010-12-06</pubdate>
- </articleinfo>
-
- <section id="basics">
- <title>Basics</title>
-
- <para><xi:include href="include.txt" parse="text"><xi:fallback>include.txt not found.</xi:fallback></xi:include></para>
- </section>
-
-</article>
diff --git a/src/engine/SCons/Tool/docbook/test/basic/xinclude/sconstest-xinclude.py b/src/engine/SCons/Tool/docbook/test/basic/xinclude/sconstest-xinclude.py
deleted file mode 100644
index 56d0575..0000000
--- a/src/engine/SCons/Tool/docbook/test/basic/xinclude/sconstest-xinclude.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2001-2010 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-"""
-Test the XInclude builder.
-"""
-
-import TestSCons
-
-test = TestSCons.TestSCons()
-
-test.dir_fixture('image')
-test.file_fixture('../../../__init__.py','site_scons/site_tools/docbook/__init__.py')
-test.dir_fixture('../../../docbook-xsl-1.76.1','site_scons/site_tools/docbook/docbook-xsl-1.76.1')
-test.dir_fixture('../../../utils','site_scons/site_tools/docbook/utils')
-
-# Normal invocation
-test.run()
-test.must_exist(test.workpath('xincluded_manual.xml'))
-test.must_contain(test.workpath('xincluded_manual.xml'),'<para>This is an included text.')
-
-
-# Cleanup
-test.run(arguments='-c')
-test.must_not_exist(test.workpath('xincluded_manual.xml'))
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/src/engine/SCons/Tool/docbook/test/dependencies/xinclude/image/SConstruct b/src/engine/SCons/Tool/docbook/test/dependencies/xinclude/image/SConstruct
deleted file mode 100644
index abf7271..0000000
--- a/src/engine/SCons/Tool/docbook/test/dependencies/xinclude/image/SConstruct
+++ /dev/null
@@ -1,3 +0,0 @@
-env = Environment(tools=['docbook'])
-env.DocbookXInclude('manual')
-
diff --git a/src/engine/SCons/Tool/docbook/test/dependencies/xinclude/image/include.txt b/src/engine/SCons/Tool/docbook/test/dependencies/xinclude/image/include.txt
deleted file mode 100644
index 095a94b..0000000
--- a/src/engine/SCons/Tool/docbook/test/dependencies/xinclude/image/include.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is an included text.
diff --git a/src/engine/SCons/Tool/docbook/test/dependencies/xinclude/image/manual.xml b/src/engine/SCons/Tool/docbook/test/dependencies/xinclude/image/manual.xml
deleted file mode 100644
index 520d309..0000000
--- a/src/engine/SCons/Tool/docbook/test/dependencies/xinclude/image/manual.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (c) 2001-2010 The SCons Foundation
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--->
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<article xmlns:xi="http://www.w3.org/2001/XInclude">
- <title>The SCons qt4 tool</title>
-
- <articleinfo>
- <author>
- <surname>Dirk Baechle</surname>
- </author>
-
- <pubdate>2010-12-06</pubdate>
- </articleinfo>
-
- <section id="basics">
- <title>Basics</title>
-
- <para><xi:include href="include.txt" parse="text"><xi:fallback>include.txt not found.</xi:fallback></xi:include></para>
- </section>
-
-</article>
diff --git a/src/engine/SCons/Tool/docbook/test/dependencies/xinclude/sconstest-xinclude.py b/src/engine/SCons/Tool/docbook/test/dependencies/xinclude/sconstest-xinclude.py
deleted file mode 100644
index e72f016..0000000
--- a/src/engine/SCons/Tool/docbook/test/dependencies/xinclude/sconstest-xinclude.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2001-2010 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-"""
-Test implicit dependencies for the XInclude builder.
-"""
-
-import TestSCons
-
-test = TestSCons.TestSCons()
-
-test.dir_fixture('image')
-test.file_fixture('../../../__init__.py','site_scons/site_tools/docbook/__init__.py')
-test.dir_fixture('../../../docbook-xsl-1.76.1','site_scons/site_tools/docbook/docbook-xsl-1.76.1')
-test.dir_fixture('../../../utils','site_scons/site_tools/docbook/utils')
-
-# Normal invocation
-test.run()
-test.must_exist(test.workpath('xincluded_manual.xml'))
-test.must_contain(test.workpath('xincluded_manual.xml'),'<para>This is an included text.')
-
-# Change included file
-test.write('include.txt', 'This is another text.')
-
-# This should trigger a rebuild
-test.not_up_to_date(options='-n', arguments='.')
-
-# The new file should contain the changes
-test.run()
-test.must_exist(test.workpath('xincluded_manual.xml'))
-test.must_contain(test.workpath('xincluded_manual.xml'),'<para>This is another text.')
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/src/engine/SCons/Tool/docbook/test/rootname/htmlchunked/image/SConstruct b/src/engine/SCons/Tool/docbook/test/rootname/htmlchunked/image/SConstruct
deleted file mode 100644
index 905eec1..0000000
--- a/src/engine/SCons/Tool/docbook/test/rootname/htmlchunked/image/SConstruct
+++ /dev/null
@@ -1,3 +0,0 @@
-env = Environment(tools=['docbook'])
-env.DocbookHtmlChunked('manual.html','manual', xsl='html.xsl')
-
diff --git a/src/engine/SCons/Tool/docbook/test/rootname/htmlchunked/image/html.xsl b/src/engine/SCons/Tool/docbook/test/rootname/htmlchunked/image/html.xsl
deleted file mode 100644
index 49824df..0000000
--- a/src/engine/SCons/Tool/docbook/test/rootname/htmlchunked/image/html.xsl
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Copyright (c) 2001-2010 The SCons Foundation
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--->
-<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- version="1.0">
-
- <xsl:import href="file:///usr/share/xml/docbook/stylesheet/docbook-xsl/html/chunkfast.xsl"/>
-
-<xsl:param name="l10n.gentext.default.language" select="'en'"/>
-<xsl:param name="section.autolabel" select="1"/>
-<xsl:param name="root.filename" select="'manual'"/>
-<xsl:param name="html.stylesheet" select="'scons.css'"/>
-<xsl:param name="generate.toc">
-/appendix toc,title
-article/appendix nop
-/article toc,title
-book toc,title,figure,table,example,equation
-/chapter toc,title
-part toc,title
-/preface toc,title
-reference toc,title
-/sect1 toc
-/sect2 toc
-/sect3 toc
-/sect4 toc
-/sect5 toc
-/section toc
-set toc,title
-</xsl:param>
-
-</xsl:stylesheet>
-
diff --git a/src/engine/SCons/Tool/docbook/test/rootname/htmlchunked/image/manual.xml b/src/engine/SCons/Tool/docbook/test/rootname/htmlchunked/image/manual.xml
deleted file mode 100644
index ca12e0e..0000000
--- a/src/engine/SCons/Tool/docbook/test/rootname/htmlchunked/image/manual.xml
+++ /dev/null
@@ -1,388 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (c) 2001-2010 The SCons Foundation
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--->
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<article>
- <title>The SCons qt4 tool</title>
-
- <articleinfo>
- <author>
- <surname>Dirk Baechle</surname>
- </author>
-
- <pubdate>2010-12-06</pubdate>
- </articleinfo>
-
- <section id="basics">
- <title>Basics</title>
-
- <para>This tool can be used to compile Qt projects, designed for versions
- 4.x.y and higher. It is not usable for Qt3 and older versions, since some
- of the helper tools (<literal>moc</literal>, <literal>uic</literal>)
- behave different.</para>
-
- <section id="install">
- <title>Install</title>
-
- <para>Installing it, requires you to copy (or, even better: checkout)
- the contents of the package's <literal>qt4</literal> folder to</para>
-
- <orderedlist>
- <listitem>
- <para><quote><literal>/path_to_your_project/site_scons/site_tools/qt4</literal></quote>,
- if you need the Qt4 Tool in one project only, or</para>
- </listitem>
-
- <listitem>
- <para><quote><literal>~/.scons/site_scons/site_tools/qt4</literal></quote>,
- for a system-wide installation under your current login.</para>
- </listitem>
- </orderedlist>
-
- <para>For more infos about this, please refer to</para>
-
- <itemizedlist>
- <listitem>
- <para>the SCons User's Guide, chap. 17.7 "Where to put your custom
- Builders and Tools" and</para>
- </listitem>
-
- <listitem>
- <para>the SCons Tools Wiki page at <ulink
- url="http://scons.org/wiki/ToolsIndex">http://scons.org/wiki/ToolsIndex</ulink>.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="activation">
- <title>How to activate</title>
-
- <para>For activating the tool "qt4", you have to add its name to the
- Environment constructor, like this</para>
-
- <screen>env = Environment(tools=['default','qt4'])
-</screen>
-
- <para>On its startup, the Qt4 tool tries to read the variable
- <literal>QT4DIR</literal> from the current Environment and
- <literal>os.environ</literal>. If it is not set, the value of
- <literal>QTDIR</literal> (in Environment/<literal>os.environ</literal>)
- is used as a fallback.</para>
-
- <para>So, you either have to explicitly give the path of your Qt4
- installation to the Environment with</para>
-
- <screen>env['QT4DIR'] = '/usr/local/Trolltech/Qt-4.2.3'
-</screen>
-
- <para>or set the <literal>QT4DIR</literal> as environment variable in
- your shell.</para>
- </section>
-
- <section id="requirements">
- <title>Requirements</title>
-
- <para>Under Linux, "qt4" uses the system tool
- <literal>pkg-config</literal> for automatically setting the required
- compile and link flags of the single Qt4 modules (like QtCore,
- QtGui,...). This means that</para>
-
- <orderedlist>
- <listitem>
- <para>you should have <literal>pkg-config</literal> installed,
- and</para>
- </listitem>
-
- <listitem>
- <para>you additionally have to set
- <literal>PKG_CONFIG_PATH</literal> in your shell environment, such
- that it points to $<literal>QT4DIR/lib/pkgconfig</literal> (or
- $<literal>QT4DIR/lib</literal> for some older versions).</para>
- </listitem>
- </orderedlist>
-
- <para>Based on these two environment variables
- (<literal>QT4DIR</literal> and <literal>PKG_CONFIG_PATH</literal>), the
- "qt4" tool initializes all <literal>QT4_*</literal> construction
- variables listed in the Reference manual. This happens when the tool is
- "detected" during Environment construction. As a consequence, the setup
- of the tool gets a two-stage process, if you want to override the values
- provided by your current shell settings:</para>
-
- <screen># Stage 1: create plain environment
-qtEnv = Environment()
-# Set new vars
-qtEnv['QT4DIR'] = '/usr/local/Trolltech/Qt-4.2.3
-qtEnv['ENV']['PKG_CONFIG_PATH'] = '/usr/local/Trolltech/Qt-4.2.3/lib/pkgconfig'
-# Stage 2: add qt4 tool
-qtEnv.Tool('qt4')
-</screen>
- </section>
- </section>
-
- <section id="boilerplate">
- <title>Suggested boilerplate</title>
-
- <para>Based on the requirements above, we suggest a simple ready-to-go
- setup as follows:</para>
-
- <para>SConstruct</para>
-
- <screen># Detect Qt version
-qtdir = detectLatestQtDir()
-
-# Create base environment
-baseEnv = Environment()
-#...further customization of base env
-
-# Clone Qt environment
-qtEnv = baseEnv.Clone()
-# Set QT4DIR and PKG_CONFIG_PATH
-qtEnv['ENV']['PKG_CONFIG_PATH'] = os.path.join(qtdir, 'lib/pkgconfig')
-qtEnv['QT4DIR'] = qtdir
-# Add qt4 tool
-qtEnv.Tool('qt4')
-#...further customization of qt env
-
-# Export environments
-Export('baseEnv qtEnv')
-
-# Your other stuff...
-# ...including the call to your SConscripts
-</screen>
-
- <para>In a SConscript</para>
-
- <screen># Get the Qt4 environment
-Import('qtEnv')
-# Clone it
-env = qtEnv.clone()
-# Patch it
-env.Append(CCFLAGS=['-m32']) # or whatever
-# Use it
-env.StaticLibrary('foo', Glob('*.cpp'))
-</screen>
-
- <para>The detection of the Qt directory could be as simple as directly
- assigning a fixed path</para>
-
- <screen>def detectLatestQtDir():
- return "/usr/local/qt4.3.2"
-</screen>
-
- <para>or a little more sophisticated</para>
-
- <screen># Tries to detect the path to the installation of Qt with
-# the highest version number
-def detectLatestQtDir():
- if sys.platform.startswith("linux"):
- # Simple check: inspect only '/usr/local/Trolltech'
- paths = glob.glob('/usr/local/Trolltech/*')
- if len(paths):
- paths.sort()
- return paths[-1]
- else:
- return ""
- else:
- # Simple check: inspect only 'C:\Qt'
- paths = glob.glob('C:\\Qt\\*')
- if len(paths):
- paths.sort()
- return paths[-1]
- else:
- return os.environ.get("QTDIR","")
-</screen>
- </section>
-
- <section id="firstproject">
- <title>A first project</title>
-
- <para>The following SConscript is for a simple project with some cxx
- files, using the QtCore, QtGui and QtNetwork modules:</para>
-
- <screen>Import('qtEnv')
-env = qtEnv.Clone()
-env.EnableQt4Modules([
- 'QtGui',
- 'QtCore',
- 'QtNetwork'
- ])
-# Add your CCFLAGS and CPPPATHs to env here...
-
-env.Program('foo', Glob('*.cpp'))
-</screen>
- </section>
-
- <section id="mocup">
- <title>MOC it up</title>
-
- <para>For the basic support of automocing, nothing needs to be done by the
- user. The tool usually detects the <literal>Q_OBJECT</literal> macro and
- calls the <quote><literal>moc</literal></quote> executable
- accordingly.</para>
-
- <para>If you don't want this, you can switch off the automocing by
- a</para>
-
- <screen>env['QT4_AUTOSCAN'] = 0
-</screen>
-
- <para>in your SConscript file. Then, you have to moc your files
- explicitly, using the Moc4 builder.</para>
-
- <para>You can also switch to an extended automoc strategy with</para>
-
- <screen>env['QT4_AUTOSCAN_STRATEGY'] = 1
-</screen>
-
- <para>Please read the description of the
- <literal>QT4_AUTOSCAN_STRATEGY</literal> variable in the Reference manual
- for details.</para>
-
- <para>For debugging purposes, you can set the variable
- <literal>QT4_DEBUG</literal> with</para>
-
- <screen>env['QT4_DEBUG'] = 1
-</screen>
-
- <para>which outputs a lot of messages during automocing.</para>
- </section>
-
- <section id="forms">
- <title>Forms (.ui)</title>
-
- <para>The header files with setup code for your GUI classes, are not
- compiled automatically from your <literal>.ui</literal> files. You always
- have to call the Uic4 builder explicitly like</para>
-
- <screen>env.Uic4(Glob('*.ui'))
-env.Program('foo', Glob('*.cpp'))
-</screen>
- </section>
-
- <section id="resources">
- <title>Resource files (.qrc)</title>
-
- <para>Resource files are not built automatically, you always have to add
- the names of the <literal>.qrc</literal> files to the source list for your
- program or library:</para>
-
- <screen>env.Program('foo', Glob('*.cpp')+Glob('*.qrc'))
-</screen>
-
- <para>For each of the Resource input files, its prefix defines the name of
- the resulting resource. An appropriate
- <quote><literal>-name</literal></quote> option is added to the call of the
- <literal>rcc</literal> executable by default.</para>
-
- <para>You can also call the Qrc4 builder explicitly as</para>
-
- <screen>qrccc = env.Qrc4('foo') # ['foo.qrc'] -&gt; ['qrc_foo.cc']
-</screen>
-
- <para>or (overriding the default suffix)</para>
-
- <screen>qrccc = env.Qrc4('myprefix_foo.cxx','foo.qrc') # -&gt; ['qrc_myprefix_foo.cxx']
-</screen>
-
- <para>and then add the resulting cxx file to the sources of your
- Program/Library:</para>
-
- <screen>env.Program('foo', Glob('*.cpp') + qrccc)
-</screen>
- </section>
-
- <section id="translation">
- <title>Translation files</title>
-
- <para>The update of the <literal>.ts</literal> files and the conversion to
- binary <literal>.qm</literal> files is not done automatically. You have to
- call the corresponding builders on your own.</para>
-
- <para>Example for updating a translation file:</para>
-
- <screen>env.Ts4('foo.ts','.') # -&gt; ['foo.ts']
-</screen>
-
- <para>By default, the <literal>.ts</literal> files are treated as
- <emphasis>precious</emphasis> targets. This means that they are not
- removed prior to a rebuild, but simply get updated. Additionally, they do
- not get cleaned on a <quote><literal>scons -c</literal></quote>. If you
- want to delete the translation files on the
- <quote><literal>-c</literal></quote> SCons command, you can set the
- variable <quote><literal>QT4_CLEAN_TS</literal></quote> like this</para>
-
- <screen>env['QT4_CLEAN_TS']=1
-</screen>
-
- <para>Example for releasing a translation file, i.e. compiling it to a
- <literal>.qm</literal> binary file:</para>
-
- <screen>env.Qm4('foo') # ['foo.ts'] -&gt; ['foo.qm']
-</screen>
-
- <para>or (overriding the output prefix)</para>
-
- <screen>env.Qm4('myprefix','foo') # ['foo.ts'] -&gt; ['myprefix.qm']
-</screen>
-
- <para>As an extension both, the Ts4() and Qm4 builder, support the
- definition of multiple targets. So, calling</para>
-
- <screen>env.Ts4(['app_en','app_de'], Glob('*.cpp'))
-</screen>
-
- <para>and</para>
-
- <screen>env.Qm4(['app','copy'], Glob('*.ts'))
-</screen>
-
- <para>should work fine.</para>
-
- <para>Finally, two short notes about the support of directories for the
- Ts4() builder. You can pass an arbitrary mix of cxx files and subdirs to
- it, as in</para>
-
- <screen>env.Ts4('app_en',['sub1','appwindow.cpp','main.cpp']))
-</screen>
-
- <para>where <literal>sub1</literal> is a folder that gets scanned
- recursively for cxx files by <literal>lupdate</literal>. But like this,
- you lose all dependency information for the subdir, i.e. if a file inside
- the folder changes, the .ts file is not updated automatically! In this
- case you should tell SCons to always update the target:</para>
-
- <screen>ts = env.Ts4('app_en',['sub1','appwindow.cpp','main.cpp'])
-env.AlwaysBuild(ts)
-</screen>
-
- <para>Last note: specifying the current folder
- <quote><literal>.</literal></quote> as input to Ts4() and storing the
- resulting .ts file in the same directory, leads to a dependency cycle! You
- then have to store the .ts and .qm files outside of the current folder, or
- use <literal>Glob('*.cpp'))</literal> instead.</para>
- </section>
-</article>
diff --git a/src/engine/SCons/Tool/docbook/test/rootname/htmlchunked/sconstest-htmlchunked.py b/src/engine/SCons/Tool/docbook/test/rootname/htmlchunked/sconstest-htmlchunked.py
deleted file mode 100644
index 7c5511e..0000000
--- a/src/engine/SCons/Tool/docbook/test/rootname/htmlchunked/sconstest-htmlchunked.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2001-2010 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-"""
-Test the root.name argument for the chunked HTML builder.
-"""
-
-import TestSCons
-
-test = TestSCons.TestSCons()
-
-test.dir_fixture('image')
-test.file_fixture('../../../__init__.py','site_scons/site_tools/docbook/__init__.py')
-test.dir_fixture('../../../docbook-xsl-1.76.1','site_scons/site_tools/docbook/docbook-xsl-1.76.1')
-test.dir_fixture('../../../utils','site_scons/site_tools/docbook/utils')
-
-# Normal invocation
-test.run(stderr=None)
-test.must_exist(test.workpath('manual.html'))
-
-# Cleanup
-test.run(arguments='-c')
-test.must_not_exist(test.workpath('manual.html'))
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/src/engine/SCons/Tool/docbook/test/rootname/htmlhelp/image/SConstruct b/src/engine/SCons/Tool/docbook/test/rootname/htmlhelp/image/SConstruct
deleted file mode 100644
index 913240b..0000000
--- a/src/engine/SCons/Tool/docbook/test/rootname/htmlhelp/image/SConstruct
+++ /dev/null
@@ -1,3 +0,0 @@
-env = Environment(tools=['docbook'])
-env.DocbookHtmlhelp('manual.html', 'manual', xsl='htmlhelp.xsl')
-
diff --git a/src/engine/SCons/Tool/docbook/test/rootname/htmlhelp/image/htmlhelp.xsl b/src/engine/SCons/Tool/docbook/test/rootname/htmlhelp/image/htmlhelp.xsl
deleted file mode 100644
index 4544b94..0000000
--- a/src/engine/SCons/Tool/docbook/test/rootname/htmlhelp/image/htmlhelp.xsl
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Copyright (c) 2001-2010 The SCons Foundation
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--->
-<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- version="1.0">
-
- <xsl:import href="file:///usr/share/xml/docbook/stylesheet/docbook-xsl/htmlhelp/htmlhelp.xsl"/>
-
-<xsl:param name="l10n.gentext.default.language" select="'en'"/>
-<xsl:param name="section.autolabel" select="1"/>
-<xsl:param name="root.filename" select="'manual'"/>
-<xsl:param name="html.stylesheet" select="'scons.css'"/>
-<xsl:param name="generate.toc">
-/appendix toc,title
-article/appendix nop
-/article toc,title
-book toc,title,figure,table,example,equation
-/chapter toc,title
-part toc,title
-/preface toc,title
-reference toc,title
-/sect1 toc
-/sect2 toc
-/sect3 toc
-/sect4 toc
-/sect5 toc
-/section toc
-set toc,title
-</xsl:param>
-
-</xsl:stylesheet>
-
diff --git a/src/engine/SCons/Tool/docbook/test/rootname/htmlhelp/image/manual.xml b/src/engine/SCons/Tool/docbook/test/rootname/htmlhelp/image/manual.xml
deleted file mode 100644
index ca12e0e..0000000
--- a/src/engine/SCons/Tool/docbook/test/rootname/htmlhelp/image/manual.xml
+++ /dev/null
@@ -1,388 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (c) 2001-2010 The SCons Foundation
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--->
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<article>
- <title>The SCons qt4 tool</title>
-
- <articleinfo>
- <author>
- <surname>Dirk Baechle</surname>
- </author>
-
- <pubdate>2010-12-06</pubdate>
- </articleinfo>
-
- <section id="basics">
- <title>Basics</title>
-
- <para>This tool can be used to compile Qt projects, designed for versions
- 4.x.y and higher. It is not usable for Qt3 and older versions, since some
- of the helper tools (<literal>moc</literal>, <literal>uic</literal>)
- behave different.</para>
-
- <section id="install">
- <title>Install</title>
-
- <para>Installing it, requires you to copy (or, even better: checkout)
- the contents of the package's <literal>qt4</literal> folder to</para>
-
- <orderedlist>
- <listitem>
- <para><quote><literal>/path_to_your_project/site_scons/site_tools/qt4</literal></quote>,
- if you need the Qt4 Tool in one project only, or</para>
- </listitem>
-
- <listitem>
- <para><quote><literal>~/.scons/site_scons/site_tools/qt4</literal></quote>,
- for a system-wide installation under your current login.</para>
- </listitem>
- </orderedlist>
-
- <para>For more infos about this, please refer to</para>
-
- <itemizedlist>
- <listitem>
- <para>the SCons User's Guide, chap. 17.7 "Where to put your custom
- Builders and Tools" and</para>
- </listitem>
-
- <listitem>
- <para>the SCons Tools Wiki page at <ulink
- url="http://scons.org/wiki/ToolsIndex">http://scons.org/wiki/ToolsIndex</ulink>.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="activation">
- <title>How to activate</title>
-
- <para>For activating the tool "qt4", you have to add its name to the
- Environment constructor, like this</para>
-
- <screen>env = Environment(tools=['default','qt4'])
-</screen>
-
- <para>On its startup, the Qt4 tool tries to read the variable
- <literal>QT4DIR</literal> from the current Environment and
- <literal>os.environ</literal>. If it is not set, the value of
- <literal>QTDIR</literal> (in Environment/<literal>os.environ</literal>)
- is used as a fallback.</para>
-
- <para>So, you either have to explicitly give the path of your Qt4
- installation to the Environment with</para>
-
- <screen>env['QT4DIR'] = '/usr/local/Trolltech/Qt-4.2.3'
-</screen>
-
- <para>or set the <literal>QT4DIR</literal> as environment variable in
- your shell.</para>
- </section>
-
- <section id="requirements">
- <title>Requirements</title>
-
- <para>Under Linux, "qt4" uses the system tool
- <literal>pkg-config</literal> for automatically setting the required
- compile and link flags of the single Qt4 modules (like QtCore,
- QtGui,...). This means that</para>
-
- <orderedlist>
- <listitem>
- <para>you should have <literal>pkg-config</literal> installed,
- and</para>
- </listitem>
-
- <listitem>
- <para>you additionally have to set
- <literal>PKG_CONFIG_PATH</literal> in your shell environment, such
- that it points to $<literal>QT4DIR/lib/pkgconfig</literal> (or
- $<literal>QT4DIR/lib</literal> for some older versions).</para>
- </listitem>
- </orderedlist>
-
- <para>Based on these two environment variables
- (<literal>QT4DIR</literal> and <literal>PKG_CONFIG_PATH</literal>), the
- "qt4" tool initializes all <literal>QT4_*</literal> construction
- variables listed in the Reference manual. This happens when the tool is
- "detected" during Environment construction. As a consequence, the setup
- of the tool gets a two-stage process, if you want to override the values
- provided by your current shell settings:</para>
-
- <screen># Stage 1: create plain environment
-qtEnv = Environment()
-# Set new vars
-qtEnv['QT4DIR'] = '/usr/local/Trolltech/Qt-4.2.3
-qtEnv['ENV']['PKG_CONFIG_PATH'] = '/usr/local/Trolltech/Qt-4.2.3/lib/pkgconfig'
-# Stage 2: add qt4 tool
-qtEnv.Tool('qt4')
-</screen>
- </section>
- </section>
-
- <section id="boilerplate">
- <title>Suggested boilerplate</title>
-
- <para>Based on the requirements above, we suggest a simple ready-to-go
- setup as follows:</para>
-
- <para>SConstruct</para>
-
- <screen># Detect Qt version
-qtdir = detectLatestQtDir()
-
-# Create base environment
-baseEnv = Environment()
-#...further customization of base env
-
-# Clone Qt environment
-qtEnv = baseEnv.Clone()
-# Set QT4DIR and PKG_CONFIG_PATH
-qtEnv['ENV']['PKG_CONFIG_PATH'] = os.path.join(qtdir, 'lib/pkgconfig')
-qtEnv['QT4DIR'] = qtdir
-# Add qt4 tool
-qtEnv.Tool('qt4')
-#...further customization of qt env
-
-# Export environments
-Export('baseEnv qtEnv')
-
-# Your other stuff...
-# ...including the call to your SConscripts
-</screen>
-
- <para>In a SConscript</para>
-
- <screen># Get the Qt4 environment
-Import('qtEnv')
-# Clone it
-env = qtEnv.clone()
-# Patch it
-env.Append(CCFLAGS=['-m32']) # or whatever
-# Use it
-env.StaticLibrary('foo', Glob('*.cpp'))
-</screen>
-
- <para>The detection of the Qt directory could be as simple as directly
- assigning a fixed path</para>
-
- <screen>def detectLatestQtDir():
- return "/usr/local/qt4.3.2"
-</screen>
-
- <para>or a little more sophisticated</para>
-
- <screen># Tries to detect the path to the installation of Qt with
-# the highest version number
-def detectLatestQtDir():
- if sys.platform.startswith("linux"):
- # Simple check: inspect only '/usr/local/Trolltech'
- paths = glob.glob('/usr/local/Trolltech/*')
- if len(paths):
- paths.sort()
- return paths[-1]
- else:
- return ""
- else:
- # Simple check: inspect only 'C:\Qt'
- paths = glob.glob('C:\\Qt\\*')
- if len(paths):
- paths.sort()
- return paths[-1]
- else:
- return os.environ.get("QTDIR","")
-</screen>
- </section>
-
- <section id="firstproject">
- <title>A first project</title>
-
- <para>The following SConscript is for a simple project with some cxx
- files, using the QtCore, QtGui and QtNetwork modules:</para>
-
- <screen>Import('qtEnv')
-env = qtEnv.Clone()
-env.EnableQt4Modules([
- 'QtGui',
- 'QtCore',
- 'QtNetwork'
- ])
-# Add your CCFLAGS and CPPPATHs to env here...
-
-env.Program('foo', Glob('*.cpp'))
-</screen>
- </section>
-
- <section id="mocup">
- <title>MOC it up</title>
-
- <para>For the basic support of automocing, nothing needs to be done by the
- user. The tool usually detects the <literal>Q_OBJECT</literal> macro and
- calls the <quote><literal>moc</literal></quote> executable
- accordingly.</para>
-
- <para>If you don't want this, you can switch off the automocing by
- a</para>
-
- <screen>env['QT4_AUTOSCAN'] = 0
-</screen>
-
- <para>in your SConscript file. Then, you have to moc your files
- explicitly, using the Moc4 builder.</para>
-
- <para>You can also switch to an extended automoc strategy with</para>
-
- <screen>env['QT4_AUTOSCAN_STRATEGY'] = 1
-</screen>
-
- <para>Please read the description of the
- <literal>QT4_AUTOSCAN_STRATEGY</literal> variable in the Reference manual
- for details.</para>
-
- <para>For debugging purposes, you can set the variable
- <literal>QT4_DEBUG</literal> with</para>
-
- <screen>env['QT4_DEBUG'] = 1
-</screen>
-
- <para>which outputs a lot of messages during automocing.</para>
- </section>
-
- <section id="forms">
- <title>Forms (.ui)</title>
-
- <para>The header files with setup code for your GUI classes, are not
- compiled automatically from your <literal>.ui</literal> files. You always
- have to call the Uic4 builder explicitly like</para>
-
- <screen>env.Uic4(Glob('*.ui'))
-env.Program('foo', Glob('*.cpp'))
-</screen>
- </section>
-
- <section id="resources">
- <title>Resource files (.qrc)</title>
-
- <para>Resource files are not built automatically, you always have to add
- the names of the <literal>.qrc</literal> files to the source list for your
- program or library:</para>
-
- <screen>env.Program('foo', Glob('*.cpp')+Glob('*.qrc'))
-</screen>
-
- <para>For each of the Resource input files, its prefix defines the name of
- the resulting resource. An appropriate
- <quote><literal>-name</literal></quote> option is added to the call of the
- <literal>rcc</literal> executable by default.</para>
-
- <para>You can also call the Qrc4 builder explicitly as</para>
-
- <screen>qrccc = env.Qrc4('foo') # ['foo.qrc'] -&gt; ['qrc_foo.cc']
-</screen>
-
- <para>or (overriding the default suffix)</para>
-
- <screen>qrccc = env.Qrc4('myprefix_foo.cxx','foo.qrc') # -&gt; ['qrc_myprefix_foo.cxx']
-</screen>
-
- <para>and then add the resulting cxx file to the sources of your
- Program/Library:</para>
-
- <screen>env.Program('foo', Glob('*.cpp') + qrccc)
-</screen>
- </section>
-
- <section id="translation">
- <title>Translation files</title>
-
- <para>The update of the <literal>.ts</literal> files and the conversion to
- binary <literal>.qm</literal> files is not done automatically. You have to
- call the corresponding builders on your own.</para>
-
- <para>Example for updating a translation file:</para>
-
- <screen>env.Ts4('foo.ts','.') # -&gt; ['foo.ts']
-</screen>
-
- <para>By default, the <literal>.ts</literal> files are treated as
- <emphasis>precious</emphasis> targets. This means that they are not
- removed prior to a rebuild, but simply get updated. Additionally, they do
- not get cleaned on a <quote><literal>scons -c</literal></quote>. If you
- want to delete the translation files on the
- <quote><literal>-c</literal></quote> SCons command, you can set the
- variable <quote><literal>QT4_CLEAN_TS</literal></quote> like this</para>
-
- <screen>env['QT4_CLEAN_TS']=1
-</screen>
-
- <para>Example for releasing a translation file, i.e. compiling it to a
- <literal>.qm</literal> binary file:</para>
-
- <screen>env.Qm4('foo') # ['foo.ts'] -&gt; ['foo.qm']
-</screen>
-
- <para>or (overriding the output prefix)</para>
-
- <screen>env.Qm4('myprefix','foo') # ['foo.ts'] -&gt; ['myprefix.qm']
-</screen>
-
- <para>As an extension both, the Ts4() and Qm4 builder, support the
- definition of multiple targets. So, calling</para>
-
- <screen>env.Ts4(['app_en','app_de'], Glob('*.cpp'))
-</screen>
-
- <para>and</para>
-
- <screen>env.Qm4(['app','copy'], Glob('*.ts'))
-</screen>
-
- <para>should work fine.</para>
-
- <para>Finally, two short notes about the support of directories for the
- Ts4() builder. You can pass an arbitrary mix of cxx files and subdirs to
- it, as in</para>
-
- <screen>env.Ts4('app_en',['sub1','appwindow.cpp','main.cpp']))
-</screen>
-
- <para>where <literal>sub1</literal> is a folder that gets scanned
- recursively for cxx files by <literal>lupdate</literal>. But like this,
- you lose all dependency information for the subdir, i.e. if a file inside
- the folder changes, the .ts file is not updated automatically! In this
- case you should tell SCons to always update the target:</para>
-
- <screen>ts = env.Ts4('app_en',['sub1','appwindow.cpp','main.cpp'])
-env.AlwaysBuild(ts)
-</screen>
-
- <para>Last note: specifying the current folder
- <quote><literal>.</literal></quote> as input to Ts4() and storing the
- resulting .ts file in the same directory, leads to a dependency cycle! You
- then have to store the .ts and .qm files outside of the current folder, or
- use <literal>Glob('*.cpp'))</literal> instead.</para>
- </section>
-</article>
diff --git a/src/engine/SCons/Tool/docbook/test/rootname/htmlhelp/sconstest-htmlhelp.py b/src/engine/SCons/Tool/docbook/test/rootname/htmlhelp/sconstest-htmlhelp.py
deleted file mode 100644
index 02c69b0..0000000
--- a/src/engine/SCons/Tool/docbook/test/rootname/htmlhelp/sconstest-htmlhelp.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2001-2010 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-"""
-Test the root.name argument for the HTMLHELP builder.
-"""
-
-import TestSCons
-
-test = TestSCons.TestSCons()
-
-test.dir_fixture('image')
-test.file_fixture('../../../__init__.py','site_scons/site_tools/docbook/__init__.py')
-test.dir_fixture('../../../docbook-xsl-1.76.1','site_scons/site_tools/docbook/docbook-xsl-1.76.1')
-test.dir_fixture('../../../utils','site_scons/site_tools/docbook/utils')
-
-# Normal invocation
-test.run(stderr=None)
-test.must_exist(test.workpath('manual.html'))
-test.must_exist(test.workpath('htmlhelp.hhp'))
-test.must_exist(test.workpath('toc.hhc'))
-
-# Cleanup
-test.run(arguments='-c')
-test.must_not_exist(test.workpath('manual.html'))
-test.must_not_exist(test.workpath('htmlhelp.hhp'))
-test.must_not_exist(test.workpath('toc.hhc'))
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/src/engine/SCons/Tool/docbook/test/rootname/slideshtml/image/SConstruct b/src/engine/SCons/Tool/docbook/test/rootname/slideshtml/image/SConstruct
deleted file mode 100644
index 769314c..0000000
--- a/src/engine/SCons/Tool/docbook/test/rootname/slideshtml/image/SConstruct
+++ /dev/null
@@ -1,3 +0,0 @@
-env = Environment(tools=['docbook'])
-env.DocbookSlidesHtml('manual.html', 'virt', xsl='slides.xsl')
-
diff --git a/src/engine/SCons/Tool/docbook/test/rootname/slideshtml/image/slides.xsl b/src/engine/SCons/Tool/docbook/test/rootname/slideshtml/image/slides.xsl
deleted file mode 100644
index 23fb3e8..0000000
--- a/src/engine/SCons/Tool/docbook/test/rootname/slideshtml/image/slides.xsl
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Copyright (c) 2001-2010 The SCons Foundation
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--->
-<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- version="1.0">
-
- <xsl:import href="file:///usr/share/xml/docbook/stylesheet/docbook-xsl/slides/html/plain.xsl"/>
-
-<xsl:param name="l10n.gentext.default.language" select="'en'"/>
-<xsl:param name="section.autolabel" select="1"/>
-<xsl:param name="titlefoil.html" select="'manual.html'"/>
-<xsl:param name="html.stylesheet" select="'scons.css'"/>
-<xsl:param name="generate.toc">
-/appendix toc,title
-article/appendix nop
-/article toc,title
-book toc,title,figure,table,example,equation
-/chapter toc,title
-part toc,title
-/preface toc,title
-reference toc,title
-/sect1 toc
-/sect2 toc
-/sect3 toc
-/sect4 toc
-/sect5 toc
-/section toc
-set toc,title
-</xsl:param>
-
-</xsl:stylesheet>
-
diff --git a/src/engine/SCons/Tool/docbook/test/rootname/slideshtml/image/virt.xml b/src/engine/SCons/Tool/docbook/test/rootname/slideshtml/image/virt.xml
deleted file mode 100644
index aec1fd7..0000000
--- a/src/engine/SCons/Tool/docbook/test/rootname/slideshtml/image/virt.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE slides PUBLIC "-//Norman Walsh//DTD Slides XML V3.3.1//EN"
-"file:///usr/share/xml/docbook/custom/slides/3.3.1/schema/dtd/slides.dtd">
-<slides>
- <slidesinfo>
- <title>Virtuelles Kopieren</title>
-
- <titleabbrev>Virtuelles Kopieren</titleabbrev>
-
- <copyright>
- <year>2007</year>
-
- <holder>Femutec GmbH</holder>
- </copyright>
-
- <author>
- <firstname>Dirk</firstname>
-
- <surname>Baechle</surname>
- </author>
-
- <pubdate>09.07.2007</pubdate>
- </slidesinfo>
-
-<foilgroup>
-<title>Group</title>
- <foil>
- <title>sfForming</title>
-
- </foil>
-</foilgroup>
-</slides>
-
diff --git a/src/engine/SCons/Tool/docbook/test/rootname/slideshtml/sconstest-slideshtml.py b/src/engine/SCons/Tool/docbook/test/rootname/slideshtml/sconstest-slideshtml.py
deleted file mode 100644
index 820a615..0000000
--- a/src/engine/SCons/Tool/docbook/test/rootname/slideshtml/sconstest-slideshtml.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2001-2010 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-"""
-Test the root.name argument for the Slides HTML builder.
-"""
-
-import TestSCons
-
-test = TestSCons.TestSCons()
-
-test.dir_fixture('image')
-test.file_fixture('../../../__init__.py','site_scons/site_tools/docbook/__init__.py')
-test.dir_fixture('../../../docbook-xsl-1.76.1','site_scons/site_tools/docbook/docbook-xsl-1.76.1')
-test.dir_fixture('../../../utils','site_scons/site_tools/docbook/utils')
-
-# Normal invocation
-test.run(stderr=None)
-test.must_exist(test.workpath('manual.html'))
-test.must_exist(test.workpath('toc.html'))
-test.must_exist(test.workpath('foil01.html'))
-test.must_exist(test.workpath('foilgroup01.html'))
-
-# Cleanup
-test.run(arguments='-c')
-test.must_not_exist(test.workpath('manual.html'))
-test.must_not_exist(test.workpath('toc.html'))
-test.must_not_exist(test.workpath('foil01.html'))
-test.must_not_exist(test.workpath('foilgroup01.html'))
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4: