summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Tool')
-rw-r--r--src/engine/SCons/Tool/BitKeeper.xml4
-rw-r--r--src/engine/SCons/Tool/CVS.xml4
-rw-r--r--src/engine/SCons/Tool/JavaCommon.py34
-rw-r--r--src/engine/SCons/Tool/JavaCommonTests.py44
-rw-r--r--src/engine/SCons/Tool/Perforce.xml2
-rw-r--r--src/engine/SCons/Tool/RCS.xml6
-rw-r--r--src/engine/SCons/Tool/SCCS.xml2
-rw-r--r--src/engine/SCons/Tool/__init__.xml34
-rw-r--r--src/engine/SCons/Tool/applelink.xml12
-rw-r--r--src/engine/SCons/Tool/ar.xml4
-rw-r--r--src/engine/SCons/Tool/as.xml9
-rw-r--r--src/engine/SCons/Tool/c++.xml14
-rw-r--r--src/engine/SCons/Tool/cc.xml43
-rw-r--r--src/engine/SCons/Tool/dvi.xml10
-rw-r--r--src/engine/SCons/Tool/dvipdf.xml4
-rw-r--r--src/engine/SCons/Tool/dvips.xml4
-rw-r--r--src/engine/SCons/Tool/f77.xml66
-rw-r--r--src/engine/SCons/Tool/f90.xml66
-rw-r--r--src/engine/SCons/Tool/f95.xml66
-rw-r--r--src/engine/SCons/Tool/fortran.xml54
-rw-r--r--src/engine/SCons/Tool/gs.xml2
-rw-r--r--src/engine/SCons/Tool/intelc.py4
-rw-r--r--src/engine/SCons/Tool/jar.xml4
-rw-r--r--src/engine/SCons/Tool/javac.xml4
-rw-r--r--src/engine/SCons/Tool/javah.xml6
-rw-r--r--src/engine/SCons/Tool/latex.xml4
-rw-r--r--src/engine/SCons/Tool/lex.xml2
-rw-r--r--src/engine/SCons/Tool/link.xml33
-rw-r--r--src/engine/SCons/Tool/m4.xml4
-rw-r--r--src/engine/SCons/Tool/mslink.xml14
-rw-r--r--src/engine/SCons/Tool/msvc.py7
-rw-r--r--src/engine/SCons/Tool/msvc.xml12
-rw-r--r--src/engine/SCons/Tool/msvs.py69
-rw-r--r--src/engine/SCons/Tool/msvs.xml24
-rw-r--r--src/engine/SCons/Tool/pdf.xml2
-rw-r--r--src/engine/SCons/Tool/qt.xml36
-rw-r--r--src/engine/SCons/Tool/rmic.xml6
-rw-r--r--src/engine/SCons/Tool/rpcgen.xml8
-rw-r--r--src/engine/SCons/Tool/swig.xml12
-rw-r--r--src/engine/SCons/Tool/tar.xml2
-rw-r--r--src/engine/SCons/Tool/tex.py62
-rw-r--r--src/engine/SCons/Tool/tex.xml6
-rw-r--r--src/engine/SCons/Tool/yacc.xml4
-rw-r--r--src/engine/SCons/Tool/zip.xml2
44 files changed, 486 insertions, 325 deletions
diff --git a/src/engine/SCons/Tool/BitKeeper.xml b/src/engine/SCons/Tool/BitKeeper.xml
index 3fef72d..8ab7049 100644
--- a/src/engine/SCons/Tool/BitKeeper.xml
+++ b/src/engine/SCons/Tool/BitKeeper.xml
@@ -27,14 +27,14 @@ fetching source files using BitKeeper.
<summary>
The string displayed when fetching
a source file using BitKeeper.
-If this is not set, then &cv-BITKEEPERCOM;
+If this is not set, then &cv-link-BITKEEPERCOM;
(the command line) is displayed.
</summary>
</cvar>
<cvar name="BITKEEPERGET">
<summary>
-The command (&cv-BITKEEPER;) and subcommand
+The command (&cv-link-BITKEEPER;) and subcommand
for fetching source files using BitKeeper.
</summary>
</cvar>
diff --git a/src/engine/SCons/Tool/CVS.xml b/src/engine/SCons/Tool/CVS.xml
index 9ad5fb5..fb666e8 100644
--- a/src/engine/SCons/Tool/CVS.xml
+++ b/src/engine/SCons/Tool/CVS.xml
@@ -33,7 +33,7 @@ fetch source files from a CVS repository.
<summary>
The string displayed when fetching
a source file from a CVS repository.
-If this is not set, then &cv-CVSCOM;
+If this is not set, then &cv-link-CVSCOM;
(the command line) is displayed.
</summary>
</cvar>
@@ -51,6 +51,6 @@ to specify from where the files must be fetched.
<summary>
The path to the CVS repository.
This is referenced in the default
-&cv-CVSFLAGS; value.
+&cv-link-CVSFLAGS; value.
</summary>
</cvar>
diff --git a/src/engine/SCons/Tool/JavaCommon.py b/src/engine/SCons/Tool/JavaCommon.py
index 09ce1d1..177d579 100644
--- a/src/engine/SCons/Tool/JavaCommon.py
+++ b/src/engine/SCons/Tool/JavaCommon.py
@@ -51,8 +51,9 @@ if java_parsing:
# any alphanumeric token (keyword, class name, specifier);
# the multi-line comment begin and end tokens /* and */;
# array declarations "[]";
- # semi-colons.
- _reToken = re.compile(r'(\n|\\\\|//|\\[\'"]|[\'"\{\}\;]|' +
+ # semi-colons;
+ # periods.
+ _reToken = re.compile(r'(\n|\\\\|//|\\[\'"]|[\'"\{\}\;\.]|' +
r'[A-Za-z_][\w\.]*|/\*|\*/|\[\])')
class OuterState:
@@ -101,20 +102,26 @@ if java_parsing:
self.skipState = ret
return ret
+ def openBracket(self):
+ self.brackets = self.brackets + 1
+
+ def closeBracket(self):
+ self.brackets = self.brackets - 1
+ if len(self.stackBrackets) and \
+ self.brackets == self.stackBrackets[-1]:
+ self.listOutputs.append(string.join(self.listClasses, '$'))
+ self.listClasses.pop()
+ self.stackBrackets.pop()
+
def parseToken(self, token):
if token[:2] == '//':
return IgnoreState('\n', self)
elif token == '/*':
return IgnoreState('*/', self)
elif token == '{':
- self.brackets = self.brackets + 1
+ self.openBracket()
elif token == '}':
- self.brackets = self.brackets - 1
- if len(self.stackBrackets) and \
- self.brackets == self.stackBrackets[-1]:
- self.listOutputs.append(string.join(self.listClasses, '$'))
- self.listClasses.pop()
- self.stackBrackets.pop()
+ self.closeBracket()
elif token in [ '"', "'" ]:
return IgnoreState(token, self)
elif token == "new":
@@ -129,13 +136,17 @@ if java_parsing:
return self.__getClassState()
elif token == 'package':
return self.__getPackageState()
+ elif token == '.':
+ # Skip the attribute, it might be named "class", in which
+ # case we don't want to treat the following token as
+ # an inner class name...
+ return self.__getSkipState()
return self
def addAnonClass(self):
"""Add an anonymous inner class"""
clazz = self.listClasses[0]
self.listOutputs.append('%s$%d' % (clazz, self.nextAnon))
- self.brackets = self.brackets + 1
self.nextAnon = self.nextAnon + 1
def setPackage(self, package):
@@ -153,7 +164,10 @@ if java_parsing:
if token == '\n':
return self
if token == '{':
+ self.outer_state.openBracket()
self.outer_state.addAnonClass()
+ elif token == '}':
+ self.outer_state.closeBracket()
elif token in ['"', "'"]:
return IgnoreState(token, self)
return self.outer_state
diff --git a/src/engine/SCons/Tool/JavaCommonTests.py b/src/engine/SCons/Tool/JavaCommonTests.py
index 4a7f9cf..853afd4 100644
--- a/src/engine/SCons/Tool/JavaCommonTests.py
+++ b/src/engine/SCons/Tool/JavaCommonTests.py
@@ -286,6 +286,50 @@ public abstract class TestClass
assert classes == ['TestClass$1', 'TestClass$2', 'TestClass'], classes
+ def test_closing_bracket(self):
+ """Test finding a closing bracket instead of an anonymous class"""
+ pkg_dir, classes = SCons.Tool.JavaCommon.parse_java("""\
+class TestSCons {
+ public static void main(String[] args) {
+ Foo[] fooArray = new Foo[] { new Foo() };
+ }
+}
+
+class Foo { }
+""")
+ assert pkg_dir == None, pkg_dir
+ assert classes == ['TestSCons', 'Foo'], classes
+
+
+ def test_dot_class_attributes(self):
+ """Test handling ".class" attributes"""
+ pkg_dir, classes = SCons.Tool.JavaCommon.parse_java("""\
+public class Test extends Object
+{
+ static {
+ Class c = Object[].class;
+ Object[] s = new Object[] {};
+ }
+}
+""")
+ assert classes == ['Test'], classes
+
+ pkg_dir, classes = SCons.Tool.JavaCommon.parse_java("""\
+public class A {
+ public class B {
+ public void F(Object[] o) {
+ F(new Object[] {Object[].class});
+ }
+ public void G(Object[] o) {
+ F(new Object[] {});
+ }
+ }
+}
+""")
+ assert pkg_dir == None, pkg_dir
+ assert classes == ['A$B', 'A'], classes
+
+
if __name__ == "__main__":
suite = unittest.TestSuite()
diff --git a/src/engine/SCons/Tool/Perforce.xml b/src/engine/SCons/Tool/Perforce.xml
index 87565af..b8824ed 100644
--- a/src/engine/SCons/Tool/Perforce.xml
+++ b/src/engine/SCons/Tool/Perforce.xml
@@ -27,7 +27,7 @@ fetch source files from Perforce.
<summary>
The string displayed when
fetching a source file from Perforce.
-If this is not set, then &cv-P4COM; (the command line) is displayed.
+If this is not set, then &cv-link-P4COM; (the command line) is displayed.
</summary>
</cvar>
diff --git a/src/engine/SCons/Tool/RCS.xml b/src/engine/SCons/Tool/RCS.xml
index 5e3b83d..2c89a5b 100644
--- a/src/engine/SCons/Tool/RCS.xml
+++ b/src/engine/SCons/Tool/RCS.xml
@@ -16,7 +16,7 @@ The RCS executable.
Note that this variable is not actually used
for the command to fetch source files from RCS;
see the
-&cv-RCS_CO;
+&cv-link-RCS_CO;
construction variable, below.
</summary>
</cvar>
@@ -39,13 +39,13 @@ fetch (checkout) source files from RCS.
<summary>
The string displayed when fetching
a source file from RCS.
-If this is not set, then &cv-RCS_COCOM;
+If this is not set, then &cv-link-RCS_COCOM;
(the command line) is displayed.
</summary>
</cvar>
<cvar name="RCS_COFLAGS">
<summary>
-Options that are passed to the &cv-RCS_CO; command.
+Options that are passed to the &cv-link-RCS_CO; command.
</summary>
</cvar>
diff --git a/src/engine/SCons/Tool/SCCS.xml b/src/engine/SCons/Tool/SCCS.xml
index 822547c..9f7539d 100644
--- a/src/engine/SCons/Tool/SCCS.xml
+++ b/src/engine/SCons/Tool/SCCS.xml
@@ -27,7 +27,7 @@ fetch source files from SCCS.
<summary>
The string displayed when fetching
a source file from a CVS repository.
-If this is not set, then &cv-SCCSCOM;
+If this is not set, then &cv-link-SCCSCOM;
(the command line) is displayed.
</summary>
</cvar>
diff --git a/src/engine/SCons/Tool/__init__.xml b/src/engine/SCons/Tool/__init__.xml
index cc7e145..ff50450 100644
--- a/src/engine/SCons/Tool/__init__.xml
+++ b/src/engine/SCons/Tool/__init__.xml
@@ -8,7 +8,7 @@ See its __doc__ string for a discussion of the format.
<summary>
Builds a C source file given a lex (<filename>.l</filename>)
or yacc (<filename>.y</filename>) input file.
-The suffix specified by the &cv-CFILESUFFIX; construction variable
+The suffix specified by the &cv-link-CFILESUFFIX; construction variable
(<filename>.c</filename> by default)
is automatically added to the target
if it is not already present.
@@ -28,7 +28,7 @@ env.CFile(target = 'bar', source = 'bar.y')
Builds a C++ source file given a lex (<filename>.ll</filename>)
or yacc (<filename>.yy</filename>)
input file.
-The suffix specified by the &cv-CXXFILESUFFIX; construction variable
+The suffix specified by the &cv-link-CXXFILESUFFIX; construction variable
(<filename>.cc</filename> by default)
is automatically added to the target
if it is not already present.
@@ -82,9 +82,9 @@ see that builder method's description for
a list of legal source file suffixes
and how they are interpreted.
The target executable file prefix
-(specified by the &cv-PROGPREFIX; construction variable; nothing by default)
+(specified by the &cv-link-PROGPREFIX; construction variable; nothing by default)
and suffix
-(specified by the &cv-PROGSUFFIX; construction variable;
+(specified by the &cv-link-PROGSUFFIX; construction variable;
by default, <filename>.exe</filename> on Windows systems,
nothing on POSIX systems)
are automatically added to the target if not already present.
@@ -109,11 +109,11 @@ compiled to object files.
The static library prefix and suffix (if any)
are automatically added to the target.
The target library file prefix
-(specified by the &cv-SHLIBPREFIX; construction variable;
+(specified by the &cv-link-SHLIBPREFIX; construction variable;
by default, <filename>lib</filename> on POSIX systems,
nothing on Windows systems)
and suffix
-(specified by the &cv-SHLIBSUFFIX; construction variable;
+(specified by the &cv-link-SHLIBSUFFIX; construction variable;
by default, <filename>.dll</filename> on Windows systems,
<filename>.so</filename> on POSIX systems)
are automatically added to the target if not already present.
@@ -146,12 +146,12 @@ On Windows systems, specifying
will cause the <filename>.dll</filename> to be
registered after it is built using REGSVR32.
The command that is run
-("regsvr32" by default) is determined by &cv-REGSVR; construction
-variable, and the flags passed are determined by &cv-REGSVRFLAGS;. By
-default, &cv-REGSVRFLAGS; includes the <option>/s</option> option,
+("regsvr32" by default) is determined by &cv-link-REGSVR; construction
+variable, and the flags passed are determined by &cv-link-REGSVRFLAGS;. By
+default, &cv-link-REGSVRFLAGS; includes the <option>/s</option> option,
to prevent dialogs from popping
up and requiring user attention when it is run. If you change
-&cv-REGSVRFLAGS;, be sure to include the <option>/s</option> option.
+&cv-link-REGSVRFLAGS;, be sure to include the <option>/s</option> option.
For example,
<example>
@@ -186,10 +186,10 @@ and shared objects to be linked into a
shared library, and will use the same suffix for shared and normal
(static) objects.
The target object file prefix
-(specified by the &cv-SHOBJPREFIX; construction variable;
-by default, the same as &cv-OBJPREFIX;)
+(specified by the &cv-link-SHOBJPREFIX; construction variable;
+by default, the same as &cv-link-OBJPREFIX;)
and suffix
-(specified by the &cv-SHOBJSUFFIX; construction variable)
+(specified by the &cv-link-SHOBJSUFFIX; construction variable)
are automatically added to the target if not already present.
Examples:
@@ -218,11 +218,11 @@ compiled to object files.
The static library prefix and suffix (if any)
are automatically added to the target.
The target library file prefix
-(specified by the &cv-LIBPREFIX; construction variable;
+(specified by the &cv-link-LIBPREFIX; construction variable;
by default, <filename>lib</filename> on POSIX systems,
nothing on Windows systems)
and suffix
-(specified by the &cv-LIBSUFFIX; construction variable;
+(specified by the &cv-link-LIBSUFFIX; construction variable;
by default, <filename>.lib</filename> on Windows systems,
<filename>.a</filename> on POSIX systems)
are automatically added to the target if not already present.
@@ -279,9 +279,9 @@ Source files must have one of the following extensions:
</example>
The target object file prefix
-(specified by the &cv-OBJPREFIX; construction variable; nothing by default)
+(specified by the &cv-link-OBJPREFIX; construction variable; nothing by default)
and suffix
-(specified by the &cv-OBJSUFFIX; construction variable;
+(specified by the &cv-link-OBJSUFFIX; construction variable;
<filename>.obj</filename> on Windows systems,
<filename>.o</filename> on POSIX systems)
are automatically added to the target if not already present.
diff --git a/src/engine/SCons/Tool/applelink.xml b/src/engine/SCons/Tool/applelink.xml
index b9ea63d..d5fadbb 100644
--- a/src/engine/SCons/Tool/applelink.xml
+++ b/src/engine/SCons/Tool/applelink.xml
@@ -11,8 +11,8 @@ general user-supplied frameworks options to be added at
the end of a command
line building a loadable module.
(This has been largely superceded by
-the &cv-FRAMEWORKPATH;, &cv-FRAMEWORKPATHPREFIX;,
-&cv-FRAMEWORKPREFIX; and &cv-FRAMEWORKS; variables
+the &cv-link-FRAMEWORKPATH;, &cv-link-FRAMEWORKPATHPREFIX;,
+&cv-link-FRAMEWORKPREFIX; and &cv-link-FRAMEWORKS; variables
described above.)
</summary>
</cvar>
@@ -35,7 +35,7 @@ For example:
<summary>
On Mac OS X with gcc,
the prefix to be used for linking in frameworks
-(see &cv-FRAMEWORKS;).
+(see &cv-link-FRAMEWORKS;).
The default value is
<option>-framework</option>.
</summary>
@@ -57,7 +57,7 @@ a list containing the paths to search for frameworks.
Used by the compiler to find framework-style includes like
#include &lt;Fmwk/Header.h&gt;.
Used by the linker to find user-specified frameworks when linking (see
-&cv-FRAMEWORKS;).
+&cv-link-FRAMEWORKS;).
For example:
<example>
@@ -77,7 +77,7 @@ to the compiler and linker command lines.
<cvar name="FRAMEWORKPATHPREFIX">
<summary>
On Mac OS X with gcc, the prefix to be used for the FRAMEWORKPATH entries.
-(see &cv-FRAMEWORKPATH;).
+(see &cv-link-FRAMEWORKPATH;).
The default value is
<option>-F</option>.
</summary>
@@ -87,6 +87,6 @@ The default value is
<summary>
On Mac OS X with gcc, an automatically-generated construction variable
containing the linker command-line options corresponding to
-&cv-FRAMEWORKPATH;.
+&cv-link-FRAMEWORKPATH;.
</summary>
</cvar>
diff --git a/src/engine/SCons/Tool/ar.xml b/src/engine/SCons/Tool/ar.xml
index 24f886b..b26f634 100644
--- a/src/engine/SCons/Tool/ar.xml
+++ b/src/engine/SCons/Tool/ar.xml
@@ -26,7 +26,7 @@ The command line used to generate a static library from object files.
<summary>
The string displayed when an object file
is generated from an assembly-language source file.
-If this is not set, then &cv-ARCOM; (the command line) is displayed.
+If this is not set, then &cv-link-ARCOM; (the command line) is displayed.
<example>
env = Environment(ARCOMSTR = "Archiving $TARGET")
@@ -55,7 +55,7 @@ The command line used to index a static library archive.
<cvar name="RANLIBCOMSTR">
<summary>
The string displayed when a static library archive is indexed.
-If this is not set, then &cv-RANLIBCOM; (the command line) is displayed.
+If this is not set, then &cv-link-RANLIBCOM; (the command line) is displayed.
<example>
env = Environment(RANLIBCOMSTR = "Indexing $TARGET")
diff --git a/src/engine/SCons/Tool/as.xml b/src/engine/SCons/Tool/as.xml
index a2447bd..f61d26a 100644
--- a/src/engine/SCons/Tool/as.xml
+++ b/src/engine/SCons/Tool/as.xml
@@ -27,7 +27,7 @@ from an assembly-language source file.
<summary>
The string displayed when an object file
is generated from an assembly-language source file.
-If this is not set, then &cv-ASCOM; (the command line) is displayed.
+If this is not set, then &cv-link-ASCOM; (the command line) is displayed.
<example>
env = Environment(ASCOMSTR = "Assembling $TARGET")
@@ -46,7 +46,8 @@ General options passed to the assembler.
The command line used to assemble an assembly-language
source file into an object file
after first running the file through the C preprocessor.
-Any options specified in the &cv-ASFLAGS; and &cv-CPPFLAGS; construction variables
+Any options specified
+in the &cv-link-ASFLAGS; and &cv-link-CPPFLAGS; construction variables
are included on this command line.
</summary>
</cvar>
@@ -56,7 +57,7 @@ are included on this command line.
The string displayed when an object file
is generated from an assembly-language source file
after first running the file through the C preprocessor.
-If this is not set, then &cv-ASPPCOM; (the command line) is displayed.
+If this is not set, then &cv-link-ASPPCOM; (the command line) is displayed.
<example>
env = Environment(ASPPCOMSTR = "Assembling $TARGET")
@@ -69,6 +70,6 @@ env = Environment(ASPPCOMSTR = "Assembling $TARGET")
General options when an assembling an assembly-language
source file into an object file
after first running the file through the C preprocessor.
-The default is to use the value of &cv-ASFLAGS;.
+The default is to use the value of &cv-link-ASFLAGS;.
</summary>
</cvar>
diff --git a/src/engine/SCons/Tool/c++.xml b/src/engine/SCons/Tool/c++.xml
index eb0a8fe..2dc7bb2 100644
--- a/src/engine/SCons/Tool/c++.xml
+++ b/src/engine/SCons/Tool/c++.xml
@@ -19,7 +19,8 @@ The C++ compiler.
<cvar name="CXXCOM">
<summary>
The command line used to compile a C++ source file to an object file.
-Any options specified in the &cv-CXXFLAGS; and &cv-CPPFLAGS; construction variables
+Any options specified in the &cv-link-CXXFLAGS; and
+&cv-link-CPPFLAGS; construction variables
are included on this command line.
</summary>
</cvar>
@@ -28,7 +29,7 @@ are included on this command line.
<summary>
The string displayed when a C++ source file
is compiled to a (static) object file.
-If this is not set, then &cv-CXXCOM; (the command line) is displayed.
+If this is not set, then &cv-link-CXXCOM; (the command line) is displayed.
<example>
env = Environment(CXXCOMSTR = "Compiling static object $TARGET")
@@ -39,10 +40,10 @@ env = Environment(CXXCOMSTR = "Compiling static object $TARGET")
<cvar name="CXXFLAGS">
<summary>
General options that are passed to the C++ compiler.
-By default, this includes the value of &cv-CCFLAGS;,
+By default, this includes the value of &cv-link-CCFLAGS;,
so that setting &cv-CCFLAGS; affects both C and C++ compilation.
If you want to add C++-specific flags,
-you must set or override the value of &cv-CXXFLAGS;.
+you must set or override the value of &cv-link-CXXFLAGS;.
</summary>
</cvar>
@@ -56,7 +57,8 @@ The C++ compiler used for generating shared-library objects.
<summary>
The command line used to compile a C++ source file
to a shared-library object file.
-Any options specified in the &cv-SHCXXFLAGS; and &cv-CPPFLAGS; construction variables
+Any options specified in the &cv-link-SHCXXFLAGS; and
+&cv-link-CPPFLAGS; construction variables
are included on this command line.
</summary>
</cvar>
@@ -65,7 +67,7 @@ are included on this command line.
<summary>
The string displayed when a C++ source file
is compiled to a shared object file.
-If this is not set, then &cv-SHCXXCOM; (the command line) is displayed.
+If this is not set, then &cv-link-SHCXXCOM; (the command line) is displayed.
<example>
env = Environment(SHCXXCOMSTR = "Compiling shared object $TARGET")
diff --git a/src/engine/SCons/Tool/cc.xml b/src/engine/SCons/Tool/cc.xml
index 0ebaf14..b7ff65a 100644
--- a/src/engine/SCons/Tool/cc.xml
+++ b/src/engine/SCons/Tool/cc.xml
@@ -6,7 +6,21 @@ See its __doc__ string for a discussion of the format.
-->
<tool name="cc">
<summary>
-XXX
+&cv-link-CC;
+&cv-link-CFLAGS;
+&cv-link-CCCOM;
+&cv-link-SHCC;
+&cv-link-SHCFLAGS;
+&cv-link-SHCCCOM;
+
+&cv-link-CPPDEFPREFIX;
+&cv-link-CPPDEFSUFFIX;
+&cv-link-INCPREFIX;
+&cv-link-INCSUFFIX;
+&cv-link-SHOBJSUFFIX;
+<!-- &cv-link-STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME; -->
+
+&cv-link-CFILESUFFIX;
</summary>
</tool>
@@ -19,8 +33,8 @@ The C compiler.
<cvar name="CCCOM">
<summary>
The command line used to compile a C source file to a (static) object
-file. Any options specified in the &cv-CFLAGS;, &cv-CCFLAGS; and
-&cv-CPPFLAGS; construction variables are included on this command
+file. Any options specified in the &cv-link-CFLAGS;, &cv-link-CCFLAGS; and
+&cv-link-CPPFLAGS; construction variables are included on this command
line.
</summary>
</cvar>
@@ -29,7 +43,7 @@ line.
<summary>
The string displayed when a C source file
is compiled to a (static) object file.
-If this is not set, then &cv-CCCOM; (the command line) is displayed.
+If this is not set, then &cv-link-CCCOM; (the command line) is displayed.
<example>
env = Environment(CCCOMSTR = "Compiling static object $TARGET")
@@ -54,11 +68,16 @@ General options that are passed to the C compiler (C only; not C++).
User-specified C preprocessor options.
These will be included in any command that uses the C preprocessor,
including not just compilation of C and C++ source files
-via the &cv-CCCOM;, &cv-SHCCCOM;, &cv-CXXCOM; and &cv-SHCXXCOM; command lines,
-but also the &cv-FORTRANPPCOM;, &cv-SHFORTRANPPCOM;,
-&cv-F77PPCOM; and &cv-SHF77PPCOM; command lines
+via the &cv-link-CCCOM;,
+&cv-link-SHCCCOM;,
+&cv-link-CXXCOM; and
+&cv-link-SHCXXCOM; command lines,
+but also the &cv-link-FORTRANPPCOM;,
+&cv-link-SHFORTRANPPCOM;,
+&cv-link-F77PPCOM; and
+&cv-link-SHF77PPCOM; command lines
used to compile a Fortran source file,
-and the &cv-ASPPCOM; command line
+and the &cv-link-ASPPCOM; command line
used to assemble an assembly language source file,
after first running each file through the C preprocessor.
Note that this variable does
@@ -66,7 +85,7 @@ Note that this variable does
contain
<option>-I</option>
(or similar) include search path options
-that scons generates automatically from &cv-CPPPATH;.
+that scons generates automatically from &cv-link-CPPPATH;.
See &cv-link-_CPPINCFLAGS;, below,
for the variable that expands to those options.
</summary>
@@ -99,7 +118,9 @@ The C compiler used for generating shared-library objects.
<summary>
The command line used to compile a C source file
to a shared-library object file.
-Any options specified in the &cv-SHCFLAGS;, &cv-SHCCFLAGS; and &cv-CPPFLAGS; construction variables
+Any options specified in the &cv-link-SHCFLAGS;,
+&cv-link-SHCCFLAGS; and
+&cv-link-CPPFLAGS; construction variables
are included on this command line.
</summary>
</cvar>
@@ -108,7 +129,7 @@ are included on this command line.
<summary>
The string displayed when a C source file
is compiled to a shared object file.
-If this is not set, then &cv-SHCCCOM; (the command line) is displayed.
+If this is not set, then &cv-link-SHCCCOM; (the command line) is displayed.
<example>
env = Environment(SHCCCOMSTR = "Compiling shared object $TARGET")
diff --git a/src/engine/SCons/Tool/dvi.xml b/src/engine/SCons/Tool/dvi.xml
index 9d3110e..26fdd43 100644
--- a/src/engine/SCons/Tool/dvi.xml
+++ b/src/engine/SCons/Tool/dvi.xml
@@ -17,24 +17,24 @@ if the string
or
<literal>\documentstyle</literal>
is found, the file is assumed to be a LaTeX file and
-the target is built by invoking the &cv-LATEXCOM; command line;
-otherwise, the &cv-TEXCOM; command line is used.
+the target is built by invoking the &cv-link-LATEXCOM; command line;
+otherwise, the &cv-link-TEXCOM; command line is used.
If the file is a LaTeX file,
the
&b-DVI;
builder method will also examine the contents
of the
<filename>.aux</filename>
-file and invoke the &cv-BIBTEX; command line
+file and invoke the &cv-link-BIBTEX; command line
if the string
<literal>bibdata</literal>
is found,
-start &cv-MAKEINDEX; to generate an index if a
+start &cv-link-MAKEINDEX; to generate an index if a
<filename>.ind</filename>
file is found
and will examine the contents
<filename>.log</filename>
-file and re-run the &cv-LATEXCOM; command
+file and re-run the &cv-link-LATEXCOM; command
if the log file says it is necessary.
The suffix <filename>.dvi</filename>
diff --git a/src/engine/SCons/Tool/dvipdf.xml b/src/engine/SCons/Tool/dvipdf.xml
index 4d82ffe..f0679b3 100644
--- a/src/engine/SCons/Tool/dvipdf.xml
+++ b/src/engine/SCons/Tool/dvipdf.xml
@@ -32,12 +32,12 @@ The command line used to convert TeX DVI files into a PDF file.
<summary>
The string displayed when a TeX DVI file
is converted into a PDF file.
-If this is not set, then &cv-DVIPDFCOM; (the command line) is displayed.
+If this is not set, then &cv-link-DVIPDFCOM; (the command line) is displayed.
</summary>
</cvar>
<cvar name="PDFCOM">
<summary>
-A deprecated synonym for &cv-DVIPDFCOM;.
+A deprecated synonym for &cv-link-DVIPDFCOM;.
</summary>
</cvar>
diff --git a/src/engine/SCons/Tool/dvips.xml b/src/engine/SCons/Tool/dvips.xml
index cb0d7d8..dbfcaf3 100644
--- a/src/engine/SCons/Tool/dvips.xml
+++ b/src/engine/SCons/Tool/dvips.xml
@@ -18,7 +18,7 @@ from a <filename>.dvi</filename> input file
<filename>.ltx</filename>,
or
<filename>.latex</filename> input file).
-The suffix specified by the &cv-PSSUFFIX; construction variable
+The suffix specified by the &cv-link-PSSUFFIX; construction variable
(<filename>.ps</filename> by default)
is added automatically to the target
if it is not already present. Example:
@@ -54,7 +54,7 @@ The command line used to convert TeX DVI files into a PostScript file.
<summary>
The string displayed when a TeX DVI file
is converted into a PostScript file.
-If this is not set, then &cv-PSCOM; (the command line) is displayed.
+If this is not set, then &cv-link-PSCOM; (the command line) is displayed.
</summary>
</cvar>
diff --git a/src/engine/SCons/Tool/f77.xml b/src/engine/SCons/Tool/f77.xml
index c077175..a1d3c34 100644
--- a/src/engine/SCons/Tool/f77.xml
+++ b/src/engine/SCons/Tool/f77.xml
@@ -13,10 +13,10 @@ XXX
<cvar name="F77">
<summary>
The Fortran 77 compiler.
-You should normally set the &cv-FORTRAN; variable,
+You should normally set the &cv-link-FORTRAN; variable,
which specifies the default Fortran compiler
for all Fortran versions.
-You only need to set &cv-F77; if you need to use a specific compiler
+You only need to set &cv-link-F77; if you need to use a specific compiler
or compiler version for Fortran 77 files.
</summary>
</cvar>
@@ -24,9 +24,9 @@ or compiler version for Fortran 77 files.
<cvar name="F77COM">
<summary>
The command line used to compile a Fortran 77 source file to an object file.
-You only need to set &cv-F77COM; if you need to use a specific
+You only need to set &cv-link-F77COM; if you need to use a specific
command line for Fortran 77 files.
-You should normally set the &cv-FORTRANCOM; variable,
+You should normally set the &cv-link-FORTRANCOM; variable,
which specifies the default command line
for all Fortran versions.
</summary>
@@ -36,7 +36,7 @@ for all Fortran versions.
<summary>
The string displayed when a Fortran 77 source file
is compiled to an object file.
-If this is not set, then &cv-F77COM; or &cv-FORTRANCOM;
+If this is not set, then &cv-link-F77COM; or &cv-link-FORTRANCOM;
(the command line) is displayed.
</summary>
</cvar>
@@ -49,14 +49,14 @@ Note that this variable does
contain
<option>-I</option>
(or similar) include search path options
-that scons generates automatically from &cv-F77PATH;.
+that scons generates automatically from &cv-link-F77PATH;.
See
-&cv-_F77INCFLAGS;
+&cv-link-_F77INCFLAGS;
below,
for the variable that expands to those options.
-You only need to set &cv-F77FLAGS; if you need to define specific
+You only need to set &cv-link-F77FLAGS; if you need to define specific
user options for Fortran 77 files.
-You should normally set the &cv-FORTRANFLAGS; variable,
+You should normally set the &cv-link-FORTRANFLAGS; variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
@@ -68,10 +68,10 @@ for all Fortran versions.
An automatically-generated construction variable
containing the Fortran 77 compiler command-line options
for specifying directories to be searched for include files.
-The value of &cv-_F77INCFLAGS; is created
-by appending &cv-INCPREFIX; and &cv-INCSUFFIX;
+The value of &cv-link-_F77INCFLAGS; is created
+by appending &cv-link-INCPREFIX; and &cv-link-INCSUFFIX;
to the beginning and end
-of each directory in &cv-F77PATH;.
+of each directory in &cv-link-F77PATH;.
</summary>
</cvar>
@@ -80,15 +80,15 @@ of each directory in &cv-F77PATH;.
The list of directories that the Fortran 77 compiler will search for include
directories. The implicit dependency scanner will search these
directories for include files. Don't explicitly put include directory
-arguments in &cv-F77FLAGS; because the result will be non-portable
+arguments in &cv-link-F77FLAGS; because the result will be non-portable
and the directories will not be searched by the dependency scanner. Note:
-directory names in &cv-F77PATH; will be looked-up relative to the SConscript
+directory names in &cv-link-F77PATH; will be looked-up relative to the SConscript
directory when they are used in a command. To force
&scons;
to look-up a directory relative to the root of the source tree use #:
-You only need to set &cv-F77PATH; if you need to define a specific
+You only need to set &cv-link-F77PATH; if you need to define a specific
include path for Fortran 77 files.
-You should normally set the &cv-FORTRANPATH; variable,
+You should normally set the &cv-link-FORTRANPATH; variable,
which specifies the include path
for the default Fortran compiler
for all Fortran versions.
@@ -108,17 +108,17 @@ env = Environment(F77PATH=include)
The directory list will be added to command lines
through the automatically-generated
-&cv-_F77INCFLAGS;
+&cv-link-_F77INCFLAGS;
construction variable,
which is constructed by
appending the values of the
-&cv-INCPREFIX; and &cv-INCSUFFIX;
+&cv-link-INCPREFIX; and &cv-link-INCSUFFIX;
construction variables
to the beginning and end
-of each directory in &cv-F77PATH;.
+of each directory in &cv-link-F77PATH;.
Any command lines you define that need
the F77PATH directory list should
-include &cv-_F77INCFLAGS;:
+include &cv-link-_F77INCFLAGS;:
<example>
env = Environment(F77COM="my_compiler $_F77INCFLAGS -c -o $TARGET $SOURCE")
@@ -130,11 +130,11 @@ env = Environment(F77COM="my_compiler $_F77INCFLAGS -c -o $TARGET $SOURCE")
<summary>
The command line used to compile a Fortran 77 source file to an object file
after first running the file through the C preprocessor.
-Any options specified in the &cv-F77FLAGS; and &cv-CPPFLAGS; construction variables
+Any options specified in the &cv-link-F77FLAGS; and &cv-link-CPPFLAGS; construction variables
are included on this command line.
-You only need to set &cv-F77PPCOM; if you need to use a specific
+You only need to set &cv-link-F77PPCOM; if you need to use a specific
C-preprocessor command line for Fortran 77 files.
-You should normally set the &cv-FORTRANPPCOM; variable,
+You should normally set the &cv-link-FORTRANPPCOM; variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
</summary>
@@ -143,10 +143,10 @@ for all Fortran versions.
<cvar name="SHF77">
<summary>
The Fortran 77 compiler used for generating shared-library objects.
-You should normally set the &cv-SHFORTRAN; variable,
+You should normally set the &cv-link-SHFORTRAN; variable,
which specifies the default Fortran compiler
for all Fortran versions.
-You only need to set &cv-SHF77; if you need to use a specific compiler
+You only need to set &cv-link-SHF77; if you need to use a specific compiler
or compiler version for Fortran 77 files.
</summary>
</cvar>
@@ -155,9 +155,9 @@ or compiler version for Fortran 77 files.
<summary>
The command line used to compile a Fortran 77 source file
to a shared-library object file.
-You only need to set &cv-SHF77COM; if you need to use a specific
+You only need to set &cv-link-SHF77COM; if you need to use a specific
command line for Fortran 77 files.
-You should normally set the &cv-SHFORTRANCOM; variable,
+You should normally set the &cv-link-SHFORTRANCOM; variable,
which specifies the default command line
for all Fortran versions.
</summary>
@@ -167,7 +167,7 @@ for all Fortran versions.
<summary>
The string displayed when a Fortran 77 source file
is compiled to a shared-library object file.
-If this is not set, then &cv-SHF77COM; or &cv-SHFORTRANCOM;
+If this is not set, then &cv-link-SHF77COM; or &cv-link-SHFORTRANCOM;
(the command line) is displayed.
</summary>
</cvar>
@@ -176,9 +176,9 @@ If this is not set, then &cv-SHF77COM; or &cv-SHFORTRANCOM;
<summary>
Options that are passed to the Fortran 77 compiler
to generated shared-library objects.
-You only need to set &cv-SHF77FLAGS; if you need to define specific
+You only need to set &cv-link-SHF77FLAGS; if you need to define specific
user options for Fortran 77 files.
-You should normally set the &cv-SHFORTRANFLAGS; variable,
+You should normally set the &cv-link-SHFORTRANFLAGS; variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
@@ -190,11 +190,11 @@ for all Fortran versions.
The command line used to compile a Fortran 77 source file to a
shared-library object file
after first running the file through the C preprocessor.
-Any options specified in the &cv-SHF77FLAGS; and &cv-CPPFLAGS; construction variables
+Any options specified in the &cv-link-SHF77FLAGS; and &cv-link-CPPFLAGS; construction variables
are included on this command line.
-You only need to set &cv-SHF77PPCOM; if you need to use a specific
+You only need to set &cv-link-SHF77PPCOM; if you need to use a specific
C-preprocessor command line for Fortran 77 files.
-You should normally set the &cv-SHFORTRANPPCOM; variable,
+You should normally set the &cv-link-SHFORTRANPPCOM; variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
</summary>
diff --git a/src/engine/SCons/Tool/f90.xml b/src/engine/SCons/Tool/f90.xml
index 5c252cc..9159a24 100644
--- a/src/engine/SCons/Tool/f90.xml
+++ b/src/engine/SCons/Tool/f90.xml
@@ -13,10 +13,10 @@ XXX
<cvar name="F90">
<summary>
The Fortran 90 compiler.
-You should normally set the &cv-FORTRAN; variable,
+You should normally set the &cv-link-FORTRAN; variable,
which specifies the default Fortran compiler
for all Fortran versions.
-You only need to set &cv-F90; if you need to use a specific compiler
+You only need to set &cv-link-F90; if you need to use a specific compiler
or compiler version for Fortran 90 files.
</summary>
</cvar>
@@ -24,9 +24,9 @@ or compiler version for Fortran 90 files.
<cvar name="F90COM">
<summary>
The command line used to compile a Fortran 90 source file to an object file.
-You only need to set &cv-F90COM; if you need to use a specific
+You only need to set &cv-link-F90COM; if you need to use a specific
command line for Fortran 90 files.
-You should normally set the &cv-FORTRANCOM; variable,
+You should normally set the &cv-link-FORTRANCOM; variable,
which specifies the default command line
for all Fortran versions.
</summary>
@@ -36,7 +36,7 @@ for all Fortran versions.
<summary>
The string displayed when a Fortran 90 source file
is compiled to an object file.
-If this is not set, then &cv-F90COM; or &cv-FORTRANCOM;
+If this is not set, then &cv-link-F90COM; or &cv-link-FORTRANCOM;
(the command line) is displayed.
</summary>
</cvar>
@@ -49,14 +49,14 @@ Note that this variable does
contain
<option>-I</option>
(or similar) include search path options
-that scons generates automatically from &cv-F90PATH;.
+that scons generates automatically from &cv-link-F90PATH;.
See
-&cv-_F90INCFLAGS;
+&cv-link-_F90INCFLAGS;
below,
for the variable that expands to those options.
-You only need to set &cv-F90FLAGS; if you need to define specific
+You only need to set &cv-link-F90FLAGS; if you need to define specific
user options for Fortran 90 files.
-You should normally set the &cv-FORTRANFLAGS; variable,
+You should normally set the &cv-link-FORTRANFLAGS; variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
@@ -68,10 +68,10 @@ for all Fortran versions.
An automatically-generated construction variable
containing the Fortran 90 compiler command-line options
for specifying directories to be searched for include files.
-The value of &cv-_F90INCFLAGS; is created
-by appending &cv-INCPREFIX; and &cv-INCSUFFIX;
+The value of &cv-link-_F90INCFLAGS; is created
+by appending &cv-link-INCPREFIX; and &cv-link-INCSUFFIX;
to the beginning and end
-of each directory in &cv-F90PATH;.
+of each directory in &cv-link-F90PATH;.
</summary>
</cvar>
@@ -80,15 +80,15 @@ of each directory in &cv-F90PATH;.
The list of directories that the Fortran 90 compiler will search for include
directories. The implicit dependency scanner will search these
directories for include files. Don't explicitly put include directory
-arguments in &cv-F90FLAGS; because the result will be non-portable
+arguments in &cv-link-F90FLAGS; because the result will be non-portable
and the directories will not be searched by the dependency scanner. Note:
-directory names in &cv-F90PATH; will be looked-up relative to the SConscript
+directory names in &cv-link-F90PATH; will be looked-up relative to the SConscript
directory when they are used in a command. To force
&scons;
to look-up a directory relative to the root of the source tree use #:
-You only need to set &cv-F90PATH; if you need to define a specific
+You only need to set &cv-link-F90PATH; if you need to define a specific
include path for Fortran 90 files.
-You should normally set the &cv-FORTRANPATH; variable,
+You should normally set the &cv-link-FORTRANPATH; variable,
which specifies the include path
for the default Fortran compiler
for all Fortran versions.
@@ -108,17 +108,17 @@ env = Environment(F90PATH=include)
The directory list will be added to command lines
through the automatically-generated
-&cv-_F90INCFLAGS;
+&cv-link-_F90INCFLAGS;
construction variable,
which is constructed by
appending the values of the
-&cv-INCPREFIX; and &cv-INCSUFFIX;
+&cv-link-INCPREFIX; and &cv-link-INCSUFFIX;
construction variables
to the beginning and end
-of each directory in &cv-F90PATH;.
+of each directory in &cv-link-F90PATH;.
Any command lines you define that need
the F90PATH directory list should
-include &cv-_F90INCFLAGS;:
+include &cv-link-_F90INCFLAGS;:
<example>
env = Environment(F90COM="my_compiler $_F90INCFLAGS -c -o $TARGET $SOURCE")
@@ -130,11 +130,11 @@ env = Environment(F90COM="my_compiler $_F90INCFLAGS -c -o $TARGET $SOURCE")
<summary>
The command line used to compile a Fortran 90 source file to an object file
after first running the file through the C preprocessor.
-Any options specified in the &cv-F90FLAGS; and &cv-CPPFLAGS; construction variables
+Any options specified in the &cv-link-F90FLAGS; and &cv-link-CPPFLAGS; construction variables
are included on this command line.
-You only need to set &cv-F90PPCOM; if you need to use a specific
+You only need to set &cv-link-F90PPCOM; if you need to use a specific
C-preprocessor command line for Fortran 90 files.
-You should normally set the &cv-FORTRANPPCOM; variable,
+You should normally set the &cv-link-FORTRANPPCOM; variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
</summary>
@@ -143,10 +143,10 @@ for all Fortran versions.
<cvar name="SHF90">
<summary>
The Fortran 90 compiler used for generating shared-library objects.
-You should normally set the &cv-SHFORTRAN; variable,
+You should normally set the &cv-link-SHFORTRAN; variable,
which specifies the default Fortran compiler
for all Fortran versions.
-You only need to set &cv-SHF90; if you need to use a specific compiler
+You only need to set &cv-link-SHF90; if you need to use a specific compiler
or compiler version for Fortran 90 files.
</summary>
</cvar>
@@ -155,9 +155,9 @@ or compiler version for Fortran 90 files.
<summary>
The command line used to compile a Fortran 90 source file
to a shared-library object file.
-You only need to set &cv-SHF90COM; if you need to use a specific
+You only need to set &cv-link-SHF90COM; if you need to use a specific
command line for Fortran 90 files.
-You should normally set the &cv-SHFORTRANCOM; variable,
+You should normally set the &cv-link-SHFORTRANCOM; variable,
which specifies the default command line
for all Fortran versions.
</summary>
@@ -167,7 +167,7 @@ for all Fortran versions.
<summary>
The string displayed when a Fortran 90 source file
is compiled to a shared-library object file.
-If this is not set, then &cv-SHF90COM; or &cv-SHFORTRANCOM;
+If this is not set, then &cv-link-SHF90COM; or &cv-link-SHFORTRANCOM;
(the command line) is displayed.
</summary>
</cvar>
@@ -176,9 +176,9 @@ If this is not set, then &cv-SHF90COM; or &cv-SHFORTRANCOM;
<summary>
Options that are passed to the Fortran 90 compiler
to generated shared-library objects.
-You only need to set &cv-SHF90FLAGS; if you need to define specific
+You only need to set &cv-link-SHF90FLAGS; if you need to define specific
user options for Fortran 90 files.
-You should normally set the &cv-SHFORTRANFLAGS; variable,
+You should normally set the &cv-link-SHFORTRANFLAGS; variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
@@ -190,11 +190,11 @@ for all Fortran versions.
The command line used to compile a Fortran 90 source file to a
shared-library object file
after first running the file through the C preprocessor.
-Any options specified in the &cv-SHF90FLAGS; and &cv-CPPFLAGS; construction variables
+Any options specified in the &cv-link-SHF90FLAGS; and &cv-link-CPPFLAGS; construction variables
are included on this command line.
-You only need to set &cv-SHF90PPCOM; if you need to use a specific
+You only need to set &cv-link-SHF90PPCOM; if you need to use a specific
C-preprocessor command line for Fortran 90 files.
-You should normally set the &cv-SHFORTRANPPCOM; variable,
+You should normally set the &cv-link-SHFORTRANPPCOM; variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
</summary>
diff --git a/src/engine/SCons/Tool/f95.xml b/src/engine/SCons/Tool/f95.xml
index 86331a4..e3c026e 100644
--- a/src/engine/SCons/Tool/f95.xml
+++ b/src/engine/SCons/Tool/f95.xml
@@ -13,10 +13,10 @@ XXX
<cvar name="F95">
<summary>
The Fortran 95 compiler.
-You should normally set the &cv-FORTRAN; variable,
+You should normally set the &cv-link-FORTRAN; variable,
which specifies the default Fortran compiler
for all Fortran versions.
-You only need to set &cv-F95; if you need to use a specific compiler
+You only need to set &cv-link-F95; if you need to use a specific compiler
or compiler version for Fortran 95 files.
</summary>
</cvar>
@@ -24,9 +24,9 @@ or compiler version for Fortran 95 files.
<cvar name="F95COM">
<summary>
The command line used to compile a Fortran 95 source file to an object file.
-You only need to set &cv-F95COM; if you need to use a specific
+You only need to set &cv-link-F95COM; if you need to use a specific
command line for Fortran 95 files.
-You should normally set the &cv-FORTRANCOM; variable,
+You should normally set the &cv-link-FORTRANCOM; variable,
which specifies the default command line
for all Fortran versions.
</summary>
@@ -36,7 +36,7 @@ for all Fortran versions.
<summary>
The string displayed when a Fortran 95 source file
is compiled to an object file.
-If this is not set, then &cv-F95COM; or &cv-FORTRANCOM;
+If this is not set, then &cv-link-F95COM; or &cv-link-FORTRANCOM;
(the command line) is displayed.
</summary>
</cvar>
@@ -49,14 +49,14 @@ Note that this variable does
contain
<option>-I</option>
(or similar) include search path options
-that scons generates automatically from &cv-F95PATH;.
+that scons generates automatically from &cv-link-F95PATH;.
See
-&cv-_F95INCFLAGS;
+&cv-link-_F95INCFLAGS;
below,
for the variable that expands to those options.
-You only need to set &cv-F95FLAGS; if you need to define specific
+You only need to set &cv-link-F95FLAGS; if you need to define specific
user options for Fortran 95 files.
-You should normally set the &cv-FORTRANFLAGS; variable,
+You should normally set the &cv-link-FORTRANFLAGS; variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
@@ -68,10 +68,10 @@ for all Fortran versions.
An automatically-generated construction variable
containing the Fortran 95 compiler command-line options
for specifying directories to be searched for include files.
-The value of &cv-_F95INCFLAGS; is created
-by appending &cv-INCPREFIX; and &cv-INCSUFFIX;
+The value of &cv-link-_F95INCFLAGS; is created
+by appending &cv-link-INCPREFIX; and &cv-link-INCSUFFIX;
to the beginning and end
-of each directory in &cv-F95PATH;.
+of each directory in &cv-link-F95PATH;.
</summary>
</cvar>
@@ -80,15 +80,15 @@ of each directory in &cv-F95PATH;.
The list of directories that the Fortran 95 compiler will search for include
directories. The implicit dependency scanner will search these
directories for include files. Don't explicitly put include directory
-arguments in &cv-F95FLAGS; because the result will be non-portable
+arguments in &cv-link-F95FLAGS; because the result will be non-portable
and the directories will not be searched by the dependency scanner. Note:
-directory names in &cv-F95PATH; will be looked-up relative to the SConscript
+directory names in &cv-link-F95PATH; will be looked-up relative to the SConscript
directory when they are used in a command. To force
&scons;
to look-up a directory relative to the root of the source tree use #:
-You only need to set &cv-F95PATH; if you need to define a specific
+You only need to set &cv-link-F95PATH; if you need to define a specific
include path for Fortran 95 files.
-You should normally set the &cv-FORTRANPATH; variable,
+You should normally set the &cv-link-FORTRANPATH; variable,
which specifies the include path
for the default Fortran compiler
for all Fortran versions.
@@ -108,17 +108,17 @@ env = Environment(F95PATH=include)
The directory list will be added to command lines
through the automatically-generated
-&cv-_F95INCFLAGS;
+&cv-link-_F95INCFLAGS;
construction variable,
which is constructed by
appending the values of the
-&cv-INCPREFIX; and &cv-INCSUFFIX;
+&cv-link-INCPREFIX; and &cv-link-INCSUFFIX;
construction variables
to the beginning and end
-of each directory in &cv-F95PATH;.
+of each directory in &cv-link-F95PATH;.
Any command lines you define that need
the F95PATH directory list should
-include &cv-_F95INCFLAGS;:
+include &cv-link-_F95INCFLAGS;:
<example>
env = Environment(F95COM="my_compiler $_F95INCFLAGS -c -o $TARGET $SOURCE")
@@ -130,11 +130,11 @@ env = Environment(F95COM="my_compiler $_F95INCFLAGS -c -o $TARGET $SOURCE")
<summary>
The command line used to compile a Fortran 95 source file to an object file
after first running the file through the C preprocessor.
-Any options specified in the &cv-F95FLAGS; and &cv-CPPFLAGS; construction variables
+Any options specified in the &cv-link-F95FLAGS; and &cv-link-CPPFLAGS; construction variables
are included on this command line.
-You only need to set &cv-F95PPCOM; if you need to use a specific
+You only need to set &cv-link-F95PPCOM; if you need to use a specific
C-preprocessor command line for Fortran 95 files.
-You should normally set the &cv-FORTRANPPCOM; variable,
+You should normally set the &cv-link-FORTRANPPCOM; variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
</summary>
@@ -143,10 +143,10 @@ for all Fortran versions.
<cvar name="SHF95">
<summary>
The Fortran 95 compiler used for generating shared-library objects.
-You should normally set the &cv-SHFORTRAN; variable,
+You should normally set the &cv-link-SHFORTRAN; variable,
which specifies the default Fortran compiler
for all Fortran versions.
-You only need to set &cv-SHF95; if you need to use a specific compiler
+You only need to set &cv-link-SHF95; if you need to use a specific compiler
or compiler version for Fortran 95 files.
</summary>
</cvar>
@@ -155,9 +155,9 @@ or compiler version for Fortran 95 files.
<summary>
The command line used to compile a Fortran 95 source file
to a shared-library object file.
-You only need to set &cv-SHF95COM; if you need to use a specific
+You only need to set &cv-link-SHF95COM; if you need to use a specific
command line for Fortran 95 files.
-You should normally set the &cv-SHFORTRANCOM; variable,
+You should normally set the &cv-link-SHFORTRANCOM; variable,
which specifies the default command line
for all Fortran versions.
</summary>
@@ -167,7 +167,7 @@ for all Fortran versions.
<summary>
The string displayed when a Fortran 95 source file
is compiled to a shared-library object file.
-If this is not set, then &cv-SHF95COM; or &cv-SHFORTRANCOM;
+If this is not set, then &cv-link-SHF95COM; or &cv-link-SHFORTRANCOM;
(the command line) is displayed.
</summary>
</cvar>
@@ -176,9 +176,9 @@ If this is not set, then &cv-SHF95COM; or &cv-SHFORTRANCOM;
<summary>
Options that are passed to the Fortran 95 compiler
to generated shared-library objects.
-You only need to set &cv-SHF95FLAGS; if you need to define specific
+You only need to set &cv-link-SHF95FLAGS; if you need to define specific
user options for Fortran 95 files.
-You should normally set the &cv-SHFORTRANFLAGS; variable,
+You should normally set the &cv-link-SHFORTRANFLAGS; variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
@@ -190,11 +190,11 @@ for all Fortran versions.
The command line used to compile a Fortran 95 source file to a
shared-library object file
after first running the file through the C preprocessor.
-Any options specified in the &cv-SHF95FLAGS; and &cv-CPPFLAGS; construction variables
+Any options specified in the &cv-link-SHF95FLAGS; and &cv-link-CPPFLAGS; construction variables
are included on this command line.
-You only need to set &cv-SHF95PPCOM; if you need to use a specific
+You only need to set &cv-link-SHF95PPCOM; if you need to use a specific
C-preprocessor command line for Fortran 95 files.
-You should normally set the &cv-SHFORTRANPPCOM; variable,
+You should normally set the &cv-link-SHFORTRANPPCOM; variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
</summary>
diff --git a/src/engine/SCons/Tool/fortran.xml b/src/engine/SCons/Tool/fortran.xml
index c472343..c7000af 100644
--- a/src/engine/SCons/Tool/fortran.xml
+++ b/src/engine/SCons/Tool/fortran.xml
@@ -21,8 +21,11 @@ for all versions of Fortran.
<summary>
The command line used to compile a Fortran source file to an object file.
By default, any options specified
-in the &cv-FORTRANFLAGS;, &cv-CPPFLAGS;, &cv-_CPPDEFFLAGS;,
-&cv-_FORTRANMODFLAG;, and &cv-_FORTRANINCFLAGS; construction variables
+in the &cv-link-FORTRANFLAGS;,
+&cv-link-CPPFLAGS;,
+&cv-link-_CPPDEFFLAGS;,
+&cv-link-_FORTRANMODFLAG;, and
+&cv-link-_FORTRANINCFLAGS; construction variables
are included on this command line.
</summary>
</cvar>
@@ -31,7 +34,7 @@ are included on this command line.
<summary>
The string displayed when a Fortran source file
is compiled to an object file.
-If this is not set, then &cv-FORTRANCOM;
+If this is not set, then &cv-link-FORTRANCOM;
(the command line) is displayed.
</summary>
</cvar>
@@ -44,9 +47,9 @@ Note that this variable does
contain
<option>-I</option>
(or similar) include or module search path options
-that scons generates automatically from &cv-FORTRANPATH;.
+that scons generates automatically from &cv-link-FORTRANPATH;.
See
-&cv-_FORTRANINCFLAGS; and &cv-_FORTRANMODFLAG;,
+&cv-link-_FORTRANINCFLAGS; and &cv-link-_FORTRANMODFLAG;,
below,
for the variables that expand those options.
</summary>
@@ -58,10 +61,10 @@ An automatically-generated construction variable
containing the Fortran compiler command-line options
for specifying directories to be searched for include
files and module files.
-The value of &cv-_FORTRANINCFLAGS; is created
-by prepending/appending &cv-INCPREFIX; and &cv-INCSUFFIX;
+The value of &cv-link-_FORTRANINCFLAGS; is created
+by prepending/appending &cv-link-INCPREFIX; and &cv-link-INCSUFFIX;
to the beginning and end
-of each directory in &cv-FORTRANPATH;.
+of each directory in &cv-link-FORTRANPATH;.
</summary>
</cvar>
@@ -79,8 +82,8 @@ for module files, as well.
The prefix used to specify a module directory on the Fortran compiler command
line.
This will be appended to the beginning of the directory
-in the &cv-FORTRANMODDIR; construction variables
-when the &cv-_FORTRANMODFLAG; variables is automatically generated.
+in the &cv-link-FORTRANMODDIR; construction variables
+when the &cv-link-_FORTRANMODFLAG; variables is automatically generated.
</summary>
</cvar>
@@ -89,8 +92,8 @@ when the &cv-_FORTRANMODFLAG; variables is automatically generated.
The suffix used to specify a module directory on the Fortran compiler command
line.
This will be appended to the beginning of the directory
-in the &cv-FORTRANMODDIR; construction variables
-when the &cv-_FORTRANMODFLAG; variables is automatically generated.
+in the &cv-link-FORTRANMODDIR; construction variables
+when the &cv-link-_FORTRANMODFLAG; variables is automatically generated.
</summary>
</cvar>
@@ -101,9 +104,10 @@ containing the Fortran compiler command-line option
for specifying the directory location where the Fortran
compiler should place any module files that happen to get
generated during compilation.
-The value of &cv-_FORTRANMODFLAG; is created
-by prepending/appending &cv-FORTRANMODDIRPREFIX; and &cv-FORTRANMODDIRSUFFIX;
-to the beginning and end of the directory in &cv-FORTRANMODDIR;.
+The value of &cv-link-_FORTRANMODFLAG; is created
+by prepending/appending &cv-link-FORTRANMODDIRPREFIX; and
+&cv-link-FORTRANMODDIRSUFFIX;
+to the beginning and end of the directory in &cv-link-FORTRANMODDIR;.
</summary>
</cvar>
@@ -162,17 +166,17 @@ env = Environment(FORTRANPATH=include)
The directory list will be added to command lines
through the automatically-generated
-&cv-_FORTRANINCFLAGS;
+&cv-link-_FORTRANINCFLAGS;
construction variable,
which is constructed by
appending the values of the
-&cv-INCPREFIX; and &cv-INCSUFFIX;
+&cv-link-INCPREFIX; and &cv-link-INCSUFFIX;
construction variables
to the beginning and end
-of each directory in &cv-FORTRANPATH;.
+of each directory in &cv-link-FORTRANPATH;.
Any command lines you define that need
the FORTRANPATH directory list should
-include &cv-_FORTRANINCFLAGS;:
+include &cv-link-_FORTRANINCFLAGS;:
<example>
env = Environment(FORTRANCOM="my_compiler $_FORTRANINCFLAGS -c -o $TARGET $SOURCE")
@@ -184,8 +188,11 @@ env = Environment(FORTRANCOM="my_compiler $_FORTRANINCFLAGS -c -o $TARGET $SOURC
<summary>
The command line used to compile a Fortran source file to an object file
after first running the file through the C preprocessor.
-By default, any options specified in the &cv-FORTRANFLAGS;, &cv-CPPFLAGS;,
-_CPPDEFFLAGS, &cv-_FORTRANMODFLAG;, and &cv-_FORTRANINCFLAGS;
+By default, any options specified in the &cv-link-FORTRANFLAGS;,
+&cv-link-CPPFLAGS;,
+&cv-link-_CPPDEFFLAGS;,
+&cv-link-_FORTRANMODFLAG;, and
+&cv-link-_FORTRANINCFLAGS;
construction variables are included on this command line.
</summary>
</cvar>
@@ -221,7 +228,7 @@ to a shared-library object file.
<summary>
The string displayed when a Fortran source file
is compiled to a shared-library object file.
-If this is not set, then &cv-SHFORTRANCOM;
+If this is not set, then &cv-link-SHFORTRANCOM;
(the command line) is displayed.
</summary>
</cvar>
@@ -239,7 +246,8 @@ The command line used to compile a Fortran source file to a
shared-library object file
after first running the file through the C preprocessor.
Any options specified
-in the &cv-SHFORTRANFLAGS; and &cv-CPPFLAGS; construction variables
+in the &cv-link-SHFORTRANFLAGS; and
+&cv-link-CPPFLAGS; construction variables
are included on this command line.
</summary>
</cvar>
diff --git a/src/engine/SCons/Tool/gs.xml b/src/engine/SCons/Tool/gs.xml
index d4840d6..9a63e94 100644
--- a/src/engine/SCons/Tool/gs.xml
+++ b/src/engine/SCons/Tool/gs.xml
@@ -27,7 +27,7 @@ The Ghostscript command line used to convert PostScript to PDF files.
The string displayed when
Ghostscript is used to convert
a PostScript file to a PDF file.
-If this is not set, then &cv-GSCOM; (the command line) is displayed.
+If this is not set, then &cv-link-GSCOM; (the command line) is displayed.
</summary>
</cvar>
diff --git a/src/engine/SCons/Tool/intelc.py b/src/engine/SCons/Tool/intelc.py
index d95a4be..2d0a5a5 100644
--- a/src/engine/SCons/Tool/intelc.py
+++ b/src/engine/SCons/Tool/intelc.py
@@ -353,7 +353,9 @@ def generate(env, version=None, abi=None, topdir=None, verbose=0):
else:
env['CC'] = 'icc'
env['CXX'] = 'icpc'
- env['LINK'] = '$CC'
+ # Don't reset LINK here;
+ # use smart_link which should already be here from link.py.
+ #env['LINK'] = '$CC'
env['AR'] = 'xiar'
env['LD'] = 'xild' # not used by default
diff --git a/src/engine/SCons/Tool/jar.xml b/src/engine/SCons/Tool/jar.xml
index 45d9ebc..488459b 100644
--- a/src/engine/SCons/Tool/jar.xml
+++ b/src/engine/SCons/Tool/jar.xml
@@ -14,7 +14,7 @@ XXX
<summary>
Builds a Java archive (<filename>.jar</filename>) file
from a source tree of <filename>.class</filename> files.
-If the &cv-JARCHDIR; value is set, the
+If the &cv-link-JARCHDIR; value is set, the
&jar;
command will change to the specified directory using the
<option>-C</option>
@@ -59,7 +59,7 @@ The command line used to call the Java archive tool.
<summary>
The string displayed when the Java archive tool
is called
-If this is not set, then &cv-JARCOM; (the command line) is displayed.
+If this is not set, then &cv-link-JARCOM; (the command line) is displayed.
<example>
env = Environment(JARCOMSTR = "JARchiving $SOURCES into $TARGET")
diff --git a/src/engine/SCons/Tool/javac.xml b/src/engine/SCons/Tool/javac.xml
index 86fd507..400a23b 100644
--- a/src/engine/SCons/Tool/javac.xml
+++ b/src/engine/SCons/Tool/javac.xml
@@ -63,7 +63,7 @@ The Java compiler.
The command line used to compile a directory tree containing
Java source files to
corresponding Java class files.
-Any options specified in the &cv-JAVACFLAGS; construction variable
+Any options specified in the &cv-link-JAVACFLAGS; construction variable
are included on this command line.
</summary>
</cvar>
@@ -73,7 +73,7 @@ are included on this command line.
The string displayed when compiling
a directory tree of Java source files to
corresponding Java class files.
-If this is not set, then &cv-JAVACCOM; (the command line) is displayed.
+If this is not set, then &cv-link-JAVACCOM; (the command line) is displayed.
<example>
env = Environment(JAVACCOMSTR = "Compiling class files $TARGETS from $SOURCES")
diff --git a/src/engine/SCons/Tool/javah.xml b/src/engine/SCons/Tool/javah.xml
index 84d0068..75d0efb 100644
--- a/src/engine/SCons/Tool/javah.xml
+++ b/src/engine/SCons/Tool/javah.xml
@@ -24,7 +24,7 @@ or the objects returned from the
builder method.
If the construction variable
-&cv-JAVACLASSDIR;
+&cv-link-JAVACLASSDIR;
is set, either in the environment
or in the call to the
&b-JavaH;
@@ -62,7 +62,7 @@ The Java generator for C header and stub files.
<summary>
The command line used to generate C header and stub files
from Java classes.
-Any options specified in the &cv-JAVAHFLAGS; construction variable
+Any options specified in the &cv-link-JAVAHFLAGS; construction variable
are included on this command line.
</summary>
</cvar>
@@ -71,7 +71,7 @@ are included on this command line.
<summary>
The string displayed when C header and stub files
are generated from Java classes.
-If this is not set, then &cv-JAVAHCOM; (the command line) is displayed.
+If this is not set, then &cv-link-JAVAHCOM; (the command line) is displayed.
<example>
env = Environment(JAVAHCOMSTR = "Generating header/stub file(s) $TARGETS from $SOURCES")
diff --git a/src/engine/SCons/Tool/latex.xml b/src/engine/SCons/Tool/latex.xml
index 96c0f4a..35eea30 100644
--- a/src/engine/SCons/Tool/latex.xml
+++ b/src/engine/SCons/Tool/latex.xml
@@ -26,7 +26,7 @@ The command line used to call the LaTeX structured formatter and typesetter.
<summary>
The string displayed when calling
the LaTeX structured formatter and typesetter.
-If this is not set, then &cv-LATEXCOM; (the command line) is displayed.
+If this is not set, then &cv-link-LATEXCOM; (the command line) is displayed.
<example>
env = Environment(LATEXCOMSTR = "Building $TARGET from LaTeX input $SOURCES")
@@ -45,7 +45,7 @@ General options passed to the LaTeX structured formatter and typesetter.
The maximum number of times that LaTeX
will be re-run if the
<filename>.log</filename>
-generated by the &cv-LATEXCOM; command
+generated by the &cv-link-LATEXCOM; command
indicates that there are undefined references.
The default is to try to resolve undefined references
by re-running LaTeX up to three times.
diff --git a/src/engine/SCons/Tool/lex.xml b/src/engine/SCons/Tool/lex.xml
index 51401dc..d67feb0 100644
--- a/src/engine/SCons/Tool/lex.xml
+++ b/src/engine/SCons/Tool/lex.xml
@@ -27,7 +27,7 @@ to generate a source file.
<summary>
The string displayed when generating a source file
using the lexical analyzer generator.
-If this is not set, then &cv-LEXCOM; (the command line) is displayed.
+If this is not set, then &cv-link-LEXCOM; (the command line) is displayed.
<example>
env = Environment(LEXCOMSTR = "Lex'ing $TARGET from $SOURCES")
diff --git a/src/engine/SCons/Tool/link.xml b/src/engine/SCons/Tool/link.xml
index 52694ad..0728dda 100644
--- a/src/engine/SCons/Tool/link.xml
+++ b/src/engine/SCons/Tool/link.xml
@@ -13,23 +13,24 @@ XXX
<cvar name="LDMODULE">
<summary>
The linker for building loadable modules.
-By default, this is the same as &cv-SHLINK;.
+By default, this is the same as &cv-link-SHLINK;.
</summary>
</cvar>
<cvar name="LDMODULECOM">
<summary>
The command line for building loadable modules.
-On Mac OS X, this uses the &cv-LDMODULE;,
-&cv-LDMODULEFLAGS; and &cv-FRAMEWORKSFLAGS; variables.
-On other systems, this is the same as &cv-SHLINK;.
+On Mac OS X, this uses the &cv-link-LDMODULE;,
+&cv-link-LDMODULEFLAGS; and
+&cv-link-FRAMEWORKSFLAGS; variables.
+On other systems, this is the same as &cv-link-SHLINK;.
</summary>
</cvar>
<cvar name="LDMODULECOMSTR">
<summary>
The string displayed when building loadable modules.
-If this is not set, then &cv-LDMODULECOM; (the command line) is displayed.
+If this is not set, then &cv-link-LDMODULECOM; (the command line) is displayed.
</summary>
</cvar>
@@ -44,7 +45,7 @@ General user options passed to the linker for building loadable modules.
The prefix used for loadable module file names.
On Mac OS X, this is null;
on other systems, this is
-the same as &cv-SHLIBPREFIX;.
+the same as &cv-link-SHLIBPREFIX;.
</summary>
</cvar>
@@ -73,7 +74,7 @@ The command line used to link object files into an executable.
<summary>
The string displayed when object files
are linked into an executable.
-If this is not set, then &cv-LINKCOM; (the command line) is displayed.
+If this is not set, then &cv-link-LINKCOM; (the command line) is displayed.
<example>
env = Environment(LINKCOMSTR = "Linking $TARGET")
@@ -88,17 +89,17 @@ Note that this variable should
<emphasis>not</emphasis>
contain
<option>-l</option>
-(or similar) options for linking with the libraries listed in &cv-LIBS;,
+(or similar) options for linking with the libraries listed in &cv-link-LIBS;,
nor
<option>-L</option>
(or similar) library search path options
-that scons generates automatically from &cv-LIBPATH;.
+that scons generates automatically from &cv-link-LIBPATH;.
See
-&cv-_LIBFLAGS;
+&cv-link-_LIBFLAGS;
above,
for the variable that expands to library-link options,
and
-&cv-_LIBDIRFLAGS;
+&cv-link-_LIBDIRFLAGS;
above,
for the variable that expands to library search path options.
</summary>
@@ -119,7 +120,7 @@ The command line used to link programs using shared libaries.
<cvar name="SHLINKCOMSTR">
<summary>
The string displayed when programs using shared libraries are linked.
-If this is not set, then &cv-SHLINKCOM; (the command line) is displayed.
+If this is not set, then &cv-link-SHLINKCOM; (the command line) is displayed.
<example>
env = Environment(SHLINKCOMSTR = "Linking shared $TARGET")
@@ -134,17 +135,17 @@ Note that this variable should
<emphasis>not</emphasis>
contain
<option>-l</option>
-(or similar) options for linking with the libraries listed in &cv-LIBS;,
+(or similar) options for linking with the libraries listed in &cv-link-LIBS;,
nor
<option>-L</option>
(or similar) include search path options
-that scons generates automatically from &cv-LIBPATH;.
+that scons generates automatically from &cv-link-LIBPATH;.
See
-&cv-_LIBFLAGS;
+&cv-link-_LIBFLAGS;
above,
for the variable that expands to library-link options,
and
-&cv-_LIBDIRFLAGS;
+&cv-link-_LIBDIRFLAGS;
above,
for the variable that expands to library search path options.
</summary>
diff --git a/src/engine/SCons/Tool/m4.xml b/src/engine/SCons/Tool/m4.xml
index 7a0f9c3..0ee421e 100644
--- a/src/engine/SCons/Tool/m4.xml
+++ b/src/engine/SCons/Tool/m4.xml
@@ -13,7 +13,7 @@ XXX
<builder name="M4">
<summary>
Builds an output file from an M4 input file.
-This uses a default &cv-M4FLAGS; value of
+This uses a default &cv-link-M4FLAGS; value of
<option>-E</option>,
which considers all warnings to be fatal
and stops on the first warning
@@ -42,7 +42,7 @@ The command line used to pass files through the M4 macro preprocessor.
<summary>
The string displayed when
a file is passed through the M4 macro preprocessor.
-If this is not set, then &cv-M4COM; (the command line) is displayed.
+If this is not set, then &cv-link-M4COM; (the command line) is displayed.
</summary>
</cvar>
diff --git a/src/engine/SCons/Tool/mslink.xml b/src/engine/SCons/Tool/mslink.xml
index 6499cfe..160d415 100644
--- a/src/engine/SCons/Tool/mslink.xml
+++ b/src/engine/SCons/Tool/mslink.xml
@@ -49,7 +49,7 @@ Using the <option>/Zi</option> instead may yield improved
link-time performance,
although parallel builds will no longer work.
You can generate PDB files with the <option>/Zi</option>
-switch by overriding the default &cv-CCPDBFLAGS; variable;
+switch by overriding the default &cv-link-CCPDBFLAGS; variable;
see the entry for that variable for specific examples.
</summary>
</cvar>
@@ -75,7 +75,7 @@ is passed a keyword argument of <literal>register=1</literal>.
<cvar name="REGSVRCOMSTR">
<summary>
The string displayed when registering a newly-built DLL file.
-If this is not set, then &cv-REGSVRCOM; (the command line) is displayed.
+If this is not set, then &cv-link-REGSVRCOM; (the command line) is displayed.
</summary>
</cvar>
@@ -92,31 +92,31 @@ and requiring user attention.
<cvar name="WIN32_INSERT_DEF">
<summary>
-A deprecated synonym for &cv-WINDOWS_INSERT_DEF;.
+A deprecated synonym for &cv-link-WINDOWS_INSERT_DEF;.
</summary>
</cvar>
<cvar name="WIN32DEFPREFIX">
<summary>
-A deprecated synonym for &cv-WINDOWSDEFPREFIX;.
+A deprecated synonym for &cv-link-WINDOWSDEFPREFIX;.
</summary>
</cvar>
<cvar name="WIN32DEFSUFFIX">
<summary>
-A deprecated synonym for &cv-WINDOWSDEFSUFFIX;.
+A deprecated synonym for &cv-link-WINDOWSDEFSUFFIX;.
</summary>
</cvar>
<cvar name="WIN32EXPPREFIX">
<summary>
-A deprecated synonym for &cv-WINDOWSEXPSUFFIX;.
+A deprecated synonym for &cv-link-WINDOWSEXPSUFFIX;.
</summary>
</cvar>
<cvar name="WIN32EXPSUFFIX">
<summary>
-A deprecated synonym for &cv-WINDOWSEXPSUFFIX;.
+A deprecated synonym for &cv-link-WINDOWSEXPSUFFIX;.
</summary>
</cvar>
diff --git a/src/engine/SCons/Tool/msvc.py b/src/engine/SCons/Tool/msvc.py
index 5c9eaf0..c6fe461 100644
--- a/src/engine/SCons/Tool/msvc.py
+++ b/src/engine/SCons/Tool/msvc.py
@@ -138,12 +138,13 @@ def _parse_msvc8_overrides(version,platform,suite):
if not SCons.Util.can_read_reg:
raise SCons.Errors.InternalError, "No Windows registry module was found"
- s = ''
+ # XXX This code assumes anything that isn't EXPRESS uses the default
+ # registry key string. Is this really true for all VS suites?
if suite == 'EXPRESS':
s = '\\VCExpress\\'
+ else:
+ s = '\\VisualStudio\\'
- # ToDo: add registry key strings for the other versions of visual
- # studio 2005.
settings_path = ""
try:
(settings_path, t) = SCons.Util.RegGetValue(SCons.Util.HKEY_CURRENT_USER,
diff --git a/src/engine/SCons/Tool/msvc.xml b/src/engine/SCons/Tool/msvc.xml
index be155bd..0ea2602 100644
--- a/src/engine/SCons/Tool/msvc.xml
+++ b/src/engine/SCons/Tool/msvc.xml
@@ -53,7 +53,7 @@ Options added to the compiler command line
to support building with precompiled headers.
The default value expands expands to the appropriate
Microsoft Visual C++ command-line options
-when the &cv-PCH; construction variable is set.
+when the &cv-link-PCH; construction variable is set.
</summary>
</cvar>
@@ -64,7 +64,7 @@ to support storing debugging information in a
Microsoft Visual C++ PDB file.
The default value expands expands to appropriate
Microsoft Visual C++ command-line options
-when the &cv-PDB; construction variable is set.
+when the &cv-link-PDB; construction variable is set.
The Visual C++ compiler option that SCons uses by default
to generate PDB information is <option>/Z7</option>.
@@ -78,7 +78,7 @@ link-time performance,
although parallel builds will no longer work.
You can generate PDB files with the <option>/Zi</option>
-switch by overriding the default &cv-CCPDBFLAGS; variable as follows:
+switch by overriding the default &cv-link-CCPDBFLAGS; variable as follows:
<example>
import SCons.Util
@@ -88,7 +88,7 @@ env['CCPDBFLAGS'] = SCons.Util.CLVar(['${(PDB and "/Zi /Fd%s" % File(PDB)) or ""
An alternative would be to use the <option>/Zi</option>
to put the debugging information in a separate <filename>.pdb</filename>
file for each object file by overriding
-the &cv-CCPDBFLAGS; variable as follows:
+the &cv-link-CCPDBFLAGS; variable as follows:
<example>
env['CCPDBFLAGS'] = '/Zi /Fd${TARGET}.pdb'
@@ -123,7 +123,7 @@ builder to generated a precompiled header.
<cvar name="PCHCOMSTR">
<summary>
The string displayed when generating a precompiled header.
-If this is not set, then &cv-PCHCOM; (the command line) is displayed.
+If this is not set, then &cv-link-PCHCOM; (the command line) is displayed.
</summary>
</cvar>
@@ -160,7 +160,7 @@ a Microsoft Visual C++ resource file.
<summary>
The string displayed when invoking the resource compiler
to build a Microsoft Visual C++ resource file.
-If this is not set, then &cv-RCCOM; (the command line) is displayed.
+If this is not set, then &cv-link-RCCOM; (the command line) is displayed.
</summary>
</cvar>
diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py
index b84b277..db8e8fd 100644
--- a/src/engine/SCons/Tool/msvs.py
+++ b/src/engine/SCons/Tool/msvs.py
@@ -1385,10 +1385,7 @@ def get_msvs_install_dirs(version = None, vs8suite = None):
# try and enumerate the installed versions of the .NET framework.
contents = os.listdir(rv['FRAMEWORKDIR'])
l = re.compile('v[0-9]+.*')
- versions = []
- for entry in contents:
- if l.match(entry):
- versions.append(entry)
+ installed_framework_versions = filter(lambda e, l=l: l.match(e), contents)
def versrt(a,b):
# since version numbers aren't really floats...
@@ -1403,23 +1400,51 @@ def get_msvs_install_dirs(version = None, vs8suite = None):
c = int(bbl[2]) - int(aal[2])
return c
- versions.sort(versrt)
+ installed_framework_versions.sort(versrt)
- rv['FRAMEWORKVERSIONS'] = versions
- # assume that the highest version is the latest version installed
- rv['FRAMEWORKVERSION'] = versions[0]
+ rv['FRAMEWORKVERSIONS'] = installed_framework_versions
- # .NET framework SDK install dir
- try:
- if rv.has_key('FRAMEWORKVERSION') and rv['FRAMEWORKVERSION'][:4] == 'v1.1':
- key = r'Software\Microsoft\.NETFramework\sdkInstallRootv1.1'
+ # TODO: allow a specific framework version to be set
+
+ # Choose a default framework version based on the Visual
+ # Studio version.
+ DefaultFrameworkVersionMap = {
+ '7.0' : 'v1.0',
+ '7.1' : 'v1.1',
+ '8.0' : 'v2.0',
+ # TODO: Does .NET 3.0 need to be worked into here somewhere?
+ }
+ try:
+ default_framework_version = DefaultFrameworkVersionMap[version[:3]]
+ except (KeyError, TypeError):
+ pass
else:
- key = r'Software\Microsoft\.NETFramework\sdkInstallRoot'
+ # Look for the first installed directory in FRAMEWORKDIR that
+ # begins with the framework version string that's appropriate
+ # for the Visual Studio version we're using.
+ for v in installed_framework_versions:
+ if v[:4] == default_framework_version:
+ rv['FRAMEWORKVERSION'] = v
+ break
- (rv['FRAMEWORKSDKDIR'], t) = SCons.Util.RegGetValue(SCons.Util.HKEY_LOCAL_MACHINE,key)
+ # If the framework version couldn't be worked out by the previous
+ # code then fall back to using the latest version of the .NET
+ # framework
+ if not rv.has_key('FRAMEWORKVERSION'):
+ rv['FRAMEWORKVERSION'] = installed_framework_versions[0]
- except SCons.Util.RegError:
- pass
+ # .NET framework SDK install dir
+ if rv.has_key('FRAMEWORKVERSION'):
+ # The .NET SDK version used must match the .NET version used,
+ # so we deliberately don't fall back to other .NET framework SDK
+ # versions that might be present.
+ ver = rv['FRAMEWORKVERSION'][:4]
+ key = r'Software\Microsoft\.NETFramework\sdkInstallRoot' + ver
+ try:
+ (rv['FRAMEWORKSDKDIR'], t) = SCons.Util.RegGetValue(SCons.Util.HKEY_LOCAL_MACHINE,
+ key)
+ except SCons.Util.RegError:
+ pass
# MS Platform SDK dir
try:
@@ -1704,9 +1729,9 @@ def generate(env):
env['MSVSSCONS'] = '"%s" -c "%s"' % (python_executable, getExecScriptMain(env))
env['MSVSSCONSFLAGS'] = '-C "${MSVSSCONSCRIPT.dir.abspath}" -f ${MSVSSCONSCRIPT.name}'
env['MSVSSCONSCOM'] = '$MSVSSCONS $MSVSSCONSFLAGS'
- env['MSVSBUILDCOM'] = '$MSVSSCONSCOM $MSVSBUILDTARGET'
- env['MSVSREBUILDCOM'] = '$MSVSSCONSCOM $MSVSBUILDTARGET'
- env['MSVSCLEANCOM'] = '$MSVSSCONSCOM -c $MSVSBUILDTARGET'
+ env['MSVSBUILDCOM'] = '$MSVSSCONSCOM "$MSVSBUILDTARGET"'
+ env['MSVSREBUILDCOM'] = '$MSVSSCONSCOM "$MSVSBUILDTARGET"'
+ env['MSVSCLEANCOM'] = '$MSVSSCONSCOM -c "$MSVSBUILDTARGET"'
env['MSVSENCODING'] = 'Windows-1252'
try:
@@ -1746,7 +1771,11 @@ def exists(env):
if env.has_key('MSVS_VERSION'):
version_num, suite = msvs_parse_version(env['MSVS_VERSION'])
if version_num >= 7.0:
- return env.Detect('devenv')
+ # The executable is 'devenv' in Visual Studio Pro,
+ # Team System and others. Express Editions have different
+ # executable names. Right now we're only going to worry
+ # about Visual C++ 2005 Express Edition.
+ return env.Detect('devenv') or env.Detect('vcexpress')
else:
return env.Detect('msdev')
else:
diff --git a/src/engine/SCons/Tool/msvs.xml b/src/engine/SCons/Tool/msvs.xml
index c16beaa..07fda0c 100644
--- a/src/engine/SCons/Tool/msvs.xml
+++ b/src/engine/SCons/Tool/msvs.xml
@@ -18,13 +18,13 @@ and by default builds a solution file as well.
This builds a Visual Studio project file, based on the version of
Visual Studio that is configured (either the latest installed version,
or the version specified by
-&cv-MSVS_VERSION;
+&cv-link-MSVS_VERSION;
in the Environment constructor).
For Visual Studio 6, it will generate a
<filename>.dsp</filename>
file.
-For Visual Studio 7 (.NET), it will generate a
-<filename>.dsp</filename>
+For Visual Studio 7 (.NET) and later versions, it will generate a
+<filename>.vcproj</filename>
file.
By default,
@@ -56,7 +56,7 @@ These are currently limited to
and
<literal>misc</literal>.
These are pretty self-explanatory, but it should be noted that these
-lists are added to the &cv-SOURCES; construction variable as strings,
+lists are added to the &cv-link-SOURCES; construction variable as strings,
NOT as SCons File Nodes. This is because they represent file
names to be added to the project file, not the source files used to
build the project file.
@@ -77,7 +77,7 @@ file.
The correct
suffix for the version of Visual Studio must be used,
but the
-&cv-MSVSPROJECTSUFFIX;
+&cv-link-MSVSPROJECTSUFFIX;
construction variable
will be defined to the correct value (see example below).
@@ -154,7 +154,7 @@ This builds a Visual Studio solution file,
based on the version of Visual Studio that is configured
(either the latest installed version,
or the version specified by
-&cv-MSVS_VERSION;
+&cv-link-MSVS_VERSION;
in the construction environment).
For Visual Studio 6, it will generate a
<filename>.dsw</filename>
@@ -169,7 +169,7 @@ The following values must be specified:
<literal>target</literal>:
The name of the target .dsw or .sln file. The correct
suffix for the version of Visual Studio must be used, but the value
-&cv-MSVSSOLUTIONSUFFIX;
+&cv-link-MSVSSOLUTIONSUFFIX;
will be defined to the correct value (see example below).
<literal>variant</literal>:
@@ -184,12 +184,13 @@ A list of project file names, or Project nodes returned by calls to the
&b-MSVSProject;
Builder,
to be placed into the solution file.
-(NOTE: Currently only one project is supported per solution.)
It should be noted that these file names are NOT added to the $SOURCES
environment variable in form of files, but rather as strings. This
is because they represent file names to be added to the solution file,
not the source files used to build the solution file.
+(NOTE: Currently only one project is supported per solution.)
+
Example Usage:
<example>
@@ -479,7 +480,8 @@ The action used to generate Microsoft Visual Studio project files.
The suffix used for Microsoft Visual Studio project (DSP) files.
The default value is
<filename>.vcproj</filename>
-when using Visual Studio version 7.x (.NET),
+when using Visual Studio version 7.x (.NET)
+or later version,
and
<filename>.dsp</filename>
when using earlier versions of Visual Studio.
@@ -528,7 +530,7 @@ file)
that will be invoked by Visual Studio
project files
(through the
-&cv-MSVSSCONSCOM;
+&cv-link-MSVSSCONSCOM;
variable).
The default is the same sconscript file
that contains the call to
@@ -561,7 +563,7 @@ The (optional) path to the SCons library directory,
initialized from the external environment.
If set, this is used to construct a shorter and more
efficient search path in the
-&cv-MSVSSCONS;
+&cv-link-MSVSSCONS;
command line executed
from Microsoft Visual Studio project files.
</summary>
diff --git a/src/engine/SCons/Tool/pdf.xml b/src/engine/SCons/Tool/pdf.xml
index 3d64be2..1e447dd 100644
--- a/src/engine/SCons/Tool/pdf.xml
+++ b/src/engine/SCons/Tool/pdf.xml
@@ -12,7 +12,7 @@ from a <filename>.dvi</filename> input file
<filename>.ltx</filename>,
or
<filename>.latex</filename> input file).
-The suffix specified by the &cv-PDFSUFFIX; construction variable
+The suffix specified by the &cv-link-PDFSUFFIX; construction variable
(<filename>.pdf</filename> by default)
is added automatically to the target
if it is not already present. Example:
diff --git a/src/engine/SCons/Tool/qt.xml b/src/engine/SCons/Tool/qt.xml
index 6a4ac78..4b11cbc 100644
--- a/src/engine/SCons/Tool/qt.xml
+++ b/src/engine/SCons/Tool/qt.xml
@@ -14,7 +14,7 @@ XXX
<summary>
Builds an output file from a moc input file. Moc input files are either
header files or cxx files. This builder is only available after using the
-tool 'qt'. See the &cv-QTDIR; variable for more information.
+tool 'qt'. See the &cv-link-QTDIR; variable for more information.
Example:
<example>
@@ -35,7 +35,7 @@ files to the &b-Program;,
without using this builder. Using this builder lets you override the standard
naming conventions (be careful: prefixes are always prepended to names of
built files; if you don't want prefixes, you may set them to ``).
-See the &cv-QTDIR; variable for more information.
+See the &cv-link-QTDIR; variable for more information.
Example:
<example>
@@ -56,7 +56,9 @@ with python's os.path.join() method,
but are listed here with the '/' separator
for easier reading.)
In addition, the construction environment
-variables &cv-CPPPATH;, &cv-LIBPATH; and &cv-LIBS; may be modified
+variables &cv-link-CPPPATH;,
+&cv-link-LIBPATH; and
+&cv-link-LIBS; may be modified
and the variables
PROGEMITTER, SHLIBEMITTER and LIBEMITTER
are modified. Because the build-performance is affected when using this tool,
@@ -110,15 +112,16 @@ specify files to run moc on.
<cvar name="QT_BINPATH">
<summary>
The path where the qt binaries are installed.
-The default value is '&cv-QTDIR;/bin'.
+The default value is '&cv-link-QTDIR;/bin'.
</summary>
</cvar>
<cvar name="QT_CPPPATH">
<summary>
The path where the qt header files are installed.
-The default value is '&cv-QTDIR;/include'.
-Note: If you set this variable to None, the tool won't change the &cv-CPPPATH;
+The default value is '&cv-link-QTDIR;/include'.
+Note: If you set this variable to None,
+the tool won't change the &cv-link-CPPPATH;
construction variable.
</summary>
</cvar>
@@ -132,22 +135,23 @@ Prints lots of debugging information while scanning for moc files.
<cvar name="QT_LIB">
<summary>
Default value is 'qt'. You may want to set this to 'qt-mt'. Note: If you set
-this variable to None, the tool won't change the &cv-LIBS; variable.
+this variable to None, the tool won't change the &cv-link-LIBS; variable.
</summary>
</cvar>
<cvar name="QT_LIBPATH">
<summary>
The path where the qt libraries are installed.
-The default value is '&cv-QTDIR;/lib'.
-Note: If you set this variable to None, the tool won't change the &cv-LIBPATH;
+The default value is '&cv-link-QTDIR;/lib'.
+Note: If you set this variable to None,
+the tool won't change the &cv-link-LIBPATH;
construction variable.
</summary>
</cvar>
<cvar name="QT_MOC">
<summary>
-Default value is '&cv-QT_BINPATH;/moc'.
+Default value is '&cv-link-QT_BINPATH;/moc'.
</summary>
</cvar>
@@ -180,7 +184,7 @@ Command to generate a moc file from a cpp file.
<cvar name="QT_MOCFROMCXXCOMSTR">
<summary>
The string displayed when generating a moc file from a cpp file.
-If this is not set, then &cv-QT_MOCFROMCXXCOM; (the command line) is displayed.
+If this is not set, then &cv-link-QT_MOCFROMCXXCOM; (the command line) is displayed.
</summary>
</cvar>
@@ -193,7 +197,7 @@ Command to generate a moc file from a header.
<cvar name="QT_MOCFROMHCOMSTR">
<summary>
The string displayed when generating a moc file from a cpp file.
-If this is not set, then &cv-QT_MOCFROMHCOM; (the command line) is displayed.
+If this is not set, then &cv-link-QT_MOCFROMHCOM; (the command line) is displayed.
</summary>
</cvar>
@@ -212,14 +216,14 @@ Default value is 'moc_'. Prefix for moc output files, when source is a header.
<cvar name="QT_MOCHSUFFIX">
<summary>
-Default value is '&cv-CXXFILESUFFIX;'. Suffix for moc output files, when source is
+Default value is '&cv-link-CXXFILESUFFIX;'. Suffix for moc output files, when source is
a header.
</summary>
</cvar>
<cvar name="QT_UIC">
<summary>
-Default value is '&cv-QT_BINPATH;/uic'.
+Default value is '&cv-link-QT_BINPATH;/uic'.
</summary>
</cvar>
@@ -232,7 +236,7 @@ Command to generate header files from .ui files.
<cvar name="QT_UICCOMSTR">
<summary>
The string displayed when generating header files from .ui files.
-If this is not set, then &cv-QT_UICCOM; (the command line) is displayed.
+If this is not set, then &cv-link-QT_UICCOM; (the command line) is displayed.
</summary>
</cvar>
@@ -270,7 +274,7 @@ Default value is 'uic_'. Prefix for uic generated implementation files.
<cvar name="QT_UICIMPLSUFFIX">
<summary>
-Default value is '&cv-CXXFILESUFFIX;'. Suffix for uic generated implementation
+Default value is '&cv-link-CXXFILESUFFIX;'. Suffix for uic generated implementation
files.
</summary>
</cvar>
diff --git a/src/engine/SCons/Tool/rmic.xml b/src/engine/SCons/Tool/rmic.xml
index 1fe4bd8..63511e5 100644
--- a/src/engine/SCons/Tool/rmic.xml
+++ b/src/engine/SCons/Tool/rmic.xml
@@ -24,7 +24,7 @@ or the objects return from the
builder method.
If the construction variable
-&cv-JAVACLASSDIR;
+&cv-link-JAVACLASSDIR;
is set, either in the environment
or in the call to the
&b-RMIC;
@@ -59,7 +59,7 @@ The Java RMI stub compiler.
The command line used to compile stub
and skeleton class files
from Java classes that contain RMI implementations.
-Any options specified in the &cv-RMICFLAGS; construction variable
+Any options specified in the &cv-link-RMICFLAGS; construction variable
are included on this command line.
</summary>
</cvar>
@@ -69,7 +69,7 @@ are included on this command line.
The string displayed when compiling
stub and skeleton class files
from Java classes that contain RMI implementations.
-If this is not set, then &cv-RMICCOM; (the command line) is displayed.
+If this is not set, then &cv-link-RMICCOM; (the command line) is displayed.
<example>
env = Environment(RMICCOMSTR = "Generating stub/skeleton class files $TARGETS from $SOURCES")
diff --git a/src/engine/SCons/Tool/rpcgen.xml b/src/engine/SCons/Tool/rpcgen.xml
index 74fc3be..a3adb22 100644
--- a/src/engine/SCons/Tool/rpcgen.xml
+++ b/src/engine/SCons/Tool/rpcgen.xml
@@ -85,7 +85,7 @@ The RPC protocol compiler.
Options passed to the RPC protocol compiler
when generating client side stubs.
These are in addition to any flags specified in the
-&cv-RPCGENFLAGS;
+&cv-link-RPCGENFLAGS;
construction variable.
</summary>
</cvar>
@@ -101,7 +101,7 @@ General options passed to the RPC protocol compiler.
Options passed to the RPC protocol compiler
when generating a header file.
These are in addition to any flags specified in the
-&cv-RPCGENFLAGS;
+&cv-link-RPCGENFLAGS;
construction variable.
</summary>
</cvar>
@@ -111,7 +111,7 @@ construction variable.
Options passed to the RPC protocol compiler
when generating server side stubs.
These are in addition to any flags specified in the
-&cv-RPCGENFLAGS;
+&cv-link-RPCGENFLAGS;
construction variable.
</summary>
</cvar>
@@ -121,7 +121,7 @@ construction variable.
Options passed to the RPC protocol compiler
when generating XDR routines.
These are in addition to any flags specified in the
-&cv-RPCGENFLAGS;
+&cv-link-RPCGENFLAGS;
construction variable.
</summary>
</cvar>
diff --git a/src/engine/SCons/Tool/swig.xml b/src/engine/SCons/Tool/swig.xml
index 0bdda96..05faff2 100644
--- a/src/engine/SCons/Tool/swig.xml
+++ b/src/engine/SCons/Tool/swig.xml
@@ -22,13 +22,13 @@ The suffix that will be used for intermediate C
source files generated by
the scripting language wrapper and interface generator.
The default value is
-<filename>_wrap</filename>&cv-CFILESUFFIX;.
+<filename>_wrap</filename>&cv-link-CFILESUFFIX;.
By default, this value is used whenever the
<option>-c++</option>
option is
<emphasis>not</emphasis>
specified as part of the
-&cv-SWIGFLAGS;
+&cv-link-SWIGFLAGS;
construction variable.
</summary>
</cvar>
@@ -44,7 +44,7 @@ the scripting language wrapper and interface generator.
<summary>
The string displayed when calling
the scripting language wrapper and interface generator.
-If this is not set, then &cv-SWIGCOM; (the command line) is displayed.
+If this is not set, then &cv-link-SWIGCOM; (the command line) is displayed.
</summary>
</cvar>
@@ -54,11 +54,11 @@ The suffix that will be used for intermediate C++
source files generated by
the scripting language wrapper and interface generator.
The default value is
-<filename>_wrap</filename>&cv-CFILESUFFIX;.
+<filename>_wrap</filename>&cv-link-CFILESUFFIX;.
By default, this value is used whenever the
<filename>-c++</filename>
option is specified as part of the
-&cv-SWIGFLAGS;
+&cv-link-SWIGFLAGS;
construction variable.
</summary>
</cvar>
@@ -79,7 +79,7 @@ option in this variable,
will, by default,
generate a C++ intermediate source file
with the extension that is specified as the
-&cv-CXXFILESUFFIX;
+&cv-link-CXXFILESUFFIX;
variable.
</summary>
</cvar>
diff --git a/src/engine/SCons/Tool/tar.xml b/src/engine/SCons/Tool/tar.xml
index 88265dc..763df54 100644
--- a/src/engine/SCons/Tool/tar.xml
+++ b/src/engine/SCons/Tool/tar.xml
@@ -65,7 +65,7 @@ The command line used to call the tar archiver.
<summary>
The string displayed when archiving files
using the tar archiver.
-If this is not set, then &cv-TARCOM; (the command line) is displayed.
+If this is not set, then &cv-link-TARCOM; (the command line) is displayed.
<example>
env = Environment(TARCOMSTR = "Archiving $TARGET")
diff --git a/src/engine/SCons/Tool/tex.py b/src/engine/SCons/Tool/tex.py
index 1defd90..0e3d4b1 100644
--- a/src/engine/SCons/Tool/tex.py
+++ b/src/engine/SCons/Tool/tex.py
@@ -52,6 +52,10 @@ undefined_references_re = re.compile(undefined_references_str, re.MULTILINE)
openout_aux_re = re.compile(r"\\openout.*`(.*\.aux)'")
+makeindex_re = re.compile(r"^[^%]*\\makeindex", re.MULTILINE)
+tableofcontents_re = re.compile(r"^[^%]*\\tableofcontents", re.MULTILINE)
+bibliography_re = re.compile(r"^[^%]*\\bibliography", re.MULTILINE)
+
# An Action sufficient to build any generic tex file.
TeXAction = None
@@ -72,6 +76,24 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None
basename = SCons.Util.splitext(str(source[0]))[0]
basedir = os.path.split(str(source[0]))[0]
+ # Notice that all the filenames are not prefixed with the basedir.
+ # That's because the *COM variables have the cd command in the prolog.
+
+ bblfilename = basename + '.bbl'
+ bblContents = ""
+ if os.path.exists(bblfilename):
+ bblContents = open(bblfilename, "rb").read()
+
+ idxfilename = basename + '.idx'
+ idxContents = ""
+ if os.path.exists(idxfilename):
+ idxContents = open(idxfilename, "rb").read()
+
+ tocfilename = basename + '.toc'
+ tocContents = ""
+ if os.path.exists(tocfilename):
+ tocContents = open(tocfilename, "rb").read()
+
# Run LaTeX once to generate a new aux file.
XXXLaTeXAction(target, source, env)
@@ -96,21 +118,26 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None
BibTeXAction(bibfile, bibfile, env)
break
- # Now decide if makeindex will need to be run.
- idxfilename = basename + '.idx'
- if os.path.exists(idxfilename):
+ must_rerun_latex = 0
+ # Now decide if latex will need to be run again due to table of contents.
+ if os.path.exists(tocfilename) and tocContents != open(tocfilename, "rb").read():
+ must_rerun_latex = 1
+
+ # Now decide if latex will need to be run again due to bibliography.
+ if os.path.exists(bblfilename) and bblContents != open(bblfilename, "rb").read():
+ must_rerun_latex = 1
+
+ # Now decide if latex will need to be run again due to index.
+ if os.path.exists(idxfilename) and idxContents != open(idxfilename, "rb").read():
+ # We must run makeindex
idxfile = env.fs.File(basename)
- # TODO: if ( idxfile has changed) ...
MakeIndexAction(idxfile, idxfile, env)
- XXXLaTeXAction(target, source, env)
+ must_rerun_latex = 1
- # Now decide if latex will need to be run again due to table of contents.
- tocfilename = basename + '.toc'
- if os.path.exists(tocfilename):
- # TODO: if ( tocfilename has changed) ...
+ if must_rerun_latex == 1:
XXXLaTeXAction(target, source, env)
- # Now decide if latex needs to be run yet again.
+ # Now decide if latex needs to be run yet again to resolve warnings.
logfilename = basename + '.log'
for _ in range(int(env.subst('$LATEXRETRIES'))):
if not os.path.exists(logfilename):
@@ -153,25 +180,30 @@ def tex_emitter(target, source, env):
target.append(base + '.log')
for f in source:
content = f.get_contents()
- if string.find(content, r'\tableofcontents') != -1:
+ if tableofcontents_re.search(content):
target.append(base + '.toc')
- if string.find(content, r'\makeindex') != -1:
+ env.Precious(base + '.toc')
+ if makeindex_re.search(content):
target.append(base + '.ilg')
target.append(base + '.ind')
target.append(base + '.idx')
- if string.find(content, r'\bibliography') != -1:
+ env.Precious(base + '.idx')
+ if bibliography_re.search(content):
target.append(base + '.bbl')
+ env.Precious(base + '.bbl')
target.append(base + '.blg')
# read log file to get all .aux files
logfilename = base + '.log'
+ dir, base_nodir = os.path.split(base)
if os.path.exists(logfilename):
content = open(logfilename, "rb").read()
aux_files = openout_aux_re.findall(content)
- aux_files = filter(lambda f, b=base+'.aux': f != b, aux_files)
- dir = os.path.split(base)[0]
+ aux_files = filter(lambda f, b=base_nodir+'.aux': f != b, aux_files)
aux_files = map(lambda f, d=dir: d+os.sep+f, aux_files)
target.extend(aux_files)
+ for a in aux_files:
+ env.Precious( a )
return (target, source)
diff --git a/src/engine/SCons/Tool/tex.xml b/src/engine/SCons/Tool/tex.xml
index b30b36d..4cfc252 100644
--- a/src/engine/SCons/Tool/tex.xml
+++ b/src/engine/SCons/Tool/tex.xml
@@ -29,7 +29,7 @@ typesetter.
<summary>
The string displayed when generating a bibliography
for TeX or LaTeX.
-If this is not set, then &cv-BIBTEXCOM; (the command line) is displayed.
+If this is not set, then &cv-link-BIBTEXCOM; (the command line) is displayed.
<example>
env = Environment(BIBTEXCOMSTR = "Generating bibliography $TARGET")
@@ -64,7 +64,7 @@ typesetter.
The string displayed when calling the makeindex generator for the
TeX formatter and typesetter
and the LaTeX structured formatter and typesetter.
-If this is not set, then &cv-MAKEINDEXCOM; (the command line) is displayed.
+If this is not set, then &cv-link-MAKEINDEXCOM; (the command line) is displayed.
</summary>
</cvar>
@@ -91,7 +91,7 @@ The command line used to call the TeX formatter and typesetter.
<summary>
The string displayed when calling
the TeX formatter and typesetter.
-If this is not set, then &cv-TEXCOM; (the command line) is displayed.
+If this is not set, then &cv-link-TEXCOM; (the command line) is displayed.
<example>
env = Environment(TEXCOMSTR = "Building $TARGET from TeX input $SOURCES")
diff --git a/src/engine/SCons/Tool/yacc.xml b/src/engine/SCons/Tool/yacc.xml
index 8a23d0b..a6ad9b4 100644
--- a/src/engine/SCons/Tool/yacc.xml
+++ b/src/engine/SCons/Tool/yacc.xml
@@ -27,7 +27,7 @@ to generate a source file.
<summary>
The string displayed when generating a source file
using the parser generator.
-If this is not set, then &cv-YACCCOM; (the command line) is displayed.
+If this is not set, then &cv-link-YACCCOM; (the command line) is displayed.
<example>
env = Environment(YACCCOMSTR = "Yacc'ing $TARGET from $SOURCES")
@@ -38,7 +38,7 @@ env = Environment(YACCCOMSTR = "Yacc'ing $TARGET from $SOURCES")
<cvar name="YACCFLAGS">
<summary>
General options passed to the parser generator.
-If &cv-YACCFLAGS; contains a <option>-d</option> option,
+If &cv-link-YACCFLAGS; contains a <option>-d</option> option,
SCons assumes that the call will also create a .h file
(if the yacc source file ends in a .y suffix)
or a .hpp file
diff --git a/src/engine/SCons/Tool/zip.xml b/src/engine/SCons/Tool/zip.xml
index 5e28bee..909a4c4 100644
--- a/src/engine/SCons/Tool/zip.xml
+++ b/src/engine/SCons/Tool/zip.xml
@@ -58,7 +58,7 @@ zip archive.
<summary>
The string displayed when archiving files
using the zip utility.
-If this is not set, then &cv-ZIPCOM;
+If this is not set, then &cv-link-ZIPCOM;
(the command line or internal Python function) is displayed.
<example>