summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Falavigna <dktrkranz@debian.org>2011-09-10 10:58:07 +0200
committerLuca Falavigna <dktrkranz@debian.org>2011-09-10 10:58:07 +0200
commit9dc7be6c34e2bda6d0d96a450bb8eee03b277ba3 (patch)
tree29a18cc5c1c1ecfc1d1d49e768ef964b84ed14bf
parent8344b122eb4ee8818cde6ef2bb07726a672a2d23 (diff)
Imported Upstream version 2.1.0upstream/2.1.0
-rw-r--r--CHANGES.txt255
-rw-r--r--LICENSE.txt2
-rw-r--r--MANIFEST1
-rw-r--r--PKG-INFO2
-rw-r--r--README.txt18
-rw-r--r--RELEASE.txt152
-rw-r--r--engine/SCons/Action.py28
-rw-r--r--engine/SCons/Builder.py4
-rw-r--r--engine/SCons/CacheDir.py4
-rw-r--r--engine/SCons/Debug.py4
-rw-r--r--engine/SCons/Defaults.py34
-rw-r--r--engine/SCons/Environment.py137
-rw-r--r--engine/SCons/Errors.py4
-rw-r--r--engine/SCons/Executor.py4
-rw-r--r--engine/SCons/Job.py4
-rw-r--r--engine/SCons/Memoize.py4
-rw-r--r--engine/SCons/Node/Alias.py4
-rw-r--r--engine/SCons/Node/FS.py402
-rw-r--r--engine/SCons/Node/Python.py4
-rw-r--r--engine/SCons/Node/__init__.py11
-rw-r--r--engine/SCons/Options/BoolOption.py4
-rw-r--r--engine/SCons/Options/EnumOption.py4
-rw-r--r--engine/SCons/Options/ListOption.py4
-rw-r--r--engine/SCons/Options/PackageOption.py4
-rw-r--r--engine/SCons/Options/PathOption.py4
-rw-r--r--engine/SCons/Options/__init__.py4
-rw-r--r--engine/SCons/PathList.py4
-rw-r--r--engine/SCons/Platform/__init__.py4
-rw-r--r--engine/SCons/Platform/aix.py4
-rw-r--r--engine/SCons/Platform/cygwin.py4
-rw-r--r--engine/SCons/Platform/darwin.py30
-rw-r--r--engine/SCons/Platform/hpux.py4
-rw-r--r--engine/SCons/Platform/irix.py4
-rw-r--r--engine/SCons/Platform/os2.py4
-rw-r--r--engine/SCons/Platform/posix.py4
-rw-r--r--engine/SCons/Platform/sunos.py4
-rw-r--r--engine/SCons/Platform/win32.py4
-rw-r--r--engine/SCons/SConf.py4
-rw-r--r--engine/SCons/SConsign.py12
-rw-r--r--engine/SCons/Scanner/C.py4
-rw-r--r--engine/SCons/Scanner/D.py4
-rw-r--r--engine/SCons/Scanner/Dir.py4
-rw-r--r--engine/SCons/Scanner/Fortran.py4
-rw-r--r--engine/SCons/Scanner/IDL.py4
-rw-r--r--engine/SCons/Scanner/LaTeX.py7
-rw-r--r--engine/SCons/Scanner/Prog.py4
-rw-r--r--engine/SCons/Scanner/RC.py6
-rw-r--r--engine/SCons/Scanner/__init__.py4
-rw-r--r--engine/SCons/Script/Interactive.py4
-rw-r--r--engine/SCons/Script/Main.py93
-rw-r--r--engine/SCons/Script/SConsOptions.py10
-rw-r--r--engine/SCons/Script/SConscript.py4
-rw-r--r--engine/SCons/Script/__init__.py4
-rw-r--r--engine/SCons/Sig.py4
-rw-r--r--engine/SCons/Subst.py4
-rw-r--r--engine/SCons/Taskmaster.py12
-rw-r--r--engine/SCons/Tool/386asm.py4
-rw-r--r--engine/SCons/Tool/BitKeeper.py4
-rw-r--r--engine/SCons/Tool/CVS.py4
-rw-r--r--engine/SCons/Tool/FortranCommon.py21
-rw-r--r--engine/SCons/Tool/JavaCommon.py4
-rw-r--r--engine/SCons/Tool/MSCommon/__init__.py4
-rw-r--r--engine/SCons/Tool/MSCommon/arch.py4
-rw-r--r--engine/SCons/Tool/MSCommon/common.py4
-rw-r--r--engine/SCons/Tool/MSCommon/netframework.py4
-rw-r--r--engine/SCons/Tool/MSCommon/sdk.py4
-rw-r--r--engine/SCons/Tool/MSCommon/vc.py15
-rw-r--r--engine/SCons/Tool/MSCommon/vs.py31
-rw-r--r--engine/SCons/Tool/Perforce.py4
-rw-r--r--engine/SCons/Tool/PharLapCommon.py4
-rw-r--r--engine/SCons/Tool/RCS.py4
-rw-r--r--engine/SCons/Tool/SCCS.py4
-rw-r--r--engine/SCons/Tool/Subversion.py4
-rw-r--r--engine/SCons/Tool/__init__.py6
-rw-r--r--engine/SCons/Tool/aixc++.py4
-rw-r--r--engine/SCons/Tool/aixcc.py4
-rw-r--r--engine/SCons/Tool/aixf77.py4
-rw-r--r--engine/SCons/Tool/aixlink.py4
-rw-r--r--engine/SCons/Tool/applelink.py4
-rw-r--r--engine/SCons/Tool/ar.py4
-rw-r--r--engine/SCons/Tool/as.py4
-rw-r--r--engine/SCons/Tool/bcc32.py4
-rw-r--r--engine/SCons/Tool/c++.py4
-rw-r--r--engine/SCons/Tool/cc.py4
-rw-r--r--engine/SCons/Tool/cvf.py4
-rw-r--r--engine/SCons/Tool/default.py4
-rw-r--r--engine/SCons/Tool/dmd.py31
-rw-r--r--engine/SCons/Tool/dvi.py4
-rw-r--r--engine/SCons/Tool/dvipdf.py5
-rw-r--r--engine/SCons/Tool/dvips.py5
-rw-r--r--engine/SCons/Tool/f03.py63
-rw-r--r--engine/SCons/Tool/f77.py4
-rw-r--r--engine/SCons/Tool/f90.py4
-rw-r--r--engine/SCons/Tool/f95.py4
-rw-r--r--engine/SCons/Tool/filesystem.py4
-rw-r--r--engine/SCons/Tool/fortran.py4
-rw-r--r--engine/SCons/Tool/g++.py4
-rw-r--r--engine/SCons/Tool/g77.py4
-rw-r--r--engine/SCons/Tool/gas.py4
-rw-r--r--engine/SCons/Tool/gcc.py4
-rw-r--r--engine/SCons/Tool/gfortran.py6
-rw-r--r--engine/SCons/Tool/gnulink.py5
-rw-r--r--engine/SCons/Tool/gs.py4
-rw-r--r--engine/SCons/Tool/hpc++.py4
-rw-r--r--engine/SCons/Tool/hpcc.py4
-rw-r--r--engine/SCons/Tool/hplink.py4
-rw-r--r--engine/SCons/Tool/icc.py4
-rw-r--r--engine/SCons/Tool/icl.py4
-rw-r--r--engine/SCons/Tool/ifl.py4
-rw-r--r--engine/SCons/Tool/ifort.py4
-rw-r--r--engine/SCons/Tool/ilink.py4
-rw-r--r--engine/SCons/Tool/ilink32.py4
-rw-r--r--engine/SCons/Tool/install.py60
-rw-r--r--engine/SCons/Tool/intelc.py90
-rw-r--r--engine/SCons/Tool/ipkg.py4
-rw-r--r--engine/SCons/Tool/jar.py12
-rw-r--r--engine/SCons/Tool/javac.py4
-rw-r--r--engine/SCons/Tool/javah.py4
-rw-r--r--engine/SCons/Tool/latex.py5
-rw-r--r--engine/SCons/Tool/lex.py4
-rw-r--r--engine/SCons/Tool/link.py11
-rw-r--r--engine/SCons/Tool/linkloc.py4
-rw-r--r--engine/SCons/Tool/m4.py4
-rw-r--r--engine/SCons/Tool/masm.py4
-rw-r--r--engine/SCons/Tool/midl.py4
-rw-r--r--engine/SCons/Tool/mingw.py41
-rw-r--r--engine/SCons/Tool/mslib.py4
-rw-r--r--engine/SCons/Tool/mslink.py70
-rw-r--r--engine/SCons/Tool/mssdk.py4
-rw-r--r--engine/SCons/Tool/msvc.py32
-rw-r--r--engine/SCons/Tool/msvs.py536
-rw-r--r--engine/SCons/Tool/mwcc.py4
-rw-r--r--engine/SCons/Tool/mwld.py4
-rw-r--r--engine/SCons/Tool/nasm.py4
-rw-r--r--engine/SCons/Tool/packaging/__init__.py4
-rw-r--r--engine/SCons/Tool/packaging/ipk.py4
-rw-r--r--engine/SCons/Tool/packaging/msi.py4
-rw-r--r--engine/SCons/Tool/packaging/rpm.py4
-rw-r--r--engine/SCons/Tool/packaging/src_tarbz2.py4
-rw-r--r--engine/SCons/Tool/packaging/src_targz.py4
-rw-r--r--engine/SCons/Tool/packaging/src_zip.py4
-rw-r--r--engine/SCons/Tool/packaging/tarbz2.py4
-rw-r--r--engine/SCons/Tool/packaging/targz.py4
-rw-r--r--engine/SCons/Tool/packaging/zip.py4
-rw-r--r--engine/SCons/Tool/pdf.py4
-rw-r--r--engine/SCons/Tool/pdflatex.py5
-rw-r--r--engine/SCons/Tool/pdftex.py5
-rw-r--r--engine/SCons/Tool/qt.py4
-rw-r--r--engine/SCons/Tool/rmic.py12
-rw-r--r--engine/SCons/Tool/rpcgen.py4
-rw-r--r--engine/SCons/Tool/rpm.py4
-rw-r--r--engine/SCons/Tool/sgiar.py4
-rw-r--r--engine/SCons/Tool/sgic++.py4
-rw-r--r--engine/SCons/Tool/sgicc.py4
-rw-r--r--engine/SCons/Tool/sgilink.py5
-rw-r--r--engine/SCons/Tool/sunar.py4
-rw-r--r--engine/SCons/Tool/sunc++.py4
-rw-r--r--engine/SCons/Tool/suncc.py4
-rw-r--r--engine/SCons/Tool/sunf77.py4
-rw-r--r--engine/SCons/Tool/sunf90.py4
-rw-r--r--engine/SCons/Tool/sunf95.py4
-rw-r--r--engine/SCons/Tool/sunlink.py5
-rw-r--r--engine/SCons/Tool/swig.py11
-rw-r--r--engine/SCons/Tool/tar.py4
-rw-r--r--engine/SCons/Tool/tex.py139
-rw-r--r--engine/SCons/Tool/textfile.py4
-rw-r--r--engine/SCons/Tool/tlib.py4
-rw-r--r--engine/SCons/Tool/wix.py4
-rw-r--r--engine/SCons/Tool/yacc.py14
-rw-r--r--engine/SCons/Tool/zip.py4
-rw-r--r--engine/SCons/Util.py6
-rw-r--r--engine/SCons/Variables/BoolVariable.py4
-rw-r--r--engine/SCons/Variables/EnumVariable.py6
-rw-r--r--engine/SCons/Variables/ListVariable.py4
-rw-r--r--engine/SCons/Variables/PackageVariable.py4
-rw-r--r--engine/SCons/Variables/PathVariable.py4
-rw-r--r--engine/SCons/Variables/__init__.py4
-rw-r--r--engine/SCons/Warnings.py4
-rw-r--r--engine/SCons/__init__.py12
-rw-r--r--engine/SCons/compat/__init__.py4
-rw-r--r--engine/SCons/compat/_scons_builtins.py4
-rw-r--r--engine/SCons/compat/_scons_collections.py4
-rw-r--r--engine/SCons/compat/_scons_dbm.py4
-rw-r--r--engine/SCons/compat/_scons_hashlib.py4
-rw-r--r--engine/SCons/compat/_scons_io.py4
-rw-r--r--engine/SCons/cpp.py4
-rw-r--r--engine/SCons/dblite.py5
-rw-r--r--engine/SCons/exitfuncs.py4
-rw-r--r--scons-time.16
-rw-r--r--scons.12268
-rw-r--r--sconsign.16
-rw-r--r--script/scons44
-rw-r--r--script/scons-time4
-rw-r--r--script/scons.bat11
-rw-r--r--script/sconsign41
-rw-r--r--setup.cfg1
-rw-r--r--setup.py78
197 files changed, 3460 insertions, 2037 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 3a17fb5..04a59b2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -5,6 +5,204 @@
Change Log
+RELEASE 2.1.0 - Mon, 09 Sep 2011 20:54:57 -0700
+
+ From Anton Lazarev:
+ - Fix Windows resource compiler scanner to accept DOS line endings.
+
+ From Matthias:
+ - Update MSVS documents to remove note indicating that only one
+ project is currently supported per solution file.
+
+ From Grzegorz Bizoń:
+ - Fix long compile lines in batch mode by using TEMPFILE
+ - Fix MSVC_BATCH=False (was treating it as true)
+
+ From Justin Gullingsrud:
+ - support -std=c++0x and related CXXFLAGS in pkgconfig (ParseFlags)
+
+ From Vincent Beffara:
+ - Support -dylib_file in pkgconfig (ParseFlags)
+
+ From Gary Oberbrunner and Sohail Somani:
+ - new construction variable WINDOWS_EMBED_MANIFEST to automatically
+ embed manifests in Windows EXEs and DLLs.
+
+ From Gary Oberbrunner:
+ - Fix Visual Studio project generation when CPPPATH contains Dir nodes
+ - Ensure Visual Studio project is regenerated when CPPPATH or CPPDEFINES change
+ - Fix unicode error when using non-ASCII filenames with Copy or Install
+ - Put RPATH in LINKCOM rather than LINKFLAGS so resetting
+ LINKFLAGS doesn't kill RPATH
+ - Fix precompiled headers on Windows when variant dir name has spaces.
+ - Adding None to an Action no longer fails (just returns original action)
+ - New --debug=prepare option to show each target as it's being
+ prepared, whether or not anything needs to be done for it.
+ - New debug option --debug=duplicate to print a line for each
+ unlink/relink (or copy) of a variant file from its source file.
+ - Improve error message for EnumVariables to show legal values.
+ - Fix Intel compiler to sort versions >9 correctly (esp. on Linux)
+ - Fix Install() when the source and target are directories and the
+ target directory exists.
+
+ From David Garcia Garzon:
+ - Fix Delete to be able to delete broken symlinks and dir
+ symlinks.
+
+ From Robert Lehr:
+ - Handle .output file generated by bison/yacc properly. Cleaning it
+ when necessary.
+
+ From Antoine Dechaume:
+ - Handle SWIG file where there is whitespace after the module name
+ properly. Previously the generated files would include
+ the whitespace.
+
+ From Dmitry R.:
+ - Handle Environment in case __semi_deepcopy is None
+
+ From Benoit Belley:
+
+ - Much improved support for Windows UNC paths (\\SERVERNAME).
+
+ From Jean-Baptiste Lab:
+
+ - Fix problems with appending CPPDEFINES that contain
+ dictionaries, and related issues with Parse/MergeFlags and
+ CPPDEFINES.
+
+ From Allen Weeks:
+
+ - Fix for an issue with implicit-cache with multiple targets
+ when dependencies are removed on disk.
+
+ From Evgeny Podjachev and Alexey Petruchick:
+
+ - Support generation of Microsoft Visual Studio 2008 (9.0)
+ and 2010 (10.0) project and solution files.
+
+ From Ken Deeter:
+
+ - Fix a problem when FS Entries which are actually Dirs have builders.
+
+ From Luca Falavigna:
+
+ - Support Fortran 03
+
+ From Gary Oberbrunner:
+
+ - Print the path to the SCons package in scons --version
+
+ From Jean-Fran�ois Colson:
+
+ - Improve Microsoft Visual Studio Solution generation, and fix
+ various errors in the generated solutions especially when using
+ MSVS_SCC_PROVIDER, and when generating multiple projects. The
+ construction variable MSVS_SCC_PROJECT_BASE_PATH, which never
+ worked properly, is removed. Users can use the new variable
+ MSVS_SCC_CONNECTION_ROOT instead if desired.
+
+ From Anatoly Techtonik:
+
+ - Use subprocess in bootstrap.py instead of os.execve to avoid
+ losing output control on Windows (http://bugs.python.org/issue9148)
+
+ - Revert patch for adding SCons to App Paths, because standard cmd
+ shell doesn't search there. This is confusing, because `scons` can
+ be executed from explorer, but fail to start from console.
+
+ - Fix broken installation with easy_install on Windows (issue #2051)
+ SCons traditionally installed in a way that allowed to run multiple
+ versions side by side. This custom logic was incompatible with
+ easy_install way of doing things.
+
+ - Use epydoc module for generating API docs in HTML if command line
+ utility is not found in PATH. Actual for Windows.
+
+ From Alexander Goomenyuk:
+
+ - Add .sx to assembly source scanner list so .sx files
+ get their header file dependencies detected.
+
+ From Arve Knudsen:
+
+ - Set module metadata when loading site_scons/site_init.py
+ so it is treated as a proper module; __doc__, __file__ and
+ __name__ now refer to the site_init.py file.
+
+ From Russel Winder:
+
+ - Users Guide updates explaining that Tools can be packages as
+ well as python modules.
+
+ From Gary Oberbrunner:
+
+ - New systemwide and per-user site_scons dirs.
+
+ From Dirk Baechle:
+
+ - XML fixes in User's Guide.
+ - Fixed the detection of 'jar' and 'rmic' during
+ the initialization of the respective Tools (#2730).
+ - Improved docs for custom Decider functions and
+ custom Scanner objects (#2711, #2713).
+ - Corrected SWIG module names for generated *.i files (#2707).
+
+ From Joe Zuntz:
+
+ - Fixed a case-sensitivity problem with Fortran modules.
+
+ From Bauke Conijn:
+
+ - Added Users Guide example for auto-generated source code
+
+ From Steven Knight:
+
+ - Fix explicit dependencies (Depends()) on Nodes that don't have
+ attached Builders.
+
+ - Fix use of the global Alias() function with command actions.
+
+ From Matt Hughes:
+
+ - Fix the ability to append to default $*FLAGS values (which are
+ implemented as CLVar instances) in a copied construction environment
+ without affecting the original construction environment's value.
+
+ From Rob Managan:
+
+ - Updated the TeX command strings to include a /D on Windows in
+ case the new directory is on a different drive letter.
+
+ - Fixed the LaTeX scanner so dependencies are found in commands that
+ are broken across lines with a comment or have embedded spaces.
+
+ - The TeX builders should now work with tex files that are generated
+ by another program. Thanks to Hans-Martin von Gaudecker for
+ isolating the cause of this bug.
+
+ - Added support for INDEXSTYLE environment variable so makeindex can
+ find style files.
+
+ - Added support for the bibunits package so we call bibtex on all
+ the bu*.aux files.
+
+ - Add support of finding path information on OSX for TeX applications
+ MacPorts and Fink paths need to be added by the user
+
+ From Russel Winder:
+
+ - Add support for DMD version 2 (the phobos2 library).
+
+ From William Deegan:
+
+ - Add initial support for VS/VC 2010 (express and non-express versions)
+ - Remove warning for not finding MS VC/VS install.
+ "scons: warning: No version of Visual Studio compiler found
+ - C/C++ compilers most likely not set correctly"
+ - Add support for Linux 3.0
+
+
RELEASE 2.0.1 - Mon, 15 Aug 2010 15:46:32 -0700
From Dirk Baechle:
@@ -24,6 +222,29 @@ RELEASE 2.0.1 - Mon, 15 Aug 2010 15:46:32 -0700
- Fix explicit dependencies (Depends()) on Nodes that don't have
attached Builders.
+ From Matt Hughes:
+
+ - Fix the ability to append to default $*FLAGS values (which are
+ implemented as CLVar instances) in a copied construction environment
+ without affecting the original construction environment's value.
+
+ From Rob Managan:
+
+ - Updated the TeX command strings to include a /D on Windows in
+ case the new directory is on a different drive letter.
+
+ - Fixed the LaTeX scanner so dependencies are found in commands that
+ are broken across lines with a comment or have embedded spaces.
+
+
+RELEASE 2.0.0.final.0 - Mon, 14 Jun 2010 22:01:37 -0700
+
+ From Dirk Baechle:
+
+ - Fix XML in documentation.
+
+ From Steven Knight:
+
- Provide forward compatibility for the 'profile' module.
- Provide forward compatibility for the 'pickle' module.
@@ -55,20 +276,6 @@ RELEASE 2.0.1 - Mon, 15 Aug 2010 15:46:32 -0700
- Handle detecting Visual C++ on Python verions with upper-case
platform architectures like 'AMD64'.
- From Matt Hughes:
-
- - Fix the ability to append to default $*FLAGS values (which are
- implemented as CLVar instances) in a copied construction environment
- without affecting the original construction environment's value.
-
- From Rob Managan:
-
- - Updated the TeX command strings to include a /D on Windows in
- case the new directory is on a different drive letter.
-
- - Fixed the LaTeX scanner so dependencies are found in commands that
- are broken across lines with a comment or have embedded spaces.
-
From W. Trevor King:
- Revisions to README.
@@ -272,7 +479,7 @@ RELEASE 1.2.0.d20100117 - Sun, 17 Jan 2010 14:26:59 -0800
- Remove LATEXSUFFIXES from environments that don't initialize Tex.
- - Add support for the glosaaries package for glossaries and acronyms
+ - Add support for the glossaries package for glossaries and acronyms
- Fix problem that pdftex, latex, and pdflatex tools by themselves did
not create the actions for bibtex, makeindex,... by creating them
@@ -472,7 +679,7 @@ RELEASE 1.1.0.d20081207 - Sun, 07 Dec 2008 19:17:23 -0800
- Issue 2401: Fix usage of comparisons with None.
- From Ludwig Hähne:
+ From Ludwig H�hne:
- Handle Java inner classes declared within a method.
@@ -601,7 +808,7 @@ RELEASE 1.1.0 - Thu, 09 Oct 2008 08:33:47 -0700
- Fix VariantDir duplication of #included files in subdirectories.
- From Ludwig Hähne:
+ From Ludwig H�hne:
- Reduce memory usage when a directory is used as a dependency of
another Node (such as an Alias) by returning a concatenation
@@ -716,7 +923,7 @@ RELEASE 1.0.0 - XXX
- Clear the Node state when turning a generic Entry into a Dir.
- From Ludwig Hähne:
+ From Ludwig H�hne:
- Fix sporadic output-order failures in test/GetBuildFailures/parallel.py.
@@ -950,7 +1157,7 @@ RELEASE 0.98.1 - Fri, 18 Apr 2008 19:11:58 -0700
- Fix the --debug=stree option so it prints its tree once, not twice.
- From Johan BoulÃ:
+ From Johan Boul�:
- Fix the ability to use LoadableModule() under MinGW.
@@ -1063,7 +1270,7 @@ RELEASE 0.98 - Sun, 30 Mar 2008 23:33:05 -0700
calls by using a File's .suffix attribute directly instead of
stringifying it.
- From Jérôme Berger:
+ From Jérôme Berger:
- Have the D language scanner search for .di files as well as .d files.
@@ -1677,7 +1884,7 @@ RELEASE 0.96.96 - Thu, 12 Apr 2007 12:36:25 -0500
RELEASE 0.96.95 - Mon, 12 Feb 2007 20:25:16 -0600
- From Anatoly:
+ From Anatoly Techtonik:
- Add the scons.org URL and a package description to the setup.py
arguments.
@@ -2164,7 +2371,7 @@ RELEASE 0.96.92 - Mon, 10 Apr 2006 21:08:22 -0400
- Fix C/C++ compiler selection on AIX to not always use the external $CC
environment variable.
- From August Hörandl:
+ From August Hörandl:
- Add a scanner for \include and \import files, with support for
searching a directory list in $TEXINPUTS (imported from the external
@@ -5330,5 +5537,5 @@ A brief overview of important functionality available in release 0.01:
- Windows installer available.
-Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
-src/CHANGES.txt 5134 2010/08/16 23:02:40 bdeegan
+Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
+src/CHANGES.txt 5357 2011/09/09 21:31:03 bdeegan
diff --git a/LICENSE.txt b/LICENSE.txt
index 77421fa..c0de36f 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/MANIFEST b/MANIFEST
index 591ece2..74c74f3 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -88,6 +88,7 @@ engine/SCons/Tool/dmd.py
engine/SCons/Tool/dvi.py
engine/SCons/Tool/dvipdf.py
engine/SCons/Tool/dvips.py
+engine/SCons/Tool/f03.py
engine/SCons/Tool/f77.py
engine/SCons/Tool/f90.py
engine/SCons/Tool/f95.py
diff --git a/PKG-INFO b/PKG-INFO
index e5e2216..5f658bc 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: scons
-Version: 2.0.1
+Version: 2.1.0
Summary: Open Source next-generation build tool.
Home-page: http://www.scons.org/
Author: Steven Knight
diff --git a/README.txt b/README.txt
index e08297f..1d63921 100644
--- a/README.txt
+++ b/README.txt
@@ -2,7 +2,7 @@
SCons - a software construction tool
- Version 2.0.1
+ Version 2.1.0
This is SCons, a tool for building software (and other files). SCons is
@@ -56,7 +56,7 @@ provided Python-standard setup script as follows:
By default, the above command will do the following:
- -- Install the version-numbered "scons-2.0.1" and "sconsign-2.0.1"
+ -- Install the version-numbered "scons-2.1.0" and "sconsign-2.1.0"
scripts in the default system script directory (/usr/bin or
C:\Python*\Scripts, for example). This can be disabled by
specifying the "--no-version-script" option on the command
@@ -70,17 +70,17 @@ By default, the above command will do the following:
making it the default on your system.
On UNIX or Linux systems, you can have the "scons" and "sconsign"
- scripts be hard links or symbolic links to the "scons-2.0.1" and
- "sconsign-2.0.1" scripts by specifying the "--hardlink-scons"
+ scripts be hard links or symbolic links to the "scons-2.1.0" and
+ "sconsign-2.1.0" scripts by specifying the "--hardlink-scons"
or "--symlink-scons" options on the command line.
- -- Install "scons-2.0.1.bat" and "scons.bat" wrapper scripts in the
+ -- Install "scons-2.1.0.bat" and "scons.bat" wrapper scripts in the
Python prefix directory on Windows (C:\Python*, for example).
This can be disabled by specifying the "--no-install-bat" option
on the command line.
On UNIX or Linux systems, the "--install-bat" option may be
- specified to have "scons-2.0.1.bat" and "scons.bat" files
+ specified to have "scons-2.1.0.bat" and "scons.bat" files
installed in the default system script directory, which is useful
if you want to install SCons in a shared file system directory
that can be used to execute SCons from both UNIX/Linux and
@@ -88,7 +88,7 @@ By default, the above command will do the following:
-- Install the SCons build engine (a Python module) in an
appropriate version-numbered SCons library directory
- (/usr/lib/scons-2.0.1 or C:\Python*\scons-2.0.1, for example).
+ (/usr/lib/scons-2.1.0 or C:\Python*\scons-2.1.0, for example).
See below for more options related to installing the build
engine library.
@@ -239,5 +239,5 @@ With plenty of help from the SCons Development team:
Greg Spencer
Christoph Wiedemann
-Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
-src/README.txt 5134 2010/08/16 23:02:40 bdeegan
+Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
+src/README.txt 5357 2011/09/09 21:31:03 bdeegan
diff --git a/RELEASE.txt b/RELEASE.txt
index 78a9f71..d98e096 100644
--- a/RELEASE.txt
+++ b/RELEASE.txt
@@ -1,98 +1,100 @@
- A new SCons release, 2.0.1, is now available
+ A new SCons checkpoint release, 2.1.0.final.0, is now available
on the SCons download page:
http://www.scons.org/download.php
- The primary purpose of this release is to remove support for Python
- versions prior to 2.4 and streamline the SCons code base using more
- modern python idioms.
-
- Here is a summary of the changes since 1.3:
+ Here is a summary of the changes since 2.0:
NEW FUNCTIONALITY
- - There should be no new functionality or bug fixes in this checkpoint.
-
- DEPRECATED FUNCTIONALITY
-
- - All features or usages deprecated in 1.3 should have been removed.
- Uses of formerly-deprecated features should get an error.
-
- - The BuildDir() method and the build_dir option now get warnings.
+ - SCons can now automatically embed manifests in Windows executables
+ and DLLs, by setting WINDOWS_EMBED_MANIFEST in the environment.
- - The SourceCode() function and its associated factory functions have
- started their deprecation cycle and can have a warning enabled.
+ - SCons now searches for site_scons dirs in several system-wide
+ and per-user locations, in addition to the SConstruct top dir.
+ This should enable much easier use of third-party (non-core)
+ Tools.
CHANGED/ENHANCED EXISTING FUNCTIONALITY
- - Any Command() or env.Command() calls that use the following Action
- factory functions will have their targets rebuilt when upgrading
- from any pre-2.0 release:
+ - scons --version now prints the path to the SCons package in use
- Chmod()
- Copy()
- Delete()
- Mkdir()
- Move()
- Touch()
+ - List modifications to existing features, where the previous behavior
+ wouldn't actually be considered a bug
- (The rebuild occurs because the underlying Python class that
- implements these functions has been changed to a new-style Python
- class, and that changes the Python byte code and therefore the
- build signature of the functions.)
+ - Add initial support for VS/VC 2010
FIXES
- - MSVC/MSVS/SDK support has been improved. A number of issues with
- determining the correct version and architecture have been resolved.
-
- - Fix propagation from environment of VS*COMNTOOLS to resolve issues
- initializing MSVC/MSVS/SDK issues.
-
- - Fixed a case-sensitivity problem with Fortran modules.
-
- - Fix the ability to append to default $*FLAGS values (which are
- implemented as CLVar instances) in a copied construction environment
- without affecting the original construction environment's value.
-
- - Updated the TeX command strings to include a /D on Windows in
- case the new directory is on a different drive letter.
-
- - Fixed the LaTeX scanner so dependencies are found in commands that
- are broken across lines with a comment or have embedded spaces.
+ - Windows resource compiler (RC) scanner now handles DOS line endings
+ - Visual Studio project generation now works when CPPPATH contains Dir nodes
+ - Visual Studio projects are regenerated when CPPPATH or CPPDEFINES change
+ NOTE: this will cause all MSVS projects to be regenerated with this version.
+ - Passing MSVC_BATCH=False works now (treated same as 0)
+ - Long compile lines no longer break MSVC_BATCH mode
+ - RPATH is now in LINKCOM rather than LINKFLAGS, so resetting
+ LINKFLAGS doesn't kill RPATH
+ - Precompiled headers on Windows no longer break when used with
+ variant dirs containing spaces.
+ - Delete can now delete symlinks to directories and broken symlinks
+ - CPPDEFINES containing dictionaries now work better.
+ - A problem with using implicit-cache and removing dependencies on
+ disk is corrected.
+ - A problem with FS Entries which are dirs and have builders
+ is corrected.
+ - A problem with Install() of a dir when the dest dir exists
+ is corrected.
+ - Windows subprocess output should now be more reliable.
+ - The users guide and man page have various fixes.
+ - Appending to default $*FLAGS in a copied environment
+ now works properly.
+ - LaTeX scanner is improved for broken lines or embedded spaces.
+ - Windows UNC paths (\\SERVER\SHARE\dir) now work much better.
IMPROVEMENTS
- - Support for Python versions prior to 2.4 has been removed. As of
- this writing, we believe that SCons will still work with Python 2.3,
- but this is not guaranteed.
- - Code paths that included special cases for older Python versions have
- been streamlined.
- - The code base has been converted to use more modern idioms. Although
- we don't have any direct measurements (yet), we believe that SCons
- startup time should be decreased and the overall code should run faster.
-
- PACKAGING
-
- - No changes.
+ - ParseFlags now supports -std=c++0x and related CXXFLAGS
+ - ParseFlags now supports -dylib_file from pkgconfig
+ - New debugging options to print unlink/relinking of variant files
+ (--debug=duplicate) and preparation of targets (--debug=prepare).
+ - SCons can now generate MSVS 9.0 and 10.0 Projects and Solutions.
+ - MSVS Solution generation is improved.
+ - Fortran 03 is supported (preliminary)
+ - .sx files are now treated as assembly sources.
+ - site_scons/site_init.py is now treated as a proper module
+ with __doc__, __file__ and __name__.
+ - TeX command strings now work on Windows when the new dir is
+ on a different drive letter.
+ - DMD version 2 is supported (using the phobos2 library)
+ - New --debug=prepare option shows each target as it's prepared
+ for building; can help when you don't know why a target isn't
+ being built.
DOCUMENTATION
- - The entries for SourceCode() and its associated factory functions now
- state that the functions are deprecated.
-
- - Document the AllowSubstExceptions() function in the User's Guide.
-
-
- DEVELOPMENT
-
- - Code no longer has to be compatible with Python versions back to 1.5.2.
- Although code is tested with Python 2.3 and is still believed to work,
- the official new floor is Python 2.4.
-
- Thanks to Greg Noel, Steven Knight, Dirk Baechle, William Deegan,
- W. Trevor King, Joe Zuntz, Bauke Conijn, Matt Hughes, Rob Managan,
- and Jim Randall for their contributions to this release.
+ - Added new getting started section
+
+ Thanks to
+ Dirk Baechle,
+ Vincent Beffara,
+ Grzegorz Bizoń,
+ Jean-François Colson,
+ Bauke Conijn,
+ Bill Deegan,
+ Ken Deeter,
+ Luca Falavigna,
+ Alexander Goomenyuk,
+ Justin Gullingsrud,
+ Steven Knight,
+ Arve Knudsen,
+ Jean-Baptiste Lab,
+ Rob Managan,
+ Gary Oberbrunner,
+ Evgeny Podjachev,
+ Sohail Somani,
+ Anatoly Techtonik,
+ Allen Weeks,
+ Russel Winder,
+ Joe Zuntz
+ for their contributions to this release.
-Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
-src/RELEASE.txt 5023 2010/06/14 22:05:46 scons
diff --git a/engine/SCons/Action.py b/engine/SCons/Action.py
index 4300dd4..f4117a4 100644
--- a/engine/SCons/Action.py
+++ b/engine/SCons/Action.py
@@ -76,7 +76,7 @@ way for wrapping up the functions.
"""
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -97,7 +97,7 @@ way for wrapping up the functions.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Action.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Action.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
@@ -300,8 +300,10 @@ def _actionAppend(act1, act2):
# a single ListAction.
a1 = Action(act1)
a2 = Action(act2)
- if a1 is None or a2 is None:
- raise TypeError("Cannot append %s to %s" % (type(act1), type(act2)))
+ if a1 is None:
+ return a2
+ if a2 is None:
+ return a1
if isinstance(a1, ListAction):
if isinstance(a2, ListAction):
return ListAction(a1.list + a2.list)
@@ -385,6 +387,10 @@ def _do_create_action(act, kw):
# The list of string commands may include a LazyAction, so we
# reprocess them via _do_create_list_action.
return _do_create_list_action(commands, kw)
+ # Catch a common error case with a nice message:
+ if isinstance(act, int) or isinstance(act, float):
+ raise TypeError("Don't know how to create an Action from a number (%s)"%act)
+ # Else fail silently (???)
return None
def _do_create_list_action(act, kw):
@@ -497,7 +503,18 @@ class _ActionAction(ActionBase):
SCons.Util.AddMethod(self, batch_key, 'batch_key')
def print_cmd_line(self, s, target, source, env):
- sys.stdout.write(s + u"\n")
+ # In python 3, and in some of our tests, sys.stdout is
+ # a String io object, and it takes unicode strings only
+ # In other cases it's a regular Python 2.x file object
+ # which takes strings (bytes), and if you pass those a
+ # unicode object they try to decode with 'ascii' codec
+ # which fails if the cmd line has any hi-bit-set chars.
+ # This code assumes s is a regular string, but should
+ # work if it's unicode too.
+ try:
+ sys.stdout.write(unicode(s + "\n"))
+ except UnicodeDecodeError:
+ sys.stdout.write(s + "\n")
def __call__(self, target, source, env,
exitstatfunc=_null,
@@ -654,7 +671,6 @@ def _subproc(scons_env, cmd, error = 'ignore', **kw):
kw['env'] = new_env
try:
- #FUTURE return subprocess.Popen(cmd, **kw)
return subprocess.Popen(cmd, **kw)
except EnvironmentError, e:
if error == 'raise': raise
diff --git a/engine/SCons/Builder.py b/engine/SCons/Builder.py
index 0592bb4..8d480be 100644
--- a/engine/SCons/Builder.py
+++ b/engine/SCons/Builder.py
@@ -76,7 +76,7 @@ There are the following methods for internal use within this module:
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -97,7 +97,7 @@ There are the following methods for internal use within this module:
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Builder.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Builder.py 5357 2011/09/09 21:31:03 bdeegan"
import collections
diff --git a/engine/SCons/CacheDir.py b/engine/SCons/CacheDir.py
index 68ee1ca..09fbce0 100644
--- a/engine/SCons/CacheDir.py
+++ b/engine/SCons/CacheDir.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/CacheDir.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/CacheDir.py 5357 2011/09/09 21:31:03 bdeegan"
__doc__ = """
CacheDir support
diff --git a/engine/SCons/Debug.py b/engine/SCons/Debug.py
index f4eb65f..b28f77d 100644
--- a/engine/SCons/Debug.py
+++ b/engine/SCons/Debug.py
@@ -6,7 +6,7 @@ needed by most users.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -28,7 +28,7 @@ needed by most users.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Debug.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Debug.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import sys
diff --git a/engine/SCons/Defaults.py b/engine/SCons/Defaults.py
index f6b0fd1..c170940 100644
--- a/engine/SCons/Defaults.py
+++ b/engine/SCons/Defaults.py
@@ -10,7 +10,7 @@ from distutils.msvccompiler.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -33,7 +33,7 @@ from distutils.msvccompiler.
#
from __future__ import division
-__revision__ = "src/engine/SCons/Defaults.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Defaults.py 5357 2011/09/09 21:31:03 bdeegan"
import os
@@ -199,14 +199,15 @@ def delete_func(dest, must_exist=0):
dest = [dest]
for entry in dest:
entry = str(entry)
- if not must_exist and not os.path.exists(entry):
+ # os.path.exists returns False with broken links that exist
+ entry_exists = os.path.exists(entry) or os.path.islink(entry)
+ if not entry_exists and not must_exist:
continue
- if not os.path.exists(entry) or os.path.isfile(entry):
- os.unlink(entry)
- continue
- else:
+ # os.path.isdir returns True when entry is a link to a dir
+ if os.path.isdir(entry) and not os.path.islink(entry):
shutil.rmtree(entry, 1)
continue
+ os.unlink(entry)
def delete_strfunc(dest, must_exist=0):
return 'Delete(%s)' % get_paths_str(dest)
@@ -372,10 +373,23 @@ def processDefines(defs):
if SCons.Util.is_List(defs):
l = []
for d in defs:
- if SCons.Util.is_List(d) or isinstance(d, tuple):
- l.append(str(d[0]) + '=' + str(d[1]))
- else:
+ if d is None:
+ continue
+ elif SCons.Util.is_List(d) or isinstance(d, tuple):
+ if len(d) >= 2:
+ l.append(str(d[0]) + '=' + str(d[1]))
+ else:
+ l.append(str(d[0]))
+ elif SCons.Util.is_Dict(d):
+ for macro,value in d.iteritems():
+ if value is not None:
+ l.append(str(macro) + '=' + str(value))
+ else:
+ l.append(str(macro))
+ elif SCons.Util.is_String(d):
l.append(str(d))
+ else:
+ raise SCons.Errors.UserError("DEFINE %s is not a list, dict, string or None."%repr(d))
elif SCons.Util.is_Dict(defs):
# The items in a dictionary are stored in random order, but
# if the order of the command-line options changes from
diff --git a/engine/SCons/Environment.py b/engine/SCons/Environment.py
index d5206fa..de8e9ef 100644
--- a/engine/SCons/Environment.py
+++ b/engine/SCons/Environment.py
@@ -10,7 +10,7 @@ Environment
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ Environment
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Environment.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Environment.py 5357 2011/09/09 21:31:03 bdeegan"
import copy
@@ -649,6 +649,7 @@ class SubstitutionEnvironment(object):
'ASFLAGS' : SCons.Util.CLVar(''),
'CFLAGS' : SCons.Util.CLVar(''),
'CCFLAGS' : SCons.Util.CLVar(''),
+ 'CXXFLAGS' : SCons.Util.CLVar(''),
'CPPDEFINES' : [],
'CPPFLAGS' : SCons.Util.CLVar(''),
'CPPPATH' : [],
@@ -723,6 +724,9 @@ class SubstitutionEnvironment(object):
append_next_arg_to = None
elif not arg[0] in ['-', '+']:
dict['LIBS'].append(self.fs.File(arg))
+ elif arg == '-dylib_file':
+ dict['LINKFLAGS'].append(arg)
+ append_next_arg_to = 'LINKFLAGS'
elif arg[:2] == '-L':
if arg[2:]:
dict['LIBPATH'].append(arg[2:])
@@ -766,16 +770,20 @@ class SubstitutionEnvironment(object):
dict['FRAMEWORKPATH'].append(arg[2:])
else:
append_next_arg_to = 'FRAMEWORKPATH'
- elif arg == '-mno-cygwin':
+ elif arg in ['-mno-cygwin',
+ '-pthread',
+ '-openmp',
+ '-fopenmp']:
dict['CCFLAGS'].append(arg)
dict['LINKFLAGS'].append(arg)
elif arg == '-mwindows':
dict['LINKFLAGS'].append(arg)
- elif arg == '-pthread':
- dict['CCFLAGS'].append(arg)
- dict['LINKFLAGS'].append(arg)
elif arg[:5] == '-std=':
- dict['CFLAGS'].append(arg) # C only
+ if arg[5:].find('++')!=-1:
+ key='CXXFLAGS'
+ else:
+ key='CFLAGS'
+ dict[key].append(arg)
elif arg[0] == '+':
dict['CCFLAGS'].append(arg)
dict['LINKFLAGS'].append(arg)
@@ -1146,12 +1154,17 @@ class Base(SubstitutionEnvironment):
# "continue" statements whenever we finish processing an item,
# but Python 1.5.2 apparently doesn't let you use "continue"
# within try:-except: blocks, so we have to nest our code.
- try:
+ try:
+ if key == 'CPPDEFINES' and SCons.Util.is_String(self._dict[key]):
+ self._dict[key] = [self._dict[key]]
orig = self._dict[key]
except KeyError:
# No existing variable in the environment, so just set
# it to the new value.
- self._dict[key] = val
+ if key == 'CPPDEFINES' and SCons.Util.is_String(val):
+ self._dict[key] = [val]
+ else:
+ self._dict[key] = val
else:
try:
# Check if the original looks like a dictionary.
@@ -1188,8 +1201,13 @@ class Base(SubstitutionEnvironment):
# The original looks like a dictionary, so update it
# based on what we think the value looks like.
if SCons.Util.is_List(val):
- for v in val:
- orig[v] = None
+ if key == 'CPPDEFINES':
+ orig = orig.items()
+ orig += val
+ self._dict[key] = orig
+ else:
+ for v in val:
+ orig[v] = None
else:
try:
update_dict(val)
@@ -1251,8 +1269,39 @@ class Base(SubstitutionEnvironment):
self._dict[key].update(val)
elif SCons.Util.is_List(val):
dk = self._dict[key]
- if not SCons.Util.is_List(dk):
- dk = [dk]
+ if key == 'CPPDEFINES':
+ tmp = []
+ for i in val:
+ if SCons.Util.is_List(i):
+ if len(i) >= 2:
+ tmp.append((i[0], i[1]))
+ else:
+ tmp.append((i[0],))
+ elif SCons.Util.is_Tuple(i):
+ tmp.append(i)
+ else:
+ tmp.append((i,))
+ val = tmp
+ if SCons.Util.is_Dict(dk):
+ dk = dk.items()
+ elif SCons.Util.is_String(dk):
+ dk = [(dk,)]
+ else:
+ tmp = []
+ for i in dk:
+ if SCons.Util.is_List(i):
+ if len(i) >= 2:
+ tmp.append((i[0], i[1]))
+ else:
+ tmp.append((i[0],))
+ elif SCons.Util.is_Tuple(i):
+ tmp.append(i)
+ else:
+ tmp.append((i,))
+ dk = tmp
+ else:
+ if not SCons.Util.is_List(dk):
+ dk = [dk]
if delete_existing:
dk = [x for x in dk if x not in val]
else:
@@ -1261,15 +1310,57 @@ class Base(SubstitutionEnvironment):
else:
dk = self._dict[key]
if SCons.Util.is_List(dk):
- # By elimination, val is not a list. Since dk is a
- # list, wrap val in a list first.
- if delete_existing:
- dk = [x for x in dk if x not in val]
- self._dict[key] = dk + [val]
+ if key == 'CPPDEFINES':
+ tmp = []
+ for i in dk:
+ if SCons.Util.is_List(i):
+ if len(i) >= 2:
+ tmp.append((i[0], i[1]))
+ else:
+ tmp.append((i[0],))
+ elif SCons.Util.is_Tuple(i):
+ tmp.append(i)
+ else:
+ tmp.append((i,))
+ dk = tmp
+ if SCons.Util.is_Dict(val):
+ val = val.items()
+ elif SCons.Util.is_String(val):
+ val = [(val,)]
+ if delete_existing:
+ dk = filter(lambda x, val=val: x not in val, dk)
+ self._dict[key] = dk + val
+ else:
+ dk = [x for x in dk if x not in val]
+ self._dict[key] = dk + val
else:
- if not val in dk:
+ # By elimination, val is not a list. Since dk is a
+ # list, wrap val in a list first.
+ if delete_existing:
+ dk = filter(lambda x, val=val: x not in val, dk)
self._dict[key] = dk + [val]
+ else:
+ if not val in dk:
+ self._dict[key] = dk + [val]
else:
+ if key == 'CPPDEFINES':
+ if SCons.Util.is_String(dk):
+ dk = [dk]
+ elif SCons.Util.is_Dict(dk):
+ dk = dk.items()
+ if SCons.Util.is_String(val):
+ if val in dk:
+ val = []
+ else:
+ val = [val]
+ elif SCons.Util.is_Dict(val):
+ tmp = []
+ for i,j in val.iteritems():
+ if j is not None:
+ tmp.append((i,j))
+ else:
+ tmp.append(i)
+ val = tmp
if delete_existing:
dk = [x for x in dk if x not in val]
self._dict[key] = dk + val
@@ -2285,6 +2376,12 @@ def NoSubstitutionProxy(subject):
return getattr(self.__dict__['__subject'], name)
def __setattr__(self, name, value):
return setattr(self.__dict__['__subject'], name, value)
+ def executor_to_lvars(self, kwdict):
+ if kwdict.has_key('executor'):
+ kwdict['lvars'] = kwdict['executor'].get_lvars()
+ del kwdict['executor']
+ else:
+ kwdict['lvars'] = {}
def raw_to_mode(self, dict):
try:
raw = dict['raw']
@@ -2301,12 +2398,14 @@ def NoSubstitutionProxy(subject):
nargs = (string, self,) + args
nkw = kwargs.copy()
nkw['gvars'] = {}
+ self.executor_to_lvars(nkw)
self.raw_to_mode(nkw)
return SCons.Subst.scons_subst_list(*nargs, **nkw)
def subst_target_source(self, string, *args, **kwargs):
nargs = (string, self,) + args
nkw = kwargs.copy()
nkw['gvars'] = {}
+ self.executor_to_lvars(nkw)
self.raw_to_mode(nkw)
return SCons.Subst.scons_subst(*nargs, **nkw)
return _NoSubstitutionProxy(subject)
diff --git a/engine/SCons/Errors.py b/engine/SCons/Errors.py
index 63f9d41..2501e36 100644
--- a/engine/SCons/Errors.py
+++ b/engine/SCons/Errors.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -28,7 +28,7 @@ and user errors in SCons.
"""
-__revision__ = "src/engine/SCons/Errors.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Errors.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Util
diff --git a/engine/SCons/Executor.py b/engine/SCons/Executor.py
index b31e348..f343568 100644
--- a/engine/SCons/Executor.py
+++ b/engine/SCons/Executor.py
@@ -6,7 +6,7 @@ Nodes.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ Nodes.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Executor.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Executor.py 5357 2011/09/09 21:31:03 bdeegan"
import collections
diff --git a/engine/SCons/Job.py b/engine/SCons/Job.py
index 7866bb4..04bb4c4 100644
--- a/engine/SCons/Job.py
+++ b/engine/SCons/Job.py
@@ -7,7 +7,7 @@ stop, and wait on jobs.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -29,7 +29,7 @@ stop, and wait on jobs.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Job.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Job.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
diff --git a/engine/SCons/Memoize.py b/engine/SCons/Memoize.py
index c76d6a5..ea7d58f 100644
--- a/engine/SCons/Memoize.py
+++ b/engine/SCons/Memoize.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Memoize.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Memoize.py 5357 2011/09/09 21:31:03 bdeegan"
__doc__ = """Memoizer
diff --git a/engine/SCons/Node/Alias.py b/engine/SCons/Node/Alias.py
index c0f3ece..9996e64 100644
--- a/engine/SCons/Node/Alias.py
+++ b/engine/SCons/Node/Alias.py
@@ -8,7 +8,7 @@ This creates a hash of global Aliases (dummy targets).
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ This creates a hash of global Aliases (dummy targets).
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Node/Alias.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Node/Alias.py 5357 2011/09/09 21:31:03 bdeegan"
import collections
diff --git a/engine/SCons/Node/FS.py b/engine/SCons/Node/FS.py
index 0997fc0..9c1b05a 100644
--- a/engine/SCons/Node/FS.py
+++ b/engine/SCons/Node/FS.py
@@ -11,7 +11,7 @@ that can be used by scripts or modules looking for the canonical default.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ that can be used by scripts or modules looking for the canonical default.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Node/FS.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Node/FS.py 5357 2011/09/09 21:31:03 bdeegan"
import fnmatch
import os
@@ -56,6 +56,7 @@ import SCons.Warnings
from SCons.Debug import Trace
do_store_info = True
+print_duplicate = 0
class EntryProxyAttributeError(AttributeError):
@@ -110,33 +111,85 @@ def save_strings(val):
#
do_splitdrive = None
+_my_splitdrive =None
def initialize_do_splitdrive():
global do_splitdrive
+ global has_unc
drive, path = os.path.splitdrive('X:/foo')
- do_splitdrive = not not drive
+ has_unc = hasattr(os.path, 'splitunc')
+
+ do_splitdrive = not not drive or has_unc
+
+ global _my_splitdrive
+ if has_unc:
+ def splitdrive(p):
+ if p[1:2] == ':':
+ return p[:2], p[2:]
+ if p[0:2] == '//':
+ # Note that we leave a leading slash in the path
+ # because UNC paths are always absolute.
+ return '//', p[1:]
+ return '', p
+ else:
+ def splitdrive(p):
+ if p[1:2] == ':':
+ return p[:2], p[2:]
+ return '', p
+ _my_splitdrive = splitdrive
+
+ # Keep some commonly used values in global variables to skip to
+ # module look-up costs.
+ global OS_SEP
+ global UNC_PREFIX
+ global os_sep_is_slash
+
+ OS_SEP = os.sep
+ UNC_PREFIX = OS_SEP + OS_SEP
+ os_sep_is_slash = OS_SEP == '/'
initialize_do_splitdrive()
-#
-
-needs_normpath_check = None
-
-def initialize_normpath_check():
- """
- Initialize the normpath_check regular expression.
-
- This function is used by the unit tests to re-initialize the pattern
- when testing for behavior with different values of os.sep.
- """
- global needs_normpath_check
- if os.sep == '/':
- pattern = r'.*/|\.$|\.\.$'
- else:
- pattern = r'.*[/%s]|\.$|\.\.$' % re.escape(os.sep)
- needs_normpath_check = re.compile(pattern)
-
-initialize_normpath_check()
+# Used to avoid invoking os.path.normpath if not necessary.
+needs_normpath_check = re.compile(
+ r'''
+ # We need to renormalize the path if it contains any consecutive
+ # '/' characters.
+ .*// |
+
+ # We need to renormalize the path if it contains a '..' directory.
+ # Note that we check for all the following cases:
+ #
+ # a) The path is a single '..'
+ # b) The path starts with '..'. E.g. '../' or '../moredirs'
+ # but we not match '..abc/'.
+ # c) The path ends with '..'. E.g. '/..' or 'dirs/..'
+ # d) The path contains a '..' in the middle.
+ # E.g. dirs/../moredirs
+
+ (.*/)?\.\.(?:/|$) |
+
+ # We need to renormalize the path if it contains a '.'
+ # directory, but NOT if it is a single '.' '/' characters. We
+ # do not want to match a single '.' because this case is checked
+ # for explicitely since this is common enough case.
+ #
+ # Note that we check for all the following cases:
+ #
+ # a) We don't match a single '.'
+ # b) We match if the path starts with '.'. E.g. './' or
+ # './moredirs' but we not match '.abc/'.
+ # c) We match if the path ends with '.'. E.g. '/.' or
+ # 'dirs/.'
+ # d) We match if the path contains a '.' in the middle.
+ # E.g. dirs/./moredirs
+
+ \./|.*/\.(?:/|$)
+
+ ''',
+ re.VERBOSE
+ )
+needs_normpath_match = needs_normpath_check.match
#
# SCons.Action objects for interacting with the outside world.
@@ -438,21 +491,21 @@ class EntryProxy(SCons.Util.Proxy):
def __get_posix_path(self):
"""Return the path with / as the path separator,
regardless of platform."""
- if os.sep == '/':
+ if os_sep_is_slash:
return self
else:
entry = self.get()
- r = entry.get_path().replace(os.sep, '/')
+ r = entry.get_path().replace(OS_SEP, '/')
return SCons.Subst.SpecialAttrWrapper(r, entry.name + "_posix")
def __get_windows_path(self):
"""Return the path with \ as the path separator,
regardless of platform."""
- if os.sep == '\\':
+ if OS_SEP == '\\':
return self
else:
entry = self.get()
- r = entry.get_path().replace(os.sep, '\\')
+ r = entry.get_path().replace(OS_SEP, '\\')
return SCons.Subst.SpecialAttrWrapper(r, entry.name + "_windows")
def __get_srcnode(self):
@@ -533,9 +586,13 @@ class Base(SCons.Node.Node):
# Filenames and paths are probably reused and are intern'ed to
# save some memory.
+
+ #: Filename with extension as it was specified when the object was
+ #: created; to obtain filesystem path, use Python str() function
self.name = SCons.Util.silent_intern(name)
+ #: Cached filename extension
self.suffix = SCons.Util.silent_intern(SCons.Util.splitext(name)[1])
- self.fs = fs
+ self.fs = fs #: Reference to parent Node.FS object
assert directory, "A directory must be provided"
@@ -606,7 +663,7 @@ class Base(SCons.Node.Node):
else:
result = srcnode.get_path()
if not Save_Strings:
- # We're not at the point where we're saving the string string
+ # We're not at the point where we're saving the string
# representations of FS Nodes (because we haven't finished
# reading the SConscript files and need to have str() return
# things relative to them). That also means we can't yet
@@ -695,11 +752,15 @@ class Base(SCons.Node.Node):
if self == dir:
return '.'
path_elems = self.path_elements
+ pathname = ''
try: i = path_elems.index(dir)
- except ValueError: pass
- else: path_elems = path_elems[i+1:]
- path_elems = [n.name for n in path_elems]
- return os.sep.join(path_elems)
+ except ValueError:
+ for p in path_elems[:-1]:
+ pathname += p.dirname
+ else:
+ for p in path_elems[i+1:-1]:
+ pathname += p.dirname
+ return pathname + path_elems[-1].name
def set_src_builder(self, builder):
"""Set the source code builder for this node."""
@@ -1063,7 +1124,7 @@ class FS(LocalFS):
self.pathTop = os.getcwd()
else:
self.pathTop = path
- self.defaultDrive = _my_normcase(os.path.splitdrive(self.pathTop)[0])
+ self.defaultDrive = _my_normcase(_my_splitdrive(self.pathTop)[0])
self.Top = self.Dir(self.pathTop)
self.Top.path = '.'
@@ -1083,7 +1144,10 @@ class FS(LocalFS):
self.max_drift = max_drift
def getcwd(self):
- return self._cwd
+ if hasattr(self, "_cwd"):
+ return self._cwd
+ else:
+ return "<no cwd>"
def chdir(self, dir, change_os_dir=0):
"""Change the current working directory for lookups.
@@ -1147,54 +1211,110 @@ class FS(LocalFS):
# str(p) in case it's something like a proxy object
p = str(p)
- initial_hash = (p[0:1] == '#')
- if initial_hash:
+ if not os_sep_is_slash:
+ p = p.replace(OS_SEP, '/')
+
+ if p[0:1] == '#':
# There was an initial '#', so we strip it and override
# whatever directory they may have specified with the
# top-level SConstruct directory.
p = p[1:]
directory = self.Top
- if directory and not isinstance(directory, Dir):
- directory = self.Dir(directory)
+ # There might be a drive letter following the
+ # '#'. Although it is not described in the SCons man page,
+ # the regression test suite explicitly tests for that
+ # syntax. It seems to mean the following thing:
+ #
+ # Assuming the the SCons top dir is in C:/xxx/yyy,
+ # '#X:/toto' means X:/xxx/yyy/toto.
+ #
+ # i.e. it assumes that the X: drive has a directory
+ # structure similar to the one found on drive C:.
+ if do_splitdrive:
+ drive, p = _my_splitdrive(p)
+ if drive:
+ root = self.get_root(drive)
+ else:
+ root = directory.root
+ else:
+ root = directory.root
- if do_splitdrive:
- drive, p = os.path.splitdrive(p)
- else:
- drive = ''
- if drive and not p:
- # This causes a naked drive letter to be treated as a synonym
- # for the root directory on that drive.
- p = os.sep
- absolute = os.path.isabs(p)
-
- needs_normpath = needs_normpath_check.match(p)
-
- if initial_hash or not absolute:
- # This is a relative lookup, either to the top-level
- # SConstruct directory (because of the initial '#') or to
- # the current directory (the path name is not absolute).
- # Add the string to the appropriate directory lookup path,
- # after which the whole thing gets normalized.
- if not directory:
- directory = self._cwd
- if p:
+ # We can only strip trailing after splitting the drive
+ # since the drive might the UNC '//' prefix.
+ p = p.strip('/')
+
+ needs_normpath = needs_normpath_match(p)
+
+ # The path is relative to the top-level SCons directory.
+ if p in ('', '.'):
+ p = directory.labspath
+ else:
p = directory.labspath + '/' + p
+ else:
+ if do_splitdrive:
+ drive, p = _my_splitdrive(p)
+ if drive and not p:
+ # This causes a naked drive letter to be treated
+ # as a synonym for the root directory on that
+ # drive.
+ p = '/'
else:
- p = directory.labspath
+ drive = ''
- if needs_normpath:
- p = os.path.normpath(p)
+ # We can only strip trailing '/' since the drive might the
+ # UNC '//' prefix.
+ if p != '/':
+ p = p.rstrip('/')
- if drive or absolute:
- root = self.get_root(drive)
- else:
- if not directory:
- directory = self._cwd
- root = directory.root
+ needs_normpath = needs_normpath_match(p)
+
+ if p[0:1] == '/':
+ # Absolute path
+ root = self.get_root(drive)
+ else:
+ # This is a relative lookup or to the current directory
+ # (the path name is not absolute). Add the string to the
+ # appropriate directory lookup path, after which the whole
+ # thing gets normalized.
+ if directory:
+ if not isinstance(directory, Dir):
+ directory = self.Dir(directory)
+ else:
+ directory = self._cwd
+
+ if p in ('', '.'):
+ p = directory.labspath
+ else:
+ p = directory.labspath + '/' + p
+
+ if drive:
+ root = self.get_root(drive)
+ else:
+ root = directory.root
+
+ if needs_normpath is not None:
+ # Normalize a pathname. Will return the same result for
+ # equivalent paths.
+ #
+ # We take advantage of the fact that we have an absolute
+ # path here for sure. In addition, we know that the
+ # components of lookup path are separated by slashes at
+ # this point. Because of this, this code is about 2X
+ # faster than calling os.path.normpath() followed by
+ # replacing os.sep with '/' again.
+ ins = p.split('/')[1:]
+ outs = []
+ for d in ins:
+ if d == '..':
+ try:
+ outs.pop()
+ except IndexError:
+ pass
+ elif d not in ('', '.'):
+ outs.append(d)
+ p = '/' + '/'.join(outs)
- if os.sep != '/':
- p = p.replace(os.sep, '/')
return root._lookup_abs(p, fsclass, create)
def Entry(self, name, directory = None, create = 1):
@@ -1300,7 +1420,7 @@ class DirNodeInfo(SCons.Node.NodeInfoBase):
top = self.fs.Top
root = top.root
if do_splitdrive:
- drive, s = os.path.splitdrive(s)
+ drive, s = _my_splitdrive(s)
if drive:
root = self.fs.get_root(drive)
if not os.path.isabs(s):
@@ -1350,11 +1470,34 @@ class Dir(Base):
self.variant_dirs = []
self.root = self.dir.root
+ # For directories, we make a difference between the directory
+ # 'name' and the directory 'dirname'. The 'name' attribute is
+ # used when we need to print the 'name' of the directory or
+ # when we it is used as the last part of a path. The 'dirname'
+ # is used when the directory is not the last element of the
+ # path. The main reason for making that distinction is that
+ # for RoorDir's the dirname can not be easily inferred from
+ # the name. For example, we have to add a '/' after a drive
+ # letter but not after a UNC path prefix ('//').
+ self.dirname = self.name + OS_SEP
+
# Don't just reset the executor, replace its action list,
# because it might have some pre-or post-actions that need to
# be preserved.
- self.builder = get_MkdirBuilder()
- self.get_executor().set_action_list(self.builder.action)
+ #
+ # But don't reset the executor if there is a non-null executor
+ # attached already. The existing executor might have other
+ # targets, in which case replacing the action list with a
+ # Mkdir action is a big mistake.
+ if not hasattr(self, 'executor'):
+ self.builder = get_MkdirBuilder()
+ self.get_executor().set_action_list(self.builder.action)
+ else:
+ # Prepend MkdirBuilder action to existing action list
+ l = self.get_executor().action_list
+ a = get_MkdirBuilder().action
+ l.insert(0, a)
+ self.get_executor().set_action_list(l)
def diskcheck_match(self):
diskcheck_match(self, self.isfile,
@@ -1403,23 +1546,6 @@ class Dir(Base):
"""
return self.fs.File(name, self)
- def _lookup_rel(self, name, klass, create=1):
- """
- Looks up a *normalized* relative path name, relative to this
- directory.
-
- This method is intended for use by internal lookups with
- already-normalized path data. For general-purpose lookups,
- use the Entry(), Dir() and File() methods above.
-
- This method does *no* input checking and will die or give
- incorrect results if it's passed a non-normalized path name (e.g.,
- a path containing '..'), an absolute path name, a top-relative
- ('#foo') path name, or any kind of object.
- """
- name = self.entry_labspath(name)
- return self.root._lookup_abs(name, klass, create)
-
def link(self, srcdir, duplicate):
"""Set this directory as the variant directory for the
supplied source directory."""
@@ -1452,7 +1578,7 @@ class Dir(Base):
if fname == '.':
fname = dir.name
else:
- fname = dir.name + os.sep + fname
+ fname = dir.name + OS_SEP + fname
dir = dir.up()
self._memo['get_all_rdirs'] = list(result)
@@ -1466,7 +1592,7 @@ class Dir(Base):
self.__clearRepositoryCache()
def up(self):
- return self.entries['..']
+ return self.dir
def _rel_path_key(self, other):
return str(other)
@@ -1514,14 +1640,14 @@ class Dir(Base):
if dir_rel_path == '.':
result = other.name
else:
- result = dir_rel_path + os.sep + other.name
+ result = dir_rel_path + OS_SEP + other.name
else:
i = self.path_elements.index(other) + 1
path_elems = ['..'] * (len(self.path_elements) - i) \
+ [n.name for n in other.path_elements[i:]]
- result = os.sep.join(path_elems)
+ result = OS_SEP.join(path_elems)
memo_dict[other] = result
@@ -1691,16 +1817,16 @@ class Dir(Base):
return stamp
def entry_abspath(self, name):
- return self.abspath + os.sep + name
+ return self.abspath + OS_SEP + name
def entry_labspath(self, name):
return self.labspath + '/' + name
def entry_path(self, name):
- return self.path + os.sep + name
+ return self.path + OS_SEP + name
def entry_tpath(self, name):
- return self.tpath + os.sep + name
+ return self.tpath + OS_SEP + name
def entry_exists_on_disk(self, name):
try:
@@ -1721,7 +1847,7 @@ class Dir(Base):
if result is None:
# Belt-and-suspenders for Windows: check directly for
# 8.3 file names that don't show up in os.listdir().
- result = os.path.exists(self.abspath + os.sep + name)
+ result = os.path.exists(self.abspath + OS_SEP + name)
d[name] = result
return result
else:
@@ -1742,7 +1868,7 @@ class Dir(Base):
while dir:
if dir.srcdir:
result.append(dir.srcdir.Dir(dirname))
- dirname = dir.name + os.sep + dirname
+ dirname = dir.name + OS_SEP + dirname
dir = dir.up()
self._memo['srcdir_list'] = result
@@ -1986,7 +2112,7 @@ class RootDir(Dir):
add a separator when creating the path names of entries within
this directory.
"""
- def __init__(self, name, fs):
+ def __init__(self, drive, fs):
if __debug__: logInstanceCreation(self, 'Node.FS.RootDir')
# We're going to be our own parent directory (".." entry and .dir
# attribute) so we have to set up some values so Base.__init__()
@@ -1998,29 +2124,47 @@ class RootDir(Dir):
self.path_elements = []
self.duplicate = 0
self.root = self
+
+ # Handle all the types of drives:
+ if drive == '':
+ # No drive, regular UNIX root or Windows default drive.
+ name = OS_SEP
+ dirname = OS_SEP
+ elif drive == '//':
+ # UNC path
+ name = UNC_PREFIX
+ dirname = UNC_PREFIX
+ else:
+ # Windows drive letter
+ name = drive
+ dirname = drive + OS_SEP
+
Base.__init__(self, name, self, fs)
- # Now set our paths to what we really want them to be: the
- # initial drive letter (the name) plus the directory separator,
- # except for the "lookup abspath," which does not have the
- # drive letter.
- self.abspath = name + os.sep
+ # Now set our paths to what we really want them to be. The
+ # name should already contain any necessary separators, such
+ # as the initial drive letter (the name) plus the directory
+ # separator, except for the "lookup abspath," which does not
+ # have the drive letter.
+ self.abspath = dirname
self.labspath = ''
- self.path = name + os.sep
- self.tpath = name + os.sep
+ self.path = dirname
+ self.tpath = dirname
self._morph()
+ # Must be reset after Dir._morph() is invoked...
+ self.dirname = dirname
+
self._lookupDict = {}
- # The // and os.sep + os.sep entries are necessary because
- # os.path.normpath() seems to preserve double slashes at the
- # beginning of a path (presumably for UNC path names), but
- # collapses triple slashes to a single slash.
self._lookupDict[''] = self
self._lookupDict['/'] = self
- self._lookupDict['//'] = self
- self._lookupDict[os.sep] = self
- self._lookupDict[os.sep + os.sep] = self
+
+ # The // entry is necessary because os.path.normpath()
+ # preserves double slashes at the beginning of a path on Posix
+ # platforms.
+ if not has_unc:
+ self._lookupDict['//'] = self
def must_be_same(self, klass):
if klass is Dir:
@@ -2039,7 +2183,7 @@ class RootDir(Dir):
normalized absolute path; we merely let Python's dictionary look
up and return the One True Node.FS object for the path.
- If no Node for the specified "p" doesn't already exist, and
+ If a Node for the specified "p" doesn't already exist, and
"create" is specified, the Node may be created after recursive
invocation to find or create the parent directory or directories.
"""
@@ -2052,7 +2196,17 @@ class RootDir(Dir):
raise SCons.Errors.UserError(msg)
# There is no Node for this path name, and we're allowed
# to create it.
- dir_name, file_name = os.path.split(p)
+ # (note: would like to use p.rsplit('/',1) here but
+ # that's not in python 2.3)
+ # e.g.: dir_name, file_name = p.rsplit('/',1)
+ last_slash = p.rindex('/')
+ if (last_slash >= 0):
+ dir_name = p[:last_slash]
+ file_name = p[last_slash+1:]
+ else:
+ dir_name = p # shouldn't happen, just in case
+ file_name = ''
+
dir_node = self._lookup_abs(dir_name, Dir)
result = klass(file_name, dir_node, self.fs)
@@ -2111,7 +2265,7 @@ class FileNodeInfo(SCons.Node.NodeInfoBase):
top = self.fs.Top
root = top.root
if do_splitdrive:
- drive, s = os.path.splitdrive(s)
+ drive, s = _my_splitdrive(s)
if drive:
root = self.fs.get_root(drive)
if not os.path.isabs(s):
@@ -2129,7 +2283,7 @@ class FileBuildInfo(SCons.Node.BuildInfoBase):
usual string representation: relative to the top-level SConstruct
directory, or an absolute path if it's outside.
"""
- if os.sep == '/':
+ if os_sep_is_slash:
node_to_str = str
else:
def node_to_str(n):
@@ -2138,7 +2292,7 @@ class FileBuildInfo(SCons.Node.BuildInfoBase):
except AttributeError:
s = str(n)
else:
- s = s.replace(os.sep, '/')
+ s = s.replace(OS_SEP, '/')
return s
for attr in ['bsources', 'bdepends', 'bimplicit']:
try:
@@ -2638,6 +2792,8 @@ class File(Base):
def _rmv_existing(self):
self.clear_memoized_values()
+ if print_duplicate:
+ print "dup: removing existing target %s"%self
e = Unlink(self, [], None)
if isinstance(e, SCons.Errors.BuildError):
raise e
@@ -2678,6 +2834,8 @@ class File(Base):
def do_duplicate(self, src):
self._createDir()
+ if print_duplicate:
+ print "dup: relinking variant '%s' from '%s'"%(self, src)
Unlink(self, None, None)
e = Link(self, src, None)
if isinstance(e, SCons.Errors.BuildError):
@@ -2711,6 +2869,8 @@ class File(Base):
else:
# The source file does not exist. Make sure no old
# copy remains in the variant directory.
+ if print_duplicate:
+ print "dup: no src for %s, unlinking old variant copy"%self
if Base.exists(self) or self.islink():
self.fs.unlink(self.path)
# Return None explicitly because the Base.exists() call
@@ -2982,8 +3142,8 @@ class FileFinder(object):
if fd is None:
fd = self.default_filedir
dir, name = os.path.split(fd)
- drive, d = os.path.splitdrive(dir)
- if not name and d[:1] in ('/', os.sep):
+ drive, d = _my_splitdrive(dir)
+ if not name and d[:1] in ('/', OS_SEP):
#return p.fs.get_root(drive).dir_on_disk(name)
return p.fs.get_root(drive)
if dir:
diff --git a/engine/SCons/Node/Python.py b/engine/SCons/Node/Python.py
index 3245005..b97f9d4 100644
--- a/engine/SCons/Node/Python.py
+++ b/engine/SCons/Node/Python.py
@@ -5,7 +5,7 @@ Python nodes.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ Python nodes.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Node/Python.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Node/Python.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Node
diff --git a/engine/SCons/Node/__init__.py b/engine/SCons/Node/__init__.py
index b737798..a832a5f 100644
--- a/engine/SCons/Node/__init__.py
+++ b/engine/SCons/Node/__init__.py
@@ -20,7 +20,7 @@ be able to depend on any other type of "thing."
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -41,7 +41,7 @@ be able to depend on any other type of "thing."
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Node/__init__.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Node/__init__.py 5357 2011/09/09 21:31:03 bdeegan"
import collections
import copy
@@ -628,9 +628,10 @@ class Node(object):
if implicit_deps_unchanged or self.is_up_to_date():
return
# one of this node's sources has changed,
- # so we must recalculate the implicit deps:
- self.implicit = []
- self.implicit_set = set()
+ # so we must recalculate the implicit deps for all targets
+ for tgt in executor.get_all_targets():
+ tgt.implicit = []
+ tgt.implicit_set = set()
# Have the executor scan the sources.
executor.scan_sources(self.builder.source_scanner)
diff --git a/engine/SCons/Options/BoolOption.py b/engine/SCons/Options/BoolOption.py
index 4609967..2b86533 100644
--- a/engine/SCons/Options/BoolOption.py
+++ b/engine/SCons/Options/BoolOption.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Options/BoolOption.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Options/BoolOption.py 5357 2011/09/09 21:31:03 bdeegan"
__doc__ = """Place-holder for the old SCons.Options module hierarchy
diff --git a/engine/SCons/Options/EnumOption.py b/engine/SCons/Options/EnumOption.py
index 1357984..5296209 100644
--- a/engine/SCons/Options/EnumOption.py
+++ b/engine/SCons/Options/EnumOption.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Options/EnumOption.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Options/EnumOption.py 5357 2011/09/09 21:31:03 bdeegan"
__doc__ = """Place-holder for the old SCons.Options module hierarchy
diff --git a/engine/SCons/Options/ListOption.py b/engine/SCons/Options/ListOption.py
index 1f34cd6..5672689 100644
--- a/engine/SCons/Options/ListOption.py
+++ b/engine/SCons/Options/ListOption.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Options/ListOption.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Options/ListOption.py 5357 2011/09/09 21:31:03 bdeegan"
__doc__ = """Place-holder for the old SCons.Options module hierarchy
diff --git a/engine/SCons/Options/PackageOption.py b/engine/SCons/Options/PackageOption.py
index 1bb88b1..930c18f 100644
--- a/engine/SCons/Options/PackageOption.py
+++ b/engine/SCons/Options/PackageOption.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Options/PackageOption.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Options/PackageOption.py 5357 2011/09/09 21:31:03 bdeegan"
__doc__ = """Place-holder for the old SCons.Options module hierarchy
diff --git a/engine/SCons/Options/PathOption.py b/engine/SCons/Options/PathOption.py
index 2e38de3..ebf0f24 100644
--- a/engine/SCons/Options/PathOption.py
+++ b/engine/SCons/Options/PathOption.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Options/PathOption.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Options/PathOption.py 5357 2011/09/09 21:31:03 bdeegan"
__doc__ = """Place-holder for the old SCons.Options module hierarchy
diff --git a/engine/SCons/Options/__init__.py b/engine/SCons/Options/__init__.py
index edb6273..b1428e9 100644
--- a/engine/SCons/Options/__init__.py
+++ b/engine/SCons/Options/__init__.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Options/__init__.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Options/__init__.py 5357 2011/09/09 21:31:03 bdeegan"
__doc__ = """Place-holder for the old SCons.Options module hierarchy
diff --git a/engine/SCons/PathList.py b/engine/SCons/PathList.py
index 4b27193..0ba07f5 100644
--- a/engine/SCons/PathList.py
+++ b/engine/SCons/PathList.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/PathList.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/PathList.py 5357 2011/09/09 21:31:03 bdeegan"
__doc__ = """SCons.PathList
diff --git a/engine/SCons/Platform/__init__.py b/engine/SCons/Platform/__init__.py
index 7621e40..eb0108e 100644
--- a/engine/SCons/Platform/__init__.py
+++ b/engine/SCons/Platform/__init__.py
@@ -20,7 +20,7 @@ their own platform definition.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -42,7 +42,7 @@ their own platform definition.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/__init__.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Platform/__init__.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
diff --git a/engine/SCons/Platform/aix.py b/engine/SCons/Platform/aix.py
index 821c9da..c48aaff 100644
--- a/engine/SCons/Platform/aix.py
+++ b/engine/SCons/Platform/aix.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/aix.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Platform/aix.py 5357 2011/09/09 21:31:03 bdeegan"
import os
diff --git a/engine/SCons/Platform/cygwin.py b/engine/SCons/Platform/cygwin.py
index 8370ea6..c04f50a 100644
--- a/engine/SCons/Platform/cygwin.py
+++ b/engine/SCons/Platform/cygwin.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/cygwin.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Platform/cygwin.py 5357 2011/09/09 21:31:03 bdeegan"
import posix
from SCons.Platform import TempFileMunge
diff --git a/engine/SCons/Platform/darwin.py b/engine/SCons/Platform/darwin.py
index 3a9c9eb..bed6fce 100644
--- a/engine/SCons/Platform/darwin.py
+++ b/engine/SCons/Platform/darwin.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,14 +30,38 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/darwin.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Platform/darwin.py 5357 2011/09/09 21:31:03 bdeegan"
import posix
+import os
def generate(env):
posix.generate(env)
env['SHLIBSUFFIX'] = '.dylib'
- env['ENV']['PATH'] = env['ENV']['PATH'] + ':/sw/bin'
+ # put macports paths at front to override Apple's versions, fink path is after
+ # For now let people who want Macports or Fink tools specify it!
+ # env['ENV']['PATH'] = '/opt/local/bin:/opt/local/sbin:' + env['ENV']['PATH'] + ':/sw/bin'
+
+ # Store extra system paths in env['ENV']['PATHOSX']
+
+ filelist = ['/etc/paths',]
+ # make sure this works on Macs with Tiger or earlier
+ try:
+ dirlist = os.listdir('/etc/paths.d')
+ except:
+ dirlist = []
+
+ for file in dirlist:
+ filelist.append('/etc/paths.d/'+file)
+
+ for file in filelist:
+ if os.path.isfile(file):
+ f = open(file, 'r')
+ lines = f.readlines()
+ for line in lines:
+ if line:
+ env.AppendENVPath('PATHOSX', line.strip('\n'))
+ f.close()
# Local Variables:
# tab-width:4
diff --git a/engine/SCons/Platform/hpux.py b/engine/SCons/Platform/hpux.py
index 77d6db3..fbacc04 100644
--- a/engine/SCons/Platform/hpux.py
+++ b/engine/SCons/Platform/hpux.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/hpux.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Platform/hpux.py 5357 2011/09/09 21:31:03 bdeegan"
import posix
diff --git a/engine/SCons/Platform/irix.py b/engine/SCons/Platform/irix.py
index ff0c323..2c3bc15 100644
--- a/engine/SCons/Platform/irix.py
+++ b/engine/SCons/Platform/irix.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/irix.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Platform/irix.py 5357 2011/09/09 21:31:03 bdeegan"
import posix
diff --git a/engine/SCons/Platform/os2.py b/engine/SCons/Platform/os2.py
index cdb4082..9c76419 100644
--- a/engine/SCons/Platform/os2.py
+++ b/engine/SCons/Platform/os2.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/os2.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Platform/os2.py 5357 2011/09/09 21:31:03 bdeegan"
import win32
def generate(env):
diff --git a/engine/SCons/Platform/posix.py b/engine/SCons/Platform/posix.py
index 87de9df..6d99fdb 100644
--- a/engine/SCons/Platform/posix.py
+++ b/engine/SCons/Platform/posix.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/posix.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Platform/posix.py 5357 2011/09/09 21:31:03 bdeegan"
import errno
import os
diff --git a/engine/SCons/Platform/sunos.py b/engine/SCons/Platform/sunos.py
index 1501107..2344906 100644
--- a/engine/SCons/Platform/sunos.py
+++ b/engine/SCons/Platform/sunos.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/sunos.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Platform/sunos.py 5357 2011/09/09 21:31:03 bdeegan"
import posix
diff --git a/engine/SCons/Platform/win32.py b/engine/SCons/Platform/win32.py
index 7a232ae..fec9b4c 100644
--- a/engine/SCons/Platform/win32.py
+++ b/engine/SCons/Platform/win32.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/win32.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Platform/win32.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import os.path
diff --git a/engine/SCons/SConf.py b/engine/SCons/SConf.py
index 7b43436..11d6245 100644
--- a/engine/SCons/SConf.py
+++ b/engine/SCons/SConf.py
@@ -4,7 +4,7 @@ Autoconf-like configuration support.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@ Autoconf-like configuration support.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/SConf.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/SConf.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
diff --git a/engine/SCons/SConsign.py b/engine/SCons/SConsign.py
index 0d78a6d..bbe475b 100644
--- a/engine/SCons/SConsign.py
+++ b/engine/SCons/SConsign.py
@@ -5,7 +5,7 @@ Writing and reading information to the .sconsign file or files.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ Writing and reading information to the .sconsign file or files.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/SConsign.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/SConsign.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
@@ -104,9 +104,15 @@ def write():
try:
syncmethod = db.sync
except AttributeError:
- pass # Not all anydbm modules have sync() methods.
+ pass # Not all dbm modules have sync() methods.
else:
syncmethod()
+ try:
+ closemethod = db.close
+ except AttributeError:
+ pass # Not all dbm modules have close() methods.
+ else:
+ closemethod()
class SConsignEntry(object):
"""
diff --git a/engine/SCons/Scanner/C.py b/engine/SCons/Scanner/C.py
index 3ac769a..0b07c13 100644
--- a/engine/SCons/Scanner/C.py
+++ b/engine/SCons/Scanner/C.py
@@ -5,7 +5,7 @@ This module implements the depenency scanner for C/C++ code.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ This module implements the depenency scanner for C/C++ code.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/C.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/C.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Node.FS
import SCons.Scanner
diff --git a/engine/SCons/Scanner/D.py b/engine/SCons/Scanner/D.py
index 2293ddd..b4b26ba 100644
--- a/engine/SCons/Scanner/D.py
+++ b/engine/SCons/Scanner/D.py
@@ -8,7 +8,7 @@ Coded by Andy Friesen
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ Coded by Andy Friesen
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/D.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/D.py 5357 2011/09/09 21:31:03 bdeegan"
import re
diff --git a/engine/SCons/Scanner/Dir.py b/engine/SCons/Scanner/Dir.py
index df0de4e..aa1239f 100644
--- a/engine/SCons/Scanner/Dir.py
+++ b/engine/SCons/Scanner/Dir.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -20,7 +20,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Scanner/Dir.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/Dir.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Node.FS
import SCons.Scanner
diff --git a/engine/SCons/Scanner/Fortran.py b/engine/SCons/Scanner/Fortran.py
index 63d34e4..13f670d 100644
--- a/engine/SCons/Scanner/Fortran.py
+++ b/engine/SCons/Scanner/Fortran.py
@@ -5,7 +5,7 @@ This module implements the dependency scanner for Fortran code.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@ This module implements the dependency scanner for Fortran code.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Scanner/Fortran.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/Fortran.py 5357 2011/09/09 21:31:03 bdeegan"
import re
diff --git a/engine/SCons/Scanner/IDL.py b/engine/SCons/Scanner/IDL.py
index 8ccda1b..206a106 100644
--- a/engine/SCons/Scanner/IDL.py
+++ b/engine/SCons/Scanner/IDL.py
@@ -6,7 +6,7 @@ Definition Language) files.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -28,7 +28,7 @@ Definition Language) files.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/IDL.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/IDL.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Node.FS
import SCons.Scanner
diff --git a/engine/SCons/Scanner/LaTeX.py b/engine/SCons/Scanner/LaTeX.py
index ae542cf..913e64b 100644
--- a/engine/SCons/Scanner/LaTeX.py
+++ b/engine/SCons/Scanner/LaTeX.py
@@ -5,7 +5,7 @@ This module implements the dependency scanner for LaTeX code.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ This module implements the dependency scanner for LaTeX code.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/LaTeX.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/LaTeX.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
import re
@@ -148,6 +148,8 @@ class LaTeX(SCons.Scanner.Base):
env['TEXINPUTS'] for "lstinputlisting" keyword
env['BIBINPUTS'] for "bibliography" keyword
env['BSTINPUTS'] for "bibliographystyle" keyword
+ env['INDEXSTYLE'] for "makeindex" keyword, no scanning support needed
+ just allows user to set it if needed.
FIXME: also look for the class or style in document[class|style]{}
FIXME: also look for the argument of bibliographystyle{}
@@ -157,6 +159,7 @@ class LaTeX(SCons.Scanner.Base):
'includegraphics': 'TEXINPUTS',
'bibliography': 'BIBINPUTS',
'bibliographystyle': 'BSTINPUTS',
+ 'makeindex': 'INDEXSTYLE',
'usepackage': 'TEXINPUTS',
'lstinputlisting': 'TEXINPUTS'}
env_variables = SCons.Util.unique(list(keyword_paths.values()))
diff --git a/engine/SCons/Scanner/Prog.py b/engine/SCons/Scanner/Prog.py
index 0312132..0df80f8 100644
--- a/engine/SCons/Scanner/Prog.py
+++ b/engine/SCons/Scanner/Prog.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/Prog.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/Prog.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Node
import SCons.Node.FS
diff --git a/engine/SCons/Scanner/RC.py b/engine/SCons/Scanner/RC.py
index 9013a09..a650581 100644
--- a/engine/SCons/Scanner/RC.py
+++ b/engine/SCons/Scanner/RC.py
@@ -6,7 +6,7 @@ Definition Language) files.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -28,7 +28,7 @@ Definition Language) files.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/RC.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/RC.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Node.FS
import SCons.Scanner
@@ -40,7 +40,7 @@ def RCScan():
res_re= r'^(?:\s*#\s*(?:include)|' \
'.*?\s+(?:ICON|BITMAP|CURSOR|HTML|FONT|MESSAGETABLE|TYPELIB|REGISTRY|D3DFX)' \
'\s*.*?)' \
- '\s*(<|"| )([^>"\s]+)(?:[>" ])*$'
+ '\s*(<|"| )([^>"\s]+)(?:[>"\s])*$'
resScanner = SCons.Scanner.ClassicCPP( "ResourceScanner",
"$RCSUFFIXES",
"CPPPATH",
diff --git a/engine/SCons/Scanner/__init__.py b/engine/SCons/Scanner/__init__.py
index 1a8dcbc..d2d7a62 100644
--- a/engine/SCons/Scanner/__init__.py
+++ b/engine/SCons/Scanner/__init__.py
@@ -5,7 +5,7 @@ The Scanner package for the SCons software construction utility.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ The Scanner package for the SCons software construction utility.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/__init__.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/__init__.py 5357 2011/09/09 21:31:03 bdeegan"
import re
diff --git a/engine/SCons/Script/Interactive.py b/engine/SCons/Script/Interactive.py
index e2906d4..f2151fa 100644
--- a/engine/SCons/Script/Interactive.py
+++ b/engine/SCons/Script/Interactive.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -20,7 +20,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Script/Interactive.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Script/Interactive.py 5357 2011/09/09 21:31:03 bdeegan"
__doc__ = """
SCons interactive mode
diff --git a/engine/SCons/Script/Main.py b/engine/SCons/Script/Main.py
index 31bcff3..2f00e5c 100644
--- a/engine/SCons/Script/Main.py
+++ b/engine/SCons/Script/Main.py
@@ -13,7 +13,7 @@ it goes here.
unsupported_python_version = (2, 3, 0)
deprecated_python_version = (2, 4, 0)
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -34,7 +34,7 @@ deprecated_python_version = (2, 4, 0)
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Script/Main.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Script/Main.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
@@ -60,6 +60,7 @@ import SCons.Errors
import SCons.Job
import SCons.Node
import SCons.Node.FS
+import SCons.Platform
import SCons.SConf
import SCons.Script
import SCons.Taskmaster
@@ -653,6 +654,10 @@ def _set_debug_values(options):
print_time = 1
if "tree" in debug_values:
options.tree_printers.append(TreePrinter())
+ if "prepare" in debug_values:
+ SCons.Taskmaster.print_prepare = 1
+ if "duplicate" in debug_values:
+ SCons.Node.FS.print_duplicate = 1
def _create_path(plist):
path = '.'
@@ -665,15 +670,15 @@ def _create_path(plist):
def _load_site_scons_dir(topdir, site_dir_name=None):
"""Load the site_scons dir under topdir.
- Adds site_scons to sys.path, imports site_scons/site_init.py,
- and adds site_scons/site_tools to default toolpath."""
+ Prepends site_scons to sys.path, imports site_scons/site_init.py,
+ and prepends site_scons/site_tools to default toolpath."""
if site_dir_name:
err_if_not_found = True # user specified: err if missing
else:
site_dir_name = "site_scons"
err_if_not_found = False
- site_dir = os.path.join(topdir.path, site_dir_name)
+ site_dir = os.path.join(topdir, site_dir_name)
if not os.path.exists(site_dir):
if err_if_not_found:
raise SCons.Errors.UserError("site dir %s not found."%site_dir)
@@ -682,11 +687,12 @@ def _load_site_scons_dir(topdir, site_dir_name=None):
site_init_filename = "site_init.py"
site_init_modname = "site_init"
site_tools_dirname = "site_tools"
+ # prepend to sys.path
sys.path = [os.path.abspath(site_dir)] + sys.path
site_init_file = os.path.join(site_dir, site_init_filename)
site_tools_dir = os.path.join(site_dir, site_tools_dirname)
if os.path.exists(site_init_file):
- import imp
+ import imp, re
# TODO(2.4): turn this into try:-except:-finally:
try:
try:
@@ -705,14 +711,26 @@ def _load_site_scons_dir(topdir, site_dir_name=None):
fmt = 'cannot import site_init.py: missing SCons.Script module %s'
raise SCons.Errors.InternalError(fmt % repr(e))
try:
+ sfx = description[0]
+ modname = os.path.basename(pathname)[:-len(sfx)]
+ site_m = {"__file__": pathname, "__name__": modname, "__doc__": None}
+ re_special = re.compile("__[^_]+__")
+ for k in m.__dict__.keys():
+ if not re_special.match(k):
+ site_m[k] = m.__dict__[k]
+
# This is the magic.
- exec fp in m.__dict__
+ exec fp in site_m
except KeyboardInterrupt:
raise
except Exception, e:
fmt = '*** Error loading site_init file %s:\n'
sys.stderr.write(fmt % repr(site_init_file))
raise
+ else:
+ for k in site_m:
+ if not re_special.match(k):
+ m.__dict__[k] = site_m[k]
except KeyboardInterrupt:
raise
except ImportError, e:
@@ -723,7 +741,55 @@ def _load_site_scons_dir(topdir, site_dir_name=None):
if fp:
fp.close()
if os.path.exists(site_tools_dir):
- SCons.Tool.DefaultToolpath.append(os.path.abspath(site_tools_dir))
+ # prepend to DefaultToolpath
+ SCons.Tool.DefaultToolpath.insert(0, os.path.abspath(site_tools_dir))
+
+def _load_all_site_scons_dirs(topdir, verbose=None):
+ """Load all of the predefined site_scons dir.
+ Order is significant; we load them in order from most generic
+ (machine-wide) to most specific (topdir).
+ The verbose argument is only for testing.
+ """
+ platform = SCons.Platform.platform_default()
+
+ def homedir(d):
+ return os.path.expanduser('~/'+d)
+
+ if platform == 'win32' or platform == 'cygwin':
+ # Note we use $ here instead of %...% because older
+ # pythons (prior to 2.6?) didn't expand %...% on Windows.
+ # This set of dirs should work on XP, Vista, 7 and later.
+ sysdirs=[
+ os.path.expandvars('$ALLUSERSPROFILE\\Application Data\\scons'),
+ os.path.expandvars('$USERPROFILE\\Local Settings\\Application Data\\scons')]
+ appdatadir = os.path.expandvars('$APPDATA\\scons')
+ if appdatadir not in sysdirs:
+ sysdirs.append(appdatadir)
+ sysdirs.append(homedir('.scons'))
+
+ elif platform == 'darwin': # MacOS X
+ sysdirs=['/Library/Application Support/SCons',
+ '/opt/local/share/scons', # (for MacPorts)
+ '/sw/share/scons', # (for Fink)
+ homedir('Library/Application Support/SCons'),
+ homedir('.scons')]
+ elif platform == 'sunos': # Solaris
+ sysdirs=['/opt/sfw/scons',
+ '/usr/share/scons',
+ homedir('.scons')]
+ else: # Linux, HPUX, etc.
+ # assume posix-like, i.e. platform == 'posix'
+ sysdirs=['/usr/share/scons',
+ homedir('.scons')]
+
+ dirs=sysdirs + [topdir]
+ for d in dirs:
+ if verbose: # this is used by unit tests.
+ print "Loading site dir ", d
+ _load_site_scons_dir(d)
+
+def test_load_all_site_scons_dirs(d):
+ _load_all_site_scons_dirs(d, True)
def version_string(label, module):
version = module.__version__
@@ -739,6 +805,10 @@ def version_string(label, module):
module.__developer__,
module.__buildsys__)
+def path_string(label, module):
+ path = module.__path__
+ return "\t%s path: %s\n"%(label,path)
+
def _main(parser):
global exit_status
global this_build_status
@@ -860,9 +930,9 @@ def _main(parser):
progress_display.set_mode(0)
if options.site_dir:
- _load_site_scons_dir(d, options.site_dir)
+ _load_site_scons_dir(d.path, options.site_dir)
elif not options.no_site_dir:
- _load_site_scons_dir(d)
+ _load_all_site_scons_dirs(d.path)
if options.include_dir:
sys.path = options.include_dir + sys.path
@@ -1258,7 +1328,8 @@ def main():
# __main__.__version__, hence there is no script version.
pass
parts.append(version_string("engine", SCons))
- parts.append("Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation")
+ parts.append(path_string("engine", SCons))
+ parts.append("Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation")
version = ''.join(parts)
import SConsOptions
diff --git a/engine/SCons/Script/SConsOptions.py b/engine/SCons/Script/SConsOptions.py
index 8afedf6..79d9927 100644
--- a/engine/SCons/Script/SConsOptions.py
+++ b/engine/SCons/Script/SConsOptions.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Script/SConsOptions.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Script/SConsOptions.py 5357 2011/09/09 21:31:03 bdeegan"
import optparse
import re
@@ -596,9 +596,9 @@ def Parser(version):
"tree" : '; please use --tree=all instead',
}
- debug_options = ["count", "explain", "findlibs",
+ debug_options = ["count", "duplicate", "explain", "findlibs",
"includes", "memoizer", "memory", "objects",
- "pdb", "presub", "stacktrace",
+ "pdb", "prepare", "presub", "stacktrace",
"time"] + list(deprecated_debug_options.keys())
def opt_debug(option, opt, value, parser,
@@ -867,7 +867,7 @@ def Parser(version):
sys.stderr.write(msg)
op.add_option('-l', '--load-average', '--max-load',
- nargs=1, type="int",
+ nargs=1, type="float",
dest="load_average", default=0,
action="callback", callback=opt_not_yet,
# action="store",
diff --git a/engine/SCons/Script/SConscript.py b/engine/SCons/Script/SConscript.py
index 5e896f1..ee5e290 100644
--- a/engine/SCons/Script/SConscript.py
+++ b/engine/SCons/Script/SConscript.py
@@ -6,7 +6,7 @@ files.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -28,7 +28,7 @@ files.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from __future__ import division
-__revision__ = "src/engine/SCons/Script/SConscript.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Script/SConscript.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons
import SCons.Action
diff --git a/engine/SCons/Script/__init__.py b/engine/SCons/Script/__init__.py
index b4545ec..f2503ae 100644
--- a/engine/SCons/Script/__init__.py
+++ b/engine/SCons/Script/__init__.py
@@ -12,7 +12,7 @@ it goes here.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -34,7 +34,7 @@ it goes here.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Script/__init__.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Script/__init__.py 5357 2011/09/09 21:31:03 bdeegan"
import time
start_time = time.time()
diff --git a/engine/SCons/Sig.py b/engine/SCons/Sig.py
index 2a9bc8e..51c1b1a 100644
--- a/engine/SCons/Sig.py
+++ b/engine/SCons/Sig.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Sig.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Sig.py 5357 2011/09/09 21:31:03 bdeegan"
__doc__ = """Place-holder for the old SCons.Sig module hierarchy
diff --git a/engine/SCons/Subst.py b/engine/SCons/Subst.py
index 84e7150..d0c8c38 100644
--- a/engine/SCons/Subst.py
+++ b/engine/SCons/Subst.py
@@ -5,7 +5,7 @@ SCons string substitution.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@ SCons string substitution.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Subst.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Subst.py 5357 2011/09/09 21:31:03 bdeegan"
import collections
import re
diff --git a/engine/SCons/Taskmaster.py b/engine/SCons/Taskmaster.py
index 019b2d7..e98a859 100644
--- a/engine/SCons/Taskmaster.py
+++ b/engine/SCons/Taskmaster.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -47,7 +47,7 @@ interface and the SCons build engine. There are two key classes here:
target(s) that it decides need to be evaluated and/or built.
"""
-__revision__ = "src/engine/SCons/Taskmaster.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Taskmaster.py 5357 2011/09/09 21:31:03 bdeegan"
from itertools import chain
import operator
@@ -66,6 +66,7 @@ NODE_UP_TO_DATE = SCons.Node.up_to_date
NODE_EXECUTED = SCons.Node.executed
NODE_FAILED = SCons.Node.failed
+print_prepare = 0 # set by option --debug=prepare
# A subsystem for recording stats about how different Nodes are handled by
# the main Taskmaster loop. There's no external control here (no need for
@@ -161,6 +162,7 @@ class Task(object):
unlink underlying files and make all necessary directories before
the Action is actually called to build the targets.
"""
+ global print_prepare
T = self.tm.trace
if T: T.write(self.trace_message(u'Task.prepare()', self.node))
@@ -186,8 +188,14 @@ class Task(object):
executor = self.targets[0].get_executor()
executor.prepare()
for t in executor.get_action_targets():
+ if print_prepare:
+ print "Preparing target %s..."%t
+ for s in t.side_effects:
+ print "...with side-effect %s..."%s
t.prepare()
for s in t.side_effects:
+ if print_prepare:
+ print "...Preparing side-effect %s..."%s
s.prepare()
def get_target(self):
diff --git a/engine/SCons/Tool/386asm.py b/engine/SCons/Tool/386asm.py
index 1ba99fa..27748cb 100644
--- a/engine/SCons/Tool/386asm.py
+++ b/engine/SCons/Tool/386asm.py
@@ -10,7 +10,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/386asm.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/386asm.py 5357 2011/09/09 21:31:03 bdeegan"
from SCons.Tool.PharLapCommon import addPharLapPaths
import SCons.Util
diff --git a/engine/SCons/Tool/BitKeeper.py b/engine/SCons/Tool/BitKeeper.py
index 8c8991a..2b8297b 100644
--- a/engine/SCons/Tool/BitKeeper.py
+++ b/engine/SCons/Tool/BitKeeper.py
@@ -10,7 +10,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/BitKeeper.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/BitKeeper.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Action
import SCons.Builder
diff --git a/engine/SCons/Tool/CVS.py b/engine/SCons/Tool/CVS.py
index 5d511f0..f1d3561 100644
--- a/engine/SCons/Tool/CVS.py
+++ b/engine/SCons/Tool/CVS.py
@@ -8,7 +8,7 @@ selection method.
"""
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -29,7 +29,7 @@ selection method.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/CVS.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/CVS.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Action
import SCons.Builder
diff --git a/engine/SCons/Tool/FortranCommon.py b/engine/SCons/Tool/FortranCommon.py
index 2194158..4311cac 100644
--- a/engine/SCons/Tool/FortranCommon.py
+++ b/engine/SCons/Tool/FortranCommon.py
@@ -5,7 +5,7 @@ Stuff for processing Fortran, common to all fortran dialects.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ Stuff for processing Fortran, common to all fortran dialects.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/FortranCommon.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/FortranCommon.py 5357 2011/09/09 21:31:03 bdeegan"
import re
import os.path
@@ -231,6 +231,22 @@ def add_f95_to_env(env):
DialectAddToEnv(env, "F95", F95Suffixes, F95PPSuffixes,
support_module = 1)
+def add_f03_to_env(env):
+ """Add Builders and construction variables for f03 to an Environment."""
+ try:
+ F03Suffixes = env['F03FILESUFFIXES']
+ except KeyError:
+ F03Suffixes = ['.f03']
+
+ #print "Adding %s to f95 suffixes" % F95Suffixes
+ try:
+ F03PPSuffixes = env['F03PPFILESUFFIXES']
+ except KeyError:
+ F03PPSuffixes = []
+
+ DialectAddToEnv(env, "F03", F03Suffixes, F03PPSuffixes,
+ support_module = 1)
+
def add_all_to_env(env):
"""Add builders and construction variables for all supported fortran
dialects."""
@@ -238,6 +254,7 @@ def add_all_to_env(env):
add_f77_to_env(env)
add_f90_to_env(env)
add_f95_to_env(env)
+ add_f03_to_env(env)
# Local Variables:
# tab-width:4
diff --git a/engine/SCons/Tool/JavaCommon.py b/engine/SCons/Tool/JavaCommon.py
index 0a38409..f1eab72 100644
--- a/engine/SCons/Tool/JavaCommon.py
+++ b/engine/SCons/Tool/JavaCommon.py
@@ -5,7 +5,7 @@ Stuff for processing Java.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ Stuff for processing Java.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/JavaCommon.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/JavaCommon.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import os.path
diff --git a/engine/SCons/Tool/MSCommon/__init__.py b/engine/SCons/Tool/MSCommon/__init__.py
index 780a97c..a5e19e6 100644
--- a/engine/SCons/Tool/MSCommon/__init__.py
+++ b/engine/SCons/Tool/MSCommon/__init__.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/MSCommon/__init__.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/MSCommon/__init__.py 5357 2011/09/09 21:31:03 bdeegan"
__doc__ = """
Common functions for Microsoft Visual Studio and Visual C/C++.
diff --git a/engine/SCons/Tool/MSCommon/arch.py b/engine/SCons/Tool/MSCommon/arch.py
index 28ef0f1..0abb9f1 100644
--- a/engine/SCons/Tool/MSCommon/arch.py
+++ b/engine/SCons/Tool/MSCommon/arch.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/MSCommon/arch.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/MSCommon/arch.py 5357 2011/09/09 21:31:03 bdeegan"
__doc__ = """Module to define supported Windows chip architectures.
"""
diff --git a/engine/SCons/Tool/MSCommon/common.py b/engine/SCons/Tool/MSCommon/common.py
index 9f3df2d..b99cd77 100644
--- a/engine/SCons/Tool/MSCommon/common.py
+++ b/engine/SCons/Tool/MSCommon/common.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/MSCommon/common.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/MSCommon/common.py 5357 2011/09/09 21:31:03 bdeegan"
__doc__ = """
Common helper functions for working with the Microsoft tool chain.
diff --git a/engine/SCons/Tool/MSCommon/netframework.py b/engine/SCons/Tool/MSCommon/netframework.py
index 66c5586..a69a924 100644
--- a/engine/SCons/Tool/MSCommon/netframework.py
+++ b/engine/SCons/Tool/MSCommon/netframework.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -20,7 +20,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/MSCommon/netframework.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/MSCommon/netframework.py 5357 2011/09/09 21:31:03 bdeegan"
__doc__ = """
"""
diff --git a/engine/SCons/Tool/MSCommon/sdk.py b/engine/SCons/Tool/MSCommon/sdk.py
index 6355998..1fc5751 100644
--- a/engine/SCons/Tool/MSCommon/sdk.py
+++ b/engine/SCons/Tool/MSCommon/sdk.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/MSCommon/sdk.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/MSCommon/sdk.py 5357 2011/09/09 21:31:03 bdeegan"
__doc__ = """Module to detect the Platform/Windows SDK
diff --git a/engine/SCons/Tool/MSCommon/vc.py b/engine/SCons/Tool/MSCommon/vc.py
index 0aeb3e7..6e3965e 100644
--- a/engine/SCons/Tool/MSCommon/vc.py
+++ b/engine/SCons/Tool/MSCommon/vc.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@
# * test on 64 bits XP + VS 2005 (and VS 6 if possible)
# * SDK
# * Assembly
-__revision__ = "src/engine/SCons/Tool/MSCommon/vc.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/MSCommon/vc.py 5357 2011/09/09 21:31:03 bdeegan"
__doc__ = """Module for Visual C/C++ detection and configuration.
"""
@@ -128,9 +128,11 @@ def get_host_target(env):
return (host, target,req_target_platform)
-_VCVER = ["10.0", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", "6.0"]
+_VCVER = ["10.0Exp","10.0", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", "6.0"]
_VCVER_TO_PRODUCT_DIR = {
+ '10.0Exp' : [
+ r'Microsoft\VCExpress\10.0\Setup\VC\ProductDir'],
'10.0': [
r'Microsoft\VisualStudio\10.0\Setup\VC\ProductDir'],
'9.0': [
@@ -324,9 +326,10 @@ def get_default_version(env):
installed_vcs = cached_get_installed_vcs()
debug('installed_vcs:%s' % installed_vcs)
if not installed_vcs:
- msg = 'No installed VCs'
- debug('msv %s\n' % repr(msg))
- SCons.Warnings.warn(SCons.Warnings.VisualCMissingWarning, msg)
+ #msg = 'No installed VCs'
+ #debug('msv %s\n' % repr(msg))
+ #SCons.Warnings.warn(SCons.Warnings.VisualCMissingWarning, msg)
+ debug('msvc_setup_env: No installed VCs')
return None
msvc_version = installed_vcs[0]
debug('msvc_setup_env: using default installed MSVC version %s\n' % repr(msvc_version))
diff --git a/engine/SCons/Tool/MSCommon/vs.py b/engine/SCons/Tool/MSCommon/vs.py
index 529d443..ee53e51 100644
--- a/engine/SCons/Tool/MSCommon/vs.py
+++ b/engine/SCons/Tool/MSCommon/vs.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/MSCommon/vs.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/MSCommon/vs.py 5357 2011/09/09 21:31:03 bdeegan"
__doc__ = """Module to detect Visual Studio and/or Visual C/C++
"""
@@ -211,6 +211,33 @@ SupportedVSList = [
# default_dirname='TBD',
#),
+ # Visual Studio 2010
+ # The batch file we look for is in the VC directory,
+ # so the devenv.com executable is up in ..\..\Common7\IDE.
+ VisualStudio('10.0',
+ sdk_version='6.1',
+ hkeys=[r'Microsoft\VisualStudio\10.0\Setup\VS\ProductDir'],
+ common_tools_var='VS100COMNTOOLS',
+ executable_path=r'Common7\IDE\devenv.com',
+ batch_file_path=r'Common7\Tools\vsvars32.bat',
+ default_dirname='Microsoft Visual Studio 10',
+ supported_arch=['x86', 'amd64'],
+ ),
+
+ # Visual C++ 2010 Express Edition
+ # The batch file we look for is in the VC directory,
+ # so the VCExpress.exe executable is up in ..\..\Common7\IDE.
+ VisualStudio('10.0Exp',
+ vc_version='10.0',
+ sdk_version='6.1',
+ hkeys=[r'Microsoft\VCExpress\10.0\Setup\VS\ProductDir'],
+ common_tools_var='VS100COMNTOOLS',
+ executable_path=r'Common7\IDE\VCExpress.exe',
+ batch_file_path=r'Common7\Tools\vsvars32.bat',
+ default_dirname='Microsoft Visual Studio 10',
+ supported_arch=['x86'],
+ ),
+
# Visual Studio 2008
# The batch file we look for is in the VC directory,
# so the devenv.com executable is up in ..\..\Common7\IDE.
diff --git a/engine/SCons/Tool/Perforce.py b/engine/SCons/Tool/Perforce.py
index 9ae64b8..40192d0 100644
--- a/engine/SCons/Tool/Perforce.py
+++ b/engine/SCons/Tool/Perforce.py
@@ -8,7 +8,7 @@ selection method.
"""
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -29,7 +29,7 @@ selection method.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/Perforce.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/Perforce.py 5357 2011/09/09 21:31:03 bdeegan"
import os
diff --git a/engine/SCons/Tool/PharLapCommon.py b/engine/SCons/Tool/PharLapCommon.py
index 7d7a022..6f53400 100644
--- a/engine/SCons/Tool/PharLapCommon.py
+++ b/engine/SCons/Tool/PharLapCommon.py
@@ -7,7 +7,7 @@ Phar Lap ETS tool chain. Right now, this is linkloc and
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -29,7 +29,7 @@ Phar Lap ETS tool chain. Right now, this is linkloc and
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/PharLapCommon.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/PharLapCommon.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import os.path
diff --git a/engine/SCons/Tool/RCS.py b/engine/SCons/Tool/RCS.py
index 10e3e71..b6ff0b5 100644
--- a/engine/SCons/Tool/RCS.py
+++ b/engine/SCons/Tool/RCS.py
@@ -8,7 +8,7 @@ selection method.
"""
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -29,7 +29,7 @@ selection method.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/RCS.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/RCS.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Action
import SCons.Builder
diff --git a/engine/SCons/Tool/SCCS.py b/engine/SCons/Tool/SCCS.py
index 1cedb0a..666eb3c 100644
--- a/engine/SCons/Tool/SCCS.py
+++ b/engine/SCons/Tool/SCCS.py
@@ -8,7 +8,7 @@ selection method.
"""
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -29,7 +29,7 @@ selection method.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/SCCS.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/SCCS.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Action
import SCons.Builder
diff --git a/engine/SCons/Tool/Subversion.py b/engine/SCons/Tool/Subversion.py
index 5708184..37377ed 100644
--- a/engine/SCons/Tool/Subversion.py
+++ b/engine/SCons/Tool/Subversion.py
@@ -8,7 +8,7 @@ selection method.
"""
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -29,7 +29,7 @@ selection method.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/Subversion.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/Subversion.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
diff --git a/engine/SCons/Tool/__init__.py b/engine/SCons/Tool/__init__.py
index 416d8de..ba90b06 100644
--- a/engine/SCons/Tool/__init__.py
+++ b/engine/SCons/Tool/__init__.py
@@ -14,7 +14,7 @@ tool definition.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -35,7 +35,7 @@ tool definition.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/__init__.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/__init__.py 5357 2011/09/09 21:31:03 bdeegan"
import imp
import sys
@@ -62,7 +62,7 @@ CSuffixes = [".c", ".C", ".cxx", ".cpp", ".c++", ".cc",
".h", ".H", ".hxx", ".hpp", ".hh",
".F", ".fpp", ".FPP",
".m", ".mm",
- ".S", ".spp", ".SPP"]
+ ".S", ".spp", ".SPP", ".sx"]
DSuffixes = ['.d']
diff --git a/engine/SCons/Tool/aixc++.py b/engine/SCons/Tool/aixc++.py
index bc2d0e8..93f8e9e 100644
--- a/engine/SCons/Tool/aixc++.py
+++ b/engine/SCons/Tool/aixc++.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/aixc++.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/aixc++.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
diff --git a/engine/SCons/Tool/aixcc.py b/engine/SCons/Tool/aixcc.py
index c1dcb16..230bfb3 100644
--- a/engine/SCons/Tool/aixcc.py
+++ b/engine/SCons/Tool/aixcc.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/aixcc.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/aixcc.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
diff --git a/engine/SCons/Tool/aixf77.py b/engine/SCons/Tool/aixf77.py
index 477ec30..2348851 100644
--- a/engine/SCons/Tool/aixf77.py
+++ b/engine/SCons/Tool/aixf77.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/aixf77.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/aixf77.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
diff --git a/engine/SCons/Tool/aixlink.py b/engine/SCons/Tool/aixlink.py
index eba4916..473c6b8 100644
--- a/engine/SCons/Tool/aixlink.py
+++ b/engine/SCons/Tool/aixlink.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/aixlink.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/aixlink.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import os.path
diff --git a/engine/SCons/Tool/applelink.py b/engine/SCons/Tool/applelink.py
index a23a437..e989b03 100644
--- a/engine/SCons/Tool/applelink.py
+++ b/engine/SCons/Tool/applelink.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/applelink.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/applelink.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Util
diff --git a/engine/SCons/Tool/ar.py b/engine/SCons/Tool/ar.py
index dab9586..dcb2676 100644
--- a/engine/SCons/Tool/ar.py
+++ b/engine/SCons/Tool/ar.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/ar.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/ar.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Defaults
import SCons.Tool
diff --git a/engine/SCons/Tool/as.py b/engine/SCons/Tool/as.py
index 7d5f872..1b1187a 100644
--- a/engine/SCons/Tool/as.py
+++ b/engine/SCons/Tool/as.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/as.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/as.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Defaults
import SCons.Tool
diff --git a/engine/SCons/Tool/bcc32.py b/engine/SCons/Tool/bcc32.py
index 664c3de..580aa72 100644
--- a/engine/SCons/Tool/bcc32.py
+++ b/engine/SCons/Tool/bcc32.py
@@ -5,7 +5,7 @@ XXX
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ XXX
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/bcc32.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/bcc32.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import os.path
diff --git a/engine/SCons/Tool/c++.py b/engine/SCons/Tool/c++.py
index e19523b..6667d06 100644
--- a/engine/SCons/Tool/c++.py
+++ b/engine/SCons/Tool/c++.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/c++.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/c++.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
diff --git a/engine/SCons/Tool/cc.py b/engine/SCons/Tool/cc.py
index 291673f..4501457 100644
--- a/engine/SCons/Tool/cc.py
+++ b/engine/SCons/Tool/cc.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/cc.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/cc.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Tool
import SCons.Defaults
diff --git a/engine/SCons/Tool/cvf.py b/engine/SCons/Tool/cvf.py
index 7c2114d..cb8da4f 100644
--- a/engine/SCons/Tool/cvf.py
+++ b/engine/SCons/Tool/cvf.py
@@ -5,7 +5,7 @@ Tool-specific initialization for the Compaq Visual Fortran compiler.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ Tool-specific initialization for the Compaq Visual Fortran compiler.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/cvf.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/cvf.py 5357 2011/09/09 21:31:03 bdeegan"
import fortran
diff --git a/engine/SCons/Tool/default.py b/engine/SCons/Tool/default.py
index ddd5c34..552de36 100644
--- a/engine/SCons/Tool/default.py
+++ b/engine/SCons/Tool/default.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/default.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/default.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Tool
diff --git a/engine/SCons/Tool/dmd.py b/engine/SCons/Tool/dmd.py
index 2a48b95..fc83194 100644
--- a/engine/SCons/Tool/dmd.py
+++ b/engine/SCons/Tool/dmd.py
@@ -6,6 +6,9 @@ Tool-specific initialization for the Digital Mars D compiler.
Coded by Andy Friesen (andy@ikagames.com)
15 November 2003
+Amended by Russel Winder (russel@russel.org.uk)
+2010-02-07
+
There are a number of problems with this script at this point in time.
The one that irritates me the most is the Windows linker setup. The D
linker doesn't have a way to add lib paths on the commandline, as far
@@ -32,7 +35,7 @@ Lib tool variables:
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -54,7 +57,7 @@ Lib tool variables:
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/dmd.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/dmd.py 5357 2011/09/09 21:31:03 bdeegan"
import os
@@ -199,11 +202,25 @@ def generate(env):
libs = env['LIBS']
except KeyError:
libs = []
- if 'phobos' not in libs and 'gphobos' not in libs:
- if dc is 'dmd':
- env.Append(LIBS = ['phobos'])
- elif dc is 'gdmd':
- env.Append(LIBS = ['gphobos'])
+ if dc == 'dmd':
+ # TODO: This assumes that the dmd executable is in the
+ # bin directory and that the libraries are in a peer
+ # directory lib. This true of the Digital Mars
+ # distribution but . . .
+ import glob
+ dHome = env.WhereIs(dc).replace('/dmd' , '/..')
+ if glob.glob(dHome + '/lib/*phobos2*'):
+ if 'phobos2' not in libs:
+ env.Append(LIBPATH = [dHome + '/lib'])
+ env.Append(LIBS = ['phobos2'])
+ # TODO: Find out when there will be a
+ # 64-bit version of D.
+ env.Append(LINKFLAGS = ['-m32'])
+ else:
+ if 'phobos' not in libs:
+ env.Append(LIBS = ['phobos'])
+ elif dc is 'gdmd':
+ env.Append(LIBS = ['gphobos'])
if 'pthread' not in libs:
env.Append(LIBS = ['pthread'])
if 'm' not in libs:
diff --git a/engine/SCons/Tool/dvi.py b/engine/SCons/Tool/dvi.py
index 6fcb96d..204821b 100644
--- a/engine/SCons/Tool/dvi.py
+++ b/engine/SCons/Tool/dvi.py
@@ -5,7 +5,7 @@ Common DVI Builder definition for various other Tool modules that use it.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ Common DVI Builder definition for various other Tool modules that use it.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/dvi.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/dvi.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Builder
import SCons.Tool
diff --git a/engine/SCons/Tool/dvipdf.py b/engine/SCons/Tool/dvipdf.py
index fb5627e..0347d2c 100644
--- a/engine/SCons/Tool/dvipdf.py
+++ b/engine/SCons/Tool/dvipdf.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/dvipdf.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/dvipdf.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Action
import SCons.Defaults
@@ -115,6 +115,7 @@ def generate(env):
env['PDFCOM'] = ['$DVIPDFCOM']
def exists(env):
+ SCons.Tool.tex.generate_darwin(env)
return env.Detect('dvipdf')
# Local Variables:
diff --git a/engine/SCons/Tool/dvips.py b/engine/SCons/Tool/dvips.py
index de84053..02f8e49 100644
--- a/engine/SCons/Tool/dvips.py
+++ b/engine/SCons/Tool/dvips.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/dvips.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/dvips.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Action
import SCons.Builder
@@ -85,6 +85,7 @@ def generate(env):
env['PSSUFFIX'] = '.ps'
def exists(env):
+ SCons.Tool.tex.generate_darwin(env)
return env.Detect('dvips')
# Local Variables:
diff --git a/engine/SCons/Tool/f03.py b/engine/SCons/Tool/f03.py
new file mode 100644
index 0000000..896c03b
--- /dev/null
+++ b/engine/SCons/Tool/f03.py
@@ -0,0 +1,63 @@
+"""engine.SCons.Tool.f03
+
+Tool-specific initialization for the generic Posix f03 Fortran compiler.
+
+There normally shouldn't be any need to import this module directly.
+It will usually be imported through the generic SCons.Tool.Tool()
+selection method.
+
+"""
+
+#
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "src/engine/SCons/Tool/f03.py 5357 2011/09/09 21:31:03 bdeegan"
+
+import SCons.Defaults
+import SCons.Tool
+import SCons.Util
+import fortran
+from SCons.Tool.FortranCommon import add_all_to_env, add_f03_to_env
+
+compilers = ['f03']
+
+def generate(env):
+ add_all_to_env(env)
+ add_f03_to_env(env)
+
+ fcomp = env.Detect(compilers) or 'f03'
+ env['F03'] = fcomp
+ env['SHF03'] = fcomp
+
+ env['FORTRAN'] = fcomp
+ env['SHFORTRAN'] = fcomp
+
+
+def exists(env):
+ return env.Detect(compilers)
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/engine/SCons/Tool/f77.py b/engine/SCons/Tool/f77.py
index cc2c852..db538d8 100644
--- a/engine/SCons/Tool/f77.py
+++ b/engine/SCons/Tool/f77.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/f77.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/f77.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Defaults
import SCons.Scanner.Fortran
diff --git a/engine/SCons/Tool/f90.py b/engine/SCons/Tool/f90.py
index a2c6147..bb7e381 100644
--- a/engine/SCons/Tool/f90.py
+++ b/engine/SCons/Tool/f90.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/f90.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/f90.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Defaults
import SCons.Scanner.Fortran
diff --git a/engine/SCons/Tool/f95.py b/engine/SCons/Tool/f95.py
index cadf23e..06fcc78 100644
--- a/engine/SCons/Tool/f95.py
+++ b/engine/SCons/Tool/f95.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/f95.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/f95.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Defaults
import SCons.Tool
diff --git a/engine/SCons/Tool/filesystem.py b/engine/SCons/Tool/filesystem.py
index 290d8d5..a91aeb1 100644
--- a/engine/SCons/Tool/filesystem.py
+++ b/engine/SCons/Tool/filesystem.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/filesystem.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/filesystem.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons
from SCons.Tool.install import copyFunc
diff --git a/engine/SCons/Tool/fortran.py b/engine/SCons/Tool/fortran.py
index ae0960a..b955e7c 100644
--- a/engine/SCons/Tool/fortran.py
+++ b/engine/SCons/Tool/fortran.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/fortran.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/fortran.py 5357 2011/09/09 21:31:03 bdeegan"
import re
diff --git a/engine/SCons/Tool/g++.py b/engine/SCons/Tool/g++.py
index dcd2406..c2ded0f 100644
--- a/engine/SCons/Tool/g++.py
+++ b/engine/SCons/Tool/g++.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/g++.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/g++.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
import re
diff --git a/engine/SCons/Tool/g77.py b/engine/SCons/Tool/g77.py
index f5bea8b..9ff3df6 100644
--- a/engine/SCons/Tool/g77.py
+++ b/engine/SCons/Tool/g77.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/g77.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/g77.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Util
from SCons.Tool.FortranCommon import add_all_to_env, add_f77_to_env
diff --git a/engine/SCons/Tool/gas.py b/engine/SCons/Tool/gas.py
index 637a111..0a5ed9f 100644
--- a/engine/SCons/Tool/gas.py
+++ b/engine/SCons/Tool/gas.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/gas.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/gas.py 5357 2011/09/09 21:31:03 bdeegan"
as_module = __import__('as', globals(), locals(), [])
diff --git a/engine/SCons/Tool/gcc.py b/engine/SCons/Tool/gcc.py
index c93c05f..d8d18bc 100644
--- a/engine/SCons/Tool/gcc.py
+++ b/engine/SCons/Tool/gcc.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/gcc.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/gcc.py 5357 2011/09/09 21:31:03 bdeegan"
import cc
import os
diff --git a/engine/SCons/Tool/gfortran.py b/engine/SCons/Tool/gfortran.py
index ed522f4..143af4c 100644
--- a/engine/SCons/Tool/gfortran.py
+++ b/engine/SCons/Tool/gfortran.py
@@ -10,7 +10,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/gfortran.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/gfortran.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Util
@@ -43,7 +43,7 @@ def generate(env):
Environment."""
fortran.generate(env)
- for dialect in ['F77', 'F90', 'FORTRAN', 'F95']:
+ for dialect in ['F77', 'F90', 'FORTRAN', 'F95', 'F03']:
env['%s' % dialect] = 'gfortran'
env['SH%s' % dialect] = '$%s' % dialect
if env['PLATFORM'] in ['cygwin', 'win32']:
diff --git a/engine/SCons/Tool/gnulink.py b/engine/SCons/Tool/gnulink.py
index 1204535..a80611e 100644
--- a/engine/SCons/Tool/gnulink.py
+++ b/engine/SCons/Tool/gnulink.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/gnulink.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/gnulink.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Util
@@ -48,7 +48,6 @@ def generate(env):
# __RPATH is set to $_RPATH in the platform specification if that
# platform supports it.
- env.Append(LINKFLAGS=['$__RPATH'])
env['RPATHPREFIX'] = '-Wl,-rpath='
env['RPATHSUFFIX'] = ''
env['_RPATH'] = '${_concat(RPATHPREFIX, RPATH, RPATHSUFFIX, __env__)}'
diff --git a/engine/SCons/Tool/gs.py b/engine/SCons/Tool/gs.py
index ac0247f..fbcb782 100644
--- a/engine/SCons/Tool/gs.py
+++ b/engine/SCons/Tool/gs.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/gs.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/gs.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Action
import SCons.Platform
diff --git a/engine/SCons/Tool/hpc++.py b/engine/SCons/Tool/hpc++.py
index d34f600..d2bb579 100644
--- a/engine/SCons/Tool/hpc++.py
+++ b/engine/SCons/Tool/hpc++.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/hpc++.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/hpc++.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
diff --git a/engine/SCons/Tool/hpcc.py b/engine/SCons/Tool/hpcc.py
index 1503c57..38ae2f2 100644
--- a/engine/SCons/Tool/hpcc.py
+++ b/engine/SCons/Tool/hpcc.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/hpcc.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/hpcc.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Util
diff --git a/engine/SCons/Tool/hplink.py b/engine/SCons/Tool/hplink.py
index db5ff00..5ebe94d 100644
--- a/engine/SCons/Tool/hplink.py
+++ b/engine/SCons/Tool/hplink.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/hplink.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/hplink.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import os.path
diff --git a/engine/SCons/Tool/icc.py b/engine/SCons/Tool/icc.py
index 0accbf6..10111ec 100644
--- a/engine/SCons/Tool/icc.py
+++ b/engine/SCons/Tool/icc.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/icc.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/icc.py 5357 2011/09/09 21:31:03 bdeegan"
import cc
diff --git a/engine/SCons/Tool/icl.py b/engine/SCons/Tool/icl.py
index ded400d..1ef7d3a 100644
--- a/engine/SCons/Tool/icl.py
+++ b/engine/SCons/Tool/icl.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/icl.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/icl.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Tool.intelc
diff --git a/engine/SCons/Tool/ifl.py b/engine/SCons/Tool/ifl.py
index fabf864..dac5670 100644
--- a/engine/SCons/Tool/ifl.py
+++ b/engine/SCons/Tool/ifl.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/ifl.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/ifl.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Defaults
from SCons.Scanner.Fortran import FortranScan
diff --git a/engine/SCons/Tool/ifort.py b/engine/SCons/Tool/ifort.py
index 7d50c5a..c6768e9 100644
--- a/engine/SCons/Tool/ifort.py
+++ b/engine/SCons/Tool/ifort.py
@@ -10,7 +10,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/ifort.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/ifort.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Defaults
from SCons.Scanner.Fortran import FortranScan
diff --git a/engine/SCons/Tool/ilink.py b/engine/SCons/Tool/ilink.py
index 7a255a7..73d7622 100644
--- a/engine/SCons/Tool/ilink.py
+++ b/engine/SCons/Tool/ilink.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/ilink.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/ilink.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Defaults
import SCons.Tool
diff --git a/engine/SCons/Tool/ilink32.py b/engine/SCons/Tool/ilink32.py
index 1af9af1..ebdf435 100644
--- a/engine/SCons/Tool/ilink32.py
+++ b/engine/SCons/Tool/ilink32.py
@@ -5,7 +5,7 @@ XXX
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ XXX
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/ilink32.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/ilink32.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Tool
import SCons.Tool.bcc32
diff --git a/engine/SCons/Tool/install.py b/engine/SCons/Tool/install.py
index 9c04710..58e2dc7 100644
--- a/engine/SCons/Tool/install.py
+++ b/engine/SCons/Tool/install.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/install.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/install.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import shutil
@@ -44,6 +44,60 @@ from SCons.Util import make_path_relative
_INSTALLED_FILES = []
_UNIQUE_INSTALLED_FILES = None
+class CopytreeError(EnvironmentError):
+ pass
+
+# This is a patched version of shutil.copytree from python 2.5. It
+# doesn't fail if the dir exists, which regular copytree does
+# (annoyingly). Note the XXX comment in the docstring.
+def scons_copytree(src, dst, symlinks=False):
+ """Recursively copy a directory tree using copy2().
+
+ The destination directory must not already exist.
+ If exception(s) occur, an CopytreeError is raised with a list of reasons.
+
+ If the optional symlinks flag is true, symbolic links in the
+ source tree result in symbolic links in the destination tree; if
+ it is false, the contents of the files pointed to by symbolic
+ links are copied.
+
+ XXX Consider this example code rather than the ultimate tool.
+
+ """
+ names = os.listdir(src)
+ # garyo@genarts.com fix: check for dir before making dirs.
+ if not os.path.exists(dst):
+ os.makedirs(dst)
+ errors = []
+ for name in names:
+ srcname = os.path.join(src, name)
+ dstname = os.path.join(dst, name)
+ try:
+ if symlinks and os.path.islink(srcname):
+ linkto = os.readlink(srcname)
+ os.symlink(linkto, dstname)
+ elif os.path.isdir(srcname):
+ scons_copytree(srcname, dstname, symlinks)
+ else:
+ shutil.copy2(srcname, dstname)
+ # XXX What about devices, sockets etc.?
+ except (IOError, os.error), why:
+ errors.append((srcname, dstname, str(why)))
+ # catch the CopytreeError from the recursive copytree so that we can
+ # continue with other files
+ except CopytreeError, err:
+ errors.extend(err.args[0])
+ try:
+ shutil.copystat(src, dst)
+ except WindowsError:
+ # can't copy file access times on Windows
+ pass
+ except OSError, why:
+ errors.extend((src, dst, str(why)))
+ if errors:
+ raise CopytreeError, errors
+
+
#
# Functions doing the actual work of the Install Builder.
#
@@ -59,7 +113,7 @@ def copyFunc(dest, source, env):
parent = os.path.split(dest)[0]
if not os.path.exists(parent):
os.makedirs(parent)
- shutil.copytree(source, dest)
+ scons_copytree(source, dest)
else:
shutil.copy2(source, dest)
st = os.stat(source)
diff --git a/engine/SCons/Tool/intelc.py b/engine/SCons/Tool/intelc.py
index 08f97c0..552fada 100644
--- a/engine/SCons/Tool/intelc.py
+++ b/engine/SCons/Tool/intelc.py
@@ -10,7 +10,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from __future__ import division
-__revision__ = "src/engine/SCons/Tool/intelc.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/intelc.py 5357 2011/09/09 21:31:03 bdeegan"
import math, sys, os.path, glob, string, re
@@ -40,7 +40,7 @@ is_windows = sys.platform == 'win32'
is_win64 = is_windows and (os.environ['PROCESSOR_ARCHITECTURE'] == 'AMD64' or
('PROCESSOR_ARCHITEW6432' in os.environ and
os.environ['PROCESSOR_ARCHITEW6432'] == 'AMD64'))
-is_linux = sys.platform == 'linux2'
+is_linux = sys.platform.startswith('linux')
is_mac = sys.platform == 'darwin'
if is_windows:
@@ -230,17 +230,26 @@ def get_all_compiler_versions():
for d in glob.glob('/opt/intel/cc*/*'):
# Typical dir here is /opt/intel/cc/9.0 for IA32,
# /opt/intel/cce/9.0 for EMT64 (AMD64)
- m = re.search(r'([0-9.]+)$', d)
+ m = re.search(r'([0-9][0-9.]*)$', d)
+ if m:
+ versions.append(m.group(1))
+ for d in glob.glob('/opt/intel/Compiler/*'):
+ # Typical dir here is /opt/intel/Compiler/11.1
+ m = re.search(r'([0-9][0-9.]*)$', d)
if m:
versions.append(m.group(1))
elif is_mac:
for d in glob.glob('/opt/intel/cc*/*'):
# Typical dir here is /opt/intel/cc/9.0 for IA32,
# /opt/intel/cce/9.0 for EMT64 (AMD64)
- m = re.search(r'([0-9.]+)$', d)
+ m = re.search(r'([0-9][0-9.]*)$', d)
if m:
versions.append(m.group(1))
- return sorted(uniquify(versions)) # remove dups
+ def keyfunc(str):
+ """Given a dot-separated version string, return a tuple of ints representing it."""
+ return [int(x) for x in str.split('.')]
+ # split into ints, sort, then remove dups
+ return sorted(uniquify(versions), key=keyfunc, reverse=True)
def get_intel_compiler_top(version, abi):
"""
@@ -259,15 +268,33 @@ def get_intel_compiler_top(version, abi):
and not os.path.exists(os.path.join(top, "Bin", abi, "icl.exe")):
raise MissingDirError("Can't find Intel compiler in %s"%(top))
elif is_mac or is_linux:
- # first dir is new (>=9.0) style, second is old (8.0) style.
- dirs=('/opt/intel/cc/%s', '/opt/intel_cc_%s')
- if abi == 'x86_64':
- dirs=('/opt/intel/cce/%s',) # 'e' stands for 'em64t', aka x86_64 aka amd64
- top=None
- for d in dirs:
- if os.path.exists(os.path.join(d%version, "bin", "icc")):
- top = d%version
- break
+ def find_in_2008style_dir(version):
+ # first dir is new (>=9.0) style, second is old (8.0) style.
+ dirs=('/opt/intel/cc/%s', '/opt/intel_cc_%s')
+ if abi == 'x86_64':
+ dirs=('/opt/intel/cce/%s',) # 'e' stands for 'em64t', aka x86_64 aka amd64
+ top=None
+ for d in dirs:
+ if os.path.exists(os.path.join(d%version, "bin", "icc")):
+ top = d%version
+ break
+ return top
+ def find_in_2010style_dir(version):
+ dirs=('/opt/intel/Compiler/%s/*'%version)
+ # typically /opt/intel/Compiler/11.1/064 (then bin/intel64/icc)
+ dirs=glob.glob(dirs)
+ # find highest sub-version number by reverse sorting and picking first existing one.
+ dirs.sort()
+ dirs.reverse()
+ top=None
+ for d in dirs:
+ if (os.path.exists(os.path.join(d, "bin", "ia32", "icc")) or
+ os.path.exists(os.path.join(d, "bin", "intel64", "icc"))):
+ top = d
+ break
+ return top
+ top = find_in_2010style_dir(version) or find_in_2008style_dir(version)
+ print "INTELC: top=",top
if not top:
raise MissingDirError("Can't find version %s Intel compiler in %s (abi='%s')"%(version,top, abi))
return top
@@ -353,29 +380,42 @@ def generate(env, version=None, abi=None, topdir=None, verbose=0):
(str(version), str(abi)))
if topdir:
+ archdir={'x86_64': 'intel64',
+ 'amd64' : 'intel64',
+ 'em64t' : 'intel64',
+ 'x86' : 'ia32',
+ 'i386' : 'ia32',
+ 'ia32' : 'ia32'
+ }[abi] # for v11 and greater
+ if os.path.exists(os.path.join(topdir, 'bin', archdir)):
+ bindir="bin/%s"%archdir
+ libdir="lib/%s"%archdir
+ else:
+ bindir="bin"
+ libdir="lib"
if verbose:
- print "Intel C compiler: using version %s (%g), abi %s, in '%s'"%\
- (repr(version), linux_ver_normalize(version),abi,topdir)
+ print "Intel C compiler: using version %s (%g), abi %s, in '%s/%s'"%\
+ (repr(version), linux_ver_normalize(version),abi,topdir,bindir)
if is_linux:
# Show the actual compiler version by running the compiler.
- os.system('%s/bin/icc --version'%topdir)
+ os.system('%s/%s/icc --version'%(topdir,bindir))
if is_mac:
# Show the actual compiler version by running the compiler.
- os.system('%s/bin/icc --version'%topdir)
+ os.system('%s/%s/icc --version'%(topdir,bindir))
env['INTEL_C_COMPILER_TOP'] = topdir
if is_linux:
paths={'INCLUDE' : 'include',
- 'LIB' : 'lib',
- 'PATH' : 'bin',
- 'LD_LIBRARY_PATH' : 'lib'}
+ 'LIB' : libdir,
+ 'PATH' : bindir,
+ 'LD_LIBRARY_PATH' : libdir}
for p in paths.keys():
env.PrependENVPath(p, os.path.join(topdir, paths[p]))
if is_mac:
paths={'INCLUDE' : 'include',
- 'LIB' : 'lib',
- 'PATH' : 'bin',
- 'LD_LIBRARY_PATH' : 'lib'}
+ 'LIB' : libdir,
+ 'PATH' : bindir,
+ 'LD_LIBRARY_PATH' : libdir}
for p in paths.keys():
env.PrependENVPath(p, os.path.join(topdir, paths[p]))
if is_windows:
diff --git a/engine/SCons/Tool/ipkg.py b/engine/SCons/Tool/ipkg.py
index 7558bd2..2ad08ab 100644
--- a/engine/SCons/Tool/ipkg.py
+++ b/engine/SCons/Tool/ipkg.py
@@ -11,7 +11,7 @@ packages fake_root.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -33,7 +33,7 @@ packages fake_root.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/ipkg.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/ipkg.py 5357 2011/09/09 21:31:03 bdeegan"
import os
diff --git a/engine/SCons/Tool/jar.py b/engine/SCons/Tool/jar.py
index 21c5ce4..6ebd762 100644
--- a/engine/SCons/Tool/jar.py
+++ b/engine/SCons/Tool/jar.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/jar.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/jar.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Subst
import SCons.Util
@@ -101,7 +101,13 @@ def generate(env):
env['JARSUFFIX'] = '.jar'
def exists(env):
- return env.Detect('jar')
+ # As reported by Jan Nijtmans in issue #2730, the simple
+ # return env.Detect('jar')
+ # doesn't always work during initialization. For now, we
+ # stop trying to detect an executable (analogous to the
+ # javac Builder).
+ # TODO: Come up with a proper detect() routine...and enable it.
+ return 1
# Local Variables:
# tab-width:4
diff --git a/engine/SCons/Tool/javac.py b/engine/SCons/Tool/javac.py
index df3c030..5a43b25 100644
--- a/engine/SCons/Tool/javac.py
+++ b/engine/SCons/Tool/javac.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/javac.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/javac.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import os.path
diff --git a/engine/SCons/Tool/javah.py b/engine/SCons/Tool/javah.py
index a022884..ccdfb3c 100644
--- a/engine/SCons/Tool/javah.py
+++ b/engine/SCons/Tool/javah.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/javah.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/javah.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
diff --git a/engine/SCons/Tool/latex.py b/engine/SCons/Tool/latex.py
index 65ff78a..b746ad1 100644
--- a/engine/SCons/Tool/latex.py
+++ b/engine/SCons/Tool/latex.py
@@ -10,7 +10,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/latex.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/latex.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Action
import SCons.Defaults
@@ -70,6 +70,7 @@ def generate(env):
SCons.Tool.tex.generate_common(env)
def exists(env):
+ SCons.Tool.tex.generate_darwin(env)
return env.Detect('latex')
# Local Variables:
diff --git a/engine/SCons/Tool/lex.py b/engine/SCons/Tool/lex.py
index 9344173..25f7c3b 100644
--- a/engine/SCons/Tool/lex.py
+++ b/engine/SCons/Tool/lex.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/lex.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/lex.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
diff --git a/engine/SCons/Tool/link.py b/engine/SCons/Tool/link.py
index 0210d7e..067099a 100644
--- a/engine/SCons/Tool/link.py
+++ b/engine/SCons/Tool/link.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/link.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/link.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Defaults
import SCons.Tool
@@ -75,14 +75,15 @@ def generate(env):
env['SHLINK'] = '$LINK'
env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -shared')
- env['SHLINKCOM'] = '$SHLINK -o $TARGET $SHLINKFLAGS $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
+ env['SHLINKCOM'] = '$SHLINK -o $TARGET $SHLINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
# don't set up the emitter, cause AppendUnique will generate a list
# starting with None :-(
env.Append(SHLIBEMITTER = [shlib_emitter])
env['SMARTLINK'] = smart_link
env['LINK'] = "$SMARTLINK"
env['LINKFLAGS'] = SCons.Util.CLVar('')
- env['LINKCOM'] = '$LINK -o $TARGET $LINKFLAGS $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
+ # __RPATH is only set to something ($_RPATH typically) on platforms that support it.
+ env['LINKCOM'] = '$LINK -o $TARGET $LINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
env['LIBDIRPREFIX']='-L'
env['LIBDIRSUFFIX']=''
env['_LIBFLAGS']='${_stripixes(LIBLINKPREFIX, LIBS, LIBLINKSUFFIX, LIBPREFIXES, LIBSUFFIXES, __env__)}'
@@ -105,7 +106,7 @@ def generate(env):
env['LDMODULEPREFIX'] = '$SHLIBPREFIX'
env['LDMODULESUFFIX'] = '$SHLIBSUFFIX'
env['LDMODULEFLAGS'] = '$SHLINKFLAGS'
- env['LDMODULECOM'] = '$LDMODULE -o $TARGET $LDMODULEFLAGS $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
+ env['LDMODULECOM'] = '$LDMODULE -o $TARGET $LDMODULEFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
diff --git a/engine/SCons/Tool/linkloc.py b/engine/SCons/Tool/linkloc.py
index 283eacb..d520100 100644
--- a/engine/SCons/Tool/linkloc.py
+++ b/engine/SCons/Tool/linkloc.py
@@ -10,7 +10,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/linkloc.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/linkloc.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
import re
diff --git a/engine/SCons/Tool/m4.py b/engine/SCons/Tool/m4.py
index ac59e48..8d997a4 100644
--- a/engine/SCons/Tool/m4.py
+++ b/engine/SCons/Tool/m4.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/m4.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/m4.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Action
import SCons.Builder
diff --git a/engine/SCons/Tool/masm.py b/engine/SCons/Tool/masm.py
index 2d02440..bbed9bb 100644
--- a/engine/SCons/Tool/masm.py
+++ b/engine/SCons/Tool/masm.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/masm.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/masm.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Defaults
import SCons.Tool
diff --git a/engine/SCons/Tool/midl.py b/engine/SCons/Tool/midl.py
index 65a4f12..5381df3 100644
--- a/engine/SCons/Tool/midl.py
+++ b/engine/SCons/Tool/midl.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/midl.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/midl.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Action
import SCons.Builder
diff --git a/engine/SCons/Tool/mingw.py b/engine/SCons/Tool/mingw.py
index 4344bc1..1df68bc 100644
--- a/engine/SCons/Tool/mingw.py
+++ b/engine/SCons/Tool/mingw.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/mingw.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/mingw.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import os.path
@@ -46,8 +46,22 @@ import SCons.Util
key_program = 'mingw32-gcc'
def find(env):
- # First search in the SCons path and then the OS path:
- return env.WhereIs(key_program) or SCons.Util.WhereIs(key_program)
+ # First search in the SCons path
+ path=env.WhereIs(key_program)
+ if (path):
+ return path
+ # then the OS path:
+ path=SCons.Util.WhereIs(key_program)
+ if (path):
+ return path
+
+ # If that doesn't work try default location for mingw
+ save_path=env['ENV']['PATH']
+ env.AppendENVPath('PATH',r'c:\MinGW\bin')
+ path =env.WhereIs(key_program)
+ if not path:
+ env['ENV']['PATH']=save_path
+ return path
def shlib_generator(target, source, env, for_signature):
cmd = SCons.Util.CLVar(['$SHLINK', '$SHLINKFLAGS'])
@@ -77,10 +91,13 @@ def shlib_emitter(target, source, env):
if not no_import_lib and \
not env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX'):
- # Append an import library to the list of targets.
- target.append(env.ReplaceIxes(dll,
+ # Create list of target libraries as strings
+ targetStrings=env.ReplaceIxes(dll,
'SHLIBPREFIX', 'SHLIBSUFFIX',
- 'LIBPREFIX', 'LIBSUFFIX'))
+ 'LIBPREFIX', 'LIBSUFFIX')
+
+ # Now add file nodes to target list
+ target.append(env.fs.File(targetStrings))
# Append a def file target if there isn't already a def file target
# or a def file source. There is no option to disable def file
@@ -89,10 +106,14 @@ def shlib_emitter(target, source, env):
def_source = env.FindIxes(source, 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX')
def_target = env.FindIxes(target, 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX')
if not def_source and not def_target:
- target.append(env.ReplaceIxes(dll,
+ # Create list of target libraries and def files as strings
+ targetStrings=env.ReplaceIxes(dll,
'SHLIBPREFIX', 'SHLIBSUFFIX',
- 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX'))
-
+ 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX')
+
+ # Now add file nodes to target list
+ target.append(env.fs.File(targetStrings))
+
return (target, source)
diff --git a/engine/SCons/Tool/mslib.py b/engine/SCons/Tool/mslib.py
index d3ed3dc..cbd1cd7 100644
--- a/engine/SCons/Tool/mslib.py
+++ b/engine/SCons/Tool/mslib.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/mslib.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/mslib.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Defaults
import SCons.Tool
diff --git a/engine/SCons/Tool/mslink.py b/engine/SCons/Tool/mslink.py
index 1d1bc08..ac533c8 100644
--- a/engine/SCons/Tool/mslink.py
+++ b/engine/SCons/Tool/mslink.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/mslink.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/mslink.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
@@ -116,8 +116,9 @@ def _dllEmitter(target, source, env, paramtp):
"WINDOWSDEFPREFIX", "WINDOWSDEFSUFFIX"))
version_num, suite = SCons.Tool.msvs.msvs_parse_version(env.get('MSVS_VERSION', '6.0'))
- if version_num >= 8.0 and env.get('WINDOWS_INSERT_MANIFEST', 0):
- # MSVC 8 automatically generates .manifest files that must be installed
+ if version_num >= 8.0 and \
+ (env.get('WINDOWS_INSERT_MANIFEST', 0) or env.get('WINDOWS_EMBED_MANIFEST', 0)):
+ # MSVC 8 and above automatically generate .manifest files that must be installed
extratargets.append(
env.ReplaceIxes(dll,
'%sPREFIX' % paramtp, '%sSUFFIX' % paramtp,
@@ -164,8 +165,9 @@ def prog_emitter(target, source, env):
raise SCons.Errors.UserError("An executable should have exactly one target with the suffix: %s" % env.subst("$PROGSUFFIX"))
version_num, suite = SCons.Tool.msvs.msvs_parse_version(env.get('MSVS_VERSION', '6.0'))
- if version_num >= 8.0 and env.get('WINDOWS_INSERT_MANIFEST', 0):
- # MSVC 8 automatically generates .manifest files that have to be installed
+ if version_num >= 8.0 and \
+ (env.get('WINDOWS_INSERT_MANIFEST', 0) or env.get('WINDOWS_EMBED_MANIFEST', 0)):
+ # MSVC 8 and above automatically generate .manifest files that have to be installed
extratargets.append(
env.ReplaceIxes(exe,
"PROGPREFIX", "PROGSUFFIX",
@@ -188,12 +190,50 @@ def RegServerFunc(target, source, env):
return ret
return 0
+# These are the actual actions run to embed the manifest.
+# They are only called from the Check versions below.
+embedManifestExeAction = SCons.Action.Action('$MTEXECOM')
+embedManifestDllAction = SCons.Action.Action('$MTSHLIBCOM')
+
+def embedManifestDllCheck(target, source, env):
+ """Function run by embedManifestDllCheckAction to check for existence of manifest
+ and other conditions, and embed the manifest by calling embedManifestDllAction if so."""
+ if env.get('WINDOWS_EMBED_MANIFEST', 0):
+ manifestSrc = target[0].abspath + '.manifest'
+ if os.path.exists(manifestSrc):
+ ret = (embedManifestDllAction) ([target[0]],None,env)
+ if ret:
+ raise SCons.Errors.UserError, "Unable to embed manifest into %s" % (target[0])
+ return ret
+ else:
+ print '(embed: no %s.manifest found; not embedding.)'%str(target[0])
+ return 0
+
+def embedManifestExeCheck(target, source, env):
+ """Function run by embedManifestExeCheckAction to check for existence of manifest
+ and other conditions, and embed the manifest by calling embedManifestExeAction if so."""
+ if env.get('WINDOWS_EMBED_MANIFEST', 0):
+ manifestSrc = target[0].abspath + '.manifest'
+ if os.path.exists(manifestSrc):
+ ret = (embedManifestExeAction) ([target[0]],None,env)
+ if ret:
+ raise SCons.Errors.UserError, "Unable to embed manifest into %s" % (target[0])
+ return ret
+ else:
+ print '(embed: no %s.manifest found; not embedding.)'%str(target[0])
+ return 0
+
+embedManifestDllCheckAction = SCons.Action.Action(embedManifestDllCheck, None)
+embedManifestExeCheckAction = SCons.Action.Action(embedManifestExeCheck, None)
+
regServerAction = SCons.Action.Action("$REGSVRCOM", "$REGSVRCOMSTR")
regServerCheck = SCons.Action.Action(RegServerFunc, None)
shlibLinkAction = SCons.Action.Action('${TEMPFILE("$SHLINK $SHLINKFLAGS $_SHLINK_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_SHLINK_SOURCES")}')
-compositeShLinkAction = shlibLinkAction + regServerCheck
+compositeShLinkAction = shlibLinkAction + regServerCheck + embedManifestDllCheckAction
ldmodLinkAction = SCons.Action.Action('${TEMPFILE("$LDMODULE $LDMODULEFLAGS $_LDMODULE_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_LDMODULE_SOURCES")}')
-compositeLdmodAction = ldmodLinkAction + regServerCheck
+compositeLdmodAction = ldmodLinkAction + regServerCheck + embedManifestDllCheckAction
+exeLinkAction = SCons.Action.Action('${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET.windows $_LIBDIRFLAGS $_LIBFLAGS $_PDB $SOURCES.windows")}')
+compositeLinkAction = exeLinkAction + embedManifestExeCheckAction
def generate(env):
"""Add Builders and construction variables for ar to an Environment."""
@@ -209,7 +249,7 @@ def generate(env):
env['LINK'] = 'link'
env['LINKFLAGS'] = SCons.Util.CLVar('/nologo')
env['_PDB'] = pdbGenerator
- env['LINKCOM'] = '${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET.windows $_LIBDIRFLAGS $_LIBFLAGS $_PDB $SOURCES.windows")}'
+ env['LINKCOM'] = compositeLinkAction
env.Append(PROGEMITTER = [prog_emitter])
env['LIBDIRPREFIX']='/LIBPATH:'
env['LIBDIRSUFFIX']=''
@@ -238,6 +278,18 @@ def generate(env):
env['REGSVRFLAGS'] = '/s '
env['REGSVRCOM'] = '$REGSVR $REGSVRFLAGS ${TARGET.windows}'
+ env['WINDOWS_EMBED_MANIFEST'] = 0
+ env['MT'] = 'mt'
+ #env['MTFLAGS'] = ['-hashupdate']
+ env['MTFLAGS'] = SCons.Util.CLVar('/nologo')
+ # Note: use - here to prevent build failure if no manifest produced.
+ # This seems much simpler than a fancy system using a function action to see
+ # if the manifest actually exists before trying to run mt with it.
+ env['MTEXECOM'] = '-$MT $MTFLAGS -manifest ${TARGET}.manifest $_MANIFEST_SOURCES -outputresource:$TARGET;1'
+ env['MTSHLIBCOM'] = '-$MT $MTFLAGS -manifest ${TARGET}.manifest $_MANIFEST_SOURCES -outputresource:$TARGET;2'
+ # Future work garyo 27-Feb-11
+ env['_MANIFEST_SOURCES'] = None # _windowsManifestSources
+
# Set-up ms tools paths
msvc_setup_env_once(env)
diff --git a/engine/SCons/Tool/mssdk.py b/engine/SCons/Tool/mssdk.py
index 6b89873..500b792 100644
--- a/engine/SCons/Tool/mssdk.py
+++ b/engine/SCons/Tool/mssdk.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/mssdk.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/mssdk.py 5357 2011/09/09 21:31:03 bdeegan"
"""engine.SCons.Tool.mssdk
diff --git a/engine/SCons/Tool/msvc.py b/engine/SCons/Tool/msvc.py
index 66c3e10..e8e20a6 100644
--- a/engine/SCons/Tool/msvc.py
+++ b/engine/SCons/Tool/msvc.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/msvc.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/msvc.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
import re
@@ -140,8 +140,13 @@ def msvc_batch_key(action, env, target, source):
Returning None specifies that the specified target+source should not
be batched with other compilations.
"""
- b = env.subst('$MSVC_BATCH')
- if b in (None, '', '0'):
+
+ # Fixing MSVC_BATCH mode. Previous if did not work when MSVC_BATCH
+ # was set to False. This new version should work better.
+ # Note we need to do the env.subst so $MSVC_BATCH can be a reference to
+ # another construction variable, which is why we test for False and 0
+ # as strings.
+ if not 'MSVC_BATCH' in env or env.subst('$MSVC_BATCH') in ('0', 'False', '', None):
# We're not using batching; return no key.
return None
t = target[0]
@@ -161,8 +166,13 @@ def msvc_output_flag(target, source, env, for_signature):
we return an /Fo string that just specifies the first target's
directory (where the Visual C/C++ compiler will put the .obj files).
"""
- b = env.subst('$MSVC_BATCH')
- if b in (None, '', '0') or len(source) == 1:
+
+ # Fixing MSVC_BATCH mode. Previous if did not work when MSVC_BATCH
+ # was set to False. This new version should work better. Removed
+ # len(source)==1 as batch mode can compile only one file
+ # (and it also fixed problem with compiling only one changed file
+ # with batch mode enabled)
+ if not 'MSVC_BATCH' in env or env.subst('$MSVC_BATCH') in ('0', 'False', '', None):
return '/Fo$TARGET'
else:
# The Visual C/C++ compiler requires a \ at the end of the /Fo
@@ -208,23 +218,23 @@ def generate(env):
shared_obj.add_emitter(suffix, shared_object_emitter)
env['CCPDBFLAGS'] = SCons.Util.CLVar(['${(PDB and "/Z7") or ""}'])
- env['CCPCHFLAGS'] = SCons.Util.CLVar(['${(PCH and "/Yu%s /Fp%s"%(PCHSTOP or "",File(PCH))) or ""}'])
+ env['CCPCHFLAGS'] = SCons.Util.CLVar(['${(PCH and "/Yu%s \\\"/Fp%s\\\""%(PCHSTOP or "",File(PCH))) or ""}'])
env['_MSVC_OUTPUT_FLAG'] = msvc_output_flag
env['_CCCOMCOM'] = '$CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS $CCPCHFLAGS $CCPDBFLAGS'
env['CC'] = 'cl'
env['CCFLAGS'] = SCons.Util.CLVar('/nologo')
env['CFLAGS'] = SCons.Util.CLVar('')
- env['CCCOM'] = '$CC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CFLAGS $CCFLAGS $_CCCOMCOM'
+ env['CCCOM'] = '${TEMPFILE("$CC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CFLAGS $CCFLAGS $_CCCOMCOM")}'
env['SHCC'] = '$CC'
env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS')
env['SHCFLAGS'] = SCons.Util.CLVar('$CFLAGS')
- env['SHCCCOM'] = '$SHCC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCFLAGS $SHCCFLAGS $_CCCOMCOM'
+ env['SHCCCOM'] = '${TEMPFILE("$SHCC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCFLAGS $SHCCFLAGS $_CCCOMCOM")}'
env['CXX'] = '$CC'
env['CXXFLAGS'] = SCons.Util.CLVar('$( /TP $)')
- env['CXXCOM'] = '$CXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CXXFLAGS $CCFLAGS $_CCCOMCOM'
+ env['CXXCOM'] = '${TEMPFILE("$CXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CXXFLAGS $CCFLAGS $_CCCOMCOM")}'
env['SHCXX'] = '$CXX'
env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS')
- env['SHCXXCOM'] = '$SHCXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM'
+ env['SHCXXCOM'] = '${TEMPFILE("$SHCXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM")}'
env['CPPDEFPREFIX'] = '/D'
env['CPPDEFSUFFIX'] = ''
env['INCPREFIX'] = '/I'
diff --git a/engine/SCons/Tool/msvs.py b/engine/SCons/Tool/msvs.py
index e6f07e5..c9b7970 100644
--- a/engine/SCons/Tool/msvs.py
+++ b/engine/SCons/Tool/msvs.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/msvs.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/msvs.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
@@ -47,6 +47,7 @@ import SCons.Builder
import SCons.Node.FS
import SCons.Platform.win32
import SCons.Script.SConscript
+import SCons.PathList
import SCons.Util
import SCons.Warnings
@@ -64,6 +65,12 @@ def xmlify(s):
s = s.replace('"', "&quot;")
return s
+# Process a CPPPATH list in includes, given the env, target and source.
+# Returns a tuple of nodes.
+def processIncludes(includes, env, target, source):
+ return SCons.PathList.PathList(includes).subst_path(env, target, source)
+
+
external_makefile_guid = '{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}'
def _generateGUID(slnfile, name):
@@ -92,6 +99,42 @@ def msvs_parse_version(s):
num, suite = version_re.match(s).groups()
return float(num), suite
+# os.path.relpath has been introduced in Python 2.6
+# We define it locally for earlier versions of Python
+def relpath(path, start=os.path.curdir):
+ """Return a relative version of a path"""
+ import sys
+ if not path:
+ raise ValueError("no path specified")
+ start_list = os.path.abspath(start).split(os.sep)
+ path_list = os.path.abspath(path).split(os.sep)
+ if 'posix' in sys.builtin_module_names:
+ # Work out how much of the filepath is shared by start and path.
+ i = len(os.path.commonprefix([start_list, path_list]))
+ else:
+ if start_list[0].lower() != path_list[0].lower():
+ unc_path, rest = os.path.splitunc(path)
+ unc_start, rest = os.path.splitunc(start)
+ if bool(unc_path) ^ bool(unc_start):
+ raise ValueError("Cannot mix UNC and non-UNC paths (%s and %s)"
+ % (path, start))
+ else:
+ raise ValueError("path is on drive %s, start on drive %s"
+ % (path_list[0], start_list[0]))
+ # Work out how much of the filepath is shared by start and path.
+ for i in range(min(len(start_list), len(path_list))):
+ if start_list[i].lower() != path_list[i].lower():
+ break
+ else:
+ i += 1
+ rel_list = [os.pardir] * (len(start_list)-i) + path_list[i:]
+ if not rel_list:
+ return os.path.curdir
+ return os.path.join(*rel_list)
+
+if not "relpath" in os.path.__all__:
+ os.path.relpath = relpath
+
# This is how we re-invoke SCons from inside MSVS Project files.
# The problem is that we might have been invoked as either scons.bat
# or scons.py. If we were invoked directly as scons.py, then we could
@@ -516,11 +559,12 @@ class _GenerateV6DSP(_DSPGenerator):
self.file.close()
V7DSPHeader = """\
-<?xml version="1.0" encoding = "%(encoding)s"?>
+<?xml version="1.0" encoding="%(encoding)s"?>
<VisualStudioProject
\tProjectType="Visual C++"
\tVersion="%(versionstr)s"
\tName="%(name)s"
+\tProjectGUID="%(project_guid)s"
%(scc_attrs)s
\tKeyword="MakeFileProj">
"""
@@ -536,8 +580,8 @@ V7DSPConfiguration = """\
\t\t\t<Tool
\t\t\t\tName="VCNMakeTool"
\t\t\t\tBuildCommandLine="%(buildcmd)s"
+\t\t\t\tReBuildCommandLine="%(rebuildcmd)s"
\t\t\t\tCleanCommandLine="%(cleancmd)s"
-\t\t\t\tRebuildCommandLine="%(rebuildcmd)s"
\t\t\t\tOutput="%(runfile)s"/>
\t\t</Configuration>
"""
@@ -548,8 +592,9 @@ V8DSPHeader = """\
\tProjectType="Visual C++"
\tVersion="%(versionstr)s"
\tName="%(name)s"
-%(scc_attrs)s
+\tProjectGUID="%(project_guid)s"
\tRootNamespace="%(name)s"
+%(scc_attrs)s
\tKeyword="MakeFileProj">
"""
@@ -582,7 +627,11 @@ class _GenerateV7DSP(_DSPGenerator):
_DSPGenerator.__init__(self, dspfile, source, env)
self.version = env['MSVS_VERSION']
self.version_num, self.suite = msvs_parse_version(self.version)
- if self.version_num >= 8.0:
+ if self.version_num >= 9.0:
+ self.versionstr = '9.00'
+ self.dspheader = V8DSPHeader
+ self.dspconfiguration = V8DSPConfiguration
+ elif self.version_num >= 8.0:
self.versionstr = '8.00'
self.dspheader = V8DSPHeader
self.dspconfiguration = V8DSPConfiguration
@@ -603,20 +652,27 @@ class _GenerateV7DSP(_DSPGenerator):
scc_provider = env.get('MSVS_SCC_PROVIDER', '')
scc_project_name = env.get('MSVS_SCC_PROJECT_NAME', '')
scc_aux_path = env.get('MSVS_SCC_AUX_PATH', '')
- scc_local_path = env.get('MSVS_SCC_LOCAL_PATH', '')
+ # MSVS_SCC_LOCAL_PATH is kept for backwards compatibility purpose and should
+ # be deprecated as soon as possible.
+ scc_local_path_legacy = env.get('MSVS_SCC_LOCAL_PATH', '')
+ scc_connection_root = env.get('MSVS_SCC_CONNECTION_ROOT', os.curdir)
+ scc_local_path = os.path.relpath(scc_connection_root, os.path.dirname(self.dspabs))
project_guid = env.get('MSVS_PROJECT_GUID', '')
- if self.version_num >= 8.0 and not project_guid:
+ if not project_guid:
project_guid = _generateGUID(self.dspfile, '')
if scc_provider != '':
- scc_attrs = ('\tProjectGUID="%s"\n'
- '\tSccProjectName="%s"\n'
- '\tSccAuxPath="%s"\n'
- '\tSccLocalPath="%s"\n'
- '\tSccProvider="%s"' % (project_guid, scc_project_name, scc_aux_path, scc_local_path, scc_provider))
+ scc_attrs = '\tSccProjectName="%s"\n' % scc_project_name
+ if scc_aux_path != '':
+ scc_attrs += '\tSccAuxPath="%s"\n' % scc_aux_path
+ scc_attrs += ('\tSccLocalPath="%s"\n'
+ '\tSccProvider="%s"' % (scc_local_path, scc_provider))
+ elif scc_local_path_legacy != '':
+ # This case is kept for backwards compatibility purpose and should
+ # be deprecated as soon as possible.
+ scc_attrs = ('\tSccProjectName="%s"\n'
+ '\tSccLocalPath="%s"' % (scc_project_name, scc_local_path_legacy))
else:
- scc_attrs = ('\tProjectGUID="%s"\n'
- '\tSccProjectName="%s"\n'
- '\tSccLocalPath="%s"' % (project_guid, scc_project_name, scc_local_path))
+ self.dspheader = self.dspheader.replace('%(scc_attrs)s\n', '')
self.file.write(self.dspheader % locals())
@@ -656,9 +712,13 @@ class _GenerateV7DSP(_DSPGenerator):
rebuildcmd = xmlify(starting + self.env.subst('$MSVSREBUILDCOM', 1) + cmdargs)
cleancmd = xmlify(starting + self.env.subst('$MSVSCLEANCOM', 1) + cmdargs)
+ # This isn't perfect; CPPDEFINES and CPPPATH can contain $TARGET and $SOURCE,
+ # so they could vary depending on the command being generated. This code
+ # assumes they don't.
preprocdefs = xmlify(';'.join(processDefines(self.env.get('CPPDEFINES', []))))
- includepath = xmlify(';'.join(self.env.get('CPPPATH', [])))
-
+ includepath_Dirs = processIncludes(self.env.get('CPPPATH', []), self.env, None, None)
+ includepath = xmlify(';'.join([str(x) for x in includepath_Dirs]))
+
if not env_has_buildtarget:
del self.env['MSVSBUILDTARGET']
@@ -811,11 +871,322 @@ class _GenerateV7DSP(_DSPGenerator):
self.PrintHeader()
self.PrintProject()
self.file.close()
+
+V10DSPHeader = """\
+<?xml version="1.0" encoding="%(encoding)s"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+"""
+
+V10DSPProjectConfiguration = """\
+\t\t<ProjectConfiguration Include="%(variant)s|%(platform)s">
+\t\t\t<Configuration>%(variant)s</Configuration>
+\t\t\t<Platform>%(platform)s</Platform>
+\t\t</ProjectConfiguration>
+"""
+
+V10DSPGlobals = """\
+\t<PropertyGroup Label="Globals">
+\t\t<ProjectGuid>%(project_guid)s</ProjectGuid>
+%(scc_attrs)s\t\t<RootNamespace>%(name)s</RootNamespace>
+\t\t<Keyword>MakeFileProj</Keyword>
+\t</PropertyGroup>
+"""
+
+V10DSPPropertyGroupCondition = """\
+\t<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'" Label="Configuration">
+\t\t<ConfigurationType>Makefile</ConfigurationType>
+\t\t<UseOfMfc>false</UseOfMfc>
+\t</PropertyGroup>
+"""
+
+V10DSPImportGroupCondition = """\
+\t<ImportGroup Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'" Label="PropertySheets">
+\t\t<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+\t</ImportGroup>
+"""
+
+V10DSPCommandLine = """\
+\t\t<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">%(buildcmd)s</NMakeBuildCommandLine>
+\t\t<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">%(rebuildcmd)s</NMakeReBuildCommandLine>
+\t\t<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">%(cleancmd)s</NMakeCleanCommandLine>
+\t\t<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">%(runfile)s</NMakeOutput>
+\t\t<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">%(preprocdefs)s</NMakePreprocessorDefinitions>
+\t\t<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">%(includepath)s</NMakeIncludeSearchPath>
+\t\t<NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
+\t\t<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
+\t\t<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
+"""
+
+class _GenerateV10DSP(_DSPGenerator):
+ """Generates a Project file for MSVS 2010"""
+
+ def __init__(self, dspfile, source, env):
+ _DSPGenerator.__init__(self, dspfile, source, env)
+
+ self.dspheader = V10DSPHeader
+ self.dspconfiguration = V10DSPProjectConfiguration
+ self.dspglobals = V10DSPGlobals
+
+ def PrintHeader(self):
+ env = self.env
+ name = self.name
+ encoding = env.subst('$MSVSENCODING')
+ project_guid = env.get('MSVS_PROJECT_GUID', '')
+ scc_provider = env.get('MSVS_SCC_PROVIDER', '')
+ scc_project_name = env.get('MSVS_SCC_PROJECT_NAME', '')
+ scc_aux_path = env.get('MSVS_SCC_AUX_PATH', '')
+ # MSVS_SCC_LOCAL_PATH is kept for backwards compatibility purpose and should
+ # be deprecated as soon as possible.
+ scc_local_path_legacy = env.get('MSVS_SCC_LOCAL_PATH', '')
+ scc_connection_root = env.get('MSVS_SCC_CONNECTION_ROOT', os.curdir)
+ scc_local_path = os.path.relpath(scc_connection_root, os.path.dirname(self.dspabs))
+ if not project_guid:
+ project_guid = _generateGUID(self.dspfile, '')
+ if scc_provider != '':
+ scc_attrs = '\t\t<SccProjectName>%s</SccProjectName>\n' % scc_project_name
+ if scc_aux_path != '':
+ scc_attrs += '\t\t<SccAuxPath>%s</SccAuxPath>\n' % scc_aux_path
+ scc_attrs += ('\t\t<SccLocalPath>%s</SccLocalPath>\n'
+ '\t\t<SccProvider>%s</SccProvider>\n' % (scc_local_path, scc_provider))
+ elif scc_local_path_legacy != '':
+ # This case is kept for backwards compatibility purpose and should
+ # be deprecated as soon as possible.
+ scc_attrs = ('\t\t<SccProjectName>%s</SccProjectName>\n'
+ '\t\t<SccLocalPath>%s</SccLocalPath>\n' % (scc_project_name, scc_local_path_legacy))
+ else:
+ self.dspglobals = self.dspglobals.replace('%(scc_attrs)s', '')
+
+ self.file.write(self.dspheader % locals())
+
+ self.file.write('\t<ItemGroup Label="ProjectConfigurations">\n')
+
+ confkeys = sorted(self.configs.keys())
+ for kind in confkeys:
+ variant = self.configs[kind].variant
+ platform = self.configs[kind].platform
+ self.file.write(self.dspconfiguration % locals())
+
+ self.file.write('\t</ItemGroup>\n')
+
+ self.file.write(self.dspglobals % locals())
+
+ def PrintProject(self):
+ name = self.name
+ confkeys = sorted(self.configs.keys())
+
+ self.file.write('\t<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\n')
+
+ for kind in confkeys:
+ variant = self.configs[kind].variant
+ platform = self.configs[kind].platform
+ self.file.write(V10DSPPropertyGroupCondition % locals())
+
+ self.file.write('\t<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\n')
+ self.file.write('\t<ImportGroup Label="ExtensionSettings">\n')
+ self.file.write('\t</ImportGroup>\n')
+
+ for kind in confkeys:
+ variant = self.configs[kind].variant
+ platform = self.configs[kind].platform
+ self.file.write(V10DSPImportGroupCondition % locals())
+
+ self.file.write('\t<PropertyGroup Label="UserMacros" />\n')
+ self.file.write('\t<PropertyGroup>\n')
+ self.file.write('\t<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\n')
+
+ for kind in confkeys:
+ variant = self.configs[kind].variant
+ platform = self.configs[kind].platform
+ outdir = self.configs[kind].outdir
+ buildtarget = self.configs[kind].buildtarget
+ runfile = self.configs[kind].runfile
+ cmdargs = self.configs[kind].cmdargs
+
+ env_has_buildtarget = 'MSVSBUILDTARGET' in self.env
+ if not env_has_buildtarget:
+ self.env['MSVSBUILDTARGET'] = buildtarget
+
+ starting = 'echo Starting SCons && '
+ if cmdargs:
+ cmdargs = ' ' + cmdargs
+ else:
+ cmdargs = ''
+ buildcmd = xmlify(starting + self.env.subst('$MSVSBUILDCOM', 1) + cmdargs)
+ rebuildcmd = xmlify(starting + self.env.subst('$MSVSREBUILDCOM', 1) + cmdargs)
+ cleancmd = xmlify(starting + self.env.subst('$MSVSCLEANCOM', 1) + cmdargs)
+
+ # This isn't perfect; CPPDEFINES and CPPPATH can contain $TARGET and $SOURCE,
+ # so they could vary depending on the command being generated. This code
+ # assumes they don't.
+ preprocdefs = xmlify(';'.join(processDefines(self.env.get('CPPDEFINES', []))))
+ includepath_Dirs = processIncludes(self.env.get('CPPPATH', []), self.env, None, None)
+ includepath = xmlify(';'.join([str(x) for x in includepath_Dirs]))
+
+ if not env_has_buildtarget:
+ del self.env['MSVSBUILDTARGET']
+
+ self.file.write(V10DSPCommandLine % locals())
+
+ self.file.write('\t</PropertyGroup>\n')
+
+ #filter settings in MSVS 2010 are stored in separate file
+ self.filtersabs = self.dspabs + '.filters'
+ try:
+ self.filters_file = open(self.filtersabs, 'w')
+ except IOError, detail:
+ raise SCons.Errors.InternalError('Unable to open "' + self.filtersabs + '" for writing:' + str(detail))
+
+ self.filters_file.write('<?xml version="1.0" encoding="utf-8"?>\n'
+ '<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\n')
+
+ self.PrintSourceFiles()
+
+ self.filters_file.write('</Project>')
+ self.filters_file.close()
+
+ self.file.write('\t<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\n'
+ '\t<ImportGroup Label="ExtensionTargets">\n'
+ '\t</ImportGroup>\n'
+ '</Project>\n')
+
+ if self.nokeep == 0:
+ # now we pickle some data and add it to the file -- MSDEV will ignore it.
+ pdata = pickle.dumps(self.configs,1)
+ pdata = base64.encodestring(pdata)
+ self.file.write('<!-- SCons Data:\n' + pdata + '\n')
+ pdata = pickle.dumps(self.sources,1)
+ pdata = base64.encodestring(pdata)
+ self.file.write(pdata + '-->\n')
+
+ def printFilters(self, hierarchy, name):
+ sorteditems = sorted(hierarchy.items(), key = lambda a: a[0].lower())
+
+ for key, value in sorteditems:
+ if SCons.Util.is_Dict(value):
+ filter_name = name + '\\' + key
+ self.filters_file.write('\t\t<Filter Include="%s">\n'
+ '\t\t\t<UniqueIdentifier>%s</UniqueIdentifier>\n'
+ '\t\t</Filter>\n' % (filter_name, _generateGUID(self.dspabs, filter_name)))
+ self.printFilters(value, filter_name)
+
+ def printSources(self, hierarchy, kind, commonprefix, filter_name):
+ keywords = {'Source Files': 'ClCompile',
+ 'Header Files': 'ClInclude',
+ 'Local Headers': 'ClInclude',
+ 'Resource Files': 'None',
+ 'Other Files': 'None'}
+
+ sorteditems = sorted(hierarchy.items(), key = lambda a: a[0].lower())
+
+ # First folders, then files
+ for key, value in sorteditems:
+ if SCons.Util.is_Dict(value):
+ self.printSources(value, kind, commonprefix, filter_name + '\\' + key)
+
+ for key, value in sorteditems:
+ if SCons.Util.is_String(value):
+ file = value
+ if commonprefix:
+ file = os.path.join(commonprefix, value)
+ file = os.path.normpath(file)
+
+ self.file.write('\t\t<%s Include="%s" />\n' % (keywords[kind], file))
+ self.filters_file.write('\t\t<%s Include="%s">\n'
+ '\t\t\t<Filter>%s</Filter>\n'
+ '\t\t</%s>\n' % (keywords[kind], file, filter_name, keywords[kind]))
+
+ def PrintSourceFiles(self):
+ categories = {'Source Files': 'cpp;c;cxx;l;y;def;odl;idl;hpj;bat',
+ 'Header Files': 'h;hpp;hxx;hm;inl',
+ 'Local Headers': 'h;hpp;hxx;hm;inl',
+ 'Resource Files': 'r;rc;ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe',
+ 'Other Files': ''}
+
+ cats = sorted([k for k in categories.keys() if self.sources[k]],
+ key = lambda a: a.lower())
+
+ # print vcxproj.filters file first
+ self.filters_file.write('\t<ItemGroup>\n')
+ for kind in cats:
+ self.filters_file.write('\t\t<Filter Include="%s">\n'
+ '\t\t\t<UniqueIdentifier>{7b42d31d-d53c-4868-8b92-ca2bc9fc052f}</UniqueIdentifier>\n'
+ '\t\t\t<Extensions>%s</Extensions>\n'
+ '\t\t</Filter>\n' % (kind, categories[kind]))
+
+ # First remove any common prefix
+ sources = self.sources[kind]
+ commonprefix = None
+ if len(sources) > 1:
+ s = list(map(os.path.normpath, sources))
+ # take the dirname because the prefix may include parts
+ # of the filenames (e.g. if you have 'dir\abcd' and
+ # 'dir\acde' then the cp will be 'dir\a' )
+ cp = os.path.dirname( os.path.commonprefix(s) )
+ if cp and s[0][len(cp)] == os.sep:
+ # +1 because the filename starts after the separator
+ sources = [s[len(cp)+1:] for s in sources]
+ commonprefix = cp
+ elif len(sources) == 1:
+ commonprefix = os.path.dirname( sources[0] )
+ sources[0] = os.path.basename( sources[0] )
+
+ hierarchy = makeHierarchy(sources)
+ self.printFilters(hierarchy, kind)
+
+ self.filters_file.write('\t</ItemGroup>\n')
+
+ # then print files and filters
+ for kind in cats:
+ self.file.write('\t<ItemGroup>\n')
+ self.filters_file.write('\t<ItemGroup>\n')
+
+ # First remove any common prefix
+ sources = self.sources[kind]
+ commonprefix = None
+ if len(sources) > 1:
+ s = list(map(os.path.normpath, sources))
+ # take the dirname because the prefix may include parts
+ # of the filenames (e.g. if you have 'dir\abcd' and
+ # 'dir\acde' then the cp will be 'dir\a' )
+ cp = os.path.dirname( os.path.commonprefix(s) )
+ if cp and s[0][len(cp)] == os.sep:
+ # +1 because the filename starts after the separator
+ sources = [s[len(cp)+1:] for s in sources]
+ commonprefix = cp
+ elif len(sources) == 1:
+ commonprefix = os.path.dirname( sources[0] )
+ sources[0] = os.path.basename( sources[0] )
+
+ hierarchy = makeHierarchy(sources)
+ self.printSources(hierarchy, kind, commonprefix, kind)
+
+ self.file.write('\t</ItemGroup>\n')
+ self.filters_file.write('\t</ItemGroup>\n')
+
+ # add the SConscript file outside of the groups
+ self.file.write('\t<ItemGroup>\n'
+ '\t\t<None Include="%s" />\n'
+ #'\t\t<None Include="SConstruct" />\n'
+ '\t</ItemGroup>\n' % str(self.sconscript))
+
+ def Parse(self):
+ print "_GenerateV10DSP.Parse()"
+
+ def Build(self):
+ try:
+ self.file = open(self.dspabs, 'w')
+ except IOError, detail:
+ raise SCons.Errors.InternalError('Unable to open "' + self.dspabs + '" for writing:' + str(detail))
+ else:
+ self.PrintHeader()
+ self.PrintProject()
+ self.file.close()
class _DSWGenerator(object):
""" Base class for DSW generators """
def __init__(self, dswfile, source, env):
self.dswfile = os.path.normpath(str(dswfile))
+ self.dsw_folder_path = os.path.dirname(os.path.abspath(self.dswfile))
self.env = env
if 'projects' not in env:
@@ -846,12 +1217,14 @@ class _GenerateV7DSW(_DSWGenerator):
self.version = self.env['MSVS_VERSION']
self.version_num, self.suite = msvs_parse_version(self.version)
self.versionstr = '7.00'
- if self.version_num >= 8.0:
+ if self.version_num >= 10.0:
+ self.versionstr = '11.00'
+ elif self.version_num >= 9.0:
+ self.versionstr = '10.00'
+ elif self.version_num >= 8.0:
self.versionstr = '9.00'
elif self.version_num >= 7.1:
self.versionstr = '8.00'
- if self.version_num >= 8.0:
- self.versionstr = '9.00'
if 'slnguid' in env and env['slnguid']:
self.slnguid = env['slnguid']
@@ -896,6 +1269,26 @@ class _GenerateV7DSW(_DSWGenerator):
if not platform in self.platforms:
self.platforms.append(platform)
+ def GenerateProjectFilesInfo(self):
+ for dspfile in self.dspfiles:
+ dsp_folder_path, name = os.path.split(dspfile)
+ dsp_folder_path = os.path.abspath(dsp_folder_path)
+ dsp_relative_folder_path = os.path.relpath(dsp_folder_path, self.dsw_folder_path)
+ if dsp_relative_folder_path == os.curdir:
+ dsp_relative_file_path = name
+ else:
+ dsp_relative_file_path = os.path.join(dsp_relative_folder_path, name)
+ dspfile_info = {'NAME': name,
+ 'GUID': _generateGUID(dspfile, ''),
+ 'FOLDER_PATH': dsp_folder_path,
+ 'FILE_PATH': dspfile,
+ 'SLN_RELATIVE_FOLDER_PATH': dsp_relative_folder_path,
+ 'SLN_RELATIVE_FILE_PATH': dsp_relative_file_path}
+ self.dspfiles_info.append(dspfile_info)
+
+ self.dspfiles_info = []
+ GenerateProjectFilesInfo(self)
+
def Parse(self):
try:
dswfile = open(self.dswfile,'r')
@@ -928,16 +1321,19 @@ class _GenerateV7DSW(_DSWGenerator):
def PrintSolution(self):
"""Writes a solution file"""
self.file.write('Microsoft Visual Studio Solution File, Format Version %s\n' % self.versionstr )
- if self.version_num >= 8.0:
+ if self.version_num >= 10.0:
+ self.file.write('# Visual Studio 2010\n')
+ elif self.version_num >= 9.0:
+ self.file.write('# Visual Studio 2008\n')
+ elif self.version_num >= 8.0:
self.file.write('# Visual Studio 2005\n')
- for p in self.dspfiles:
- name = os.path.basename(p)
+ for dspinfo in self.dspfiles_info:
+ name = dspinfo['NAME']
base, suffix = SCons.Util.splitext(name)
if suffix == '.vcproj':
name = base
- guid = _generateGUID(p, '')
self.file.write('Project("%s") = "%s", "%s", "%s"\n'
- % ( external_makefile_guid, name, p, guid ) )
+ % (external_makefile_guid, name, dspinfo['SLN_RELATIVE_FILE_PATH'], dspinfo['GUID']))
if self.version_num >= 7.1 and self.version_num < 8.0:
self.file.write('\tProjectSection(ProjectDependencies) = postProject\n'
'\tEndProjectSection\n')
@@ -947,30 +1343,36 @@ class _GenerateV7DSW(_DSWGenerator):
env = self.env
if 'MSVS_SCC_PROVIDER' in env:
- dspfile_base = os.path.basename(self.dspfile)
+ scc_number_of_projects = len(self.dspfiles) + 1
slnguid = self.slnguid
- scc_provider = env.get('MSVS_SCC_PROVIDER', '')
- scc_provider = scc_provider.replace(' ', r'\u0020')
- scc_project_name = env.get('MSVS_SCC_PROJECT_NAME', '')
- # scc_aux_path = env.get('MSVS_SCC_AUX_PATH', '')
- scc_local_path = env.get('MSVS_SCC_LOCAL_PATH', '')
- scc_project_base_path = env.get('MSVS_SCC_PROJECT_BASE_PATH', '')
- # project_guid = env.get('MSVS_PROJECT_GUID', '')
-
+ scc_provider = env.get('MSVS_SCC_PROVIDER', '').replace(' ', r'\u0020')
+ scc_project_name = env.get('MSVS_SCC_PROJECT_NAME', '').replace(' ', r'\u0020')
+ scc_connection_root = env.get('MSVS_SCC_CONNECTION_ROOT', os.curdir)
+ scc_local_path = os.path.relpath(scc_connection_root, self.dsw_folder_path).replace('\\', '\\\\')
self.file.write('\tGlobalSection(SourceCodeControl) = preSolution\n'
- '\t\tSccNumberOfProjects = 2\n'
- '\t\tSccProjectUniqueName0 = %(dspfile_base)s\n'
+ '\t\tSccNumberOfProjects = %(scc_number_of_projects)d\n'
+ '\t\tSccProjectName0 = %(scc_project_name)s\n'
'\t\tSccLocalPath0 = %(scc_local_path)s\n'
- '\t\tCanCheckoutShared = true\n'
- '\t\tSccProjectFilePathRelativizedFromConnection0 = %(scc_project_base_path)s\n'
- '\t\tSccProjectName1 = %(scc_project_name)s\n'
- '\t\tSccLocalPath1 = %(scc_local_path)s\n'
- '\t\tSccProvider1 = %(scc_provider)s\n'
- '\t\tCanCheckoutShared = true\n'
- '\t\tSccProjectFilePathRelativizedFromConnection1 = %(scc_project_base_path)s\n'
- '\t\tSolutionUniqueID = %(slnguid)s\n'
- '\tEndGlobalSection\n' % locals())
-
+ '\t\tSccProvider0 = %(scc_provider)s\n'
+ '\t\tCanCheckoutShared = true\n' % locals())
+ sln_relative_path_from_scc = os.path.relpath(self.dsw_folder_path, scc_connection_root)
+ if sln_relative_path_from_scc != os.curdir:
+ self.file.write('\t\tSccProjectFilePathRelativizedFromConnection0 = %s\\\\\n'
+ % sln_relative_path_from_scc.replace('\\', '\\\\'))
+ if self.version_num < 8.0:
+ # When present, SolutionUniqueID is automatically removed by VS 2005
+ # TODO: check for Visual Studio versions newer than 2005
+ self.file.write('\t\tSolutionUniqueID = %s\n' % slnguid)
+ for dspinfo in self.dspfiles_info:
+ i = self.dspfiles_info.index(dspinfo) + 1
+ dsp_relative_file_path = dspinfo['SLN_RELATIVE_FILE_PATH'].replace('\\', '\\\\')
+ dsp_scc_relative_folder_path = os.path.relpath(dspinfo['FOLDER_PATH'], scc_connection_root).replace('\\', '\\\\')
+ self.file.write('\t\tSccProjectUniqueName%(i)s = %(dsp_relative_file_path)s\n'
+ '\t\tSccLocalPath%(i)d = %(scc_local_path)s\n'
+ '\t\tCanCheckoutShared = true\n'
+ '\t\tSccProjectFilePathRelativizedFromConnection%(i)s = %(dsp_scc_relative_folder_path)s\\\\\n'
+ % locals())
+ self.file.write('\tEndGlobalSection\n')
if self.version_num >= 8.0:
self.file.write('\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n')
else:
@@ -987,7 +1389,7 @@ class _GenerateV7DSW(_DSWGenerator):
self.file.write('\t\tConfigName.%d = %s\n' % (cnt, variant))
cnt = cnt + 1
self.file.write('\tEndGlobalSection\n')
- if self.version_num < 7.1:
+ if self.version_num <= 7.1:
self.file.write('\tGlobalSection(ProjectDependencies) = postSolution\n'
'\tEndGlobalSection\n')
if self.version_num >= 8.0:
@@ -999,13 +1401,13 @@ class _GenerateV7DSW(_DSWGenerator):
variant = self.configs[name].variant
platform = self.configs[name].platform
if self.version_num >= 8.0:
- for p in self.dspfiles:
- guid = _generateGUID(p, '')
+ for dspinfo in self.dspfiles_info:
+ guid = dspinfo['GUID']
self.file.write('\t\t%s.%s|%s.ActiveCfg = %s|%s\n'
'\t\t%s.%s|%s.Build.0 = %s|%s\n' % (guid,variant,platform,variant,platform,guid,variant,platform,variant,platform))
else:
- for p in self.dspfiles:
- guid = _generateGUID(p, '')
+ for dspinfo in self.dspfiles_info:
+ guid = dspinfo['GUID']
self.file.write('\t\t%s.%s.ActiveCfg = %s|%s\n'
'\t\t%s.%s.Build.0 = %s|%s\n' %(guid,variant,variant,platform,guid,variant,variant,platform))
@@ -1072,7 +1474,7 @@ class _GenerateV6DSW(_DSWGenerator):
def PrintWorkspace(self):
""" writes a DSW file """
name = self.name
- dspfile = self.dspfiles[0]
+ dspfile = os.path.relpath(self.dspfiles[0], self.dsw_folder_path)
self.file.write(V6DSWHeader % locals())
def Build(self):
@@ -1091,7 +1493,10 @@ def GenerateDSP(dspfile, source, env):
version_num = 6.0
if 'MSVS_VERSION' in env:
version_num, suite = msvs_parse_version(env['MSVS_VERSION'])
- if version_num >= 7.0:
+ if version_num >= 10.0:
+ g = _GenerateV10DSP(dspfile, source, env)
+ g.Build()
+ elif version_num >= 7.0:
g = _GenerateV7DSP(dspfile, source, env)
g.Build()
else:
@@ -1118,10 +1523,10 @@ def GenerateDSW(dswfile, source, env):
##############################################################################
def GetMSVSProjectSuffix(target, source, env, for_signature):
- return env['MSVS']['PROJECTSUFFIX']
+ return env['MSVS']['PROJECTSUFFIX']
def GetMSVSSolutionSuffix(target, source, env, for_signature):
- return env['MSVS']['SOLUTIONSUFFIX']
+ return env['MSVS']['SOLUTIONSUFFIX']
def GenerateProject(target, source, env):
# generate the dsp file, according to the version of MSVS.
@@ -1178,6 +1583,12 @@ def projectEmitter(target, source, env):
source = source + env.subst('$MSVSSCONSCOM', 1)
source = source + env.subst('$MSVSENCODING', 1)
+ # Project file depends on CPPDEFINES and CPPPATH
+ preprocdefs = xmlify(';'.join(processDefines(env.get('CPPDEFINES', []))))
+ includepath_Dirs = processIncludes(env.get('CPPPATH', []), env, None, None)
+ includepath = xmlify(';'.join([str(x) for x in includepath_Dirs]))
+ source = source + "; ppdefs:%s incpath:%s"%(preprocdefs, includepath)
+
if 'buildtarget' in env and env['buildtarget'] != None:
if SCons.Util.is_String(env['buildtarget']):
source = source + ' "%s"' % env['buildtarget']
@@ -1246,7 +1657,7 @@ def projectEmitter(target, source, env):
sourcelist = source
if env.get('auto_build_solution', 1):
- env['projects'] = targetlist
+ env['projects'] = [env.File(t).srcnode() for t in targetlist]
t, s = solutionEmitter(target, target, env)
targetlist = targetlist + t
@@ -1354,7 +1765,6 @@ def generate(env):
env['MSVSBUILDCOM'] = '$MSVSSCONSCOM "$MSVSBUILDTARGET"'
env['MSVSREBUILDCOM'] = '$MSVSSCONSCOM "$MSVSBUILDTARGET"'
env['MSVSCLEANCOM'] = '$MSVSSCONSCOM -c "$MSVSBUILDTARGET"'
- env['MSVSENCODING'] = 'Windows-1252'
# Set-up ms tools paths for default version
msvc_setup_env_once(env)
@@ -1368,9 +1778,17 @@ def generate(env):
if (version_num < 7.0):
env['MSVS']['PROJECTSUFFIX'] = '.dsp'
env['MSVS']['SOLUTIONSUFFIX'] = '.dsw'
- else:
+ elif (version_num < 10.0):
env['MSVS']['PROJECTSUFFIX'] = '.vcproj'
env['MSVS']['SOLUTIONSUFFIX'] = '.sln'
+ else:
+ env['MSVS']['PROJECTSUFFIX'] = '.vcxproj'
+ env['MSVS']['SOLUTIONSUFFIX'] = '.sln'
+
+ if (version_num >= 10.0):
+ env['MSVSENCODING'] = 'utf-8'
+ else:
+ env['MSVSENCODING'] = 'Windows-1252'
env['GET_MSVSPROJECTSUFFIX'] = GetMSVSProjectSuffix
env['GET_MSVSSOLUTIONSUFFIX'] = GetMSVSSolutionSuffix
diff --git a/engine/SCons/Tool/mwcc.py b/engine/SCons/Tool/mwcc.py
index d61510e..849aa74 100644
--- a/engine/SCons/Tool/mwcc.py
+++ b/engine/SCons/Tool/mwcc.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/mwcc.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/mwcc.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import os.path
diff --git a/engine/SCons/Tool/mwld.py b/engine/SCons/Tool/mwld.py
index d881627..a8cf2a6 100644
--- a/engine/SCons/Tool/mwld.py
+++ b/engine/SCons/Tool/mwld.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/mwld.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/mwld.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Tool
diff --git a/engine/SCons/Tool/nasm.py b/engine/SCons/Tool/nasm.py
index d759e41..5641518 100644
--- a/engine/SCons/Tool/nasm.py
+++ b/engine/SCons/Tool/nasm.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/nasm.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/nasm.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Defaults
import SCons.Tool
diff --git a/engine/SCons/Tool/packaging/__init__.py b/engine/SCons/Tool/packaging/__init__.py
index 35029f2..9d1978b 100644
--- a/engine/SCons/Tool/packaging/__init__.py
+++ b/engine/SCons/Tool/packaging/__init__.py
@@ -4,7 +4,7 @@ SCons Packaging Tool.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -25,7 +25,7 @@ SCons Packaging Tool.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/packaging/__init__.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/__init__.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Environment
from SCons.Variables import *
diff --git a/engine/SCons/Tool/packaging/ipk.py b/engine/SCons/Tool/packaging/ipk.py
index 09fc779..2aaa722 100644
--- a/engine/SCons/Tool/packaging/ipk.py
+++ b/engine/SCons/Tool/packaging/ipk.py
@@ -2,7 +2,7 @@
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -24,7 +24,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/ipk.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/ipk.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Builder
import SCons.Node.FS
diff --git a/engine/SCons/Tool/packaging/msi.py b/engine/SCons/Tool/packaging/msi.py
index 4cc8071..ccb3596 100644
--- a/engine/SCons/Tool/packaging/msi.py
+++ b/engine/SCons/Tool/packaging/msi.py
@@ -4,7 +4,7 @@ The msi packager.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -25,7 +25,7 @@ The msi packager.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/packaging/msi.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/msi.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import SCons
diff --git a/engine/SCons/Tool/packaging/rpm.py b/engine/SCons/Tool/packaging/rpm.py
index a09457b..4baa016 100644
--- a/engine/SCons/Tool/packaging/rpm.py
+++ b/engine/SCons/Tool/packaging/rpm.py
@@ -4,7 +4,7 @@ The rpm packager.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -25,7 +25,7 @@ The rpm packager.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/packaging/rpm.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/rpm.py 5357 2011/09/09 21:31:03 bdeegan"
import os
diff --git a/engine/SCons/Tool/packaging/src_tarbz2.py b/engine/SCons/Tool/packaging/src_tarbz2.py
index a6ea750..af7e9ce 100644
--- a/engine/SCons/Tool/packaging/src_tarbz2.py
+++ b/engine/SCons/Tool/packaging/src_tarbz2.py
@@ -4,7 +4,7 @@ The tarbz2 SRC packager.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@ The tarbz2 SRC packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/src_tarbz2.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/src_tarbz2.py 5357 2011/09/09 21:31:03 bdeegan"
from SCons.Tool.packaging import putintopackageroot
diff --git a/engine/SCons/Tool/packaging/src_targz.py b/engine/SCons/Tool/packaging/src_targz.py
index 7474ea6..202afa2 100644
--- a/engine/SCons/Tool/packaging/src_targz.py
+++ b/engine/SCons/Tool/packaging/src_targz.py
@@ -4,7 +4,7 @@ The targz SRC packager.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@ The targz SRC packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/src_targz.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/src_targz.py 5357 2011/09/09 21:31:03 bdeegan"
from SCons.Tool.packaging import putintopackageroot
diff --git a/engine/SCons/Tool/packaging/src_zip.py b/engine/SCons/Tool/packaging/src_zip.py
index d81f54c..4efef3d 100644
--- a/engine/SCons/Tool/packaging/src_zip.py
+++ b/engine/SCons/Tool/packaging/src_zip.py
@@ -4,7 +4,7 @@ The zip SRC packager.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@ The zip SRC packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/src_zip.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/src_zip.py 5357 2011/09/09 21:31:03 bdeegan"
from SCons.Tool.packaging import putintopackageroot
diff --git a/engine/SCons/Tool/packaging/tarbz2.py b/engine/SCons/Tool/packaging/tarbz2.py
index c01d7bc..3a3cbcb 100644
--- a/engine/SCons/Tool/packaging/tarbz2.py
+++ b/engine/SCons/Tool/packaging/tarbz2.py
@@ -4,7 +4,7 @@ The tarbz2 SRC packager.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@ The tarbz2 SRC packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/tarbz2.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/tarbz2.py 5357 2011/09/09 21:31:03 bdeegan"
from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot
diff --git a/engine/SCons/Tool/packaging/targz.py b/engine/SCons/Tool/packaging/targz.py
index 6a3282d..9a742df 100644
--- a/engine/SCons/Tool/packaging/targz.py
+++ b/engine/SCons/Tool/packaging/targz.py
@@ -4,7 +4,7 @@ The targz SRC packager.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@ The targz SRC packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/targz.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/targz.py 5357 2011/09/09 21:31:03 bdeegan"
from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot
diff --git a/engine/SCons/Tool/packaging/zip.py b/engine/SCons/Tool/packaging/zip.py
index 462aa47..9749a6c 100644
--- a/engine/SCons/Tool/packaging/zip.py
+++ b/engine/SCons/Tool/packaging/zip.py
@@ -4,7 +4,7 @@ The zip SRC packager.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@ The zip SRC packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/zip.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/packaging/zip.py 5357 2011/09/09 21:31:03 bdeegan"
from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot
diff --git a/engine/SCons/Tool/pdf.py b/engine/SCons/Tool/pdf.py
index e022105..fb30cb8 100644
--- a/engine/SCons/Tool/pdf.py
+++ b/engine/SCons/Tool/pdf.py
@@ -6,7 +6,7 @@ Add an explicit action to run epstopdf to convert .eps files to .pdf
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -28,7 +28,7 @@ Add an explicit action to run epstopdf to convert .eps files to .pdf
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/pdf.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/pdf.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Builder
import SCons.Tool
diff --git a/engine/SCons/Tool/pdflatex.py b/engine/SCons/Tool/pdflatex.py
index 203b635..40a120b 100644
--- a/engine/SCons/Tool/pdflatex.py
+++ b/engine/SCons/Tool/pdflatex.py
@@ -10,7 +10,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/pdflatex.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/pdflatex.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Action
import SCons.Util
@@ -74,6 +74,7 @@ def generate(env):
SCons.Tool.tex.generate_common(env)
def exists(env):
+ SCons.Tool.tex.generate_darwin(env)
return env.Detect('pdflatex')
# Local Variables:
diff --git a/engine/SCons/Tool/pdftex.py b/engine/SCons/Tool/pdftex.py
index b31c966..8b72502 100644
--- a/engine/SCons/Tool/pdftex.py
+++ b/engine/SCons/Tool/pdftex.py
@@ -10,7 +10,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/pdftex.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/pdftex.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import SCons.Action
@@ -99,6 +99,7 @@ def generate(env):
SCons.Tool.tex.generate_common(env)
def exists(env):
+ SCons.Tool.tex.generate_darwin(env)
return env.Detect('pdftex')
# Local Variables:
diff --git a/engine/SCons/Tool/qt.py b/engine/SCons/Tool/qt.py
index 7ce6c99..d0ff108 100644
--- a/engine/SCons/Tool/qt.py
+++ b/engine/SCons/Tool/qt.py
@@ -10,7 +10,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/qt.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/qt.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
import re
diff --git a/engine/SCons/Tool/rmic.py b/engine/SCons/Tool/rmic.py
index 9262336..84266a7 100644
--- a/engine/SCons/Tool/rmic.py
+++ b/engine/SCons/Tool/rmic.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/rmic.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/rmic.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
@@ -111,7 +111,13 @@ def generate(env):
env['JAVACLASSSUFFIX'] = '.class'
def exists(env):
- return env.Detect('rmic')
+ # As reported by Jan Nijtmans in issue #2730, the simple
+ # return env.Detect('rmic')
+ # doesn't always work during initialization. For now, we
+ # stop trying to detect an executable (analogous to the
+ # javac Builder).
+ # TODO: Come up with a proper detect() routine...and enable it.
+ return 1
# Local Variables:
# tab-width:4
diff --git a/engine/SCons/Tool/rpcgen.py b/engine/SCons/Tool/rpcgen.py
index 46f1209..76f98f2 100644
--- a/engine/SCons/Tool/rpcgen.py
+++ b/engine/SCons/Tool/rpcgen.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/rpcgen.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/rpcgen.py 5357 2011/09/09 21:31:03 bdeegan"
from SCons.Builder import Builder
import SCons.Util
diff --git a/engine/SCons/Tool/rpm.py b/engine/SCons/Tool/rpm.py
index d9a661a..f6ae365 100644
--- a/engine/SCons/Tool/rpm.py
+++ b/engine/SCons/Tool/rpm.py
@@ -11,7 +11,7 @@ tar.gz consisting of the source file and a specfile.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -33,7 +33,7 @@ tar.gz consisting of the source file and a specfile.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/rpm.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/rpm.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import re
diff --git a/engine/SCons/Tool/sgiar.py b/engine/SCons/Tool/sgiar.py
index b56de2b..3dcbdaf 100644
--- a/engine/SCons/Tool/sgiar.py
+++ b/engine/SCons/Tool/sgiar.py
@@ -11,7 +11,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -33,7 +33,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sgiar.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sgiar.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Defaults
import SCons.Tool
diff --git a/engine/SCons/Tool/sgic++.py b/engine/SCons/Tool/sgic++.py
index 45c64cf..e67974d 100644
--- a/engine/SCons/Tool/sgic++.py
+++ b/engine/SCons/Tool/sgic++.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sgic++.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sgic++.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Util
diff --git a/engine/SCons/Tool/sgicc.py b/engine/SCons/Tool/sgicc.py
index 27f8317..3f8af89 100644
--- a/engine/SCons/Tool/sgicc.py
+++ b/engine/SCons/Tool/sgicc.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sgicc.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sgicc.py 5357 2011/09/09 21:31:03 bdeegan"
import cc
diff --git a/engine/SCons/Tool/sgilink.py b/engine/SCons/Tool/sgilink.py
index 7aef1fe..cb6658f 100644
--- a/engine/SCons/Tool/sgilink.py
+++ b/engine/SCons/Tool/sgilink.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sgilink.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sgilink.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Util
@@ -48,7 +48,6 @@ def generate(env):
# __RPATH is set to $_RPATH in the platform specification if that
# platform supports it.
- env.Append(LINKFLAGS=['$__RPATH'])
env['RPATHPREFIX'] = '-rpath '
env['RPATHSUFFIX'] = ''
env['_RPATH'] = '${_concat(RPATHPREFIX, RPATH, RPATHSUFFIX, __env__)}'
diff --git a/engine/SCons/Tool/sunar.py b/engine/SCons/Tool/sunar.py
index 30e5dd6..32641e0 100644
--- a/engine/SCons/Tool/sunar.py
+++ b/engine/SCons/Tool/sunar.py
@@ -10,7 +10,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sunar.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sunar.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Defaults
import SCons.Tool
diff --git a/engine/SCons/Tool/sunc++.py b/engine/SCons/Tool/sunc++.py
index d127e16..de404da 100644
--- a/engine/SCons/Tool/sunc++.py
+++ b/engine/SCons/Tool/sunc++.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sunc++.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sunc++.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons
diff --git a/engine/SCons/Tool/suncc.py b/engine/SCons/Tool/suncc.py
index 14898c7..b937dc4 100644
--- a/engine/SCons/Tool/suncc.py
+++ b/engine/SCons/Tool/suncc.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/suncc.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/suncc.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Util
diff --git a/engine/SCons/Tool/sunf77.py b/engine/SCons/Tool/sunf77.py
index 499a3a7..4f22d56 100644
--- a/engine/SCons/Tool/sunf77.py
+++ b/engine/SCons/Tool/sunf77.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sunf77.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sunf77.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Util
diff --git a/engine/SCons/Tool/sunf90.py b/engine/SCons/Tool/sunf90.py
index 9fa9191..f080085 100644
--- a/engine/SCons/Tool/sunf90.py
+++ b/engine/SCons/Tool/sunf90.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sunf90.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sunf90.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Util
diff --git a/engine/SCons/Tool/sunf95.py b/engine/SCons/Tool/sunf95.py
index 13e5ef9..3e4351e 100644
--- a/engine/SCons/Tool/sunf95.py
+++ b/engine/SCons/Tool/sunf95.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sunf95.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sunf95.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Util
diff --git a/engine/SCons/Tool/sunlink.py b/engine/SCons/Tool/sunlink.py
index 502008d..3952baa 100644
--- a/engine/SCons/Tool/sunlink.py
+++ b/engine/SCons/Tool/sunlink.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sunlink.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/sunlink.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import os.path
@@ -62,7 +62,6 @@ def generate(env):
env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -G')
- env.Append(LINKFLAGS=['$__RPATH'])
env['RPATHPREFIX'] = '-R'
env['RPATHSUFFIX'] = ''
env['_RPATH'] = '${_concat(RPATHPREFIX, RPATH, RPATHSUFFIX, __env__)}'
diff --git a/engine/SCons/Tool/swig.py b/engine/SCons/Tool/swig.py
index d02bbe8..c773cd5 100644
--- a/engine/SCons/Tool/swig.py
+++ b/engine/SCons/Tool/swig.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/swig.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/swig.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
import re
@@ -53,7 +53,8 @@ def swigSuffixEmitter(env, source):
# Match '%module test', as well as '%module(directors="1") test'
# Also allow for test to be quoted (SWIG permits double quotes, but not single)
-_reModule = re.compile(r'%module(\s*\(.*\))?\s+("?)(.+)\2')
+# Also allow for the line to have spaces after test if not quoted
+_reModule = re.compile(r'%module(\s*\(.*\))?\s+("?)(\S+)\2')
def _find_modules(src):
"""Find all modules referenced by %module lines in `src`, a SWIG .i file.
@@ -65,9 +66,9 @@ def _find_modules(src):
try:
matches = _reModule.findall(open(src).read())
except IOError:
- # If the file's not yet generated, guess the module name from the filename
+ # If the file's not yet generated, guess the module name from the file stem
matches = []
- mnames.append(os.path.splitext(src)[0])
+ mnames.append(os.path.splitext(os.path.basename(src))[0])
for m in matches:
mnames.append(m[2])
diff --git a/engine/SCons/Tool/tar.py b/engine/SCons/Tool/tar.py
index 55a405b..774312c 100644
--- a/engine/SCons/Tool/tar.py
+++ b/engine/SCons/Tool/tar.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/tar.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/tar.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Action
import SCons.Builder
diff --git a/engine/SCons/Tool/tex.py b/engine/SCons/Tool/tex.py
index 23226db..79da6be 100644
--- a/engine/SCons/Tool/tex.py
+++ b/engine/SCons/Tool/tex.py
@@ -10,7 +10,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -32,13 +32,14 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/tex.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/tex.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
import re
import shutil
import sys
import platform
+import glob
import SCons.Action
import SCons.Node
@@ -84,6 +85,7 @@ auxfile_re = re.compile(r".", re.MULTILINE)
tableofcontents_re = re.compile(r"^[^%\n]*\\tableofcontents", re.MULTILINE)
makeindex_re = re.compile(r"^[^%\n]*\\makeindex", re.MULTILINE)
bibliography_re = re.compile(r"^[^%\n]*\\bibliography", re.MULTILINE)
+bibunit_re = re.compile(r"^[^%\n]*\\begin\{bibunit\}", re.MULTILINE)
listoffigures_re = re.compile(r"^[^%\n]*\\listoffigures", re.MULTILINE)
listoftables_re = re.compile(r"^[^%\n]*\\listoftables", re.MULTILINE)
hyperref_re = re.compile(r"^[^%\n]*\\usepackage.*\{hyperref\}", re.MULTILINE)
@@ -151,7 +153,7 @@ def FindFile(name,suffixes,paths,env,requireExt=False):
testName = os.path.join(path,name)
if Verbose:
print " look for '%s'" % testName
- if os.path.exists(testName):
+ if os.path.isfile(testName):
if Verbose:
print " found '%s'" % testName
return env.fs.File(testName)
@@ -166,7 +168,7 @@ def FindFile(name,suffixes,paths,env,requireExt=False):
if Verbose:
print " look for '%s'" % testNameExt
- if os.path.exists(testNameExt):
+ if os.path.isfile(testNameExt):
if Verbose:
print " found '%s'" % testNameExt
return env.fs.File(testNameExt)
@@ -213,13 +215,13 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None
# if there is a \makeindex there will be a .idx and thus
# we have to run makeindex at least once to keep the build
# happy even if there is no index.
- # Same for glossaries and nomenclature
+ # Same for glossaries, nomenclature, and acronyms
src_content = source[0].get_text_contents()
- run_makeindex = makeindex_re.search(src_content) and not os.path.exists(targetbase + '.idx')
- run_nomenclature = makenomenclature_re.search(src_content) and not os.path.exists(targetbase + '.nlo')
- run_glossary = makeglossary_re.search(src_content) and not os.path.exists(targetbase + '.glo')
- run_glossaries = makeglossaries_re.search(src_content) and not os.path.exists(targetbase + '.glo')
- run_acronyms = makeacronyms_re.search(src_content) and not os.path.exists(targetbase + '.acn')
+ run_makeindex = makeindex_re.search(src_content) and not os.path.isfile(targetbase + '.idx')
+ run_nomenclature = makenomenclature_re.search(src_content) and not os.path.isfile(targetbase + '.nlo')
+ run_glossary = makeglossary_re.search(src_content) and not os.path.isfile(targetbase + '.glo')
+ run_glossaries = makeglossaries_re.search(src_content) and not os.path.isfile(targetbase + '.glo')
+ run_acronyms = makeacronyms_re.search(src_content) and not os.path.isfile(targetbase + '.acn')
saved_hashes = {}
suffix_nodes = {}
@@ -272,7 +274,7 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None
# Read the log file to find warnings/errors
logfilename = targetbase + '.log'
logContent = ''
- if os.path.exists(logfilename):
+ if os.path.isfile(logfilename):
logContent = open(logfilename, "rb").read()
@@ -280,9 +282,15 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None
flsfilename = targetbase + '.fls'
flsContent = ''
auxfiles = []
- if os.path.exists(flsfilename):
+ if os.path.isfile(flsfilename):
flsContent = open(flsfilename, "rb").read()
auxfiles = openout_aux_re.findall(flsContent)
+ # remove duplicates
+ dups = {}
+ for x in auxfiles:
+ dups[x] = 1
+ auxfiles = list(dups.keys())
+
if Verbose:
print "auxfiles ",auxfiles
@@ -294,18 +302,16 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None
if count == 1:
for auxfilename in auxfiles:
target_aux = os.path.join(targetdir, auxfilename)
- if os.path.exists(target_aux):
+ if os.path.isfile(target_aux):
content = open(target_aux, "rb").read()
if content.find("bibdata") != -1:
if Verbose:
print "Need to run bibtex"
- bibfile = env.fs.File(targetbase)
+ bibfile = env.fs.File(SCons.Util.splitext(target_aux)[0])
result = BibTeXAction(bibfile, bibfile, env)
if result != 0:
check_file_error_message(env['BIBTEX'], 'blg')
- return result
- must_rerun_latex = check_MD5(suffix_nodes['.bbl'],'.bbl')
- break
+ must_rerun_latex = must_rerun_latex or check_MD5(suffix_nodes['.bbl'],'.bbl')
# Now decide if latex will need to be run again due to index.
if check_MD5(suffix_nodes['.idx'],'.idx') or (count == 1 and run_makeindex):
@@ -382,8 +388,8 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None
# end of while loop
# rename Latex's output to what the target name is
- if not (str(target[0]) == resultfilename and os.path.exists(resultfilename)):
- if os.path.exists(resultfilename):
+ if not (str(target[0]) == resultfilename and os.path.isfile(resultfilename)):
+ if os.path.isfile(resultfilename):
print "move %s to %s" % (resultfilename, str(target[0]), )
shutil.move(resultfilename,str(target[0]))
@@ -583,7 +589,7 @@ def tex_emitter_core(target, source, env, graphics_extensions):
basedir = os.path.split(str(source[0]))[0]
abspath = os.path.abspath(basedir)
target[0].attributes.path = abspath
-
+
#
# file names we will make use of in searching the sources and log file
#
@@ -603,16 +609,18 @@ def tex_emitter_core(target, source, env, graphics_extensions):
content = source[0].get_text_contents()
- idx_exists = os.path.exists(targetbase + '.idx')
- nlo_exists = os.path.exists(targetbase + '.nlo')
- glo_exists = os.path.exists(targetbase + '.glo')
- acr_exists = os.path.exists(targetbase + '.acn')
+ # These variables are no longer used.
+ #idx_exists = os.path.isfile(targetbase + '.idx')
+ #nlo_exists = os.path.isfile(targetbase + '.nlo')
+ #glo_exists = os.path.isfile(targetbase + '.glo')
+ #acr_exists = os.path.isfile(targetbase + '.acn')
# set up list with the regular expressions
# we use to find features used
file_tests_search = [auxfile_re,
makeindex_re,
bibliography_re,
+ bibunit_re,
tableofcontents_re,
listoffigures_re,
listoftables_re,
@@ -624,18 +632,19 @@ def tex_emitter_core(target, source, env, graphics_extensions):
beamer_re ]
# set up list with the file suffixes that need emitting
# when a feature is found
- file_tests_suff = [['.aux'],
- ['.idx', '.ind', '.ilg'],
- ['.bbl', '.blg'],
- ['.toc'],
- ['.lof'],
- ['.lot'],
- ['.out'],
- ['.nlo', '.nls', '.nlg'],
- ['.glo', '.gls', '.glg'],
- ['.glo', '.gls', '.glg'],
- ['.acn', '.acr', '.alg'],
- ['.nav', '.snm', '.out', '.toc'] ]
+ file_tests_suff = [['.aux','aux_file'],
+ ['.idx', '.ind', '.ilg','makeindex'],
+ ['.bbl', '.blg','bibliography'],
+ ['.bbl', '.blg','bibunit'],
+ ['.toc','contents'],
+ ['.lof','figures'],
+ ['.lot','tables'],
+ ['.out','hyperref'],
+ ['.nlo', '.nls', '.nlg','nomenclature'],
+ ['.glo', '.gls', '.glg','glossary'],
+ ['.glo', '.gls', '.glg','glossaries'],
+ ['.acn', '.acr', '.alg','acronyms'],
+ ['.nav', '.snm', '.out', '.toc','beamer'] ]
# build the list of lists
file_tests = []
for i in range(len(file_tests_search)):
@@ -668,12 +677,23 @@ def tex_emitter_core(target, source, env, graphics_extensions):
file_tests = ScanFiles(source[0], target, paths, file_tests, file_tests_search, env, graphics_extensions, targetdir, aux_files)
for (theSearch,suffix_list) in file_tests:
- if theSearch:
- for suffix in suffix_list:
- env.SideEffect(targetbase + suffix,target[0])
- if Verbose:
- print "side effect :",targetbase + suffix
- env.Clean(target[0],targetbase + suffix)
+ # add side effects if feature is present.If file is to be generated,add all side effects
+ if (theSearch != None) or (not source[0].exists() ):
+ file_list = [targetbase,]
+ # for bibunit we need a list of files
+ if suffix_list[-1] == 'bibunit':
+ file_basename = os.path.join(targetdir, 'bu*.aux')
+ file_list = glob.glob(file_basename)
+ # remove the suffix '.aux'
+ for i in range(len(file_list)):
+ file_list[i] = SCons.Util.splitext(file_list[i])[0]
+ # now define the side effects
+ for file_name in file_list:
+ for suffix in suffix_list[:-1]:
+ env.SideEffect(file_name + suffix,target[0])
+ if Verbose:
+ print "side effect :",file_name + suffix
+ env.Clean(target[0],file_name + suffix)
for aFile in aux_files:
aFile_base = SCons.Util.splitext(aFile)[0]
@@ -683,7 +703,7 @@ def tex_emitter_core(target, source, env, graphics_extensions):
env.Clean(target[0],aFile_base + '.aux')
# read fls file to get all other files that latex creates and will read on the next pass
# remove files from list that we explicitly dealt with above
- if os.path.exists(flsfilename):
+ if os.path.isfile(flsfilename):
content = open(flsfilename, "rb").read()
out_files = openout_re.findall(content)
myfiles = [auxfilename, logfilename, flsfilename, targetbase+'.dvi',targetbase+'.pdf']
@@ -719,9 +739,28 @@ def generate(env):
bld.add_action('.tex', TeXLaTeXAction)
bld.add_emitter('.tex', tex_eps_emitter)
+def generate_darwin(env):
+ try:
+ environ = env['ENV']
+ except KeyError:
+ environ = {}
+ env['ENV'] = environ
+
+ if (platform.system() == 'Darwin'):
+ try:
+ ospath = env['ENV']['PATHOSX']
+ except:
+ ospath = None
+ if ospath:
+ env.AppendENVPath('PATH', ospath)
+
def generate_common(env):
"""Add internal Builders and construction variables for LaTeX to an Environment."""
+ # Add OSX system paths so TeX tools can be found
+ # when a list of tools is given the exists() method is not called
+ generate_darwin(env)
+
# A generic tex file Action, sufficient for all tex files.
global TeXAction
if TeXAction is None:
@@ -758,6 +797,19 @@ def generate_common(env):
if MakeAcronymsAction is None:
MakeAcronymsAction = SCons.Action.Action("$MAKEACRONYMSCOM", "$MAKEACRONYMSCOMSTR")
+ try:
+ environ = env['ENV']
+ except KeyError:
+ environ = {}
+ env['ENV'] = environ
+
+ # Some Linux platforms have pdflatex set up in a way
+ # that requires that the HOME environment variable be set.
+ # Add it here if defined.
+ v = os.environ.get('HOME')
+ if v:
+ environ['HOME'] = v
+
CDCOM = 'cd '
if platform.system() == 'Windows':
# allow cd command to change drives on Windows
@@ -804,6 +856,7 @@ def generate_common(env):
env['MAKENCLCOM'] = CDCOM + '${TARGET.dir} && $MAKENCL ${SOURCE.filebase}.nlo $MAKENCLFLAGS -o ${SOURCE.filebase}.nls'
def exists(env):
+ generate_darwin(env)
return env.Detect('tex')
# Local Variables:
diff --git a/engine/SCons/Tool/textfile.py b/engine/SCons/Tool/textfile.py
index d4b1b0f..b849e71 100644
--- a/engine/SCons/Tool/textfile.py
+++ b/engine/SCons/Tool/textfile.py
@@ -1,6 +1,6 @@
# -*- python -*-
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -44,7 +44,7 @@ Textfile/Substfile builder for SCons.
is unpredictible whether the expansion will occur.
"""
-__revision__ = "src/engine/SCons/Tool/textfile.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/textfile.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons
diff --git a/engine/SCons/Tool/tlib.py b/engine/SCons/Tool/tlib.py
index 157c210..918d3cd 100644
--- a/engine/SCons/Tool/tlib.py
+++ b/engine/SCons/Tool/tlib.py
@@ -5,7 +5,7 @@ XXX
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ XXX
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/tlib.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/tlib.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Tool
import SCons.Tool.bcc32
diff --git a/engine/SCons/Tool/wix.py b/engine/SCons/Tool/wix.py
index 44b5d0f..208e96d 100644
--- a/engine/SCons/Tool/wix.py
+++ b/engine/SCons/Tool/wix.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/wix.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/wix.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Builder
import SCons.Action
diff --git a/engine/SCons/Tool/yacc.py b/engine/SCons/Tool/yacc.py
index 9f95bd1..60e1a83 100644
--- a/engine/SCons/Tool/yacc.py
+++ b/engine/SCons/Tool/yacc.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/yacc.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/yacc.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
@@ -61,6 +61,16 @@ def _yaccEmitter(target, source, env, ysuf, hsuf):
base, ext = os.path.splitext(SCons.Util.to_String(source[0]))
target.append(base + env.subst("$YACCVCGFILESUFFIX"))
+ # If -v is specirfied yacc will create the output debug file
+ # which is not really source for any process, but should
+ # be noted and also be cleaned
+ # Bug #2558
+ if "-v" in flags:
+ env.SideEffect(targetBase+'.output',target[0])
+ env.Clean(target[0],targetBase+'.output')
+
+
+
# With --defines and --graph, the name of the file is totally defined
# in the options.
fileGenOptions = ["--defines=", "--graph="]
diff --git a/engine/SCons/Tool/zip.py b/engine/SCons/Tool/zip.py
index 0f30147..fe2f4be 100644
--- a/engine/SCons/Tool/zip.py
+++ b/engine/SCons/Tool/zip.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/zip.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/zip.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
diff --git a/engine/SCons/Util.py b/engine/SCons/Util.py
index 1ffbd03..cedd78c 100644
--- a/engine/SCons/Util.py
+++ b/engine/SCons/Util.py
@@ -3,7 +3,7 @@
Various utility functions go here.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -24,7 +24,7 @@ Various utility functions go here.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Util.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Util.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import sys
@@ -464,7 +464,7 @@ def semi_deepcopy(x):
if copier:
return copier(x)
else:
- if hasattr(x, '__semi_deepcopy__'):
+ if hasattr(x, '__semi_deepcopy__') and callable(x.__semi_deepcopy__):
return x.__semi_deepcopy__()
elif isinstance(x, UserDict):
return x.__class__(_semi_deepcopy_dict(x))
diff --git a/engine/SCons/Variables/BoolVariable.py b/engine/SCons/Variables/BoolVariable.py
index f41537b..dc2bf40 100644
--- a/engine/SCons/Variables/BoolVariable.py
+++ b/engine/SCons/Variables/BoolVariable.py
@@ -12,7 +12,7 @@ Usage example:
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -34,7 +34,7 @@ Usage example:
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Variables/BoolVariable.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Variables/BoolVariable.py 5357 2011/09/09 21:31:03 bdeegan"
__all__ = ['BoolVariable',]
diff --git a/engine/SCons/Variables/EnumVariable.py b/engine/SCons/Variables/EnumVariable.py
index c9cdbb7..60a3c5d 100644
--- a/engine/SCons/Variables/EnumVariable.py
+++ b/engine/SCons/Variables/EnumVariable.py
@@ -15,7 +15,7 @@ Usage example:
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -37,7 +37,7 @@ Usage example:
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Variables/EnumVariable.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Variables/EnumVariable.py 5357 2011/09/09 21:31:03 bdeegan"
__all__ = ['EnumVariable',]
@@ -47,7 +47,7 @@ import SCons.Errors
def _validator(key, val, env, vals):
if not val in vals:
raise SCons.Errors.UserError(
- 'Invalid value for option %s: %s' % (key, val))
+ 'Invalid value for option %s: %s. Valid values are: %s' % (key, val, vals))
def EnumVariable(key, help, default, allowed_values, map={}, ignorecase=0):
diff --git a/engine/SCons/Variables/ListVariable.py b/engine/SCons/Variables/ListVariable.py
index 8f28706..eb3ad8a 100644
--- a/engine/SCons/Variables/ListVariable.py
+++ b/engine/SCons/Variables/ListVariable.py
@@ -25,7 +25,7 @@ Usage example:
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -46,7 +46,7 @@ Usage example:
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Variables/ListVariable.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Variables/ListVariable.py 5357 2011/09/09 21:31:03 bdeegan"
# Know Bug: This should behave like a Set-Type, but does not really,
# since elements can occur twice.
diff --git a/engine/SCons/Variables/PackageVariable.py b/engine/SCons/Variables/PackageVariable.py
index c8bfeb8..ffa5db5 100644
--- a/engine/SCons/Variables/PackageVariable.py
+++ b/engine/SCons/Variables/PackageVariable.py
@@ -28,7 +28,7 @@ Usage example:
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -50,7 +50,7 @@ Usage example:
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Variables/PackageVariable.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Variables/PackageVariable.py 5357 2011/09/09 21:31:03 bdeegan"
__all__ = ['PackageVariable',]
diff --git a/engine/SCons/Variables/PathVariable.py b/engine/SCons/Variables/PathVariable.py
index 0cf8cd3..1076a8d 100644
--- a/engine/SCons/Variables/PathVariable.py
+++ b/engine/SCons/Variables/PathVariable.py
@@ -46,7 +46,7 @@ Usage example:
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -68,7 +68,7 @@ Usage example:
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Variables/PathVariable.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Variables/PathVariable.py 5357 2011/09/09 21:31:03 bdeegan"
__all__ = ['PathVariable',]
diff --git a/engine/SCons/Variables/__init__.py b/engine/SCons/Variables/__init__.py
index a2c4218..3c5ca53 100644
--- a/engine/SCons/Variables/__init__.py
+++ b/engine/SCons/Variables/__init__.py
@@ -5,7 +5,7 @@ customizable variables to an SCons build.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@ customizable variables to an SCons build.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Variables/__init__.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Variables/__init__.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
import sys
diff --git a/engine/SCons/Warnings.py b/engine/SCons/Warnings.py
index 89f7ce9..f20e65e 100644
--- a/engine/SCons/Warnings.py
+++ b/engine/SCons/Warnings.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ This file implements the warnings framework for SCons.
"""
-__revision__ = "src/engine/SCons/Warnings.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Warnings.py 5357 2011/09/09 21:31:03 bdeegan"
import sys
diff --git a/engine/SCons/__init__.py b/engine/SCons/__init__.py
index f623225..950b314 100644
--- a/engine/SCons/__init__.py
+++ b/engine/SCons/__init__.py
@@ -5,7 +5,7 @@ The main package for the SCons software construction utility.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -27,15 +27,15 @@ The main package for the SCons software construction utility.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/__init__.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/__init__.py 5357 2011/09/09 21:31:03 bdeegan"
-__version__ = "2.0.1"
+__version__ = "2.1.0"
-__build__ = "r5134"
+__build__ = "r5357[MODIFIED]"
-__buildsys__ = "cooldog"
+__buildsys__ = "ubuntu"
-__date__ = "2010/08/16 23:02:40"
+__date__ = "2011/09/09 21:31:03"
__developer__ = "bdeegan"
diff --git a/engine/SCons/compat/__init__.py b/engine/SCons/compat/__init__.py
index 1dc5cc5..39edff2 100644
--- a/engine/SCons/compat/__init__.py
+++ b/engine/SCons/compat/__init__.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -60,7 +60,7 @@ function defined below loads the module as the "real" name (without the
rest of our code will find our pre-loaded compatibility module.
"""
-__revision__ = "src/engine/SCons/compat/__init__.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/compat/__init__.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import sys
diff --git a/engine/SCons/compat/_scons_builtins.py b/engine/SCons/compat/_scons_builtins.py
index 5daae95..63dde01 100644
--- a/engine/SCons/compat/_scons_builtins.py
+++ b/engine/SCons/compat/_scons_builtins.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -52,7 +52,7 @@ the FUNCTIONS or DATA output, that means those names are already built in
to this version of Python and we don't need to add them from this module.
"""
-__revision__ = "src/engine/SCons/compat/_scons_builtins.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/compat/_scons_builtins.py 5357 2011/09/09 21:31:03 bdeegan"
import builtins
diff --git a/engine/SCons/compat/_scons_collections.py b/engine/SCons/compat/_scons_collections.py
index 8cae268..8975b44 100644
--- a/engine/SCons/compat/_scons_collections.py
+++ b/engine/SCons/compat/_scons_collections.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ used by SCons, in an interface that looks enough like collections for
our purposes.
"""
-__revision__ = "src/engine/SCons/compat/_scons_collections.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/compat/_scons_collections.py 5357 2011/09/09 21:31:03 bdeegan"
# Use exec to hide old names from fixers.
exec("""if True:
diff --git a/engine/SCons/compat/_scons_dbm.py b/engine/SCons/compat/_scons_dbm.py
index 8c53b8c..e8f7e4b 100644
--- a/engine/SCons/compat/_scons_dbm.py
+++ b/engine/SCons/compat/_scons_dbm.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ that the whichdb.whichdb() implementstation in the various 2.X versions of
Python won't blow up even if dbm wasn't compiled in.
"""
-__revision__ = "src/engine/SCons/compat/_scons_dbm.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/compat/_scons_dbm.py 5357 2011/09/09 21:31:03 bdeegan"
class error(Exception):
pass
diff --git a/engine/SCons/compat/_scons_hashlib.py b/engine/SCons/compat/_scons_hashlib.py
index e38f6a8..991e29a 100644
--- a/engine/SCons/compat/_scons_hashlib.py
+++ b/engine/SCons/compat/_scons_hashlib.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ purposes, anyway). In fact, this module will raise an ImportError if
the underlying md5 module isn't available.
"""
-__revision__ = "src/engine/SCons/compat/_scons_hashlib.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/compat/_scons_hashlib.py 5357 2011/09/09 21:31:03 bdeegan"
import md5
from string import hexdigits
diff --git a/engine/SCons/compat/_scons_io.py b/engine/SCons/compat/_scons_io.py
index e7eb5ee..9b04e98 100644
--- a/engine/SCons/compat/_scons_io.py
+++ b/engine/SCons/compat/_scons_io.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -29,7 +29,7 @@ functionality. It only wraps the portions of io functionality used
by SCons, in an interface that looks enough like io for our purposes.
"""
-__revision__ = "src/engine/SCons/compat/_scons_io.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/compat/_scons_io.py 5357 2011/09/09 21:31:03 bdeegan"
# Use the "imp" module to protect the imports below from fixers.
import imp
diff --git a/engine/SCons/cpp.py b/engine/SCons/cpp.py
index 496d3f4..3015b53 100644
--- a/engine/SCons/cpp.py
+++ b/engine/SCons/cpp.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/cpp.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/cpp.py 5357 2011/09/09 21:31:03 bdeegan"
__doc__ = """
SCons C Pre-Processor module
diff --git a/engine/SCons/dblite.py b/engine/SCons/dblite.py
index ea24e6a..f4ba90a 100644
--- a/engine/SCons/dblite.py
+++ b/engine/SCons/dblite.py
@@ -104,10 +104,13 @@ class dblite(object):
if (ignore_corrupt_dbfiles == 1):
corruption_warning(self._file_name)
- def __del__(self):
+ def close(self):
if (self._needs_sync):
self.sync()
+ def __del__(self):
+ self.close()
+
def sync(self):
self._check_writable()
f = self._open(self._tmp_name, "wb", self._mode)
diff --git a/engine/SCons/exitfuncs.py b/engine/SCons/exitfuncs.py
index a72fe03..7dd2bfe 100644
--- a/engine/SCons/exitfuncs.py
+++ b/engine/SCons/exitfuncs.py
@@ -5,7 +5,7 @@ Register functions which are executed when SCons exits for any reason.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ Register functions which are executed when SCons exits for any reason.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/exitfuncs.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/exitfuncs.py 5357 2011/09/09 21:31:03 bdeegan"
diff --git a/scons-time.1 b/scons-time.1
index dda1c13..69db49a 100644
--- a/scons-time.1
+++ b/scons-time.1
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+.\" Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining
.\" a copy of this software and associated documentation files (the
@@ -19,7 +19,7 @@
.\" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
.\" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.\"
-.\" doc/man/scons-time.1 5134 2010/08/16 23:02:40 bdeegan
+.\" doc/man/scons-time.1 5357 2011/09/09 21:31:03 bdeegan
.\"
.\" ES - Example Start - indents and turns off line fill
.de ES
@@ -98,7 +98,7 @@
[\fB--which=\fIWHICH\fR]
[\fIARGUMENTS\fR]
..
-.TH SCONS-TIME 1 "August 2010"
+.TH SCONS-TIME 1 "September 2011"
.SH NAME
scons-time \- generate and display SCons timing information
'\"==========================================================================
diff --git a/scons.1 b/scons.1
index 878980e..ee321d7 100644
--- a/scons.1
+++ b/scons.1
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+.\" Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining
.\" a copy of this software and associated documentation files (the
@@ -19,9 +19,9 @@
.\" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
.\" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.\"
-.\" doc/man/scons.1 5134 2010/08/16 23:02:40 bdeegan
+.\" doc/man/scons.1 5357 2011/09/09 21:31:03 bdeegan
.\"
-.TH SCONS 1 "August 2010"
+.TH SCONS 1 "September 2011"
.\" ES - Example Start - indents and turns off line fill
.rm ES
.de ES
@@ -100,17 +100,17 @@ file,
.B scons
looks for a directory named
.I site_scons
-in the directory containing the
+in various system directories (see below) and the directory containing the
.I SConstruct
-file; if it exists,
+file; for each of those dirs which exists,
.I site_scons
-is added to sys.path,
+is prepended to sys.path,
the file
.IR site_scons/site_init.py ,
is evaluated if it exists,
and the directory
.I site_scons/site_tools
-is added to the default toolpath if it exist.
+is prepended to the default toolpath if it exists.
See the
.I --no-site-dir
and
@@ -601,6 +601,12 @@ have been compiled with optimization
files).
.TP
+--debug=duplicate
+Print a line for each unlink/relink (or copy) of a variant file from
+its source file. Includes debugging info for unlinking stale variant
+files, as well as unlinking old targets before building them.
+
+.TP
--debug=dtree
A synonym for the newer
.B --tree=derived
@@ -664,6 +670,18 @@ Re-run SCons under the control of the
Python debugger.
.TP
+--debug=prepare
+Print a line each time any target (internal or external)
+is prepared for building.
+.B scons
+prints this for each target it considers, even if that
+target is up to date (see also --debug=explain).
+This can help debug problems with targets that aren't being
+built; it shows whether
+.B scons
+is at least considering them or not.
+
+.TP
--debug=presub
Print the raw command line used to build each target
before the construction environment variables are substituted.
@@ -1095,13 +1113,13 @@ any out-of-date target files, but do not execute the commands.
.RI --no-site-dir
Prevents the automatic addition of the standard
.I site_scons
-dir to
+dirs to
.IR sys.path .
Also prevents loading the
.I site_scons/site_init.py
-module if it exists, and prevents adding
+modules if they exist, and prevents adding their
.I site_scons/site_tools
-to the toolpath.
+dirs to the toolpath.
.\" .TP
.\" .RI -o " file" ", --old-file=" file ", --assume-old=" file
@@ -1182,7 +1200,7 @@ Ignored for compatibility with GNU
.RI --site-dir= dir
Uses the named dir as the site dir rather than the default
.I site_scons
-dir. This dir will get prepended to
+dirs. This dir will get prepended to
.IR sys.path ,
the module
.IR dir /site_init.py
@@ -1190,6 +1208,48 @@ will get loaded if it exists, and
.IR dir /site_tools
will get added to the default toolpath.
+The default set of
+.I site_scons
+dirs used when
+.I --site-dir
+is not specified depends on the system platform, as follows. Note
+that the directories are examined in the order given, from most
+generic to most specific, so the last-executed site_init.py file is
+the most specific one (which gives it the chance to override
+everything else), and the dirs are prepended to the paths, again so
+the last dir examined comes first in the resulting path.
+
+.IP "Windows:"
+.nf
+ %ALLUSERSPROFILE/Application Data/scons/site_scons
+ %USERPROFILE%/Local Settings/Application Data/scons/site_scons
+ %APPDATA%/scons/site_scons
+ %HOME%/.scons/site_scons
+ ./site_scons
+.fi
+.IP "Mac OS X:"
+.nf
+ /Library/Application Support/SCons/site_scons
+ /opt/local/share/scons/site_scons (for MacPorts)
+ /sw/share/scons/site_scons (for Fink)
+ $HOME/Library/Application Support/SCons/site_scons
+ $HOME/.scons/site_scons
+ ./site_scons
+.fi
+.IP "Solaris:"
+.nf
+ /opt/sfw/scons/site_scons
+ /usr/share/scons/site_scons
+ $HOME/.scons/site_scons
+ ./site_scons
+.fi
+.IP "Linux, HPUX, and other Posix-like systems:"
+.nf
+ /usr/share/scons/site_scons
+ $HOME/.scons/site_scons
+ ./site_scons
+.fi
+
.TP
.RI --stack-size= KILOBYTES
Set the size stack used to run threads to
@@ -2214,7 +2274,7 @@ provides the following builder methods:
.IP env.CFile()
Builds a C source file given a lex (\fB.l\fP)
or yacc (\fB.y\fP) input file.
-The suffix specified by the $CFILESUFFIX construction variable
+The suffix specified by the \fB$CFILESUFFIX\fP construction variable
(\fB.c\fP by default)
is automatically added to the target
if it is not already present.
@@ -2228,12 +2288,22 @@ env.CFile(target = 'bar', source = 'bar.y')
.EE
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.IP Command()
+.IP env.Command()
+The \fBCommand\fP() "Builder" is actually implemented
+as a function that looks like a Builder,
+but actually takes an additional argument of the action
+from which the Builder should be made.
+See the \fBCommand\fP() function description
+for the calling syntax and details.
+
+'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.IP CXXFile()
.IP env.CXXFile()
Builds a C++ source file given a lex (\fB.ll\fP)
or yacc (\fB.yy\fP)
input file.
-The suffix specified by the $CXXFILESUFFIX construction variable
+The suffix specified by the \fB$CXXFILESUFFIX\fP construction variable
(\fB.cc\fP by default)
is automatically added to the target
if it is not already present.
@@ -2260,24 +2330,24 @@ if the string
or
.B \\documentstyle
is found, the file is assumed to be a LaTeX file and
-the target is built by invoking the $LATEXCOM command line;
-otherwise, the $TEXCOM command line is used.
+the target is built by invoking the \fB$LATEXCOM\fP command line;
+otherwise, the \fB$TEXCOM\fP command line is used.
If the file is a LaTeX file,
the
.BR DVI ()
builder method will also examine the contents
of the
.B .aux
-file and invoke the $BIBTEX command line
+file and invoke the \fB$BIBTEX\fP command line
if the string
.B bibdata
is found,
-start $MAKEINDEX to generate an index if a
+start \fB$MAKEINDEX\fP to generate an index if a
.B .ind
file is found
and will examine the contents
.B .log
-file and re-run the $LATEXCOM command
+file and re-run the \fB$LATEXCOM\fP command
if the log file says it is necessary.
The suffix \fB.dvi\fP
@@ -2339,12 +2409,12 @@ Any \fB.java\fP files in the source list
will be compiled to \fB.class\fP files
by calling the \fBJava\fP() Builder.
-If the $JARCHDIR value is set, the
+If the \fB$JARCHDIR\fP value is set, the
.B jar
command will change to the specified directory using the
.B \-C
option.
-If $JARCHDIR is not set explicitly,
+If \fB$JARCHDIR\fP is not set explicitly,
&SCons; will use the top of any subdirectory tree
in which Java \fB.class\fP
were built by the \fBJava\fP() Builder.
@@ -2445,7 +2515,7 @@ or the objects returned from the
builder method.
If the construction variable
-$JAVACLASSDIR
+.B $JAVACLASSDIR
is set, either in the environment
or in the call to the
.BR JavaH ()
@@ -2491,7 +2561,7 @@ this creates a loadable module bundle.
.IP M4()
.IP env.M4()
Builds an output file from an M4 input file.
-This uses a default $M4FLAGS value of
+This uses a default \fB$M4FLAGS\fP value of
.BR \-E ,
which considers all warnings to be fatal
and stops on the first warning
@@ -2507,7 +2577,7 @@ env.M4(target = 'foo.c', source = 'foo.c.m4')
.IP env.Moc()
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 $QTDIR variable for more information.
+tool 'qt'. See the \fB$QTDIR\fP variable for more information.
Example:
.ES
@@ -2524,7 +2594,7 @@ 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
-$MSVS_VERSION
+.B $MSVS_VERSION
in the Environment constructor).
For Visual Studio 6, it will generate a
.B .dsp
@@ -2563,7 +2633,7 @@ These are currently limited to
and
.BR misc .
These are pretty self-explanatory, but it should be noted that these
-lists are added to the $SOURCES construction variable as strings,
+lists are added to the \fB$SOURCES\fP 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.
@@ -2584,7 +2654,7 @@ file.
The correct
suffix for the version of Visual Studio must be used,
but the
-$MSVSPROJECTSUFFIX
+.B $MSVSPROJECTSUFFIX
construction variable
will be defined to the correct value (see example below).
@@ -2639,7 +2709,7 @@ displayed in the Visual Studio console output window.
This can be remedied by adding the
Visual C/C++
.B /FC
-compiler option to the $CCFLAGS variable
+compiler option to the \fB$CCFLAGS\fP variable
so that the compiler will print
the full path name of any
files that cause compilation errors.
@@ -2675,7 +2745,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
-$MSVS_VERSION
+.B $MSVS_VERSION
in the construction environment).
For Visual Studio 6, it will generate a
.B .dsw
@@ -2690,7 +2760,7 @@ The following values must be specified:
.BR target :
The name of the target .dsw or .sln file. The correct
suffix for the version of Visual Studio must be used, but the value
-$MSVSSOLUTIONSUFFIX
+.B $MSVSSOLUTIONSUFFIX
will be defined to the correct value (see example below).
.BR variant :
@@ -2710,8 +2780,6 @@ 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:
.ES
@@ -2746,7 +2814,7 @@ The mandatory ones will complain if they were not specified.
They vary depending on chosen target packager.
The target packager may be selected with the "PACKAGETYPE" command line
-option or with the $PACKAGETYPE construction variable. Currently
+option or with the \fB$PACKAGETYPE\fP construction variable. Currently
the following packagers available:
* msi - Microsoft Installer
@@ -2802,7 +2870,7 @@ from a \fB.dvi\fP input file
.BR .ltx ,
or
\fB.latex\fP input file).
-The suffix specified by the $PDFSUFFIX construction variable
+The suffix specified by the \fB$PDFSUFFIX\fP construction variable
(\fB.pdf\fP by default)
is added automatically to the target
if it is not already present. Example:
@@ -2823,7 +2891,7 @@ from a \fB.dvi\fP input file
.BR .ltx ,
or
\fB.latex\fP input file).
-The suffix specified by the $PSSUFFIX construction variable
+The suffix specified by the \fB$PSSUFFIX\fP construction variable
(\fB.ps\fP by default)
is added automatically to the target
if it is not already present. Example:
@@ -2849,9 +2917,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 $PROGPREFIX construction variable; nothing by default)
+(specified by the \fB$PROGPREFIX\fP construction variable; nothing by default)
and suffix
-(specified by the $PROGSUFFIX construction variable;
+(specified by the \fB$PROGSUFFIX\fP construction variable;
by default, \fB.exe\fP on Windows systems,
nothing on POSIX systems)
are automatically added to the target if not already present.
@@ -2894,7 +2962,7 @@ or the objects return from the
builder method.
If the construction variable
-$JAVACLASSDIR
+.B $JAVACLASSDIR
is set, either in the environment
or in the call to the
.BR RMIC ()
@@ -2990,11 +3058,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 $SHLIBPREFIX construction variable;
+(specified by the \fB$SHLIBPREFIX\fP construction variable;
by default, \fBlib\fP on POSIX systems,
nothing on Windows systems)
and suffix
-(specified by the $SHLIBSUFFIX construction variable;
+(specified by the \fB$SHLIBSUFFIX\fP construction variable;
by default, \fB.dll\fP on Windows systems,
\fB.so\fP on POSIX systems)
are automatically added to the target if not already present.
@@ -3032,12 +3100,12 @@ On Windows systems, specifying
will cause the \fB.dll\fP to be
registered after it is built using REGSVR32.
The command that is run
-("regsvr32" by default) is determined by $REGSVR construction
-variable, and the flags passed are determined by $REGSVRFLAGS. By
-default, $REGSVRFLAGS includes the \fB/s\fP option,
+("regsvr32" by default) is determined by \fB$REGSVR\fP construction
+variable, and the flags passed are determined by \fB$REGSVRFLAGS\fP. By
+default, \fB$REGSVRFLAGS\fP includes the \fB/s\fP option,
to prevent dialogs from popping
up and requiring user attention when it is run. If you change
-$REGSVRFLAGS, be sure to include the \fB/s\fP option.
+\fB$REGSVRFLAGS\fP, be sure to include the \fB/s\fP option.
For example,
.ES
@@ -3071,10 +3139,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 $SHOBJPREFIX construction variable;
-by default, the same as $OBJPREFIX)
+(specified by the \fB$SHOBJPREFIX\fP construction variable;
+by default, the same as \fB$OBJPREFIX\fP)
and suffix
-(specified by the $SHOBJSUFFIX construction variable)
+(specified by the \fB$SHOBJSUFFIX\fP construction variable)
are automatically added to the target if not already present.
Examples:
@@ -3102,11 +3170,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 $LIBPREFIX construction variable;
+(specified by the \fB$LIBPREFIX\fP construction variable;
by default, \fBlib\fP on POSIX systems,
nothing on Windows systems)
and suffix
-(specified by the $LIBSUFFIX construction variable;
+(specified by the \fB$LIBSUFFIX\fP construction variable;
by default, \fB.lib\fP on Windows systems,
\fB.a\fP on POSIX systems)
are automatically added to the target if not already present.
@@ -3164,9 +3232,9 @@ Source files must have one of the following extensions:
.EE
.IP
The target object file prefix
-(specified by the $OBJPREFIX construction variable; nothing by default)
+(specified by the \fB$OBJPREFIX\fP construction variable; nothing by default)
and suffix
-(specified by the $OBJSUFFIX construction variable;
+(specified by the \fB$OBJSUFFIX\fP construction variable;
\fB.obj\fP on Windows systems,
\fB.o\fP on POSIX systems)
are automatically added to the target if not already present.
@@ -3191,18 +3259,18 @@ below, for more information.
The \fBSubstfile\fP() builder generates a single text file
by concatenating the source files.
Nested lists of sources are flattened.
-$LINESEPARATOR is used to separate the source files;
+\fB$LINESEPARATOR\fP is used to separate the source files;
see the description of \fBTextfile\fP() for details.
If a single source file is present with an \fB.in\fP suffix,
the suffix is stripped and the remainder is used as the default target name.
-The prefix and suffix specified by the $SUBSTFILEPREFIX
-and $SUBSTFILESUFFIX construction variables
+The prefix and suffix specified by the \fB$SUBSTFILEPREFIX\fP
+and \fB$SUBSTFILESUFFIX\fP construction variables
(the null string by default in both cases)
are automatically added to the target if they are not already present.
-If a construction variable named $SUBST_DICT is present,
+If a construction variable named \fB$SUBST_DICT\fP is present,
it may be either a Python dictionary or a sequence of (key,value) tuples.
If the former,
the dictionary is converted into a list of tuples in an arbitrary order,
@@ -3306,14 +3374,14 @@ env.Tar('foo')
The \fBTextfile\fP() builder generates a single text file.
The source strings constitute the lines;
nested lists of sources are flattened.
-$LINESEPARATOR is used to separate the strings.
+\fB$LINESEPARATOR\fP is used to separate the strings.
-If present, the $SUBST_DICT construction variable
+If present, the \fB$SUBST_DICT\fP construction variable
is used to modify the strings before they are written;
see the \fBSubstfile\fP() description for details.
-The prefix and suffix specified by the $TEXTFILEPREFIX
-and $TEXTFILESUFFIX construction variables
+The prefix and suffix specified by the \fB$TEXTFILEPREFIX\fP
+and \fB$TEXTFILESUFFIX\fP construction variables
(the null string and \fB.txt\fP by default, respectively)
are automatically added to the target if they are not already present.
Examples:
@@ -3393,7 +3461,7 @@ files to the \fBProgram\fP(),
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 $QTDIR variable for more information.
+See the \fB$QTDIR\fP variable for more information.
Example:
.ES
@@ -3490,7 +3558,7 @@ Builders by adding them
to the
.B SourceFileScanner
object.
-See the section "Scanner Objects,"
+See the section "Scanner Objects"
below, for more information about
defining your own Scanner objects
and using the
@@ -3572,10 +3640,25 @@ and global functions supported by
include:
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+'\" BEGIN GENERATED FUNCTION DESCRIPTIONS
+'\"
+'\" The descriptions below of the various SCons functions are generated
+'\" from the .xml files that live next to the various Python modules in
+'\" the build enginer library. If you're reading this [gnt]roff file
+'\" with an eye towards patching this man page, you can still submit
+'\" a diff against this text, but it will have to be translated to a
+'\" diff against the underlying .xml file before the patch is actually
+'\" accepted. If you do that yourself, it will make it easier to
+'\" integrate the patch.
+'\"
+'\" BEGIN GENERATED FUNCTION DESCRIPTIONS
+'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI Action( action ", [" cmd/str/fun ", [" var ", ...]] [" option = value ", ...])"
+.RI Action( action ", [" cmd/str/fun ", [" var ", ...]] [option=" value ", ...])"
.TP
-.IR env .Action( action ", [" cmd/str/fun ", [" var ", ...]] [" option = value ", ...])"
+.IR env .Action( action ", [" cmd/str/fun ", [" var ", ...]] [option=" value ", ...])"
Creates an Action object for
the specified
.IR action .
@@ -3601,9 +3684,9 @@ until the Action object is actually used.
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI AddMethod( object, function ", [" name ])
+.RI AddMethod( object ", " function ", [" name ])
.TP
-.RI env.AddMethod( function ", [" name ])
+.IR env .AddMethod( function ", [" name ])
When called with the
.BR AddMethod ()
form,
@@ -3668,7 +3751,7 @@ see the documentation for
for a thorough discussion of its option-processing capabities.
In addition to the arguments and values supported by the
-.B optparse.add_option ()
+.BR optparse.add_option ()
method,
the SCons
.BR AddOption ()
@@ -3705,27 +3788,25 @@ the option value may be accessed using
.BR GetOption ()
or
.BR env.GetOption ().
-\" NOTE: in SCons 1.x or 2.0, user options will be settable, but not yet.
-\" Uncomment this when that works. See tigris issue 2105.
-\" The value may also be set, using
-\" .BR SetOption ()
-\" or
-\" .BR env.SetOption (),
-\" if conditions in a
-\" .B SConscript
-\" require overriding any default value.
-\" Note, however, that a
-\" value specified on the command line will
-\" .I always
-\" override a value set by any SConscript file.
+The value may also be set, using
+.BR SetOption ()
+or
+.BR env.SetOption (),
+if conditions in a
+.B SConscript
+require overriding any default value.
+Note, however, that a
+value specified on the command line will
+.I always
+override a value set by any SConscript file.
Any specified
.B help=
strings for the new option(s)
will be displayed by the
-.B -H
+.B \-H
or
-.B -h
+.B \-h
options
(the latter only if no other help text is
specified in the SConscript files).
@@ -3756,7 +3837,7 @@ env = Environment(PREFIX = GetOption('prefix'))
.TP
.RI AddPostAction( target ", " action )
.TP
-.RI env.AddPostAction( target ", " action )
+.IR env .AddPostAction( target ", " action )
Arranges for the specified
.I action
to be performed
@@ -3777,7 +3858,7 @@ one or more targets in the list.
.TP
.RI AddPreAction( target ", " action )
.TP
-.RI env.AddPreAction( target ", " action )
+.IR env .AddPreAction( target ", " action )
Arranges for the specified
.I action
to be performed
@@ -3807,7 +3888,7 @@ file via an intermediate object file:
foo = Program('foo.c')
AddPreAction(foo, 'pre_action')
.EE
-
+.IP
The specified
.B pre_action
would be executed before
@@ -3823,7 +3904,7 @@ file into an object file.
.TP
.RI Alias( alias ", [" targets ", [" action ]])
.TP
-.RI env.Alias( alias ", [" targets ", [" action ]])
+.IR env .Alias( alias ", [" targets ", [" action ]])
Creates one or more phony targets that
expand to one or more other targets.
An optional
@@ -3837,7 +3918,7 @@ which exists outside of any file system.
This Node object, or the alias name,
may be used as a dependency of any other target,
including another alias.
-.B Alias
+.BR Alias ()
can be called multiple times for the same
alias to add additional targets to the alias,
or additional actions to the list for this alias.
@@ -3864,7 +3945,7 @@ By default,
any construction variable expansions that generate a
.B NameError
or
-.BR IndexError
+.B IndexError
exception will expand to a
.B ''
(a null string) and not cause scons to fail.
@@ -3873,7 +3954,7 @@ will generate an error message
and terminate processing.
If
-.B AllowSubstExceptions
+.BR AllowSubstExceptions ()
is called multiple times,
each call completely overwrites the previous list
of allowed exceptions.
@@ -3895,7 +3976,7 @@ AllowSubstExceptions(IndexError, NameError, ZeroDivisionError)
.TP
.RI AlwaysBuild( target ", ...)"
.TP
-.RI env.AlwaysBuild( target ", ...)"
+.IR env .AlwaysBuild( target ", ...)"
Marks each given
.I target
so that it is always assumed to be out of date,
@@ -3914,7 +3995,7 @@ Multiple targets can be passed in to a single call to
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI env.Append( key = val ", [...])"
+.IR env .Append(key= val ", [...])"
Appends the specified keyword arguments
to the end of construction variables in the environment.
If the Environment does not have
@@ -3937,7 +4018,7 @@ env.Append(CCFLAGS = ' -g', FOO = ['foo.yyy'])
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI env.AppendENVPath( name ", " newpath ", [" envname ", " sep ", " delete_existing ])
+.IR env .AppendENVPath( name ", " newpath ", [" envname ", " sep ", " delete_existing ])
This appends new path elements to the given path in the
specified external environment
.RB ( ENV
@@ -3974,7 +4055,7 @@ after: /biz:/foo/bar:/foo
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI env.AppendUnique( key = val ", [...], delete_existing=0)"
+.IR env .AppendUnique(key= val ", [...], delete_existing=" 0)
Appends the specified keyword arguments
to the end of construction variables in the environment.
If the Environment does not have
@@ -3997,18 +4078,18 @@ env.AppendUnique(CCFLAGS = '-g', FOO = ['foo.yyy'])
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-env.BitKeeper()
+.IR env .BitKeeper()
A factory function that
returns a Builder object
to be used to fetch source files
using BitKeeper.
The returned Builder
is intended to be passed to the
-.B SourceCode
+.BR SourceCode ()
function.
This function is deprecated. For details, see the entry for the
-.B SourceCode
+.BR SourceCode ()
function.
Example:
@@ -4021,7 +4102,7 @@ env.SourceCode('.', env.BitKeeper())
.TP
.RI BuildDir( build_dir ", " src_dir ", [" duplicate ])
.TP
-.RI env.BuildDir( build_dir ", " src_dir ", [" duplicate ])
+.IR env .BuildDir( build_dir ", " src_dir ", [" duplicate ])
Deprecated synonyms for
.BR VariantDir ()
and
@@ -4039,7 +4120,7 @@ or
.TP
.RI Builder( action ", [" arguments ])
.TP
-.RI env.Builder( action ", [" arguments ])
+.IR env .Builder( action ", [" arguments ])
Creates a Builder object for
the specified
.IR action .
@@ -4055,7 +4136,7 @@ including the
argument,
at the time it is called
using the construction variables in the
-.B env
+.I env
construction environment through which
.BR env.Builder ()
was called.
@@ -4068,11 +4149,11 @@ until after the Builder object is actually called.
.TP
.RI CacheDir( cache_dir )
.TP
-.RI env.CacheDir( cache_dir )
+.IR env .CacheDir( cache_dir )
Specifies that
.B scons
will maintain a cache of derived files in
-.I cache_dir .
+.IR cache_dir .
The derived files in the cache will be shared
among all the builds using the same
.BR CacheDir ()
@@ -4120,14 +4201,14 @@ builds that need to build the same derived file
from identical inputs.
Use of a specified
-.BR CacheDir()
+.BR CacheDir ()
may be disabled for any invocation
by using the
-.B --cache-disable
+.B \-\-cache-disable
option.
If the
-.B --cache-force
+.B \-\-cache-force
option is used,
.B scons
will place a copy of
@@ -4140,7 +4221,7 @@ the first time
.BR CacheDir ()
is added to a build,
or after using the
-.B --cache-disable
+.B \-\-cache-disable
option.
When using
@@ -4149,10 +4230,10 @@ When using
will report,
"Retrieved `file' from cache,"
unless the
-.B --cache-show
+.B \-\-cache-show
option is being used.
When the
-.B --cache-show
+.B \-\-cache-show
option is used,
.B scons
will print the action that
@@ -4175,10 +4256,10 @@ predict or prohibitively large.
.TP
.RI Clean( targets ", " files_or_dirs )
.TP
-.RI env.Clean( targets ", " files_or_dirs )
+.IR env .Clean( targets ", " files_or_dirs )
This specifies a list of files or directories which should be removed
whenever the targets are specified with the
-.B -c
+.B \-c
command line option.
The specified targets may be a list
or an individual target.
@@ -4205,7 +4286,7 @@ for the same target,
and any targets passed to both functions will
.I not
be removed by the
-.B -c
+.B \-c
option.
Examples:
@@ -4215,7 +4296,7 @@ Clean('foo', ['bar', 'baz'])
Clean('dist', env.Program('hello', 'hello.c'))
Clean(['foo', 'bar'], 'something_else_to_clean')
.EE
-
+.IP
In this example,
installing the project creates a subdirectory for the documentation.
This statement causes the subdirectory to be removed
@@ -4226,9 +4307,42 @@ Clean(docdir, os.path.join(docdir, projectname))
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI Command( target ", " source ", " action ", [" key = val ", ...])"
+.IR env .Clone([key= val ", ...])"
+Returns a separate copy of a construction environment.
+If there are any keyword arguments specified,
+they are added to the returned copy,
+overwriting any existing values
+for the keywords.
+
+Example:
+
+.ES
+env2 = env.Clone()
+env3 = env.Clone(CCFLAGS = '-g')
+.EE
+.IP
+Additionally, a list of tools and a toolpath may be specified, as in
+the Environment constructor:
+
+.ES
+def MyTool(env): env['FOO'] = 'bar'
+env4 = env.Clone(tools = ['msvc', MyTool])
+.EE
+.IP
+The
+.I parse_flags
+keyword argument is also recognized:
+
+.ES
+# create an environment for compiling programs that use wxWidgets
+wx_env = env.Clone(parse_flags = '!wx-config --cflags --cxxflags')
+.EE
+
+'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.TP
+.RI Command( target ", " source ", " action ", [key=" val ", ...])"
.TP
-.RI env.Command( target ", " source ", " action ", [" key = val ", ...])"
+.IR env .Command( target ", " source ", " action ", [key=" val ", ...])"
Executes a specific action
(or list of actions)
to build a target file or files.
@@ -4237,7 +4351,7 @@ than defining a separate Builder object
for a single special-case build.
As a special case, the
-.B source_scanner
+.I source_scanner
keyword argument can
be used to specify
a Scanner object
@@ -4287,7 +4401,6 @@ env.Command('baz.out', 'baz.in',
["$BAZ_BUILD < $SOURCES > .tmp",
rename ])
.EE
-
.IP
Note that the
.BR Command ()
@@ -4312,7 +4425,6 @@ env.Command('ddd.list', Dir('ddd'), 'ls -l $SOURCE > $TARGET')
env['DISTDIR'] = 'destination/directory'
env.Command(env.Dir('$DISTDIR')), None, make_distdir)
.EE
-
.IP
(Also note that SCons will usually
automatically create any directory necessary to hold a target file,
@@ -4322,7 +4434,7 @@ so you normally don't need to create directories by hand.)
.TP
.RI Configure( env ", [" custom_tests ", " conf_dir ", " log_file ", " config_h ])
.TP
-.RI env.Configure([ custom_tests ", " conf_dir ", " log_file ", " config_h ])
+.IR env .Configure([ custom_tests ", " conf_dir ", " log_file ", " config_h ])
Creates a Configure object for integrated
functionality similar to GNU autoconf.
See the section "Configure Contexts,"
@@ -4330,46 +4442,13 @@ below, for a complete explanation of the arguments and behavior.
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI env.Clone([ key = val ", ...])"
-Return a separate copy of a construction environment.
-If there are any keyword arguments specified,
-they are added to the returned copy,
-overwriting any existing values
-for the keywords.
-
-Example:
-
-.ES
-env2 = env.Clone()
-env3 = env.Clone(CCFLAGS = '-g')
-.EE
-.IP
-Additionally, a list of tools and a toolpath may be specified, as in
-the Environment constructor:
-
-.ES
-def MyTool(env): env['FOO'] = 'bar'
-env4 = env.Clone(tools = ['msvc', MyTool])
-.EE
-
-The
-.I parse_flags
-keyword argument is also recognized:
-
-.ES
-# create an environment for compiling programs that use wxWidgets
-wx_env = env.Clone(parse_flags = '!wx-config --cflags --cxxflags')
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.Copy([ key = val ", ...])"
+.IR env .Copy([key= val ", ...])"
A now-deprecated synonym for
-.BR env.Clone() .
+.BR env.Clone ().
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI env.CVS( repository ", " module )
+.IR env .CVS( repository ", " module )
A factory function that
returns a Builder object
to be used to fetch source files
@@ -4378,7 +4457,11 @@ CVS
.IR repository .
The returned Builder
is intended to be passed to the
-.B SourceCode
+.BR SourceCode ()
+function.
+
+This function is deprecated. For details, see the entry for the
+.BR SourceCode ()
function.
The optional specified
@@ -4393,10 +4476,6 @@ replicate part of the repository
directory hierarchy in your
local build directory.
-This function is deprecated. For details, see the entry for the
-.B SourceCode
-function.
-
Examples:
.ES
@@ -4417,7 +4496,7 @@ env.SourceCode('.', env.CVS('/usr/local/CVSROOT', 'foo/bar'))
.TP
.RI Decider( function )
.TP
-.RI env.Decider( function )
+.IR env .Decider( function )
Specifies that all up-to-date decisions for
targets built through this construction environment
will be handled by the specified
@@ -4429,7 +4508,7 @@ that specify the type of decision function
to be performed:
.RS 10
-.HP 6
+.TP 6
.B timestamp-newer
Specifies that a target shall be considered out of date and rebuilt
if the dependency's timestamp is newer than the target file's timestamp.
@@ -4438,8 +4517,7 @@ and
.B make
can be used a synonym for
.BR timestamp-newer .
-
-.HP 6
+.TP 6
.B timestamp-match
Specifies that a target shall be considered out of date and rebuilt
if the dependency's timestamp is different than the
@@ -4451,8 +4529,7 @@ except that the target will also be rebuilt if a
dependency file has been restored to a version with an
.I earlier
timestamp, such as can happen when restoring files from backup archives.
-
-.HP 6
+.TP 6
.B MD5
Specifies that a target shall be considered out of date and rebuilt
if the dependency's content has changed sine the last time
@@ -4464,8 +4541,7 @@ last time the target was built.
.B content
can be used as a synonym for
.BR MD5 .
-
-.HP 6
+.TP 6
.B MD5-timestamp
Specifies that a target shall be considered out of date and rebuilt
if the dependency's content has changed sine the last time
@@ -4492,7 +4568,6 @@ and runs the build again,
all within a single second.
.RE
-.IP
Examples:
.ES
@@ -4503,7 +4578,6 @@ Decider('timestamp-match')
# with the attached construction environment.
env.Decider('content')
.EE
-
.IP
In addition to the above already-available functions,
the
@@ -4518,8 +4592,8 @@ should cause the
.I target
to be rebuilt
if it has "changed" since the last tme
-.I target was built.
-
+.I target
+was built.
.IP target
The Node (file) being built.
In the normal case,
@@ -4527,7 +4601,6 @@ this is what should get rebuilt
if the
.I dependency
has "changed."
-
.IP prev_ni
Stored information about the state of the
.I dependency
@@ -4540,7 +4613,6 @@ such as the timestamp,
size, or content signature.
.RE
-.IP
The
.I function
should return a
@@ -4580,7 +4652,7 @@ env.Decider(my_decider)
.TP
.RI Default( targets )
.TP
-.RI env.Default( targets )
+.IR env .Default( targets )
This specifies a list of default targets,
which will be built by
.B scons
@@ -4638,7 +4710,7 @@ from source code management systems.
.TP
.RI Depends( target ", " dependency )
.TP
-.RI env.Depends( target ", " dependency )
+.IR env .Depends( target ", " dependency )
Specifies an explicit dependency;
the
.I target
@@ -4680,7 +4752,7 @@ env.Depends(bar, installed_lib)
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI env.Dictionary([ vars ])
+.IR env .Dictionary([ vars ])
Returns a dictionary object
containing copies of all of the
construction variables in the environment.
@@ -4699,7 +4771,7 @@ cc_dict = env.Dictionary('CC', 'CCFLAGS', 'CCCOM')
.TP
.RI Dir( name ", [" directory ])
.TP
-.RI env.Dir( name ", [" directory ])
+.IR env .Dir( name ", [" directory ])
This returns a Directory Node,
an object that represents the specified directory
.IR name .
@@ -4726,23 +4798,27 @@ see "File and Directory Nodes," below.
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI env.Dump([ key ])
+.IR env .Dump([ key ])
Returns a pretty printable representation of the environment.
.IR key ,
if not
-.IR None ,
+.BR None ,
should be a string containing the name of the variable of interest.
This SConstruct:
+
.ES
env=Environment()
print env.Dump('CCCOM')
.EE
.IP
will print:
+
.ES
-\&'$CC -c -o $TARGET $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS $SOURCES'
+'$CC -c -o $TARGET $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS $SOURCES'
.EE
+.IP
+While this SConstruct:
.ES
env=Environment()
@@ -4752,7 +4828,7 @@ print env.Dump()
will print:
.ES
{ 'AR': 'ar',
- 'ARCOM': '$AR $ARFLAGS $TARGET $SOURCES\n$RANLIB $RANLIBFLAGS $TARGET',
+ 'ARCOM': '$AR $ARFLAGS $TARGET $SOURCES\\n$RANLIB $RANLIBFLAGS $TARGET',
'ARFLAGS': ['r'],
'AS': 'as',
'ASCOM': '$AS $ASFLAGS -o $TARGET $SOURCES',
@@ -4764,9 +4840,9 @@ will print:
.TP
.RI EnsurePythonVersion( major ", " minor )
.TP
-.RI env.EnsurePythonVersion( major ", " minor )
+.IR env .EnsurePythonVersion( major ", " minor )
Ensure that the Python version is at least
-.IR major . minor .
+.IR major\fP.\fIminor .
This function will
print out an error message and exit SCons with a non-zero exit code if the
actual Python version is not late enough.
@@ -4781,7 +4857,7 @@ EnsurePythonVersion(2,2)
.TP
.RI EnsureSConsVersion( major ", " minor ", [" revision ])
.TP
-.RI env.EnsureSConsVersion( major ", " minor ", [" revision ])
+.IR env .EnsureSConsVersion( major ", " minor ", [" revision ])
Ensure that the SCons version is at least
.IR major.minor ,
or
@@ -4803,9 +4879,9 @@ EnsureSConsVersion(0,96,90)
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI Environment([ key = value ", ...])"
+.RI Environment([key= value ", ...])"
.TP
-.RI env.Environment([ key = value ", ...])"
+.IR env .Environment([key= value ", ...])"
Return a new construction environment
initialized with the specified
.IR key = value
@@ -4815,10 +4891,10 @@ pairs.
.TP
.RI Execute( action ", [" strfunction ", " varlist ])
.TP
-.RI env.Execute( action ", [" strfunction ", " varlist ])
+.IR env .Execute( action ", [" strfunction ", " varlist ])
Executes an Action object.
The specified
-.IR action
+.I action
may be an Action object
(see the section "Action Objects,"
below, for a complete explanation of the arguments and behavior),
@@ -4840,7 +4916,7 @@ fails--that is,
exits with or returns a non-zero value.
.B scons
will
-.I not ,
+.IR not ,
however,
automatically terminate the build
if the specified
@@ -4863,7 +4939,7 @@ if Execute("mkdir sub/dir/ectory"):
.TP
.RI Exit([ value ])
.TP
-.RI env.Exit([ value ])
+.IR env .Exit([ value ])
This tells
.B scons
to exit immediately
@@ -4878,7 +4954,7 @@ is used if no value is specified.
.TP
.RI Export( vars )
.TP
-.RI env.Export( vars )
+.IR env .Export( vars )
This tells
.B scons
to export a list of variables from the current
@@ -4914,7 +4990,6 @@ Export(debug = env)
# Make env available using the name debug:
Export({"debug":env})
.EE
-
.IP
Note that the
.BR SConscript ()
@@ -4930,7 +5005,7 @@ function, below.
.TP
.RI File( name ", [" directory ])
.TP
-.RI env.File( name ", [" directory ])
+.IR env .File( name ", [" directory ])
This returns a
File Node,
an object that represents the specified file
@@ -4957,7 +5032,7 @@ see "File and Directory Nodes," below.
.TP
.RI FindFile( file ", " dirs )
.TP
-.RI env.FindFile( file ", " dirs )
+.IR env .FindFile( file ", " dirs )
Search for
.I file
in the path specified by
@@ -4976,13 +5051,13 @@ foo = env.FindFile('foo', ['dir1', 'dir2'])
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI FindInstalledFiles( )
+.RI FindInstalledFiles()
.TP
-.RI env.FindInstalledFiles( )
+.IR env .FindInstalledFiles()
Returns the list of targets set up by the
-.B Install()
+.BR Install ()
or
-.B InstallAs()
+.BR InstallAs ()
builders.
This function serves as a convenient method to select the contents of
@@ -5006,46 +5081,11 @@ FindInstalledFiles()
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI FindSourceFiles( node = '"."' )
-.TP
-.RI env.FindSourceFiles( node = '"."' )
-
-Returns the list of nodes which serve as the source of the built files.
-It does so by inspecting the dependency tree starting at the optional
-argument
-.B node
-which defaults to the '"."'-node. It will then return all leaves of
-.B node.
-These are all children which have no further children.
-
-This function is a convenient method to select the contents of a Source
-Package.
-
-Example:
-
-.ES
-Program( 'src/main_a.c' )
-Program( 'src/main_b.c' )
-Program( 'main_c.c' )
-
-# returns ['main_c.c', 'src/main_a.c', 'SConstruct', 'src/main_b.c']
-FindSourceFiles()
-
-# returns ['src/main_b.c', 'src/main_a.c' ]
-FindSourceFiles( 'src' )
-.EE
-
-.IP
-As you can see build support files (SConstruct in the above example)
-will also be returned by this function.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
.RI FindPathDirs( variable )
Returns a function
(actually a callable Python object)
intended to be used as the
-.B path_function
+.I path_function
of a Scanner object.
The returned object will look up the specified
.I variable
@@ -5053,15 +5093,15 @@ in a construction environment
and treat the construction variable's value as a list of
directory paths that should be searched
(like
-.BR CPPPATH ,
-.BR LIBPATH ,
+.BR $CPPPATH ,
+.BR $LIBPATH ,
etc.).
Note that use of
.BR FindPathDirs ()
is generally preferable to
writing your own
-.B path_function
+.I path_function
for the following reasons:
1) The returned list will contain all appropriate directories
found in source trees
@@ -5095,9 +5135,42 @@ scanner = Scanner(name = 'myscanner',
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
+.RI FindSourceFiles(node= '"."')
+.TP
+.IR env .FindSourceFiles(node= '"."')
+Returns the list of nodes which serve as the source of the built files.
+It does so by inspecting the dependency tree starting at the optional
+argument
+.I node
+which defaults to the '"."'-node. It will then return all leaves of
+.IR node .
+These are all children which have no further children.
+
+This function is a convenient method to select the contents of a Source
+Package.
+
+Example:
+
+.ES
+Program( 'src/main_a.c' )
+Program( 'src/main_b.c' )
+Program( 'main_c.c' )
+
+# returns ['main_c.c', 'src/main_a.c', 'SConstruct', 'src/main_b.c']
+FindSourceFiles()
+
+# returns ['src/main_b.c', 'src/main_a.c' ]
+FindSourceFiles( 'src' )
+.EE
+.IP
+As you can see build support files (SConstruct in the above example)
+will also be returned by this function.
+
+'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.TP
.RI Flatten( sequence )
.TP
-.RI env.Flatten( sequence )
+.IR env .Flatten( sequence )
Takes a sequence (that is, a Python list or tuple)
that may contain nested sequences
and returns a flattened list containing
@@ -5136,7 +5209,7 @@ Returns a list of exceptions for the
actions that failed while
attempting to build targets.
Each element in the returned list is a
-.B BuildError
+.I BuildError
object
with the following attributes
that record various aspects
@@ -5236,9 +5309,9 @@ atexit.register(print_build_failures)
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI GetBuildPath( file ", [" ... ])
+.RI GetBuildPath( file ", [...])"
.TP
-.RI env.GetBuildPath( file ", [" ... ])
+.IR env .GetBuildPath( file ", [...])"
Returns the
.B scons
path name (or names) for the specified
@@ -5255,15 +5328,15 @@ Nodes or strings representing path names.
.TP
.RI GetLaunchDir()
.TP
-.RI env.GetLaunchDir()
+.IR env .GetLaunchDir()
Returns the absolute path name of the directory from which
.B scons
was initially invoked.
This can be useful when using the
.BR \-u ,
-.BR \-U
+.B \-U
or
-.BR \-D
+.B \-D
options, which internally
change to the directory in which the
.B SConstruct
@@ -5273,11 +5346,11 @@ file is found.
.TP
.RI GetOption( name )
.TP
-.RI env.GetOption( name )
+.IR env .GetOption( name )
This function provides a way to query the value of
SCons options set on scons command line
(or set using the
-.IR SetOption ()
+.BR SetOption ()
function).
The options supported are:
@@ -5374,7 +5447,6 @@ which corresponds to --taskmastertrace; and
which corresponds to --warn and --warning.
.RE
-.IP
See the documentation for the
corresponding command line object for information about each specific
option.
@@ -5383,7 +5455,7 @@ option.
.TP
.RI Glob( pattern ", [" ondisk ", " source ", " strings ])
.TP
-.RI env.Glob( pattern ", [" ondisk ", " source ", " strings ])
+.IR env .Glob( pattern ", [" ondisk ", " source ", " strings ])
Returns Nodes (or strings) that match the specified
.IR pattern ,
relative to the directory of the current
@@ -5406,7 +5478,6 @@ uses Unix shell style metacharacters for matching:
[seq] matches any character in seq
[!seq] matches any char not in seq
.EE
-
.IP
If the first character of a filename is a dot,
it must be matched explicitly.
@@ -5433,7 +5504,7 @@ anywhere in a corresponding
repository or source directory.
The
-.B ondisk
+.I ondisk
argument may be set to
.B False
(or any other non-true value)
@@ -5445,7 +5516,7 @@ return corresponding Nodes
for any on-disk matches found.
The
-.B source
+.I source
argument may be set to
.B True
(or any equivalent value)
@@ -5457,7 +5528,7 @@ corresponding source directory,
not the local directory.
The
-.B strings
+.I strings
argument may be set to
.B True
(or any equivalent value)
@@ -5489,51 +5560,32 @@ Zip('/tmp/everything', Glob('.??*') + Glob('*'))
.EE
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-'\".TP
-'\".RI GlobalBuilders( flag )
-'\"When
-'\".B flag
-'\"is non-zero,
-'\"adds the names of the default builders
-'\"(Program, Library, etc.)
-'\"to the global name space
-'\"so they can be called without an explicit construction environment.
-'\"(This is the default.)
-'\"When
-'\".B
-'\"flag is zero,
-'\"the names of the default builders are removed
-'\"from the global name space
-'\"so that an explicit construction environment is required
-'\"to call all builders.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
.RI Help( text )
.TP
-.RI env.Help( text )
+.IR env .Help( text )
This specifies help text to be printed if the
-.B -h
+.B \-h
argument is given to
.BR scons .
If
-.BR Help
+.BR Help ()
is called multiple times, the text is appended together in the order
that
-.BR Help
+.BR Help ()
is called.
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
.RI Ignore( target ", " dependency )
.TP
-.RI env.Ignore( target ", " dependency )
+.IR env .Ignore( target ", " dependency )
The specified dependency file(s)
will be ignored when deciding if
the target file(s) need to be rebuilt.
You can also use
-.BR Ignore()
+.BR Ignore ()
to remove a target from the default build.
In order to do this you must specify the directory the target will
be built in as the target, and the file you want to skip building
@@ -5557,7 +5609,7 @@ env.Ignore('bar','bar/foobar.obj')
.TP
.RI Import( vars )
.TP
-.RI env.Import( vars )
+.IR env .Import( vars )
This tells
.B scons
to import a list of variables into the current SConscript file. This
@@ -5588,7 +5640,7 @@ Import("*")
.TP
.RI Literal( string )
.TP
-.RI env.Literal( string )
+.IR env .Literal( string )
The specified
.I string
will be preserved as-is
@@ -5598,7 +5650,7 @@ and not have construction variables expanded.
.TP
.RI Local( targets )
.TP
-.RI env.Local( targets )
+.IR env .Local( targets )
The specified
.I targets
will have copies made in the local tree,
@@ -5607,47 +5659,8 @@ exists in a repository.
Returns a list of the target Node or Nodes.
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-\" .TP
-\" .RI env.MergeShellPaths( arg ", [" prepend ])
-\" Merges the elements of the specified
-\" .IR arg ,
-\" which must be a dictionary, to the construction
-\" environment's copy of the shell environment
-\" in env['ENV'].
-\" (This is the environment which is passed
-\" to subshells spawned by SCons.)
-\" Note that
-\" .I arg
-\" must be a single value,
-\" so multiple strings must
-\" be passed in as a list,
-\" not as separate arguments to
-\" .BR env.MergeShellPaths ().
-
-\" New values are prepended to the environment variable by default,
-\" unless prepend=0 is specified.
-\" Duplicate values are always eliminated,
-\" since this function calls
-\" .B AppendENVPath
-\" or
-\" .B PrependENVPath
-\" depending on the
-\" .I prepend
-\" argument. See those functions for more details.
-
-\" Examples:
-
-\" .ES
-\" # Prepend a path to the shell PATH.
-\" env.MergeShellPaths({'PATH':'/usr/local/bin'} )
-\" # Append two dirs to the shell INCLUDE.
-\" env.MergeShellPaths({'INCLUDE':['c:/inc1', 'c:/inc2']}, prepend=0 )
-
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI env.MergeFlags( arg ", [" unique ])
+.IR env .MergeFlags( arg ", [" unique ])
Merges the specified
.I arg
values to the construction environment's construction variables.
@@ -5655,7 +5668,7 @@ If the
.I arg
argument is not a dictionary,
it is converted to one by calling
-.B env.ParseFlags()
+.BR env.ParseFlags ()
on the argument
before the values are merged.
Note that
@@ -5701,7 +5714,7 @@ env.MergeFlags(['-O3',
.TP
.RI NoCache( target ", ...)"
.TP
-.RI env.NoCache( target ", ...)"
+.IR env .NoCache( target ", ...)"
Specifies a list of files which should
.I not
be cached whenever the
@@ -5734,12 +5747,12 @@ NoCache(env.Program('hello', 'hello.c'))
.TP
.RI NoClean( target ", ...)"
.TP
-.RI env.NoClean( target ", ...)"
+.IR env .NoClean( target ", ...)"
Specifies a list of files or directories which should
.I not
be removed whenever the targets (or their dependencies)
are specified with the
-.B -c
+.B \-c
command line option.
The specified targets may be a list
or an individual target.
@@ -5748,7 +5761,7 @@ Multiple calls to
are legal,
and prevent each specified target
from being removed by calls to the
-.B -c
+.B \-c
option.
Multiple files or directories should be specified
@@ -5767,7 +5780,7 @@ for the same target,
and any targets passed to both functions will
.I not
be removed by the
-.B -c
+.B \-c
option.
Examples:
@@ -5779,17 +5792,18 @@ NoClean(env.Program('hello', 'hello.c'))
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI env.ParseConfig( command ", [" function ", " unique ])
+.IR env .ParseConfig( command ", [" function ", " unique ])
Calls the specified
.I function
to modify the environment as specified by the output of
-.I command .
+.IR command .
The default
.I function
is
.BR env.MergeFlags (),
which expects the output of a typical
-.I *-config command
+.B *-config
+command
(for example,
.BR gtk-config )
and adds the options
@@ -5814,11 +5828,11 @@ for a table of options and construction variables.
.TP
.RI ParseDepends( filename ", [" must_exist ", " only_one ])
.TP
-.RI env.ParseDepends( filename ", [" must_exist ", " only_one ])
+.IR env .ParseDepends( filename ", [" must_exist ", " only_one ])
Parses the contents of the specified
.I filename
as a list of dependencies in the style of
-.BR Make
+.B Make
or
.BR mkdep ,
and explicitly establishes all of the listed dependencies.
@@ -5849,7 +5863,7 @@ information for more than one target.
This can provide a small sanity check
for files intended to be generated
by, for example, the
-.B gcc -M
+.B "gcc -M"
flag,
which should typically only
write dependency information for
@@ -5862,14 +5876,14 @@ The
and all of the files listed therein
will be interpreted relative to
the directory of the
-.I SConscript
+.B SConscript
file which calls the
-.B ParseDepends
+.BR ParseDepends ()
function.
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI env.ParseFlags( flags ", ...)"
+.IR env .ParseFlags( flags ", ...)"
Parses one or more strings containing
typical command-line flags for GCC tool chains
and returns a dictionary with the flag values
@@ -5919,12 +5933,11 @@ and added to the following construction variables:
- CCFLAGS
+ CCFLAGS, LINKFLAGS
.EE
-
.IP
Any other strings not associated with options
are assumed to be the names of libraries
and added to the
-.B LIBS
+.B $LIBS
construction variable.
Examples (all of which produce the same result):
@@ -5938,18 +5951,18 @@ dict = env.ParseFlags('-O2', '!echo -Dfoo -Dbar=1')
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-env.Perforce()
+.IR env .Perforce()
A factory function that
returns a Builder object
to be used to fetch source files
from the Perforce source code management system.
The returned Builder
is intended to be passed to the
-.B SourceCode
+.BR SourceCode ()
function.
This function is deprecated. For details, see the entry for the
-.B SourceCode
+.BR SourceCode ()
function.
Example:
@@ -5978,19 +5991,24 @@ USERNAME.
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
.RI Platform( string )
-Returns a callable object
+The
+.BR Platform ()
+form returns a callable object
that can be used to initialize
a construction environment using the
-platform keyword of the Environment() method.
+platform keyword of the
+.BR Environment ()
+function.
Example:
.ES
env = Environment(platform = Platform('win32'))
.EE
-.TP
-.RI env.Platform( string )
-Applies the callable object for the specified platform
+.IP
+The
+.BR env.Platform ()
+form applies the callable object for the specified platform
.I string
to the environment through which the method was called.
@@ -6006,7 +6024,7 @@ and
.B SystemRoot
variables from the user's external environment
to the construction environment's
-.B ENV
+.B $ENV
dictionary.
This is so that any executed commands
that use sockets to connect with other systems
@@ -6017,6 +6035,106 @@ will work on Windows systems.
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
+.RI Precious( target ", ...)"
+.TP
+.IR env .Precious( target ", ...)"
+Marks each given
+.I target
+as precious so it is not deleted before it is rebuilt. Normally
+.B scons
+deletes a target before building it.
+Multiple targets can be passed in to a single call to
+.BR Precious ().
+
+'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.TP
+.IR env .Prepend(key= val ", [...])"
+Appends the specified keyword arguments
+to the beginning of construction variables in the environment.
+If the Environment does not have
+the specified construction variable,
+it is simply added to the environment.
+If the values of the construction variable
+and the keyword argument are the same type,
+then the two values will be simply added together.
+Otherwise, the construction variable
+and the value of the keyword argument
+are both coerced to lists,
+and the lists are added together.
+(See also the Append method, above.)
+
+Example:
+
+.ES
+env.Prepend(CCFLAGS = '-g ', FOO = ['foo.yyy'])
+.EE
+
+'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.TP
+.IR env .PrependENVPath( name ", " newpath ", [" envname ", " sep ", " delete_existing ])
+This appends new path elements to the given path in the
+specified external environment
+.RB ( $ENV
+by default).
+This will only add
+any particular path once (leaving the first one it encounters and
+ignoring the rest, to preserve path order),
+and to help assure this,
+will normalize all paths (using
+.B os.path.normpath
+and
+.BR os.path.normcase ).
+This can also handle the
+case where the given old path variable is a list instead of a
+string, in which case a list will be returned instead of a string.
+
+If
+.I delete_existing
+is 0, then adding a path that already exists
+will not move it to the beginning;
+it will stay where it is in the list.
+
+Example:
+
+.ES
+print 'before:',env['ENV']['INCLUDE']
+include_path = '/foo/bar:/foo'
+env.PrependENVPath('INCLUDE', include_path)
+print 'after:',env['ENV']['INCLUDE']
+.EE
+.IP
+The above example will print:
+
+.ES
+before: /biz:/foo
+after: /foo/bar:/foo:/biz
+.EE
+
+'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.TP
+.IR env .PrependUnique(key= val ", delete_existing=" "0, [...])"
+Appends the specified keyword arguments
+to the beginning of construction variables in the environment.
+If the Environment does not have
+the specified construction variable,
+it is simply added to the environment.
+If the construction variable being appended to is a list,
+then any value(s) that already exist in the
+construction variable will
+.I not
+be added again to the list.
+However, if delete_existing is 1,
+existing matching values are removed first, so
+existing values in the arg list move to the front of the list.
+
+Example:
+
+.ES
+env.PrependUnique(CCFLAGS = '-g', FOO = ['foo.yyy'])
+.EE
+
+'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.TP
.RI Progress( callable ", [" interval ])
.TP
.RI Progress( string ", [" interval ", " file ", " overwrite ])
@@ -6060,7 +6178,7 @@ A more complicated example of a custom progress display object
that prints a string containing a count
every 100 evaluated Nodes.
Note the use of
-.B \\\\r
+.B \\r
(a carriage return)
at the end so that the string
will overwrite itself on a display:
@@ -6097,7 +6215,7 @@ Progress('.', interval=100, file=sys.stderr)
.EE
.IP
If the string contains the verbatim substring
-.B $TARGET,
+.BR $TARGET ,
it will be replaced with the Node.
Note that, for performance reasons, this is
.I not
@@ -6107,7 +6225,7 @@ or use curly braces.
The following example will print the name of
every evaluated Node,
using a
-.B \\\\r
+.B \\r
(carriage return) to cause each line to overwritten by the next line,
and the
.B overwrite=
@@ -6135,118 +6253,18 @@ Progress(['-\\r', '\\\\\\r', '|\\r', '/\\r'], interval=5)
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI Precious( target ", ...)"
-.TP
-.RI env.Precious( target ", ...)"
-Marks each given
-.I target
-as precious so it is not deleted before it is rebuilt. Normally
-.B scons
-deletes a target before building it.
-Multiple targets can be passed in to a single call to
-.BR Precious ().
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.Prepend( key = val ", [...])"
-Appends the specified keyword arguments
-to the beginning of construction variables in the environment.
-If the Environment does not have
-the specified construction variable,
-it is simply added to the environment.
-If the values of the construction variable
-and the keyword argument are the same type,
-then the two values will be simply added together.
-Otherwise, the construction variable
-and the value of the keyword argument
-are both coerced to lists,
-and the lists are added together.
-(See also the Append method, above.)
-
-Example:
-
-.ES
-env.Prepend(CCFLAGS = '-g ', FOO = ['foo.yyy'])
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.PrependENVPath( name ", " newpath ", [" envname ", " sep ", " delete_existing ])
-This appends new path elements to the given path in the
-specified external environment
-.RB ( ENV
-by default).
-This will only add
-any particular path once (leaving the first one it encounters and
-ignoring the rest, to preserve path order),
-and to help assure this,
-will normalize all paths (using
-.B os.path.normpath
-and
-.BR os.path.normcase ).
-This can also handle the
-case where the given old path variable is a list instead of a
-string, in which case a list will be returned instead of a string.
-
-If
-.I delete_existing
-is 0, then adding a path that already exists
-will not move it to the beginning;
-it will stay where it is in the list.
-
-Example:
-
-.ES
-print 'before:',env['ENV']['INCLUDE']
-include_path = '/foo/bar:/foo'
-env.PrependENVPath('INCLUDE', include_path)
-print 'after:',env['ENV']['INCLUDE']
-.EE
-
-The above exmaple will print:
-
-.ES
-before: /biz:/foo
-after: /foo/bar:/foo:/biz
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.PrependUnique( key = val ", delete_existing=0, [...])"
-Appends the specified keyword arguments
-to the beginning of construction variables in the environment.
-If the Environment does not have
-the specified construction variable,
-it is simply added to the environment.
-If the construction variable being appended to is a list,
-then any value(s) that already exist in the
-construction variable will
-.I not
-be added again to the list.
-However, if delete_existing is 1,
-existing matching values are removed first, so
-existing values in the arg list move to the front of the list.
-
-Example:
-
-.ES
-env.PrependUnique(CCFLAGS = '-g', FOO = ['foo.yyy'])
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-env.RCS()
+.IR env .RCS()
A factory function that
returns a Builder object
to be used to fetch source files
from RCS.
The returned Builder
is intended to be passed to the
-.B SourceCode
+.BR SourceCode ()
function:
This function is deprecated. For details, see the entry for the
-.B SourceCode
+.BR SourceCode ()
function.
Examples:
@@ -6271,7 +6289,7 @@ for a specific subdirectory.
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI env.Replace( key = val ", [...])"
+.IR env .Replace(key= val ", [...])"
Replaces construction variables in the Environment
with the specified keyword arguments.
@@ -6285,7 +6303,7 @@ env.Replace(CCFLAGS = '-g', FOO = 'foo.xxx')
.TP
.RI Repository( directory )
.TP
-.RI env.Repository( directory )
+.IR env .Repository( directory )
Specifies that
.I directory
is a repository to be searched for files.
@@ -6324,14 +6342,14 @@ make a copy in the local directory tree.
In order to guarantee that a local copy
will be made,
use the
-.B Local()
+.BR Local ()
method.
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
.RI Requires( target ", " prerequisite )
.TP
-.RI env.Requires( target ", " prerequisite )
+.IR env .Requires( target ", " prerequisite )
Specifies an order-only relationship
between the specified target file(s)
and the specified prerequisite file(s).
@@ -6352,7 +6370,7 @@ env.Requires('foo', 'file-that-must-be-built-before-foo')
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI Return([ vars "... , " stop= ])
+.RI Return([ vars "..., stop=" ])
By default,
this stops processing the current SConscript
file and returns to the calling SConscript file
@@ -6398,7 +6416,7 @@ Return('val1 val2')
.TP
.RI Scanner( function ", [" argument ", " keys ", " path_function ", " node_class ", " node_factory ", " scan_check ", " recursive ])
.TP
-.RI env.Scanner( function ", [" argument ", " keys ", " path_function ", " node_class ", " node_factory ", " scan_check ", " recursive ])
+.IR env .Scanner( function ", [" argument ", " keys ", " path_function ", " node_class ", " node_factory ", " scan_check ", " recursive ])
Creates a Scanner object for
the specified
.IR function .
@@ -6407,18 +6425,14 @@ below, for a complete explanation of the arguments and behavior.
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-env.SCCS()
+.IR env .SCCS()
A factory function that
returns a Builder object
to be used to fetch source files
from SCCS.
The returned Builder
is intended to be passed to the
-.B SourceCode
-function.
-
-This function is deprecated. For details, see the entry for the
-.B SourceCode
+.BR SourceCode ()
function.
Example:
@@ -6435,7 +6449,7 @@ so configuring SCCS
as demonstrated in the above example
should only be necessary if
you are fetching from
-.I s.SCCS
+.B s.SCCS
files in the same
directory as the source files,
or if you need to explicitly specify SCCS
@@ -6444,16 +6458,12 @@ for a specific subdirectory.
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
.RI SConscript( scripts ", [" exports ", " variant_dir ", " duplicate ])
-'\" .RI SConscript( scripts ", [" exports ", " variant_dir ", " src_dir ", " duplicate ])
.TP
-.RI env.SConscript( scripts ", [" exports ", " variant_dir ", " duplicate ])
-'\" .RI env.SConscript( scripts ", [" exports ", " variant_dir ", " src_dir ", " duplicate ])
+.IR env .SConscript( scripts ", [" exports ", " variant_dir ", " duplicate ])
.TP
.RI SConscript(dirs= subdirs ", [name=" script ", " exports ", " variant_dir ", " duplicate ])
-'\" .RI SConscript(dirs= subdirs ", [name=" script ", " exports ", " variant_dir ", " src_dir ", " duplicate ])
.TP
-.RI env.SConscript(dirs= subdirs ", [name=" script ", " exports ", " variant_dir ", " duplicate ])
-'\" .RI env.SConscript(dirs= subdirs ", [name=" script ", " exports ", " variant_dir ", " src_dir ", " duplicate ])
+.IR env .SConscript(dirs= subdirs ", [name=" script ", " exports ", " variant_dir ", " duplicate ])
This tells
.B scons
to execute
@@ -6483,12 +6493,12 @@ SConscript('src/SConscript') # run SConscript in the src directory
SConscript(['src/SConscript', 'doc/SConscript'])
config = SConscript('MyConfig.py')
.EE
-
+.IP
The second way you can call
.BR SConscript ()
is to specify a list of (sub)directory names
as a
-.RI dirs= subdirs
+.BI dirs= subdirs
keyword argument.
In this case,
.B scons
@@ -6499,7 +6509,7 @@ in each of the specified directories.
You may specify a name other than
.B SConscript
by supplying an optional
-.RI name= script
+.BI name= script
keyword argument.
The first three examples below have the same effect
as the first three examples above:
@@ -6509,7 +6519,7 @@ SConscript(dirs='src') # run SConscript in the src directory
SConscript(dirs=['src', 'doc'])
SConscript(dirs=['sub1', 'sub2'], name='MySConscript')
.EE
-
+.IP
The optional
.I exports
argument provides a list of variable names or a dictionary of
@@ -6520,7 +6530,6 @@ These variables are locally exported only to the specified
and do not affect the global pool of variables used by the
.BR Export ()
function.
-'\"If multiple dirs are provided, each script gets a fresh export.
The subsidiary
.I script(s)
must use the
@@ -6533,7 +6542,7 @@ SConscript('dir/SConscript', exports=['env', 'variable'])
SConscript(dirs='subdir', exports='env variable')
SConscript(dirs=['one', 'two', 'three'], exports='shared_info')
.EE
-
+.IP
If the optional
.I variant_dir
argument is present, it causes an effect equivalent to the
@@ -6542,15 +6551,10 @@ method described below.
(If
.I variant_dir
is not present, the
-'\" .IR src_dir and
.I duplicate
-'\" arguments are ignored.)
argument is ignored.)
The
.I variant_dir
-'\" and
-'\" .I src_dir
-'\" arguments are interpreted relative to the directory of the calling
argument is interpreted relative to the directory of the calling
.B SConscript
file.
@@ -6561,8 +6565,6 @@ function below for additional details and restrictions.
If
.I variant_dir
is present,
-'\" but
-'\" .IR src_dir " is not,"
the source directory is the directory in which the
.B SConscript
file resides and the
@@ -6573,46 +6575,29 @@ directory:
.ES
SConscript('src/SConscript', variant_dir = 'build')
.EE
+.IP
is equivalent to
+
.ES
VariantDir('build', 'src')
SConscript('build/SConscript')
.EE
+.IP
This later paradigm is often used when the sources are
in the same directory as the
-.BR SConstruct:
+.BR SConstruct :
+
.ES
SConscript('SConscript', variant_dir = 'build')
.EE
+.IP
is equivalent to
+
.ES
VariantDir('build', '.')
SConscript('build/SConscript')
.EE
-
-'\" If
-'\" .IR variant_dir " and"
-'\" .IR src_dir " are both present,"
-'\" xxxxx everything is in a state of confusion.
-'\" .ES
-'\" SConscript(dirs = 'src', variant_dir = 'build', src_dir = '.')
-'\" runs src/SConscript in build/src, but
-'\" SConscript(dirs = 'lib', variant_dir = 'build', src_dir = 'src')
-'\" runs lib/SConscript (in lib!). However,
-'\" SConscript(dirs = 'src', variant_dir = 'build', src_dir = 'src')
-'\" runs src/SConscript in build. Moreover,
-'\" SConscript(dirs = 'src/lib', variant_dir = 'build', src_dir = 'src')
-'\" runs src/lib/SConscript in build/lib. Moreover,
-'\" SConscript(dirs = 'build/src/lib', variant_dir = 'build', src_dir = 'src')
-'\" can't find build/src/lib/SConscript, even though it ought to exist.
-'\" .EE
-'\" is equivalent to
-'\" .ES
-'\" ????????????????
-'\" .EE
-'\" and what about this alternative?
-'\"TODO??? SConscript('build/SConscript', src_dir='src')
-
+.IP
Here are some composite examples:
.ES
@@ -6649,7 +6634,7 @@ SConscript('src/SConscript', variant_dir='build/ppc', duplicate=0)
.TP
.RI SConscriptChdir( value )
.TP
-.RI env.SConscriptChdir( value )
+.IR env .SConscriptChdir( value )
By default,
.B scons
changes its working directory
@@ -6687,9 +6672,9 @@ SConscript('bar/SConscript') # will chdir to bar
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI SConsignFile([ file , dbm_module ])
+.RI SConsignFile([ file ", " dbm_module ])
.TP
-.RI env.SConsignFile([ file , dbm_module ])
+.IR env .SConsignFile([ file ", " dbm_module ])
This tells
.B scons
to store all file signatures
@@ -6757,7 +6742,7 @@ SConsignFile(None)
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI env.SetDefault(key = val ", [...])"
+.IR env .SetDefault(key= val ", [...])"
Sets construction variables to default values specified with the keyword
arguments if (and only if) the variables are not already set.
The following statements are equivalent:
@@ -6772,7 +6757,7 @@ if 'FOO' not in env: env['FOO'] = 'foo'
.TP
.RI SetOption( name ", " value )
.TP
-.RI env.SetOption( name ", " value )
+.IR env .SetOption( name ", " value )
This function provides a way to set a select subset of the scons command
line options from a SConscript file. The options supported are:
@@ -6806,7 +6791,6 @@ which corresponds to --random; and
which corresponds to --stack-size.
.RE
-.IP
See the documentation for the
corresponding command line object for information about each specific
option.
@@ -6821,7 +6805,7 @@ SetOption('max_drift', 1)
.TP
.RI SideEffect( side_effect ", " target )
.TP
-.RI env.SideEffect( side_effect ", " target )
+.IR env .SideEffect( side_effect ", " target )
Declares
.I side_effect
as a side effect of building
@@ -6856,7 +6840,7 @@ automatically removed
when the
.I target
is removed by the
-.B -c
+.B \-c
option.
(Note, however, that the
.I side_effect
@@ -6878,13 +6862,13 @@ function.
.TP
.RI SourceCode( entries ", " builder )
.TP
-.RI env.SourceCode( entries ", " builder )
+.IR env .SourceCode( entries ", " builder )
This function and its associate factory functions are deprecated.
There is no replacement.
The intended use was to keep a local tree in sync with an archive,
but in actuality the function only causes the archive
to be fetched on the first run.
-Synchronizing with the archive is best done external to SCons.
+Synchronizing with the archive is best done external to &SCons;.
Arrange for non-existent source files to
be fetched from a source code management system
@@ -6901,7 +6885,7 @@ For any non-existent source files,
.B scons
will search up the directory tree
and use the first
-.B SourceCode
+.BR SourceCode ()
builder it finds.
The specified
.I builder
@@ -6913,7 +6897,7 @@ will not use a builder to fetch
source files for the specified
.IR entries ,
even if a
-.B SourceCode
+.BR SourceCode ()
builder has been specified
for a directory higher up the tree.
@@ -6931,7 +6915,6 @@ by disabling these searches as follows:
.ES
env.SourceCode('.', None)
.EE
-
.IP
Note that if the specified
.I builder
@@ -6954,151 +6937,12 @@ env.SourceCode('/', env.RCS())
env.SourceCode(['f1.c', 'f2.c'], env.SCCS())
env.SourceCode('no_source.c', None)
.EE
-'\"env.SourceCode('.', env.Subversion('file:///usr/local/Subversion'))
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.subst( input ", [" raw ", " target ", " source ", " conv ])
-Performs construction variable interpolation
-on the specified string or sequence argument
-.IR input .
-
-By default,
-leading or trailing white space will
-be removed from the result.
-and all sequences of white space
-will be compressed to a single space character.
-Additionally, any
-.B $(
-and
-.B $)
-character sequences will be stripped from the returned string,
-The optional
-.I raw
-argument may be set to
-.B 1
-if you want to preserve white space and
-.BR $( - $)
-sequences.
-The
-.I raw
-argument may be set to
-.B 2
-if you want to strip
-all characters between
-any
-.B $(
-and
-.B $)
-pairs
-(as is done for signature calculation).
-
-If the input is a sequence
-(list or tuple),
-the individual elements of
-the sequence will be expanded,
-and the results will be returned as a list.
-
-The optional
-.I target
-and
-.I source
-keyword arguments
-must be set to lists of
-target and source nodes, respectively,
-if you want the
-.BR $TARGET ,
-.BR $TARGETS ,
-.BR $SOURCE
-and
-.BR $SOURCES
-to be available for expansion.
-This is usually necessary if you are
-calling
-.BR env.subst ()
-from within a Python function used
-as an SCons action.
-
-Returned string values or sequence elements
-are converted to their string representation by default.
-The optional
-.I conv
-argument
-may specify a conversion function
-that will be used in place of
-the default.
-For example, if you want Python objects
-(including SCons Nodes)
-to be returned as Python objects,
-you can use the Python
-.B lambda
-idiom to pass in an unnamed function
-that simply returns its unconverted argument.
-
-Example:
-
-.ES
-print env.subst("The C compiler is: $CC")
-
-def compile(target, source, env):
- sourceDir = env.subst("${SOURCE.srcdir}",
- target=target,
- source=source)
-
-source_nodes = env.subst('$EXPAND_TO_NODELIST',
- conv=lambda x: x)
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-'\".TP
-'\".RI Subversion( repository ", " module )
-'\"A factory function that
-'\"returns a Builder object
-'\"to be used to fetch source files
-'\"from the specified Subversion
-'\".IR repository .
-'\"The returned Builder
-'\"is intended to be passed to the
-'\".B SourceCode
-'\"function.
-'\"
-'\"The optional specified
-'\".I module
-'\"will be added to the beginning
-'\"of all repository path names;
-'\"this can be used, in essence,
-'\"to strip initial directory names
-'\"from the repository path names,
-'\"so that you only have to
-'\"replicate part of the repository
-'\"directory hierarchy in your
-'\"local build directory.
-'\"
-'\"This function is deprecated. For details, see the entry for the
-'\".B SourceCode
-'\"function.
-'\"
-'\"Example:
-'\"
-'\".ES
-'\"# Will fetch foo/bar/src.c
-'\"# from /usr/local/Subversion/foo/bar/src.c.
-'\"env.SourceCode('.', env.Subversion('file:///usr/local/Subversion'))
-'\"
-'\"# Will fetch bar/src.c
-'\"# from /usr/local/Subversion/foo/bar/src.c.
-'\"env.SourceCode('.', env.Subversion('file:///usr/local/Subversion', 'foo'))
-'\"
-'\"# Will fetch src.c
-'\"# from /usr/local/Subversion/foo/bar/src.c.
-'\"env.SourceCode('.', env.Subversion('file:///usr/local/Subversion', 'foo/bar'))
-'\".EE
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
.RI SourceSignatures( type )
.TP
-.RI env.SourceSignatures( type )
+.IR env .SourceSignatures( type )
Note: Although it is not yet officially deprecated,
use of this function is discouraged.
See the
@@ -7115,9 +6959,9 @@ how to decide if a source file
has changed since the last time it
was used to build a particular target file.
Legal values are
-.B "MD5"
+.B MD5
or
-.BR "timestamp" .
+.BR timestamp .
If the environment method is used,
the specified type of source signature
@@ -7128,14 +6972,14 @@ the specified type of source signature becomes the default
used for all decisions
about whether targets are up-to-date.
-.B "MD5"
+.B MD5
means
.B scons
decides that a source file has changed
if the MD5 checksum of its contents has changed since
the last time it was used to rebuild a particular target file.
-.B "timestamp"
+.B timestamp
means
.B scons
decides that a source file has changed
@@ -7151,13 +6995,13 @@ for Python
.BR Value ()
node objects.
-.B "MD5"
+.B MD5
signatures take longer to compute,
but are more accurate than
-.B "timestamp"
+.B timestamp
signatures.
The default value is
-.BR "MD5" .
+.BR MD5 .
Note that the default
.BR TargetSignatures ()
@@ -7179,7 +7023,7 @@ is used).
.TP
.RI Split( arg )
.TP
-.RI env.Split( arg )
+.IR env .Split( arg )
Returns a list of file names or other objects.
If arg is a string,
it will be split on strings of white-space characters
@@ -7205,6 +7049,99 @@ files = Split("""
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
+.IR env .subst( input ", [" raw ", " target ", " source ", " conv ])
+Performs construction variable interpolation
+on the specified string or sequence argument
+.IR input .
+
+By default,
+leading or trailing white space will
+be removed from the result.
+and all sequences of white space
+will be compressed to a single space character.
+Additionally, any
+.B $(
+and
+.B $)
+character sequences will be stripped from the returned string,
+The optional
+.I raw
+argument may be set to
+.B 1
+if you want to preserve white space and
+.BR $( - $)
+sequences.
+The
+.I raw
+argument may be set to
+.B 2
+if you want to strip
+all characters between
+any
+.B $(
+and
+.B $)
+pairs
+(as is done for signature calculation).
+
+If the input is a sequence
+(list or tuple),
+the individual elements of
+the sequence will be expanded,
+and the results will be returned as a list.
+
+The optional
+.I target
+and
+.I source
+keyword arguments
+must be set to lists of
+target and source nodes, respectively,
+if you want the
+.BR $TARGET ,
+.BR $TARGETS ,
+.B $SOURCE
+and
+.B $SOURCES
+to be available for expansion.
+This is usually necessary if you are
+calling
+.BR env.subst ()
+from within a Python function used
+as an SCons action.
+
+Returned string values or sequence elements
+are converted to their string representation by default.
+The optional
+.I conv
+argument
+may specify a conversion function
+that will be used in place of
+the default.
+For example, if you want Python objects
+(including SCons Nodes)
+to be returned as Python objects,
+you can use the Python
+.B lambda
+idiom to pass in an unnamed function
+that simply returns its unconverted argument.
+
+Example:
+
+.ES
+print env.subst("The C compiler is: $CC")
+
+def compile(target, source, env):
+ sourceDir = env.subst("${SOURCE.srcdir}",
+ target=target,
+ source=source)
+
+source_nodes = env.subst('$EXPAND_TO_NODELIST',
+ conv=lambda x: x)
+.EE
+
+'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.TP
.RI Tag( node ", " tags )
Annotates file or directory Nodes with
information about how the
@@ -7227,7 +7164,7 @@ Tag( 'file2.txt', DOC )
.TP
.RI TargetSignatures( type )
.TP
-.RI env.TargetSignatures( type )
+.IR env .TargetSignatures( type )
Note: Although it is not yet officially deprecated,
use of this function is discouraged.
See the
@@ -7247,7 +7184,7 @@ has changed since the last time it
was used to build some other target file.
Legal values are
.BR "build" ;
-.BR "content"
+.B "content"
(or its synonym
.BR "MD5" );
.BR "timestamp" ;
@@ -7298,7 +7235,7 @@ decides that a target file has changed
as specified by the corresponding
.BR SourceSignatures ()
setting
-.BR "" ( "MD5"
+.RB ( "MD5"
or
.BR "timestamp" ).
This means that
@@ -7347,7 +7284,7 @@ Because the default setting is
using
.BR SourceSignatures ()
is generally preferable to
-.BR TargetSignatures () ,
+.BR TargetSignatures (),
so that the up-to-date decision
will be consistent for all files
(or all files built with a specific construction environment).
@@ -7358,8 +7295,13 @@ affect their "downstream" dependencies.
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI Tool( string [, toolpath ", " **kw ])
-Returns a callable object
+.RI Tool( string ", [" toolpath ", **" kw ])
+.TP
+.IR env .Tool( string ", [" toolpath ", **" kw ])
+The
+.BR Tool ()
+form of the function
+returns a callable object
that can be used to initialize
a construction environment using the
tools keyword of the Environment() method.
@@ -7373,7 +7315,7 @@ and the name of the tool will be added to the
construction variable.
Additional keyword arguments are passed to the tool's
-.B generate()
+.BR generate ()
method.
Examples:
@@ -7387,14 +7329,16 @@ t(env) # adds 'msvc' to the TOOLS variable
u = Tool('opengl', toolpath = ['tools'])
u(env) # adds 'opengl' to the TOOLS variable
.EE
-.TP
-.RI env.Tool( string [, toolpath ", " **kw ])
-Applies the callable object for the specified tool
+.IP
+The
+.BR env.Tool ()
+form of the function
+applies the callable object for the specified tool
.I string
to the environment through which the method was called.
Additional keyword arguments are passed to the tool's
-.B generate()
+.BR generate ()
method.
.ES
@@ -7406,13 +7350,13 @@ env.Tool('opengl', toolpath = ['build/tools'])
.TP
.RI Value( value ", [" built_value ])
.TP
-.RI env.Value( value ", [" built_value ])
+.IR env .Value( value ", [" built_value ])
Returns a Node object representing the specified Python value. Value
Nodes can be used as dependencies of targets. If the result of
calling
-.BR str( value )
+.BI str( value )
changes between SCons runs, any targets depending on
-.BR Value( value )
+.BI Value( value )
will be rebuilt.
(This is true even when using timestamps to decide if
files are up-to-date.)
@@ -7473,12 +7417,12 @@ env.UpdateValue(target = Value(output), source = Value(input))
.TP
.RI VariantDir( variant_dir ", " src_dir ", [" duplicate ])
.TP
-.RI env.VariantDir( variant_dir ", " src_dir ", [" duplicate ])
+.IR env .VariantDir( variant_dir ", " src_dir ", [" duplicate ])
Use the
.BR VariantDir ()
function to create a copy of your sources in another location:
if a name under
-.IR variant_dir
+.I variant_dir
is not found but exists under
.IR src_dir ,
the file or directory is copied to
@@ -7489,7 +7433,7 @@ within the variant tree.
.BR VariantDir ()
can be called multiple times with the same
-.I src_dir
+.I src_dir
to set up multiple builds with different options
.RI ( variants ).
The
@@ -7498,9 +7442,6 @@ location must be in or underneath the SConstruct file's directory, and
.I variant_dir
may not be underneath
.IR src_dir .
-'\"TODO: Can the above restrictions be clarified or relaxed?
-'\"TODO: The latter restriction is clearly not completely right;
-'\"TODO: src_dir = '.' works fine with a build dir under it.
The default behavior is for
.B scons
@@ -7516,15 +7457,17 @@ to put derived files in the same directory as source files.
If possible on the platform,
the duplication is performed by linking rather than copying;
see also the
-.IR --duplicate
+.B \-\-duplicate
command-line option.
Moreover, only the files needed for the build are duplicated;
files and directories that are not used are not present in
.IR variant_dir .
Duplicating the source tree may be disabled by setting the
-.I duplicate
-argument to 0 (zero).
+.B duplicate
+argument to
+.B 0
+(zero).
This will cause
.B scons
to invoke Builders using the path names of source files in
@@ -7532,7 +7475,7 @@ to invoke Builders using the path names of source files in
and the path names of derived files within
.IR variant_dir .
This is always more efficient than
-.IR duplicate =1,
+.BR duplicate=1 ,
and is usually safe for most builds
(but see above for cases that may cause problems).
@@ -7541,9 +7484,9 @@ Note that
works most naturally with a subsidiary SConscript file.
However, you would then call the subsidiary SConscript file
not in the source directory, but in the
-.I variant_dir ,
+.IR variant_dir ,
regardless of the value of
-.IR duplicate .
+.BR duplicate .
This is how you tell
.B scons
which variant of a source tree to build:
@@ -7555,7 +7498,6 @@ SConscript('build/variant1/SConscript')
VariantDir('build/variant2', 'src')
SConscript('build/variant2/SConscript')
.EE
-
.IP
See also the
.BR SConscript ()
@@ -7585,36 +7527,49 @@ SConscript(dirs='doc', variant_dir='build/doc', duplicate=0)
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TP
-.RI WhereIs( program ", [" path ", " pathext ", " reject ])
+.RI WhereIs( program ", [" path ", " pathext ", " reject ])
.TP
-.RI env.WhereIs( program ", [" path ", " pathext ", " reject ])
-
+.IR env .WhereIs( program ", [" path ", " pathext ", " reject ])
Searches for the specified executable
-.I program,
+.IR program ,
returning the full path name to the program
if it is found,
and returning None if not.
Searches the specified
-.I path,
+.IR path ,
the value of the calling environment's PATH
-(env['ENV']['PATH']),
+.RB ( env['ENV']['PATH'] ),
or the user's current external PATH
-(os.environ['PATH'])
+.RB ( os.environ['PATH'] )
by default.
On Windows systems, searches for executable
programs with any of the file extensions
listed in the specified
-.I pathext,
+.IR pathext ,
the calling environment's PATHEXT
-(env['ENV']['PATHEXT'])
+.RB ( env['ENV']['PATHEXT'] )
or the user's current PATHEXT
-(os.environ['PATHEXT'])
+.RB ( os.environ['PATHEXT'] )
by default.
Will not select any
path name or names
in the specified
.I reject
list, if any.
+'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+'\" END GENERATED FUNCTION DESCRIPTIONS
+'\"
+'\" The descriptions above of the various SCons functions are generated
+'\" from the .xml files that live next to the various Python modules in
+'\" the build enginer library. If you're reading this [gnt]roff file
+'\" with an eye towards patching this man page, you can still submit
+'\" a diff against this text, but it will have to be translated to a
+'\" diff against the underlying .xml file before the patch is actually
+'\" accepted. If you do that yourself, it will make it easier to
+'\" integrate the patch.
+'\"
+'\" END GENERATED FUNCTION DESCRIPTIONS
+'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SS SConscript Variables
In addition to the global functions and methods,
@@ -7870,7 +7825,7 @@ The command line used to generate a static library from object files.
.IP ARCOMSTR
The string displayed when an object file
is generated from an assembly-language source file.
-If this is not set, then $ARCOM (the command line) is displayed.
+If this is not set, then \fB$ARCOM\fP (the command line) is displayed.
.ES
env = Environment(ARCOMSTR = "Archiving $TARGET")
@@ -7889,7 +7844,7 @@ from an assembly-language source file.
.IP ASCOMSTR
The string displayed when an object file
is generated from an assembly-language source file.
-If this is not set, then $ASCOM (the command line) is displayed.
+If this is not set, then \fB$ASCOM\fP (the command line) is displayed.
.ES
env = Environment(ASCOMSTR = "Assembling $TARGET")
@@ -7903,14 +7858,14 @@ 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 $ASFLAGS and $CPPFLAGS construction variables
+in the \fB$ASFLAGS\fP and \fB$CPPFLAGS\fP construction variables
are included on this command line.
.IP ASPPCOMSTR
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 $ASPPCOM (the command line) is displayed.
+If this is not set, then \fB$ASPPCOM\fP (the command line) is displayed.
.ES
env = Environment(ASPPCOMSTR = "Assembling $TARGET")
@@ -7920,7 +7875,7 @@ 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 $ASFLAGS.
+The default is to use the value of \fB$ASFLAGS\fP.
.IP BIBTEX
The bibliography generator for the TeX formatter and typesetter and the
@@ -7934,7 +7889,7 @@ typesetter.
.IP BIBTEXCOMSTR
The string displayed when generating a bibliography
for TeX or LaTeX.
-If this is not set, then $BIBTEXCOM (the command line) is displayed.
+If this is not set, then \fB$BIBTEXCOM\fP (the command line) is displayed.
.ES
env = Environment(BIBTEXCOMSTR = "Generating bibliography $TARGET")
@@ -7954,11 +7909,11 @@ fetching source files using BitKeeper.
.IP BITKEEPERCOMSTR
The string displayed when fetching
a source file using BitKeeper.
-If this is not set, then $BITKEEPERCOM
+If this is not set, then \fB$BITKEEPERCOM\fP
(the command line) is displayed.
.IP BITKEEPERGET
-The command ($BITKEEPER) and subcommand
+The command (\fB$BITKEEPER\fP) and subcommand
for fetching source files using BitKeeper.
.IP BITKEEPERGETFLAGS
@@ -8001,14 +7956,14 @@ The C compiler.
.IP CCCOM
The command line used to compile a C source file to a (static) object
-file. Any options specified in the $CFLAGS, $CCFLAGS and
-$CPPFLAGS construction variables are included on this command
+file. Any options specified in the \fB$CFLAGS\fP, \fB$CCFLAGS\fP and
+\fB$CPPFLAGS\fP construction variables are included on this command
line.
.IP CCCOMSTR
The string displayed when a C source file
is compiled to a (static) object file.
-If this is not set, then $CCCOM (the command line) is displayed.
+If this is not set, then \fB$CCCOM\fP (the command line) is displayed.
.ES
env = Environment(CCCOMSTR = "Compiling static object $TARGET")
@@ -8022,7 +7977,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 $PCH construction variable is set.
+when the \fB$PCH\fP construction variable is set.
.IP CCPDBFLAGS
Options added to the compiler command line
@@ -8030,7 +7985,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 $PDB construction variable is set.
+when the \fB$PDB\fP construction variable is set.
The Visual C++ compiler option that SCons uses by default
to generate PDB information is \fB/Z7\fP.
@@ -8044,7 +7999,7 @@ link-time performance,
although parallel builds will no longer work.
You can generate PDB files with the \fB/Zi\fP
-switch by overriding the default $CCPDBFLAGS variable as follows:
+switch by overriding the default \fB$CCPDBFLAGS\fP variable as follows:
.ES
env['CCPDBFLAGS'] = ['${(PDB and "/Zi /Fd%s" % File(PDB)) or ""}']
@@ -8053,7 +8008,7 @@ env['CCPDBFLAGS'] = ['${(PDB and "/Zi /Fd%s" % File(PDB)) or ""}']
An alternative would be to use the \fB/Zi\fP
to put the debugging information in a separate \fB.pdb\fP
file for each object file by overriding
-the $CCPDBFLAGS variable as follows:
+the \fB$CCPDBFLAGS\fP variable as follows:
.ES
env['CCPDBFLAGS'] = '/Zi /Fd${TARGET}.pdb'
@@ -8108,7 +8063,7 @@ section of the RPM
\fB.spec\fP file.
.IP _concat
-A function used to produce variables like $_CPPINCFLAGS. It takes
+A function used to produce variables like \fB$_CPPINCFLAGS\fP. It takes
four or five
arguments: a prefix to concatenate onto each element, a list of
elements, a suffix to concatenate onto each element, an environment
@@ -8142,22 +8097,22 @@ file.
An automatically-generated construction variable
containing the C preprocessor command-line options
to define values.
-The value of $_CPPDEFFLAGS is created
-by appending $CPPDEFPREFIX and $CPPDEFSUFFIX
+The value of \fB$_CPPDEFFLAGS\fP is created
+by appending \fB$CPPDEFPREFIX\fP and \fB$CPPDEFSUFFIX\fP
to the beginning and end
-of each definition in $CPPDEFINES.
+of each definition in \fB$CPPDEFINES\fP.
.IP CPPDEFINES
A platform independent specification of C preprocessor definitions.
The definitions will be added to command lines
through the automatically-generated
-$_CPPDEFFLAGS construction variable (see above),
+\fB$_CPPDEFFLAGS\fP construction variable (see above),
which is constructed according to
-the type of value of $CPPDEFINES:
+the type of value of \fB$CPPDEFINES\fP:
-If $CPPDEFINES is a string,
+If \fB$CPPDEFINES\fP is a string,
the values of the
-$CPPDEFPREFIX and $CPPDEFSUFFIX
+.BR $CPPDEFPREFIX and $CPPDEFSUFFIX
construction variables
will be added to the beginning and end.
@@ -8167,9 +8122,9 @@ will be added to the beginning and end.
env = Environment(CPPDEFINES='xyz')
.EE
.IP
-If $CPPDEFINES is a list,
+If \fB$CPPDEFINES\fP is a list,
the values of the
-$CPPDEFPREFIX and $CPPDEFSUFFIX
+.BR $CPPDEFPREFIX and $CPPDEFSUFFIX
construction variables
will be appended to the beginning and end
of each element in the list.
@@ -8183,9 +8138,9 @@ defined and the second item is its value:
env = Environment(CPPDEFINES=[('B', 2), 'A'])
.EE
.IP
-If $CPPDEFINES is a dictionary,
+If \fB$CPPDEFINES\fP is a dictionary,
the values of the
-$CPPDEFPREFIX and $CPPDEFSUFFIX
+.BR $CPPDEFPREFIX and $CPPDEFSUFFIX
construction variables
will be appended to the beginning and end
of each item from the dictionary.
@@ -8211,30 +8166,30 @@ env = Environment(CPPDEFINES={'B':2, 'A':None})
The prefix used to specify preprocessor definitions
on the C compiler command line.
This will be appended to the beginning of each definition
-in the $CPPDEFINES construction variable
-when the $_CPPDEFFLAGS variable is automatically generated.
+in the \fB$CPPDEFINES\fP construction variable
+when the \fB$_CPPDEFFLAGS\fP variable is automatically generated.
.IP CPPDEFSUFFIX
The suffix used to specify preprocessor definitions
on the C compiler command line.
This will be appended to the end of each definition
-in the $CPPDEFINES construction variable
-when the $_CPPDEFFLAGS variable is automatically generated.
+in the \fB$CPPDEFINES\fP construction variable
+when the \fB$_CPPDEFFLAGS\fP variable is automatically generated.
.IP CPPFLAGS
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 $CCCOM,
-$SHCCCOM,
-$CXXCOM and
-$SHCXXCOM command lines,
-but also the $FORTRANPPCOM,
-$SHFORTRANPPCOM,
-$F77PPCOM and
-$SHF77PPCOM command lines
+via the \fB$CCCOM\fP,
+.BR $SHCCCOM ,
+\fB$CXXCOM\fP and
+\fB$SHCXXCOM\fP command lines,
+but also the \fB$FORTRANPPCOM\fP,
+.BR $SHFORTRANPPCOM ,
+\fB$F77PPCOM\fP and
+\fB$SHF77PPCOM\fP command lines
used to compile a Fortran source file,
-and the $ASPPCOM command line
+and the \fB$ASPPCOM\fP command line
used to assemble an assembly language source file,
after first running each file through the C preprocessor.
Note that this variable does
@@ -8242,18 +8197,18 @@ Note that this variable does
contain
.B \-I
(or similar) include search path options
-that scons generates automatically from $CPPPATH.
-See $_CPPINCFLAGS, below,
+that scons generates automatically from \fB$CPPPATH\fP.
+See \fB$_CPPINCFLAGS\fP, below,
for the variable that expands to those options.
.IP _CPPINCFLAGS
An automatically-generated construction variable
containing the C preprocessor command-line options
for specifying directories to be searched for include files.
-The value of $_CPPINCFLAGS is created
-by appending $INCPREFIX and $INCSUFFIX
+The value of \fB$_CPPINCFLAGS\fP is created
+by appending \fB$INCPREFIX\fP and \fB$INCSUFFIX\fP
to the beginning and end
-of each directory in $CPPPATH.
+of each directory in \fB$CPPPATH\fP.
.IP CPPPATH
The list of directories that the C preprocessor will search for include
@@ -8281,17 +8236,17 @@ env = Environment(CPPPATH=include)
.IP
The directory list will be added to command lines
through the automatically-generated
-$_CPPINCFLAGS
+.B $_CPPINCFLAGS
construction variable,
which is constructed by
appending the values of the
-$INCPREFIX and $INCSUFFIX
+.BR $INCPREFIX and $INCSUFFIX
construction variables
to the beginning and end
-of each directory in $CPPPATH.
+of each directory in \fB$CPPPATH\fP.
Any command lines you define that need
the CPPPATH directory list should
-include $_CPPINCFLAGS:
+include \fB$_CPPINCFLAGS\fP:
.ES
env = Environment(CCCOM="my_compiler $_CPPINCFLAGS -c -o $TARGET $SOURCE")
@@ -8324,7 +8279,7 @@ fetch source files from a CVS repository.
.IP CVSCOMSTR
The string displayed when fetching
a source file from a CVS repository.
-If this is not set, then $CVSCOM
+If this is not set, then \fB$CVSCOM\fP
(the command line) is displayed.
.IP CVSFLAGS
@@ -8336,21 +8291,21 @@ to specify from where the files must be fetched.
.IP CVSREPOSITORY
The path to the CVS repository.
This is referenced in the default
-$CVSFLAGS value.
+\fB$CVSFLAGS\fP value.
.IP CXX
The C++ compiler.
.IP CXXCOM
The command line used to compile a C++ source file to an object file.
-Any options specified in the $CXXFLAGS and
-$CPPFLAGS construction variables
+Any options specified in the \fB$CXXFLAGS\fP and
+\fB$CPPFLAGS\fP construction variables
are included on this command line.
.IP CXXCOMSTR
The string displayed when a C++ source file
is compiled to a (static) object file.
-If this is not set, then $CXXCOM (the command line) is displayed.
+If this is not set, then \fB$CXXCOM\fP (the command line) is displayed.
.ES
env = Environment(CXXCOMSTR = "Compiling static object $TARGET")
@@ -8380,10 +8335,10 @@ as C++ files.
.IP CXXFLAGS
General options that are passed to the C++ compiler.
-By default, this includes the value of $CCFLAGS,
-so that setting $CCFLAGS affects both C and C++ compilation.
+By default, this includes the value of \fB$CCFLAGS\fP,
+so that setting \fB$CCFLAGS\fP affects both C and C++ compilation.
If you want to add C++-specific flags,
-you must set or override the value of $CXXFLAGS.
+you must set or override the value of \fB$CXXFLAGS\fP.
.IP CXXVERSION
The version number of the C++ compiler.
@@ -8429,7 +8384,7 @@ The command line used to convert TeX DVI files into a PDF file.
.IP DVIPDFCOMSTR
The string displayed when a TeX DVI file
is converted into a PDF file.
-If this is not set, then $DVIPDFCOM (the command line) is displayed.
+If this is not set, then \fB$DVIPDFCOM\fP (the command line) is displayed.
.IP DVIPDFFLAGS
General options passed to the TeX DVI file to PDF file converter.
@@ -8443,7 +8398,7 @@ General options passed to the TeX DVI file to PostScript converter.
.IP ENV
A dictionary of environment variables
to use when invoking commands. When
-$ENV is used in a command all list
+\fB$ENV\fP is used in a command all list
values will be joined using the path separator and any other non-string
values will simply be coerced to a string.
Note that, by default,
@@ -8494,24 +8449,24 @@ string to escape; and should return the escaped command line.
.IP F77
The Fortran 77 compiler.
-You should normally set the $FORTRAN variable,
+You should normally set the \fB$FORTRAN\fP variable,
which specifies the default Fortran compiler
for all Fortran versions.
-You only need to set $F77 if you need to use a specific compiler
+You only need to set \fB$F77\fP if you need to use a specific compiler
or compiler version for Fortran 77 files.
.IP F77COM
The command line used to compile a Fortran 77 source file to an object file.
-You only need to set $F77COM if you need to use a specific
+You only need to set \fB$F77COM\fP if you need to use a specific
command line for Fortran 77 files.
-You should normally set the $FORTRANCOM variable,
+You should normally set the \fB$FORTRANCOM\fP variable,
which specifies the default command line
for all Fortran versions.
.IP F77COMSTR
The string displayed when a Fortran 77 source file
is compiled to an object file.
-If this is not set, then $F77COM or $FORTRANCOM
+If this is not set, then \fB$F77COM\fP or \fB$FORTRANCOM\fP
(the command line) is displayed.
.IP F77FILESUFFIXES
@@ -8525,14 +8480,14 @@ Note that this variable does
contain
.B \-I
(or similar) include search path options
-that scons generates automatically from $F77PATH.
+that scons generates automatically from \fB$F77PATH\fP.
See
-$_F77INCFLAGS
+.B $_F77INCFLAGS
below,
for the variable that expands to those options.
-You only need to set $F77FLAGS if you need to define specific
+You only need to set \fB$F77FLAGS\fP if you need to define specific
user options for Fortran 77 files.
-You should normally set the $FORTRANFLAGS variable,
+You should normally set the \fB$FORTRANFLAGS\fP variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
@@ -8541,24 +8496,24 @@ 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 $_F77INCFLAGS is created
-by appending $INCPREFIX and $INCSUFFIX
+The value of \fB$_F77INCFLAGS\fP is created
+by appending \fB$INCPREFIX\fP and \fB$INCSUFFIX\fP
to the beginning and end
-of each directory in $F77PATH.
+of each directory in \fB$F77PATH\fP.
.IP 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 $F77FLAGS because the result will be non-portable
+arguments in \fB$F77FLAGS\fP because the result will be non-portable
and the directories will not be searched by the dependency scanner. Note:
-directory names in $F77PATH will be looked-up relative to the SConscript
+directory names in \fB$F77PATH\fP will be looked-up relative to the SConscript
directory when they are used in a command. To force
.B scons
to look-up a directory relative to the root of the source tree use #:
-You only need to set $F77PATH if you need to define a specific
+You only need to set \fB$F77PATH\fP if you need to define a specific
include path for Fortran 77 files.
-You should normally set the $FORTRANPATH variable,
+You should normally set the \fB$FORTRANPATH\fP variable,
which specifies the include path
for the default Fortran compiler
for all Fortran versions.
@@ -8578,17 +8533,17 @@ env = Environment(F77PATH=include)
.IP
The directory list will be added to command lines
through the automatically-generated
-$_F77INCFLAGS
+.B $_F77INCFLAGS
construction variable,
which is constructed by
appending the values of the
-$INCPREFIX and $INCSUFFIX
+.BR $INCPREFIX and $INCSUFFIX
construction variables
to the beginning and end
-of each directory in $F77PATH.
+of each directory in \fB$F77PATH\fP.
Any command lines you define that need
the F77PATH directory list should
-include $_F77INCFLAGS:
+include \fB$_F77INCFLAGS\fP:
.ES
env = Environment(F77COM="my_compiler $_F77INCFLAGS -c -o $TARGET $SOURCE")
@@ -8597,11 +8552,11 @@ env = Environment(F77COM="my_compiler $_F77INCFLAGS -c -o $TARGET $SOURCE")
.IP F77PPCOM
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 $F77FLAGS and $CPPFLAGS construction variables
+Any options specified in the \fB$F77FLAGS\fP and \fB$CPPFLAGS\fP construction variables
are included on this command line.
-You only need to set $F77PPCOM if you need to use a specific
+You only need to set \fB$F77PPCOM\fP if you need to use a specific
C-preprocessor command line for Fortran 77 files.
-You should normally set the $FORTRANPPCOM variable,
+You should normally set the \fB$FORTRANPPCOM\fP variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
@@ -8609,7 +8564,7 @@ for all Fortran versions.
The string displayed when a Fortran 77 source file
is compiled to an object file
after first running the file through the C preprocessor.
-If this is not set, then $F77PPCOM or $FORTRANPPCOM
+If this is not set, then \fB$F77PPCOM\fP or \fB$FORTRANPPCOM\fP
(the command line) is displayed.
.IP F77PPFILESUFFIXES
@@ -8618,24 +8573,24 @@ F77 dialect will be used. By default, this is empty
.IP F90
The Fortran 90 compiler.
-You should normally set the $FORTRAN variable,
+You should normally set the \fB$FORTRAN\fP variable,
which specifies the default Fortran compiler
for all Fortran versions.
-You only need to set $F90 if you need to use a specific compiler
+You only need to set \fB$F90\fP if you need to use a specific compiler
or compiler version for Fortran 90 files.
.IP F90COM
The command line used to compile a Fortran 90 source file to an object file.
-You only need to set $F90COM if you need to use a specific
+You only need to set \fB$F90COM\fP if you need to use a specific
command line for Fortran 90 files.
-You should normally set the $FORTRANCOM variable,
+You should normally set the \fB$FORTRANCOM\fP variable,
which specifies the default command line
for all Fortran versions.
.IP F90COMSTR
The string displayed when a Fortran 90 source file
is compiled to an object file.
-If this is not set, then $F90COM or $FORTRANCOM
+If this is not set, then \fB$F90COM\fP or \fB$FORTRANCOM\fP
(the command line) is displayed.
.IP F90FILESUFFIXES
@@ -8649,14 +8604,14 @@ Note that this variable does
contain
.B \-I
(or similar) include search path options
-that scons generates automatically from $F90PATH.
+that scons generates automatically from \fB$F90PATH\fP.
See
-$_F90INCFLAGS
+.B $_F90INCFLAGS
below,
for the variable that expands to those options.
-You only need to set $F90FLAGS if you need to define specific
+You only need to set \fB$F90FLAGS\fP if you need to define specific
user options for Fortran 90 files.
-You should normally set the $FORTRANFLAGS variable,
+You should normally set the \fB$FORTRANFLAGS\fP variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
@@ -8665,24 +8620,24 @@ 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 $_F90INCFLAGS is created
-by appending $INCPREFIX and $INCSUFFIX
+The value of \fB$_F90INCFLAGS\fP is created
+by appending \fB$INCPREFIX\fP and \fB$INCSUFFIX\fP
to the beginning and end
-of each directory in $F90PATH.
+of each directory in \fB$F90PATH\fP.
.IP 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 $F90FLAGS because the result will be non-portable
+arguments in \fB$F90FLAGS\fP because the result will be non-portable
and the directories will not be searched by the dependency scanner. Note:
-directory names in $F90PATH will be looked-up relative to the SConscript
+directory names in \fB$F90PATH\fP will be looked-up relative to the SConscript
directory when they are used in a command. To force
.B scons
to look-up a directory relative to the root of the source tree use #:
-You only need to set $F90PATH if you need to define a specific
+You only need to set \fB$F90PATH\fP if you need to define a specific
include path for Fortran 90 files.
-You should normally set the $FORTRANPATH variable,
+You should normally set the \fB$FORTRANPATH\fP variable,
which specifies the include path
for the default Fortran compiler
for all Fortran versions.
@@ -8702,17 +8657,17 @@ env = Environment(F90PATH=include)
.IP
The directory list will be added to command lines
through the automatically-generated
-$_F90INCFLAGS
+.B $_F90INCFLAGS
construction variable,
which is constructed by
appending the values of the
-$INCPREFIX and $INCSUFFIX
+.BR $INCPREFIX and $INCSUFFIX
construction variables
to the beginning and end
-of each directory in $F90PATH.
+of each directory in \fB$F90PATH\fP.
Any command lines you define that need
the F90PATH directory list should
-include $_F90INCFLAGS:
+include \fB$_F90INCFLAGS\fP:
.ES
env = Environment(F90COM="my_compiler $_F90INCFLAGS -c -o $TARGET $SOURCE")
@@ -8721,18 +8676,18 @@ env = Environment(F90COM="my_compiler $_F90INCFLAGS -c -o $TARGET $SOURCE")
.IP F90PPCOM
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 $F90FLAGS and $CPPFLAGS construction variables
+Any options specified in the \fB$F90FLAGS\fP and \fB$CPPFLAGS\fP construction variables
are included on this command line.
-You only need to set $F90PPCOM if you need to use a specific
+You only need to set \fB$F90PPCOM\fP if you need to use a specific
C-preprocessor command line for Fortran 90 files.
-You should normally set the $FORTRANPPCOM variable,
+You should normally set the \fB$FORTRANPPCOM\fP variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
.IP F90PPCOMSTR
The string displayed when a Fortran 90 source file
is compiled after first running the file through the C preprocessor.
-If this is not set, then $F90PPCOM or $FORTRANPPCOM
+If this is not set, then \fB$F90PPCOM\fP or \fB$FORTRANPPCOM\fP
(the command line) is displayed.
.IP F90PPFILESUFFIXES
@@ -8741,24 +8696,24 @@ F90 dialect will be used. By default, this is empty
.IP F95
The Fortran 95 compiler.
-You should normally set the $FORTRAN variable,
+You should normally set the \fB$FORTRAN\fP variable,
which specifies the default Fortran compiler
for all Fortran versions.
-You only need to set $F95 if you need to use a specific compiler
+You only need to set \fB$F95\fP if you need to use a specific compiler
or compiler version for Fortran 95 files.
.IP F95COM
The command line used to compile a Fortran 95 source file to an object file.
-You only need to set $F95COM if you need to use a specific
+You only need to set \fB$F95COM\fP if you need to use a specific
command line for Fortran 95 files.
-You should normally set the $FORTRANCOM variable,
+You should normally set the \fB$FORTRANCOM\fP variable,
which specifies the default command line
for all Fortran versions.
.IP F95COMSTR
The string displayed when a Fortran 95 source file
is compiled to an object file.
-If this is not set, then $F95COM or $FORTRANCOM
+If this is not set, then \fB$F95COM\fP or \fB$FORTRANCOM\fP
(the command line) is displayed.
.IP F95FILESUFFIXES
@@ -8772,14 +8727,14 @@ Note that this variable does
contain
.B \-I
(or similar) include search path options
-that scons generates automatically from $F95PATH.
+that scons generates automatically from \fB$F95PATH\fP.
See
-$_F95INCFLAGS
+.B $_F95INCFLAGS
below,
for the variable that expands to those options.
-You only need to set $F95FLAGS if you need to define specific
+You only need to set \fB$F95FLAGS\fP if you need to define specific
user options for Fortran 95 files.
-You should normally set the $FORTRANFLAGS variable,
+You should normally set the \fB$FORTRANFLAGS\fP variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
@@ -8788,24 +8743,24 @@ 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 $_F95INCFLAGS is created
-by appending $INCPREFIX and $INCSUFFIX
+The value of \fB$_F95INCFLAGS\fP is created
+by appending \fB$INCPREFIX\fP and \fB$INCSUFFIX\fP
to the beginning and end
-of each directory in $F95PATH.
+of each directory in \fB$F95PATH\fP.
.IP 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 $F95FLAGS because the result will be non-portable
+arguments in \fB$F95FLAGS\fP because the result will be non-portable
and the directories will not be searched by the dependency scanner. Note:
-directory names in $F95PATH will be looked-up relative to the SConscript
+directory names in \fB$F95PATH\fP will be looked-up relative to the SConscript
directory when they are used in a command. To force
.B scons
to look-up a directory relative to the root of the source tree use #:
-You only need to set $F95PATH if you need to define a specific
+You only need to set \fB$F95PATH\fP if you need to define a specific
include path for Fortran 95 files.
-You should normally set the $FORTRANPATH variable,
+You should normally set the \fB$FORTRANPATH\fP variable,
which specifies the include path
for the default Fortran compiler
for all Fortran versions.
@@ -8825,17 +8780,17 @@ env = Environment(F95PATH=include)
.IP
The directory list will be added to command lines
through the automatically-generated
-$_F95INCFLAGS
+.B $_F95INCFLAGS
construction variable,
which is constructed by
appending the values of the
-$INCPREFIX and $INCSUFFIX
+.BR $INCPREFIX and $INCSUFFIX
construction variables
to the beginning and end
-of each directory in $F95PATH.
+of each directory in \fB$F95PATH\fP.
Any command lines you define that need
the F95PATH directory list should
-include $_F95INCFLAGS:
+include \fB$_F95INCFLAGS\fP:
.ES
env = Environment(F95COM="my_compiler $_F95INCFLAGS -c -o $TARGET $SOURCE")
@@ -8844,11 +8799,11 @@ env = Environment(F95COM="my_compiler $_F95INCFLAGS -c -o $TARGET $SOURCE")
.IP F95PPCOM
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 $F95FLAGS and $CPPFLAGS construction variables
+Any options specified in the \fB$F95FLAGS\fP and \fB$CPPFLAGS\fP construction variables
are included on this command line.
-You only need to set $F95PPCOM if you need to use a specific
+You only need to set \fB$F95PPCOM\fP if you need to use a specific
C-preprocessor command line for Fortran 95 files.
-You should normally set the $FORTRANPPCOM variable,
+You should normally set the \fB$FORTRANPPCOM\fP variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
@@ -8856,7 +8811,7 @@ for all Fortran versions.
The string displayed when a Fortran 95 source file
is compiled to an object file
after first running the file through the C preprocessor.
-If this is not set, then $F95PPCOM or $FORTRANPPCOM
+If this is not set, then \fB$F95PPCOM\fP or \fB$FORTRANPPCOM\fP
(the command line) is displayed.
.IP F95PPFILESUFFIXES
@@ -8874,17 +8829,17 @@ for all versions of Fortran.
.IP FORTRANCOM
The command line used to compile a Fortran source file to an object file.
By default, any options specified
-in the $FORTRANFLAGS,
-$CPPFLAGS,
-$_CPPDEFFLAGS,
-$_FORTRANMODFLAG, and
-$_FORTRANINCFLAGS construction variables
+in the \fB$FORTRANFLAGS\fP,
+.BR $CPPFLAGS ,
+.BR $_CPPDEFFLAGS ,
+\fB$_FORTRANMODFLAG\fP, and
+\fB$_FORTRANINCFLAGS\fP construction variables
are included on this command line.
.IP FORTRANCOMSTR
The string displayed when a Fortran source file
is compiled to an object file.
-If this is not set, then $FORTRANCOM
+If this is not set, then \fB$FORTRANCOM\fP
(the command line) is displayed.
.IP FORTRANFILESUFFIXES
@@ -8898,9 +8853,9 @@ Note that this variable does
contain
.B \-I
(or similar) include or module search path options
-that scons generates automatically from $FORTRANPATH.
+that scons generates automatically from \fB$FORTRANPATH\fP.
See
-$_FORTRANINCFLAGS and $_FORTRANMODFLAG,
+.BR $_FORTRANINCFLAGS\fP and \fB$_FORTRANMODFLAG ,
below,
for the variables that expand those options.
@@ -8909,10 +8864,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 $_FORTRANINCFLAGS is created
-by prepending/appending $INCPREFIX and $INCSUFFIX
+The value of \fB$_FORTRANINCFLAGS\fP is created
+by prepending/appending \fB$INCPREFIX\fP and \fB$INCSUFFIX\fP
to the beginning and end
-of each directory in $FORTRANPATH.
+of each directory in \fB$FORTRANPATH\fP.
.IP FORTRANMODDIR
Directory location where the Fortran compiler should place
@@ -8924,15 +8879,15 @@ 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 $FORTRANMODDIR construction variables
-when the $_FORTRANMODFLAG variables is automatically generated.
+in the \fB$FORTRANMODDIR\fP construction variables
+when the \fB$_FORTRANMODFLAG\fP variables is automatically generated.
.IP FORTRANMODDIRSUFFIX
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 $FORTRANMODDIR construction variables
-when the $_FORTRANMODFLAG variables is automatically generated.
+in the \fB$FORTRANMODDIR\fP construction variables
+when the \fB$_FORTRANMODFLAG\fP variables is automatically generated.
.IP _FORTRANMODFLAG
An automatically-generated construction variable
@@ -8940,10 +8895,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 $_FORTRANMODFLAG is created
-by prepending/appending $FORTRANMODDIRPREFIX and
-$FORTRANMODDIRSUFFIX
-to the beginning and end of the directory in $FORTRANMODDIR.
+The value of \fB$_FORTRANMODFLAG\fP is created
+by prepending/appending \fB$FORTRANMODDIRPREFIX\fP and
+.B $FORTRANMODDIRSUFFIX
+to the beginning and end of the directory in \fB$FORTRANMODDIR\fP.
.IP FORTRANMODPREFIX
The module file prefix used by the Fortran compiler. SCons assumes that
@@ -8993,17 +8948,17 @@ env = Environment(FORTRANPATH=include)
.IP
The directory list will be added to command lines
through the automatically-generated
-$_FORTRANINCFLAGS
+.B $_FORTRANINCFLAGS
construction variable,
which is constructed by
appending the values of the
-$INCPREFIX and $INCSUFFIX
+.BR $INCPREFIX and $INCSUFFIX
construction variables
to the beginning and end
-of each directory in $FORTRANPATH.
+of each directory in \fB$FORTRANPATH\fP.
Any command lines you define that need
the FORTRANPATH directory list should
-include $_FORTRANINCFLAGS:
+include \fB$_FORTRANINCFLAGS\fP:
.ES
env = Environment(FORTRANCOM="my_compiler $_FORTRANINCFLAGS -c -o $TARGET $SOURCE")
@@ -9012,18 +8967,18 @@ env = Environment(FORTRANCOM="my_compiler $_FORTRANINCFLAGS -c -o $TARGET $SOURC
.IP FORTRANPPCOM
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 $FORTRANFLAGS,
-$CPPFLAGS,
-$_CPPDEFFLAGS,
-$_FORTRANMODFLAG, and
-$_FORTRANINCFLAGS
+By default, any options specified in the \fB$FORTRANFLAGS\fP,
+.BR $CPPFLAGS ,
+.BR $_CPPDEFFLAGS ,
+\fB$_FORTRANMODFLAG\fP, and
+.B $_FORTRANINCFLAGS
construction variables are included on this command line.
.IP FORTRANPPCOMSTR
The string displayed when a Fortran source file
is compiled to an object file
after first running the file through the C preprocessor.
-If this is not set, then $FORTRANPPCOM
+If this is not set, then \fB$FORTRANPPCOM\fP
(the command line) is displayed.
.IP FORTRANPPFILESUFFIXES
@@ -9047,7 +9002,7 @@ a list containing the paths to search for frameworks.
Used by the compiler to find framework-style includes like
#include <Fmwk/Header.h>.
Used by the linker to find user-specified frameworks when linking (see
-$FRAMEWORKS).
+.BR $FRAMEWORKS ).
For example:
.ES
@@ -9065,18 +9020,18 @@ to the compiler and linker command lines.
.IP _FRAMEWORKPATH
On Mac OS X with gcc, an automatically-generated construction variable
containing the linker command-line options corresponding to
-$FRAMEWORKPATH.
+.BR $FRAMEWORKPATH .
.IP FRAMEWORKPATHPREFIX
On Mac OS X with gcc, the prefix to be used for the FRAMEWORKPATH entries.
-(see $FRAMEWORKPATH).
+(see \fB$FRAMEWORKPATH\fP).
The default value is
.BR \-F .
.IP FRAMEWORKPREFIX
On Mac OS X with gcc,
the prefix to be used for linking in frameworks
-(see $FRAMEWORKS).
+(see \fB$FRAMEWORKS\fP).
The default value is
.BR \-framework .
@@ -9103,8 +9058,8 @@ general user-supplied frameworks options to be added at
the end of a command
line building a loadable module.
(This has been largely superseded by
-the $FRAMEWORKPATH, $FRAMEWORKPATHPREFIX,
-$FRAMEWORKPREFIX and $FRAMEWORKS variables
+the \fB$FRAMEWORKPATH\fP, \fB$FRAMEWORKPATHPREFIX\fP,
+\fB$FRAMEWORKPREFIX\fP and \fB$FRAMEWORKS\fP variables
described above.)
.IP GS
@@ -9117,7 +9072,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 $GSCOM (the command line) is displayed.
+If this is not set, then \fB$GSCOM\fP (the command line) is displayed.
.IP GSFLAGS
General options passed to the Ghostscript program
@@ -9130,7 +9085,7 @@ on the python you are using.
This variable must be passed as an argument to the Environment()
constructor; setting it later has no effect.
-Valid values are the same as for $TARGET_ARCH.
+Valid values are the same as for \fB$TARGET_ARCH\fP.
This is currently only used on Windows, but in the future it will be
used on other OSes as well.
@@ -9171,7 +9126,7 @@ variable in the
environment used to execute the command.
If the construction variable
-$IMPLICIT_COMMAND_DEPENDENCIES
+.B $IMPLICIT_COMMAND_DEPENDENCIES
is set to a false value
.RB ( None ,
.BR False ,
@@ -9189,16 +9144,16 @@ env = Environment(IMPLICIT_COMMAND_DEPENDENCIES = 0)
The prefix used to specify an include directory on the C compiler command
line.
This will be appended to the beginning of each directory
-in the $CPPPATH and $FORTRANPATH construction variables
-when the $_CPPINCFLAGS and $_FORTRANINCFLAGS
+in the \fB$CPPPATH\fP and \fB$FORTRANPATH\fP construction variables
+when the \fB$_CPPINCFLAGS\fP and \fB$_FORTRANINCFLAGS\fP
variables are automatically generated.
.IP INCSUFFIX
The suffix used to specify an include directory on the C compiler command
line.
This will be appended to the end of each directory
-in the $CPPPATH and $FORTRANPATH construction variables
-when the $_CPPINCFLAGS and $_FORTRANINCFLAGS
+in the \fB$CPPPATH\fP and \fB$FORTRANPATH\fP construction variables
+when the \fB$_CPPINCFLAGS\fP and \fB$_FORTRANINCFLAGS\fP
variables are automatically generated.
.IP INSTALL
@@ -9250,7 +9205,7 @@ The command line used to call the Java archive tool.
.IP JARCOMSTR
The string displayed when the Java archive tool
is called
-If this is not set, then $JARCOM (the command line) is displayed.
+If this is not set, then \fB$JARCOM\fP (the command line) is displayed.
.ES
env = Environment(JARCOMSTR = "JARchiving $SOURCES into $TARGET")
@@ -9286,14 +9241,14 @@ 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 $JAVACFLAGS construction variable
+Any options specified in the \fB$JAVACFLAGS\fP construction variable
are included on this command line.
.IP JAVACCOMSTR
The string displayed when compiling
a directory tree of Java source files to
corresponding Java class files.
-If this is not set, then $JAVACCOM (the command line) is displayed.
+If this is not set, then \fB$JAVACCOM\fP (the command line) is displayed.
.ES
env = Environment(JAVACCOMSTR = "Compiling class files $TARGETS from $SOURCES")
@@ -9324,7 +9279,7 @@ separated by the operating system's path separate character
Note that this currently just adds the specified
directory via the \fB\-classpath\fP option.
&SCons; does not currently search the
-$JAVACLASSPATH directories for dependency
+\fB$JAVACLASSPATH\fP directories for dependency
\fB.class\fP files.
.IP JAVACLASSSUFFIX
@@ -9338,13 +9293,13 @@ The Java generator for C header and stub files.
.IP JAVAHCOM
The command line used to generate C header and stub files
from Java classes.
-Any options specified in the $JAVAHFLAGS construction variable
+Any options specified in the \fB$JAVAHFLAGS\fP construction variable
are included on this command line.
.IP JAVAHCOMSTR
The string displayed when C header and stub files
are generated from Java classes.
-If this is not set, then $JAVAHCOM (the command line) is displayed.
+If this is not set, then \fB$JAVAHCOM\fP (the command line) is displayed.
.ES
env = Environment(JAVAHCOMSTR = "Generating header/stub file(s) $TARGETS from $SOURCES")
@@ -9369,7 +9324,7 @@ separated by the operating system's path separate character
Note that this currently just adds the specified
directory via the \fB\-sourcepath\fP option.
&SCons; does not currently search the
-$JAVASOURCEPATH directories for dependency
+\fB$JAVASOURCEPATH\fP directories for dependency
\fB.java\fP files.
.IP JAVASUFFIX
@@ -9390,7 +9345,7 @@ Java 1.5 changed the file names that are created
for nested anonymous inner classes,
which can cause a mismatch with the files
that &SCons; expects will be generated by the &javac; compiler.
-Setting $JAVAVERSION to \fB1.5\fP
+Setting \fB$JAVAVERSION\fP to \fB1.5\fP
(or \fB1.6\fP, as appropriate)
can make &SCons; realize that a Java 1.5 or 1.6
build is actually up to date.
@@ -9404,7 +9359,7 @@ The command line used to call the LaTeX structured formatter and typesetter.
.IP LATEXCOMSTR
The string displayed when calling
the LaTeX structured formatter and typesetter.
-If this is not set, then $LATEXCOM (the command line) is displayed.
+If this is not set, then \fB$LATEXCOM\fP (the command line) is displayed.
.ES
env = Environment(LATEXCOMSTR = "Building $TARGET from LaTeX input $SOURCES")
@@ -9417,7 +9372,7 @@ General options passed to the LaTeX structured formatter and typesetter.
The maximum number of times that LaTeX
will be re-run if the
.B .log
-generated by the $LATEXCOM command
+generated by the \fB$LATEXCOM\fP command
indicates that there are undefined references.
The default is to try to resolve undefined references
by re-running LaTeX up to three times.
@@ -9434,18 +9389,18 @@ The default list is:
.IP LDMODULE
The linker for building loadable modules.
-By default, this is the same as $SHLINK.
+By default, this is the same as \fB$SHLINK\fP.
.IP LDMODULECOM
The command line for building loadable modules.
-On Mac OS X, this uses the $LDMODULE,
-$LDMODULEFLAGS and
-$FRAMEWORKSFLAGS variables.
-On other systems, this is the same as $SHLINK.
+On Mac OS X, this uses the \fB$LDMODULE\fP,
+\fB$LDMODULEFLAGS\fP and
+\fB$FRAMEWORKSFLAGS\fP variables.
+On other systems, this is the same as \fB$SHLINK\fP.
.IP LDMODULECOMSTR
The string displayed when building loadable modules.
-If this is not set, then $LDMODULECOM (the command line) is displayed.
+If this is not set, then \fB$LDMODULECOM\fP (the command line) is displayed.
.IP LDMODULEFLAGS
General user options passed to the linker for building loadable modules.
@@ -9454,7 +9409,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 $SHLIBPREFIX.
+the same as \fB$SHLIBPREFIX\fP.
.IP LDMODULESUFFIX
The suffix used for loadable module file names.
@@ -9472,7 +9427,7 @@ to generate a source file.
.IP LEXCOMSTR
The string displayed when generating a source file
using the lexical analyzer generator.
-If this is not set, then $LEXCOM (the command line) is displayed.
+If this is not set, then \fB$LEXCOM\fP (the command line) is displayed.
.ES
env = Environment(LEXCOMSTR = "Lex'ing $TARGET from $SOURCES")
@@ -9485,49 +9440,52 @@ General options passed to the lexical analyzer generator.
An automatically-generated construction variable
containing the linker command-line options
for specifying directories to be searched for library.
-The value of $_LIBDIRFLAGS is created
-by appending $LIBDIRPREFIX and $LIBDIRSUFFIX
+The value of \fB$_LIBDIRFLAGS\fP is created
+by appending \fB$LIBDIRPREFIX\fP and \fB$LIBDIRSUFFIX\fP
to the beginning and end
-of each directory in $LIBPATH.
+of each directory in \fB$LIBPATH\fP.
.IP LIBDIRPREFIX
The prefix used to specify a library directory on the linker command line.
This will be appended to the beginning of each directory
-in the $LIBPATH construction variable
-when the $_LIBDIRFLAGS variable is automatically generated.
+in the \fB$LIBPATH\fP construction variable
+when the \fB$_LIBDIRFLAGS\fP variable is automatically generated.
.IP LIBDIRSUFFIX
The suffix used to specify a library directory on the linker command line.
This will be appended to the end of each directory
-in the $LIBPATH construction variable
-when the $_LIBDIRFLAGS variable is automatically generated.
+in the \fB$LIBPATH\fP construction variable
+when the \fB$_LIBDIRFLAGS\fP variable is automatically generated.
+
+.IP LIBEMITTER
+TODO
.IP _LIBFLAGS
An automatically-generated construction variable
containing the linker command-line options
for specifying libraries to be linked with the resulting target.
-The value of $_LIBFLAGS is created
-by appending $LIBLINKPREFIX and $LIBLINKSUFFIX
+The value of \fB$_LIBFLAGS\fP is created
+by appending \fB$LIBLINKPREFIX\fP and \fB$LIBLINKSUFFIX\fP
to the beginning and end
-of each filename in $LIBS.
+of each filename in \fB$LIBS\fP.
.IP LIBLINKPREFIX
The prefix used to specify a library to link on the linker command line.
This will be appended to the beginning of each library
-in the $LIBS construction variable
-when the $_LIBFLAGS variable is automatically generated.
+in the \fB$LIBS\fP construction variable
+when the \fB$_LIBFLAGS\fP variable is automatically generated.
.IP LIBLINKSUFFIX
The suffix used to specify a library to link on the linker command line.
This will be appended to the end of each library
-in the $LIBS construction variable
-when the $_LIBFLAGS variable is automatically generated.
+in the \fB$LIBS\fP construction variable
+when the \fB$_LIBFLAGS\fP variable is automatically generated.
.IP LIBPATH
The list of directories that will be searched for libraries.
The implicit dependency scanner will search these
directories for include files. Don't explicitly put include directory
-arguments in $LINKFLAGS or $SHLINKFLAGS
+arguments in \fB$LINKFLAGS\fP or \fB$SHLINKFLAGS\fP
because the result will be non-portable
and the directories will not be searched by the dependency scanner. Note:
directory names in LIBPATH will be looked-up relative to the SConscript
@@ -9550,17 +9508,17 @@ env = Environment(LIBPATH=libs)
.IP
The directory list will be added to command lines
through the automatically-generated
-$_LIBDIRFLAGS
+.B $_LIBDIRFLAGS
construction variable,
which is constructed by
appending the values of the
-$LIBDIRPREFIX and $LIBDIRSUFFIX
+.BR $LIBDIRPREFIX and $LIBDIRSUFFIX
construction variables
to the beginning and end
-of each directory in $LIBPATH.
+of each directory in \fB$LIBPATH\fP.
Any command lines you define that need
the LIBPATH directory list should
-include $_LIBDIRFLAGS:
+include \fB$_LIBDIRFLAGS\fP:
.ES
env = Environment(LINKCOM="my_linker $_LIBDIRFLAGS $_LIBFLAGS -o $TARGET $SOURCE")
@@ -9579,7 +9537,7 @@ A list of all legal prefixes for library file names.
When searching for library dependencies,
SCons will look for files with these prefixes,
the base library name,
-and suffixes in the $LIBSUFFIXES list.
+and suffixes in the \fB$LIBSUFFIXES\fP list.
.IP LIBS
A list of one or more libraries
@@ -9589,17 +9547,17 @@ created by this environment.
The library list will be added to command lines
through the automatically-generated
-$_LIBFLAGS
+.B $_LIBFLAGS
construction variable,
which is constructed by
appending the values of the
-$LIBLINKPREFIX and $LIBLINKSUFFIX
+.BR $LIBLINKPREFIX and $LIBLINKSUFFIX
construction variables
to the beginning and end
-of each filename in $LIBS.
+of each filename in \fB$LIBS\fP.
Any command lines you define that need
the LIBS library list should
-include $_LIBFLAGS:
+include \fB$_LIBFLAGS\fP:
.ES
env = Environment(LINKCOM="my_linker $_LIBDIRFLAGS $_LIBFLAGS -o $TARGET $SOURCE")
@@ -9608,13 +9566,13 @@ env = Environment(LINKCOM="my_linker $_LIBDIRFLAGS $_LIBFLAGS -o $TARGET $SOURCE
If you add a
File
object to the
-$LIBS
+.B $LIBS
list, the name of that file will be added to
-$_LIBFLAGS,
+.BR $_LIBFLAGS ,
and thus the link line, as is, without
-$LIBLINKPREFIX
+.B $LIBLINKPREFIX
or
-$LIBLINKSUFFIX.
+.BR $LIBLINKSUFFIX .
For example:
.ES
@@ -9635,7 +9593,7 @@ to reflect the names of the libraries they create.
.IP LIBSUFFIXES
A list of all legal suffixes for library file names.
When searching for library dependencies,
-SCons will look for files with prefixes, in the $LIBPREFIXES list,
+SCons will look for files with prefixes, in the \fB$LIBPREFIXES\fP list,
the base library name,
and these suffixes.
@@ -9659,7 +9617,7 @@ The command line used to link object files into an executable.
.IP LINKCOMSTR
The string displayed when object files
are linked into an executable.
-If this is not set, then $LINKCOM (the command line) is displayed.
+If this is not set, then \fB$LINKCOM\fP (the command line) is displayed.
.ES
env = Environment(LINKCOMSTR = "Linking $TARGET")
@@ -9671,17 +9629,17 @@ Note that this variable should
.I not
contain
.B \-l
-(or similar) options for linking with the libraries listed in $LIBS,
+(or similar) options for linking with the libraries listed in \fB$LIBS\fP,
nor
.B \-L
(or similar) library search path options
-that scons generates automatically from $LIBPATH.
+that scons generates automatically from \fB$LIBPATH\fP.
See
-$_LIBFLAGS
+.B $_LIBFLAGS
above,
for the variable that expands to library-link options,
and
-$_LIBDIRFLAGS
+.B $_LIBDIRFLAGS
above,
for the variable that expands to library search path options.
@@ -9694,7 +9652,7 @@ The command line used to pass files through the M4 macro preprocessor.
.IP M4COMSTR
The string displayed when
a file is passed through the M4 macro preprocessor.
-If this is not set, then $M4COM (the command line) is displayed.
+If this is not set, then \fB$M4COM\fP (the command line) is displayed.
.IP M4FLAGS
General options passed to the M4 macro preprocessor.
@@ -9712,7 +9670,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 $MAKEINDEXCOM (the command line) is displayed.
+If this is not set, then \fB$MAKEINDEXCOM\fP (the command line) is displayed.
.IP MAKEINDEXFLAGS
General options passed to the makeindex generator for the TeX formatter
@@ -9733,7 +9691,7 @@ The command line used to pass files to the Microsoft IDL compiler.
.IP MIDLCOMSTR
The string displayed when
the Microsoft IDL copmiler is called.
-If this is not set, then $MIDLCOM (the command line) is displayed.
+If this is not set, then \fB$MIDLCOM\fP (the command line) is displayed.
.IP MIDLFLAGS
General options passed to the Microsoft IDL compiler.
@@ -9766,7 +9724,7 @@ and were configured in SCons using the same construction environment
will be built in a single call to the compiler.
Only source files that have changed since their
object files were built will be passed to each compiler invocation
-(via the $CHANGED_SOURCES construction variable).
+(via the \fB$CHANGED_SOURCES\fP construction variable).
Any compilations where the object (target) file base name
(minus the \fB.obj\fP)
does not match the source file base name
@@ -9775,7 +9733,7 @@ will be compiled separately.
.IP MSVC_USE_SCRIPT
Use a batch script to set up Microsoft Visual Studio compiler
-$MSVC_USE_SCRIPT overrides $MSVC_VERSION and $TARGET_ARCH.
+.BR $MSVC_USE_SCRIPT\fP overrides \fB$MSVC_VERSION\fP and \fB$TARGET_ARCH .
If set to the name of a Visual Studio .bat file (e.g. vcvars.bat),
SCons will run that bat file and extract the relevant variables from
the result (typically %INCLUDE%, %LIB%, and %PATH%). Setting
@@ -9786,7 +9744,7 @@ window and importing the shell's environment variables.
.IP MSVC_VERSION
Sets the preferred version of Microsoft Visual C/C++ to use.
-If $MSVC_VERSION is not set, SCons will (by default) select the
+If \fB$MSVC_VERSION\fP is not set, SCons will (by default) select the
latest version of Visual C/C++ installed on your system. If the
specified version isn't installed, tool initialization will fail.
This variable must be passed as an argument to the Environment()
@@ -9799,7 +9757,7 @@ this dictionary with the following keys:
.BR VERSION :
the version of MSVS being used (can be set via
-$MSVS_VERSION)
+.BR $MSVS_VERSION )
.BR VERSIONS :
the available versions of MSVS installed
@@ -9839,34 +9797,17 @@ Sets the architecture for which the generated project(s) should build.
The default value is \fBx86\fP.
\fBamd64\fP is also supported
by &SCons; for some Visual Studio versions.
-Trying to set $MSVS_ARCH to an architecture that's not
+Trying to set \fB$MSVS_ARCH\fP to an architecture that's not
supported for a given Visual Studio version
will generate an error.
-.IP MSVS_PROJECT_BASE_PATH
-The string
-placed in a generated Microsoft Visual Studio solution file
-as the value of the
-.B SccProjectFilePathRelativizedFromConnection0
-and
-.B SccProjectFilePathRelativizedFromConnection1
-attributes of the
-.B GlobalSection(SourceCodeControl)
-section.
-There is no default value.
-
.IP MSVS_PROJECT_GUID
The string
placed in a generated Microsoft Visual Studio project file
as the value of the
.B ProjectGUID
attribute.
-The string is also placed in the
-.B SolutionUniqueID
-attribute of the
-.B GlobalSection(SourceCodeControl)
-section of the Microsoft Visual Studio solution file.
-There is no default value.
+There is no default value. If not defined, a new GUID is generated.
.IP MSVS_SCC_AUX_PATH
The path name
@@ -9879,30 +9820,47 @@ if the
construction variable is also set.
There is no default value.
-.IP MSVS_SCC_LOCAL_PATH
-The path name
-placed in a generated Microsoft Visual Studio project file
-as the value of the
+.IP MSVS_SCC_CONNECTION_ROOT
+The root path of projects in your SCC workspace, i.e the path under which
+all project and solution files will be generated. It is used as a
+reference path from which the relative paths of the generated
+Microsoft Visual Studio project and solution files are computed.
+The relative project file path is placed as the value of the
.B SccLocalPath
attribute
-if the
-.B MSVS_SCC_PROVIDER
-construction variable is also set.
-The path name is also placed in the
-.B SccLocalPath0
-and
-.B SccLocalPath1
+of the project file
+and as the values of the
+.B SccProjectFilePathRelativizedFromConnection[i]
+(where [i] ranges from 0 to the number of projects in the solution)
attributes of the
.B GlobalSection(SourceCodeControl)
section of the Microsoft Visual Studio solution file.
-There is no default value.
+Similarly the relative solution file path is placed as the values of the
+.B SccLocalPath[i]
+(where [i] ranges from 0 to the number of projects in the solution)
+attributes of the
+.B GlobalSection(SourceCodeControl)
+section of the Microsoft Visual Studio solution file.
+This is used only
+if the
+.B MSVS_SCC_PROVIDER
+construction variable is also set.
+The default value is the current working directory.
.IP MSVS_SCC_PROJECT_NAME
The project name
placed in a generated Microsoft Visual Studio project file
as the value of the
.B SccProjectName
-attribute.
+attribute
+if the
+.B MSVS_SCC_PROVIDER
+construction variable is also set.
+In this case the string is also placed in the
+.B SccProjectName0
+attribute of the
+.B GlobalSection(SourceCodeControl)
+section of the Microsoft Visual Studio solution file.
There is no default value.
.IP MSVS_SCC_PROVIDER
@@ -9912,7 +9870,7 @@ as the value of the
.B SccProvider
attribute.
The string is also placed in the
-.B SccProvider1
+.B SccProvider0
attribute of the
.B GlobalSection(SourceCodeControl)
section of the Microsoft Visual Studio solution file.
@@ -9921,7 +9879,7 @@ There is no default value.
.IP MSVS_VERSION
Sets the preferred version of Microsoft Visual Studio to use.
-If $MSVS_VERSION is not set,
+If \fB$MSVS_VERSION\fP is not set,
&SCons; will (by default) select the latest version
of Visual Studio installed on your system.
So, if you have version 6 and version 7 (MSVS .NET) installed,
@@ -9934,8 +9892,8 @@ appropriate version ('6.0' or '7.0', for example).
If the specified version isn't installed,
tool initialization will fail.
-This is obsolete: use $MSVC_VERSION instead. If $MSVS_VERSION is set and
-$MSVC_VERSION is not, $MSVC_VERSION will be set automatically to $MSVS_VERSION.
+This is obsolete: use \fB$MSVC_VERSION\fP instead. If \fB$MSVS_VERSION\fP is set and
+.BR $MSVC_VERSION\fP is not, \fB$MSVC_VERSION\fP will be set automatically to \fB$MSVS_VERSION .
If both are set to different values, scons will raise an error.
.IP MSVSBUILDCOM
@@ -9994,7 +9952,7 @@ file)
that will be invoked by Visual Studio
project files
(through the
-$MSVSSCONSCOM
+.B $MSVSSCONSCOM
variable).
The default is the same sconscript file
that contains the call to
@@ -10017,6 +9975,21 @@ and
.B .dsw
when using earlier versions of Visual Studio.
+.IP MT
+The program used on Windows systems to embed manifests into DLLs and EXEs.
+See also \fB$WINDOWS_EMBED_MANIFEST\fP.
+
+.IP MTEXECOM
+The Windows command line used to embed manifests into executables.
+See also \fB$MTSHLIBCOM\fP.
+
+.IP MTFLAGS
+Flags passed to the \fB$MT\fP manifest embedding program (Windows only).
+
+.IP MTSHLIBCOM
+The Windows command line used to embed manifests into shared libraries (DLLs).
+See also \fB$MTEXECOM\fP.
+
.IP MWCW_VERSION
The version number of the MetroWerks CodeWarrior C compiler
to be used.
@@ -10054,7 +10027,7 @@ fetch source files from Perforce.
.IP P4COMSTR
The string displayed when
fetching a source file from Perforce.
-If this is not set, then $P4COM (the command line) is displayed.
+If this is not set, then \fB$P4COM\fP (the command line) is displayed.
.IP P4FLAGS
General options that are passed to Perforce.
@@ -10104,12 +10077,12 @@ builder to generated a precompiled header.
.IP PCHCOMSTR
The string displayed when generating a precompiled header.
-If this is not set, then $PCHCOM (the command line) is displayed.
+If this is not set, then \fB$PCHCOM\fP (the command line) is displayed.
.IP PCHPDBFLAGS
A construction variable that, when expanded,
adds the \fB/yD\fP flag to the command line
-only if the $PDB construction variable is set.
+only if the \fB$PDB\fP construction variable is set.
.IP PCHSTOP
This variable specifies how much of a source file is precompiled. This
@@ -10148,11 +10121,11 @@ Using the \fB/Zi\fP instead may yield improved
link-time performance,
although parallel builds will no longer work.
You can generate PDB files with the \fB/Zi\fP
-switch by overriding the default $CCPDBFLAGS variable;
+switch by overriding the default \fB$CCPDBFLAGS\fP variable;
see the entry for that variable for specific examples.
.IP PDFCOM
-A deprecated synonym for $DVIPDFCOM.
+A deprecated synonym for \fB$DVIPDFCOM\fP.
.IP PDFLATEX
The &pdflatex; utility.
@@ -10162,7 +10135,7 @@ The command line used to call the &pdflatex; utility.
.IP PDFLATEXCOMSTR
The string displayed when calling the &pdflatex; utility.
-If this is not set, then $PDFLATEXCOM (the command line) is displayed.
+If this is not set, then \fB$PDFLATEXCOM\fP (the command line) is displayed.
.ES
env = Environment(PDFLATEX;COMSTR = "Building $TARGET from LaTeX input $SOURCES")
@@ -10185,7 +10158,7 @@ The command line used to call the &pdftex; utility.
.IP PDFTEXCOMSTR
The string displayed when calling the &pdftex; utility.
-If this is not set, then $PDFTEXCOM (the command line) is displayed.
+If this is not set, then \fB$PDFTEXCOM\fP (the command line) is displayed.
.ES
env = Environment(PDFTEXCOMSTR = "Building $TARGET from TeX input $SOURCES")
@@ -10197,7 +10170,7 @@ General options passed to the &pdftex; utility.
.IP PKGCHK
On Solaris systems,
the package-checking program that will
-be used (along with $PKGINFO)
+be used (along with \fB$PKGINFO\fP)
to look for installed versions of
the Sun PRO C++ compiler.
The default is
@@ -10206,7 +10179,7 @@ The default is
.IP PKGINFO
On Solaris systems,
the package information program that will
-be used (along with $PKGCHK)
+be used (along with \fB$PKGCHK\fP)
to look for installed versions of
the Sun PRO C++ compiler.
The default is
@@ -10266,6 +10239,9 @@ of the actual commands.
Such a function could also log the actual commands to a log file,
for example.
+.IP PROGEMITTER
+TODO
+
.IP PROGPREFIX
The prefix used for executable file names.
@@ -10278,7 +10254,7 @@ The command line used to convert TeX DVI files into a PostScript file.
.IP PSCOMSTR
The string displayed when a TeX DVI file
is converted into a PostScript file.
-If this is not set, then $PSCOM (the command line) is displayed.
+If this is not set, then \fB$PSCOM\fP (the command line) is displayed.
.IP PSPREFIX
The prefix used for PostScript file names.
@@ -10292,13 +10268,13 @@ specify files to run moc on.
.IP QT_BINPATH
The path where the qt binaries are installed.
-The default value is '$QTDIR/bin'.
+The default value is '\fB$QTDIR\fP/bin'.
.IP QT_CPPPATH
The path where the qt header files are installed.
-The default value is '$QTDIR/include'.
+The default value is '\fB$QTDIR\fP/include'.
Note: If you set this variable to None,
-the tool won't change the $CPPPATH
+the tool won't change the \fB$CPPPATH\fP
construction variable.
.IP QT_DEBUG
@@ -10306,17 +10282,17 @@ Prints lots of debugging information while scanning for moc files.
.IP QT_LIB
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 $LIBS variable.
+this variable to None, the tool won't change the \fB$LIBS\fP variable.
.IP QT_LIBPATH
The path where the qt libraries are installed.
-The default value is '$QTDIR/lib'.
+The default value is '\fB$QTDIR\fP/lib'.
Note: If you set this variable to None,
-the tool won't change the $LIBPATH
+the tool won't change the \fB$LIBPATH\fP
construction variable.
.IP QT_MOC
-Default value is '$QT_BINPATH/moc'.
+Default value is '\fB$QT_BINPATH\fP/moc'.
.IP QT_MOCCXXPREFIX
Default value is ''. Prefix for moc output files, when source is a cxx file.
@@ -10330,7 +10306,7 @@ Command to generate a moc file from a cpp file.
.IP QT_MOCFROMCXXCOMSTR
The string displayed when generating a moc file from a cpp file.
-If this is not set, then $QT_MOCFROMCXXCOM (the command line) is displayed.
+If this is not set, then \fB$QT_MOCFROMCXXCOM\fP (the command line) is displayed.
.IP QT_MOCFROMCXXFLAGS
Default value is '-i'. These flags are passed to moc, when moccing a
@@ -10341,7 +10317,7 @@ Command to generate a moc file from a header.
.IP QT_MOCFROMHCOMSTR
The string displayed when generating a moc file from a cpp file.
-If this is not set, then $QT_MOCFROMHCOM (the command line) is displayed.
+If this is not set, then \fB$QT_MOCFROMHCOM\fP (the command line) is displayed.
.IP QT_MOCFROMHFLAGS
Default value is ''. These flags are passed to moc, when moccing a header
@@ -10351,18 +10327,18 @@ file.
Default value is 'moc_'. Prefix for moc output files, when source is a header.
.IP QT_MOCHSUFFIX
-Default value is '$CXXFILESUFFIX'. Suffix for moc output files, when source is
+Default value is '\fB$CXXFILESUFFIX\fP'. Suffix for moc output files, when source is
a header.
.IP QT_UIC
-Default value is '$QT_BINPATH/uic'.
+Default value is '\fB$QT_BINPATH\fP/uic'.
.IP QT_UICCOM
Command to generate header files from .ui files.
.IP QT_UICCOMSTR
The string displayed when generating header files from .ui files.
-If this is not set, then $QT_UICCOM (the command line) is displayed.
+If this is not set, then \fB$QT_UICCOM\fP (the command line) is displayed.
.IP QT_UICDECLFLAGS
Default value is ''. These flags are passed to uic, when creating a a h
@@ -10382,7 +10358,7 @@ file from a .ui file.
Default value is 'uic_'. Prefix for uic generated implementation files.
.IP QT_UICIMPLSUFFIX
-Default value is '$CXXFILESUFFIX'. Suffix for uic generated implementation
+Default value is '\fB$CXXFILESUFFIX\fP'. Suffix for uic generated implementation
files.
.IP QT_UISUFFIX
@@ -10397,11 +10373,11 @@ with python's os.path.join() method,
but are listed here with the '/' separator
for easier reading.)
In addition, the construction environment
-variables $CPPPATH,
-$LIBPATH and
-$LIBS may be modified
+variables \fB$CPPPATH\fP,
+\fB$LIBPATH\fP and
+\fB$LIBS\fP may be modified
and the variables
-PROGEMITTER, SHLIBEMITTER and LIBEMITTER
+.BR $PROGEMITTER\fP, \fB$SHLIBEMITTER and $LIBEMITTER
are modified. Because the build-performance is affected when using this tool,
you have to explicitly specify it at Environment creation:
@@ -10417,8 +10393,9 @@ However, there are a few preconditions to do so: Your header file must have
the same filebase as your implementation file and must stay in the same
directory. It must have one of the suffixes .h, .hpp, .H, .hxx, .hh. You
can turn off automatic moc file generation by setting QT_AUTOSCAN to 0.
-See also the corresponding builder method
-.B Moc()
+See also the corresponding
+.BR Moc() ()
+builder method.
.I "Automatic moc file generation from cxx files."
As stated in the qt documentation, include the moc file at the end of
@@ -10449,7 +10426,7 @@ The command line used to index a static library archive.
.IP RANLIBCOMSTR
The string displayed when a static library archive is indexed.
-If this is not set, then $RANLIBCOM (the command line) is displayed.
+If this is not set, then \fB$RANLIBCOM\fP (the command line) is displayed.
.ES
env = Environment(RANLIBCOMSTR = "Indexing $TARGET")
@@ -10469,7 +10446,7 @@ a Microsoft Visual C++ resource file.
.IP RCCOMSTR
The string displayed when invoking the resource compiler
to build a Microsoft Visual C++ resource file.
-If this is not set, then $RCCOM (the command line) is displayed.
+If this is not set, then \fB$RCCOM\fP (the command line) is displayed.
.IP RCFLAGS
The flags passed to the resource compiler by the RES builder.
@@ -10479,31 +10456,31 @@ An automatically-generated construction variable
containing the command-line options
for specifying directories to be searched
by the resource compiler.
-The value of $RCINCFLAGS is created
-by appending $RCINCPREFIX and $RCINCSUFFIX
+The value of \fB$RCINCFLAGS\fP is created
+by appending \fB$RCINCPREFIX\fP and \fB$RCINCSUFFIX\fP
to the beginning and end
-of each directory in $CPPPATH.
+of each directory in \fB$CPPPATH\fP.
.IP RCINCPREFIX
The prefix (flag) used to specify an include directory
on the resource compiler command line.
This will be appended to the beginning of each directory
-in the $CPPPATH construction variable
-when the $RCINCFLAGS variable is expanded.
+in the \fB$CPPPATH\fP construction variable
+when the \fB$RCINCFLAGS\fP variable is expanded.
.IP RCINCSUFFIX
The suffix used to specify an include directory
on the resource compiler command line.
This will be appended to the end of each directory
-in the $CPPPATH construction variable
-when the $RCINCFLAGS variable is expanded.
+in the \fB$CPPPATH\fP construction variable
+when the \fB$RCINCFLAGS\fP variable is expanded.
.IP RCS
The RCS executable.
Note that this variable is not actually used
for the command to fetch source files from RCS;
see the
-$RCS_CO
+.B $RCS_CO
construction variable, below.
.IP RCS_CO
@@ -10517,11 +10494,11 @@ fetch (checkout) source files from RCS.
.IP RCS_COCOMSTR
The string displayed when fetching
a source file from RCS.
-If this is not set, then $RCS_COCOM
+If this is not set, then \fB$RCS_COCOM\fP
(the command line) is displayed.
.IP RCS_COFLAGS
-Options that are passed to the $RCS_CO command.
+Options that are passed to the \fB$RCS_CO\fP command.
.IP RDirs
A function that converts a string into a list of Dir instances by
@@ -10541,7 +10518,7 @@ is passed a keyword argument of \fBregister=1\fP.
.IP REGSVRCOMSTR
The string displayed when registering a newly-built DLL file.
-If this is not set, then $REGSVRCOM (the command line) is displayed.
+If this is not set, then \fB$REGSVRCOM\fP (the command line) is displayed.
.IP REGSVRFLAGS
Flags passed to the DLL registration program
@@ -10558,14 +10535,14 @@ 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 $RMICFLAGS construction variable
+Any options specified in the \fB$RMICFLAGS\fP construction variable
are included on this command line.
.IP RMICCOMSTR
The string displayed when compiling
stub and skeleton class files
from Java classes that contain RMI implementations.
-If this is not set, then $RMICCOM (the command line) is displayed.
+If this is not set, then \fB$RMICCOM\fP (the command line) is displayed.
.ES
env = Environment(RMICCOMSTR = "Generating stub/skeleton class files $TARGETS from $SOURCES")
@@ -10578,10 +10555,10 @@ General options passed to the Java RMI stub compiler.
An automatically-generated construction variable
containing the rpath flags to be used when linking
a program with shared libraries.
-The value of $_RPATH is created
-by appending $RPATHPREFIX and $RPATHSUFFIX
+The value of \fB$_RPATH\fP is created
+by appending \fB$RPATHPREFIX\fP and \fB$RPATHSUFFIX\fP
to the beginning and end
-of each directory in $RPATH.
+of each directory in \fB$RPATH\fP.
.IP RPATH
A list of paths to search for shared libraries when running programs.
@@ -10598,15 +10575,15 @@ path, you must make it absolute yourself.
The prefix used to specify a directory to be searched for
shared libraries when running programs.
This will be appended to the beginning of each directory
-in the $RPATH construction variable
-when the $_RPATH variable is automatically generated.
+in the \fB$RPATH\fP construction variable
+when the \fB$_RPATH\fP variable is automatically generated.
.IP RPATHSUFFIX
The suffix used to specify a directory to be searched for
shared libraries when running programs.
This will be appended to the end of each directory
-in the $RPATH construction variable
-when the $_RPATH variable is automatically generated.
+in the \fB$RPATH\fP construction variable
+when the \fB$_RPATH\fP variable is automatically generated.
.IP RPCGEN
The RPC protocol compiler.
@@ -10615,7 +10592,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
-$RPCGENFLAGS
+.B $RPCGENFLAGS
construction variable.
.IP RPCGENFLAGS
@@ -10625,21 +10602,21 @@ 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
-$RPCGENFLAGS
+.B $RPCGENFLAGS
construction variable.
.IP RPCGENSERVICEFLAGS
Options passed to the RPC protocol compiler
when generating server side stubs.
These are in addition to any flags specified in the
-$RPCGENFLAGS
+.B $RPCGENFLAGS
construction variable.
.IP RPCGENXDRFLAGS
Options passed to the RPC protocol compiler
when generating XDR routines.
These are in addition to any flags specified in the
-$RPCGENFLAGS
+.B $RPCGENFLAGS
construction variable.
.IP SCANNERS
@@ -10663,7 +10640,7 @@ fetch source files from SCCS.
.IP SCCSCOMSTR
The string displayed when fetching
a source file from a CVS repository.
-If this is not set, then $SCCSCOM
+If this is not set, then \fB$SCCSCOM\fP
(the command line) is displayed.
.IP SCCSFLAGS
@@ -10680,7 +10657,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
-$MSVSSCONS
+.B $MSVSSCONS
command line executed
from Microsoft Visual Studio project files.
@@ -10690,15 +10667,15 @@ The C compiler used for generating shared-library objects.
.IP SHCCCOM
The command line used to compile a C source file
to a shared-library object file.
-Any options specified in the $SHCFLAGS,
-$SHCCFLAGS and
-$CPPFLAGS construction variables
+Any options specified in the \fB$SHCFLAGS\fP,
+\fB$SHCCFLAGS\fP and
+\fB$CPPFLAGS\fP construction variables
are included on this command line.
.IP SHCCCOMSTR
The string displayed when a C source file
is compiled to a shared object file.
-If this is not set, then $SHCCCOM (the command line) is displayed.
+If this is not set, then \fB$SHCCCOM\fP (the command line) is displayed.
.ES
env = Environment(SHCCCOMSTR = "Compiling shared object $TARGET")
@@ -10718,14 +10695,14 @@ The C++ compiler used for generating shared-library objects.
.IP SHCXXCOM
The command line used to compile a C++ source file
to a shared-library object file.
-Any options specified in the $SHCXXFLAGS and
-$CPPFLAGS construction variables
+Any options specified in the \fB$SHCXXFLAGS\fP and
+\fB$CPPFLAGS\fP construction variables
are included on this command line.
.IP SHCXXCOMSTR
The string displayed when a C++ source file
is compiled to a shared object file.
-If this is not set, then $SHCXXCOM (the command line) is displayed.
+If this is not set, then \fB$SHCXXCOM\fP (the command line) is displayed.
.ES
env = Environment(SHCXXCOMSTR = "Compiling shared object $TARGET")
@@ -10737,41 +10714,41 @@ to generate shared-library objects.
.IP SHELL
A string naming the shell program that will be passed to the
-$SPAWN
+.B $SPAWN
function.
See the
-$SPAWN
+.B $SPAWN
construction variable for more information.
.IP SHF77
The Fortran 77 compiler used for generating shared-library objects.
-You should normally set the $SHFORTRAN variable,
+You should normally set the \fB$SHFORTRAN\fP variable,
which specifies the default Fortran compiler
for all Fortran versions.
-You only need to set $SHF77 if you need to use a specific compiler
+You only need to set \fB$SHF77\fP if you need to use a specific compiler
or compiler version for Fortran 77 files.
.IP SHF77COM
The command line used to compile a Fortran 77 source file
to a shared-library object file.
-You only need to set $SHF77COM if you need to use a specific
+You only need to set \fB$SHF77COM\fP if you need to use a specific
command line for Fortran 77 files.
-You should normally set the $SHFORTRANCOM variable,
+You should normally set the \fB$SHFORTRANCOM\fP variable,
which specifies the default command line
for all Fortran versions.
.IP SHF77COMSTR
The string displayed when a Fortran 77 source file
is compiled to a shared-library object file.
-If this is not set, then $SHF77COM or $SHFORTRANCOM
+If this is not set, then \fB$SHF77COM\fP or \fB$SHFORTRANCOM\fP
(the command line) is displayed.
.IP SHF77FLAGS
Options that are passed to the Fortran 77 compiler
to generated shared-library objects.
-You only need to set $SHF77FLAGS if you need to define specific
+You only need to set \fB$SHF77FLAGS\fP if you need to define specific
user options for Fortran 77 files.
-You should normally set the $SHFORTRANFLAGS variable,
+You should normally set the \fB$SHFORTRANFLAGS\fP variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
@@ -10780,11 +10757,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 $SHF77FLAGS and $CPPFLAGS construction variables
+Any options specified in the \fB$SHF77FLAGS\fP and \fB$CPPFLAGS\fP construction variables
are included on this command line.
-You only need to set $SHF77PPCOM if you need to use a specific
+You only need to set \fB$SHF77PPCOM\fP if you need to use a specific
C-preprocessor command line for Fortran 77 files.
-You should normally set the $SHFORTRANPPCOM variable,
+You should normally set the \fB$SHFORTRANPPCOM\fP variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
@@ -10792,38 +10769,38 @@ for all Fortran versions.
The string displayed when a Fortran 77 source file
is compiled to a shared-library object file
after first running the file through the C preprocessor.
-If this is not set, then $SHF77PPCOM or $SHFORTRANPPCOM
+If this is not set, then \fB$SHF77PPCOM\fP or \fB$SHFORTRANPPCOM\fP
(the command line) is displayed.
.IP SHF90
The Fortran 90 compiler used for generating shared-library objects.
-You should normally set the $SHFORTRAN variable,
+You should normally set the \fB$SHFORTRAN\fP variable,
which specifies the default Fortran compiler
for all Fortran versions.
-You only need to set $SHF90 if you need to use a specific compiler
+You only need to set \fB$SHF90\fP if you need to use a specific compiler
or compiler version for Fortran 90 files.
.IP SHF90COM
The command line used to compile a Fortran 90 source file
to a shared-library object file.
-You only need to set $SHF90COM if you need to use a specific
+You only need to set \fB$SHF90COM\fP if you need to use a specific
command line for Fortran 90 files.
-You should normally set the $SHFORTRANCOM variable,
+You should normally set the \fB$SHFORTRANCOM\fP variable,
which specifies the default command line
for all Fortran versions.
.IP SHF90COMSTR
The string displayed when a Fortran 90 source file
is compiled to a shared-library object file.
-If this is not set, then $SHF90COM or $SHFORTRANCOM
+If this is not set, then \fB$SHF90COM\fP or \fB$SHFORTRANCOM\fP
(the command line) is displayed.
.IP SHF90FLAGS
Options that are passed to the Fortran 90 compiler
to generated shared-library objects.
-You only need to set $SHF90FLAGS if you need to define specific
+You only need to set \fB$SHF90FLAGS\fP if you need to define specific
user options for Fortran 90 files.
-You should normally set the $SHFORTRANFLAGS variable,
+You should normally set the \fB$SHFORTRANFLAGS\fP variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
@@ -10832,11 +10809,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 $SHF90FLAGS and $CPPFLAGS construction variables
+Any options specified in the \fB$SHF90FLAGS\fP and \fB$CPPFLAGS\fP construction variables
are included on this command line.
-You only need to set $SHF90PPCOM if you need to use a specific
+You only need to set \fB$SHF90PPCOM\fP if you need to use a specific
C-preprocessor command line for Fortran 90 files.
-You should normally set the $SHFORTRANPPCOM variable,
+You should normally set the \fB$SHFORTRANPPCOM\fP variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
@@ -10844,38 +10821,38 @@ for all Fortran versions.
The string displayed when a Fortran 90 source file
is compiled to a shared-library object file
after first running the file through the C preprocessor.
-If this is not set, then $SHF90PPCOM or $SHFORTRANPPCOM
+If this is not set, then \fB$SHF90PPCOM\fP or \fB$SHFORTRANPPCOM\fP
(the command line) is displayed.
.IP SHF95
The Fortran 95 compiler used for generating shared-library objects.
-You should normally set the $SHFORTRAN variable,
+You should normally set the \fB$SHFORTRAN\fP variable,
which specifies the default Fortran compiler
for all Fortran versions.
-You only need to set $SHF95 if you need to use a specific compiler
+You only need to set \fB$SHF95\fP if you need to use a specific compiler
or compiler version for Fortran 95 files.
.IP SHF95COM
The command line used to compile a Fortran 95 source file
to a shared-library object file.
-You only need to set $SHF95COM if you need to use a specific
+You only need to set \fB$SHF95COM\fP if you need to use a specific
command line for Fortran 95 files.
-You should normally set the $SHFORTRANCOM variable,
+You should normally set the \fB$SHFORTRANCOM\fP variable,
which specifies the default command line
for all Fortran versions.
.IP SHF95COMSTR
The string displayed when a Fortran 95 source file
is compiled to a shared-library object file.
-If this is not set, then $SHF95COM or $SHFORTRANCOM
+If this is not set, then \fB$SHF95COM\fP or \fB$SHFORTRANCOM\fP
(the command line) is displayed.
.IP SHF95FLAGS
Options that are passed to the Fortran 95 compiler
to generated shared-library objects.
-You only need to set $SHF95FLAGS if you need to define specific
+You only need to set \fB$SHF95FLAGS\fP if you need to define specific
user options for Fortran 95 files.
-You should normally set the $SHFORTRANFLAGS variable,
+You should normally set the \fB$SHFORTRANFLAGS\fP variable,
which specifies the user-specified options
passed to the default Fortran compiler
for all Fortran versions.
@@ -10884,11 +10861,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 $SHF95FLAGS and $CPPFLAGS construction variables
+Any options specified in the \fB$SHF95FLAGS\fP and \fB$CPPFLAGS\fP construction variables
are included on this command line.
-You only need to set $SHF95PPCOM if you need to use a specific
+You only need to set \fB$SHF95PPCOM\fP if you need to use a specific
C-preprocessor command line for Fortran 95 files.
-You should normally set the $SHFORTRANPPCOM variable,
+You should normally set the \fB$SHFORTRANPPCOM\fP variable,
which specifies the default C-preprocessor command line
for all Fortran versions.
@@ -10896,7 +10873,7 @@ for all Fortran versions.
The string displayed when a Fortran 95 source file
is compiled to a shared-library object file
after first running the file through the C preprocessor.
-If this is not set, then $SHF95PPCOM or $SHFORTRANPPCOM
+If this is not set, then \fB$SHF95PPCOM\fP or \fB$SHFORTRANPPCOM\fP
(the command line) is displayed.
.IP SHFORTRAN
@@ -10909,7 +10886,7 @@ to a shared-library object file.
.IP SHFORTRANCOMSTR
The string displayed when a Fortran source file
is compiled to a shared-library object file.
-If this is not set, then $SHFORTRANCOM
+If this is not set, then \fB$SHFORTRANCOM\fP
(the command line) is displayed.
.IP SHFORTRANFLAGS
@@ -10921,17 +10898,20 @@ 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 $SHFORTRANFLAGS and
-$CPPFLAGS construction variables
+in the \fB$SHFORTRANFLAGS\fP and
+\fB$CPPFLAGS\fP construction variables
are included on this command line.
.IP SHFORTRANPPCOMSTR
The string displayed when a Fortran source file
is compiled to a shared-library object file
after first running the file through the C preprocessor.
-If this is not set, then $SHFORTRANPPCOM
+If this is not set, then \fB$SHFORTRANPPCOM\fP
(the command line) is displayed.
+.IP SHLIBEMITTER
+TODO
+
.IP SHLIBPREFIX
The prefix used for shared library file names.
@@ -10946,7 +10926,7 @@ The command line used to link programs using shared libraries.
.IP SHLINKCOMSTR
The string displayed when programs using shared libraries are linked.
-If this is not set, then $SHLINKCOM (the command line) is displayed.
+If this is not set, then \fB$SHLINKCOM\fP (the command line) is displayed.
.ES
env = Environment(SHLINKCOMSTR = "Linking shared $TARGET")
@@ -10958,17 +10938,17 @@ Note that this variable should
.I not
contain
.B \-l
-(or similar) options for linking with the libraries listed in $LIBS,
+(or similar) options for linking with the libraries listed in \fB$LIBS\fP,
nor
.B \-L
(or similar) include search path options
-that scons generates automatically from $LIBPATH.
+that scons generates automatically from \fB$LIBPATH\fP.
See
-$_LIBFLAGS
+.B $_LIBFLAGS
above,
for the variable that expands to library-link options,
and
-$_LIBDIRFLAGS
+.B $_LIBDIRFLAGS
above,
for the variable that expands to library search path options.
@@ -11049,13 +11029,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
-.BR _wrap $CFILESUFFIX.
+.BR _wrap\fP\fB$CFILESUFFIX .
By default, this value is used whenever the
.B \-c++
option is
.I not
specified as part of the
-$SWIGFLAGS
+.B $SWIGFLAGS
construction variable.
.IP SWIGCOM
@@ -11065,18 +11045,18 @@ the scripting language wrapper and interface generator.
.IP SWIGCOMSTR
The string displayed when calling
the scripting language wrapper and interface generator.
-If this is not set, then $SWIGCOM (the command line) is displayed.
+If this is not set, then \fB$SWIGCOM\fP (the command line) is displayed.
.IP SWIGCXXFILESUFFIX
The suffix that will be used for intermediate C++
source files generated by
the scripting language wrapper and interface generator.
The default value is
-.BR _wrap $CFILESUFFIX.
+.BR _wrap\fP\fB$CFILESUFFIX .
By default, this value is used whenever the
.B \-c++
option is specified as part of the
-$SWIGFLAGS
+.B $SWIGFLAGS
construction variable.
.IP SWIGDIRECTORSUFFIX
@@ -11102,29 +11082,29 @@ option in this variable,
will, by default,
generate a C++ intermediate source file
with the extension that is specified as the
-$CXXFILESUFFIX
+.B $CXXFILESUFFIX
variable.
.IP _SWIGINCFLAGS
An automatically-generated construction variable
containing the SWIG command-line options
for specifying directories to be searched for included files.
-The value of $_SWIGINCFLAGS is created
-by appending $SWIGINCPREFIX and $SWIGINCSUFFIX
+The value of \fB$_SWIGINCFLAGS\fP is created
+by appending \fB$SWIGINCPREFIX\fP and \fB$SWIGINCSUFFIX\fP
to the beginning and end
-of each directory in $SWIGPATH.
+of each directory in \fB$SWIGPATH\fP.
.IP SWIGINCPREFIX
The prefix used to specify an include directory on the SWIG command line.
This will be appended to the beginning of each directory
-in the $SWIGPATH construction variable
-when the $_SWIGINCFLAGS variable is automatically generated.
+in the \fB$SWIGPATH\fP construction variable
+when the \fB$_SWIGINCFLAGS\fP variable is automatically generated.
.IP SWIGINCSUFFIX
The suffix used to specify an include directory on the SWIG command line.
This will be appended to the end of each directory
-in the $SWIGPATH construction variable
-when the $_SWIGINCFLAGS variable is automatically generated.
+in the \fB$SWIGPATH\fP construction variable
+when the \fB$_SWIGINCFLAGS\fP variable is automatically generated.
.IP SWIGOUTDIR
Specifies the output directory in which
@@ -11141,7 +11121,7 @@ and interface generate will search for included files.
The SWIG implicit dependency scanner will search these
directories for include files.
The default is to use the same path
-specified as $CPPPATH.
+specified as \fB$CPPPATH\fP.
Don't explicitly put include directory
arguments in SWIGFLAGS;
@@ -11168,17 +11148,17 @@ env = Environment(SWIGPATH=include)
.IP
The directory list will be added to command lines
through the automatically-generated
-$_SWIGINCFLAGS
+.B $_SWIGINCFLAGS
construction variable,
which is constructed by
appending the values of the
-$SWIGINCPREFIX and $SWIGINCSUFFIX
+.BR $SWIGINCPREFIX and $SWIGINCSUFFIX
construction variables
to the beginning and end
-of each directory in $SWIGPATH.
+of each directory in \fB$SWIGPATH\fP.
Any command lines you define that need
the SWIGPATH directory list should
-include $_SWIGINCFLAGS:
+include \fB$_SWIGINCFLAGS\fP:
.ES
env = Environment(SWIGCOM="my_swig -o $TARGET $_SWIGINCFLAGS $SORUCES")
@@ -11196,7 +11176,7 @@ The command line used to call the tar archiver.
.IP TARCOMSTR
The string displayed when archiving files
using the tar archiver.
-If this is not set, then $TARCOM (the command line) is displayed.
+If this is not set, then \fB$TARCOM\fP (the command line) is displayed.
.ES
env = Environment(TARCOMSTR = "Archiving $TARGET")
@@ -11213,7 +11193,7 @@ that may not be set or used in a construction environment.
.IP TARGET_ARCH
Sets the target architecture for Visual Studio compiler (i.e. the arch
of the binaries generated by the compiler). If not set, default to
-$HOST_ARCH, or, if that is unset, to the architecture of the
+\fB$HOST_ARCH\fP, or, if that is unset, to the architecture of the
running machine's OS (note that the python build or architecture has no
effect).
This variable must be passed as an argument to the Environment()
@@ -11264,7 +11244,7 @@ The command line used to call the TeX formatter and typesetter.
.IP TEXCOMSTR
The string displayed when calling
the TeX formatter and typesetter.
-If this is not set, then $TEXCOM (the command line) is displayed.
+If this is not set, then \fB$TEXCOM\fP (the command line) is displayed.
.ES
env = Environment(TEXCOMSTR = "Building $TARGET from TeX input $SOURCES")
@@ -11314,19 +11294,26 @@ field in the controlling information for MSI packages.
The version of the project, specified as a string.
.IP WIN32_INSERT_DEF
-A deprecated synonym for $WINDOWS_INSERT_DEF.
+A deprecated synonym for \fB$WINDOWS_INSERT_DEF\fP.
.IP WIN32DEFPREFIX
-A deprecated synonym for $WINDOWSDEFPREFIX.
+A deprecated synonym for \fB$WINDOWSDEFPREFIX\fP.
.IP WIN32DEFSUFFIX
-A deprecated synonym for $WINDOWSDEFSUFFIX.
+A deprecated synonym for \fB$WINDOWSDEFSUFFIX\fP.
.IP WIN32EXPPREFIX
-A deprecated synonym for $WINDOWSEXPSUFFIX.
+A deprecated synonym for \fB$WINDOWSEXPSUFFIX\fP.
.IP WIN32EXPSUFFIX
-A deprecated synonym for $WINDOWSEXPSUFFIX.
+A deprecated synonym for \fB$WINDOWSEXPSUFFIX\fP.
+
+.IP WINDOWS_EMBED_MANIFEST
+Set this variable to True or 1 to embed the compiler-generated manifest
+(normally \fB${TARGET}.manifest\fP)
+into all Windows exes and DLLs built with this environment,
+as a resource during their link step.
+This is done using \fB$MT\fP and \fB$MTEXECOM\fP and \fB$MTSHLIBCOM\fP.
.IP WINDOWS_INSERT_DEF
When this is set to true,
@@ -11346,7 +11333,7 @@ will be aware of the
files generated by Microsoft Visua C/C++ 8.
.IP WINDOWSDEFPREFIX
-The prefix used for Windows \fB.def\fPfile names.
+The prefix used for Windows \fB.def\fP file names.
.IP WINDOWSDEFSUFFIX
The suffix used for Windows \fB.def\fP file names.
@@ -11383,7 +11370,7 @@ This is used to fill in the
.B Description:
field in the controlling information for Ipkg packages.
The default value is
-.B "$SUMMARY\\\\$SUMMARY"
+.B "$SUMMARY\\n$DESCRIPTION"
.IP X_IPK_MAINTAINER
This is used to fill in the
.B Maintainer:
@@ -11407,7 +11394,7 @@ attribute in the controlling information for MSI packages.
.IP X_MSI_LICENSE_TEXT
The text of the software license in RTF format.
Carriage return characters will be
-replaced with the RTF equivalent \\\par.
+replaced with the RTF equivalent \\\\par.
.IP X_MSI_UPGRADE_CODE
TODO
@@ -11567,7 +11554,7 @@ to generate a source file.
.IP YACCCOMSTR
The string displayed when generating a source file
using the parser generator.
-If this is not set, then $YACCCOM (the command line) is displayed.
+If this is not set, then \fB$YACCCOM\fP (the command line) is displayed.
.ES
env = Environment(YACCCOMSTR = "Yacc'ing $TARGET from $SOURCES")
@@ -11575,7 +11562,7 @@ env = Environment(YACCCOMSTR = "Yacc'ing $TARGET from $SOURCES")
.IP YACCFLAGS
General options passed to the parser generator.
-If $YACCFLAGS contains a \fB\-d\fP option,
+If \fB$YACCFLAGS\fP contains a \fB\-d\fP 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
@@ -11656,7 +11643,7 @@ module is unavailable.
.IP ZIPCOMSTR
The string displayed when archiving files
using the zip utility.
-If this is not set, then $ZIPCOM
+If this is not set, then \fB$ZIPCOM\fP
(the command line or internal Python function) is displayed.
.ES
@@ -13144,14 +13131,14 @@ implicit dependencies
based only on the target file
and the construction environment,
.I not
-for implicit
-(See the section "Scanner Objects," below,
+for implicit dependencies based on source files.
+(See the section "Scanner Objects" below,
for information about creating Scanner objects.)
.IP source_scanner
A Scanner object that
will be invoked to
-find implicit dependences in
+find implicit dependencies in
any source files
used to build this target file.
This is where you would
@@ -13168,7 +13155,7 @@ for on-disk changes to files
that
.B scons
does not know about from other Builder or function calls.
-(See the section "Scanner Objects," below,
+(See the section "Scanner Objects" below,
for information about creating your own Scanner objects.)
.IP target_factory
@@ -14273,7 +14260,7 @@ to enclose arbitrary Python code to be evaluated.
(In fact, this is how the above modifiers are substituted,
they are simply attributes of the Python objects
that represent TARGET, SOURCES, etc.)
-See the section "Python Code Substitution," below,
+See the section "Python Code Substitution" below,
for more thorough examples of
how this can be used.
@@ -14450,9 +14437,9 @@ function accepts the following arguments:
This can be either:
1) a Python function that will process
the Node (file)
-and return a list of strings (file names)
+and return a list of File Nodes
representing the implicit
-dependencies found in the contents;
+dependencies (file names) found in the contents;
or:
2) a dictionary that maps keys
(typically the file suffix, but see below for more discussion)
@@ -14626,7 +14613,7 @@ def xyz_scan(node, env, path):
XYZScanner = Scanner(xyz_scan)
-SourceFileScanner.add_scanner('.xyx', XYZScanner)
+SourceFileScanner.add_scanner('.xyz', XYZScanner)
env.Program('my_prog', ['file1.c', 'file2.f', 'file3.xyz'])
.EE
@@ -14895,7 +14882,7 @@ include_re = re.compile(r'^include\\s+(\\S+)$', re.M)
def kfile_scan(node, env, path, arg):
contents = node.get_text_contents()
includes = include_re.findall(contents)
- return includes
+ return env.File(includes)
kscan = Scanner(name = 'kfile',
function = kfile_scan,
@@ -14911,6 +14898,14 @@ env.Command('bar', bar_in, 'kprocess $SOURCES > $TARGET')
bar_in.target_scanner = kscan
.EE
+It is important to note that you
+have to return a list of File nodes from the scan function, simple
+strings for the file names won't do. As in the examples we are showing here,
+you can use the
+.BR File()
+function of your current Environment in order to create nodes on the fly from
+a sequence of file names with relative paths.
+
Here is a similar but more complete example that searches
a path of directories
(specified as the
@@ -14919,30 +14914,35 @@ construction variable)
for files that actually exist:
.ES
+import re
+import os
include_re = re.compile(r'^include\\s+(\\S+)$', re.M)
def my_scan(node, env, path, arg):
- contents = node.get_text_contents()
- includes = include_re.findall(contents)
- if includes == []:
+ contents = node.get_text_contents()
+ includes = include_re.findall(contents)
+ if includes == []:
return []
results = []
for inc in includes:
for dir in path:
- file = dir + os.sep + inc
+ file = str(dir) + os.sep + inc
if os.path.exists(file):
results.append(file)
break
- return results
+ return env.File(results)
scanner = Scanner(name = 'myscanner',
function = my_scan,
argument = None,
skeys = ['.x'],
- path_function = FindPathDirs('MYPATH'),
+ path_function = FindPathDirs('MYPATH')
)
scanners = Environment().Dictionary('SCANNERS')
-env = Environment(SCANNERS = scanners + [scanner])
+env = Environment(SCANNERS = scanners + [scanner],
+ MYPATH = ['incs'])
+
+env.Command('foo', 'foo.x', 'xprocess < $SOURCES > $TARGET')
.EE
The
@@ -14952,7 +14952,13 @@ function used in the previous example returns a function
that will return a list of directories
specified in the
.B $MYPATH
-construction variable.
+construction variable. It lets SCons detect the file
+.B incs/foo.inc
+, even if
+.B foo.x
+contains the line
+.B include foo.inc
+only.
If you need to customize how the search path is derived,
you would provide your own
.B path_function
@@ -14973,7 +14979,7 @@ scanner = Scanner(name = 'myscanner',
function = my_scan,
argument = None,
skeys = ['.x'],
- path_function = pf,
+ path_function = pf
)
.EE
diff --git a/sconsign.1 b/sconsign.1
index d7f7ef9..2cd2fca 100644
--- a/sconsign.1
+++ b/sconsign.1
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+.\" Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining
.\" a copy of this software and associated documentation files (the
@@ -19,7 +19,7 @@
.\" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
.\" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.\"
-.\" doc/man/sconsign.1 5134 2010/08/16 23:02:40 bdeegan
+.\" doc/man/sconsign.1 5357 2011/09/09 21:31:03 bdeegan
.\"
.\" ES - Example Start - indents and turns off line fill
.de ES
@@ -31,7 +31,7 @@
.RE
.fi
..
-.TH SCONSIGN 1 "August 2010"
+.TH SCONSIGN 1 "September 2011"
.SH NAME
sconsign \- print SCons .sconsign file information
.SH SYNOPSIS
diff --git a/script/scons b/script/scons
index bf84bf0..0e5b8ec 100644
--- a/script/scons
+++ b/script/scons
@@ -2,7 +2,7 @@
#
# SCons - a Software Constructor
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -22,22 +22,20 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-__revision__ = "src/script/scons.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/script/scons.py 5357 2011/09/09 21:31:03 bdeegan"
-__version__ = "2.0.1"
+__version__ = "2.1.0"
-__build__ = "r5134"
+__build__ = "r5357[MODIFIED]"
-__buildsys__ = "cooldog"
+__buildsys__ = "ubuntu"
-__date__ = "2010/08/16 23:02:40"
+__date__ = "2011/09/09 21:31:03"
__developer__ = "bdeegan"
import os
-import os.path
import sys
##############################################################################
@@ -61,7 +59,8 @@ import sys
# If so exit with error message
try:
if sys.version_info >= (3,0,0):
- msg = "scons: *** SCons version %s does not run under Python version %s.\n"
+ msg = "scons: *** SCons version %s does not run under Python version %s.\n\
+Python 3.0 and later are not yet supported.\n"
sys.stderr.write(msg % (__version__, sys.version.split()[0]))
sys.exit(1)
except AttributeError:
@@ -89,8 +88,22 @@ libs.append(os.path.abspath(local))
scons_version = 'scons-%s' % __version__
+# preferred order of scons lookup paths
prefs = []
+try:
+ import pkg_resources
+except ImportError:
+ pass
+else:
+ # when running from an egg add the egg's directory
+ try:
+ d = pkg_resources.get_distribution('scons')
+ except pkg_resources.DistributionNotFound:
+ pass
+ else:
+ prefs.append(d.location)
+
if sys.platform == 'win32':
# sys.prefix is (likely) C:\Python*;
# check only C:\Python*.
@@ -159,19 +172,6 @@ else:
# Check /usr/libfoo/scons*.
prefs.append(libpath)
- try:
- import pkg_resources
- except ImportError:
- pass
- else:
- # when running from an egg add the egg's directory
- try:
- d = pkg_resources.get_distribution('scons')
- except pkg_resources.DistributionNotFound:
- pass
- else:
- prefs.append(d.location)
-
# Look first for 'scons-__version__' in all of our preference libs,
# then for 'scons'.
libs.extend([os.path.join(x, scons_version) for x in prefs])
diff --git a/script/scons-time b/script/scons-time
index 36bdeb5..ace2d85 100644
--- a/script/scons-time
+++ b/script/scons-time
@@ -9,7 +9,7 @@
#
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@
from __future__ import division
from __future__ import nested_scopes
-__revision__ = "src/script/scons-time.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/script/scons-time.py 5357 2011/09/09 21:31:03 bdeegan"
import getopt
import glob
diff --git a/script/scons.bat b/script/scons.bat
index 33ed144..1648cb3 100644
--- a/script/scons.bat
+++ b/script/scons.bat
@@ -1,11 +1,11 @@
-@REM Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
-@REM src/script/scons.bat 5134 2010/08/16 23:02:40 bdeegan
+@REM Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
+@REM src/script/scons.bat 5357 2011/09/09 21:31:03 bdeegan
@echo off
set SCONS_ERRORLEVEL=
if "%OS%" == "Windows_NT" goto WinNT
@REM for 9x/Me you better not have more than 9 args
-python -c "from os.path import join; import sys; sys.path = [ join(sys.prefix, 'Lib', 'site-packages', 'scons-2.0.1'), join(sys.prefix, 'Lib', 'site-packages', 'scons'), join(sys.prefix, 'scons-2.0.1'), join(sys.prefix, 'scons')] + sys.path; import SCons.Script; SCons.Script.main()" %1 %2 %3 %4 %5 %6 %7 %8 %9
+python -c "from os.path import join; import sys; sys.path = [ join(sys.prefix, 'Lib', 'site-packages', 'scons-2.1.0'), join(sys.prefix, 'Lib', 'site-packages', 'scons'), join(sys.prefix, 'scons-2.1.0'), join(sys.prefix, 'scons')] + sys.path; import SCons.Script; SCons.Script.main()" %1 %2 %3 %4 %5 %6 %7 %8 %9
@REM no way to set exit status of this script for 9x/Me
goto endscons
@@ -17,7 +17,10 @@ goto endscons
setlocal
@REM ensure the script will be executed with the Python it was installed for
set path=%~dp0;%~dp0..;%path%
-python -c "from os.path import join; import sys; sys.path = [ join(sys.prefix, 'Lib', 'site-packages', 'scons-2.0.1'), join(sys.prefix, 'Lib', 'site-packages', 'scons'), join(sys.prefix, 'scons-2.0.1'), join(sys.prefix, 'scons')] + sys.path; import SCons.Script; SCons.Script.main()" %*
+@REM try the script named as the .bat file in current dir, then in Scripts subdir
+set scriptname=%~dp0%~n0.py
+if not exist %scriptname% set scriptname=%~dp0Scripts\%~n0.py
+python "%scriptname%" %*
endlocal & set SCONS_ERRORLEVEL=%ERRORLEVEL%
if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto returncode
diff --git a/script/sconsign b/script/sconsign
index adf3d28..4debf04 100644
--- a/script/sconsign
+++ b/script/sconsign
@@ -2,7 +2,7 @@
#
# SCons - a Software Constructor
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -23,21 +23,20 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/script/sconsign.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/script/sconsign.py 5357 2011/09/09 21:31:03 bdeegan"
-__version__ = "2.0.1"
+__version__ = "2.1.0"
-__build__ = "r5134"
+__build__ = "r5357[MODIFIED]"
-__buildsys__ = "cooldog"
+__buildsys__ = "ubuntu"
-__date__ = "2010/08/16 23:02:40"
+__date__ = "2011/09/09 21:31:03"
__developer__ = "bdeegan"
import os
import sys
-import time
##############################################################################
# BEGIN STANDARD SCons SCRIPT HEADER
@@ -75,8 +74,22 @@ libs.append(os.path.abspath(local))
scons_version = 'scons-%s' % __version__
+# preferred order of scons lookup paths
prefs = []
+try:
+ import pkg_resources
+except ImportError:
+ pass
+else:
+ # when running from an egg add the egg's directory
+ try:
+ d = pkg_resources.get_distribution('scons')
+ except pkg_resources.DistributionNotFound:
+ pass
+ else:
+ prefs.append(d.location)
+
if sys.platform == 'win32':
# sys.prefix is (likely) C:\Python*;
# check only C:\Python*.
@@ -145,19 +158,6 @@ else:
# Check /usr/libfoo/scons*.
prefs.append(libpath)
- try:
- import pkg_resources
- except ImportError:
- pass
- else:
- # when running from an egg add the egg's directory
- try:
- d = pkg_resources.get_distribution('scons')
- except pkg_resources.DistributionNotFound:
- pass
- else:
- prefs.append(d.location)
-
# Look first for 'scons-__version__' in all of our preference libs,
# then for 'scons'.
libs.extend([os.path.join(x, scons_version) for x in prefs])
@@ -172,6 +172,7 @@ sys.path = libs + sys.path
import SCons.compat # so pickle will import cPickle instead
import whichdb
+import time
import pickle
import imp
diff --git a/setup.cfg b/setup.cfg
index a234e22..f04ca1b 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -3,4 +3,3 @@ group = Development/Tools
[bdist_wininst]
title = SCons - a software construction tool
-#install-script = scons-post-install.py
diff --git a/setup.py b/setup.py
index f5dd9e6..2d04341 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -20,14 +20,25 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/setup.py 5134 2010/08/16 23:02:40 bdeegan"
+"""
+NOTE: Installed SCons is not importable like usual Python packages. It is
+ executed explicitly with command line scripts. This allows multiple
+ SCons versions to coexist within single Python installation, which
+ is critical for enterprise build cases. Explicit invokation is
+ necessary to avoid confusion over which version of SCons is active.
+
+ By default SCons is installed into versioned directory, e.g.
+ site-packages/scons-2.1.0.alpha.20101125 and much of the stuff
+ below is dedicated to make it happen on various platforms.
+"""
+
+__revision__ = "src/setup.py 5357 2011/09/09 21:31:03 bdeegan"
import os
-import os.path
import stat
import sys
-Version = "2.0.1"
+Version = "2.1.0"
man_pages = [
'scons.1',
@@ -35,12 +46,15 @@ man_pages = [
'scons-time.1',
]
+# change to setup.py directory if it was executed from other dir
(head, tail) = os.path.split(sys.argv[0])
-
if head:
os.chdir(head)
sys.argv[0] = tail
+
+# flag if setup.py is run on win32 or _for_ win32 platform,
+# (when building windows installer on linux, for example)
is_win32 = 0
if not sys.platform == 'win32':
try:
@@ -51,23 +65,14 @@ if not sys.platform == 'win32':
else:
is_win32 = 1
-try:
- import distutils
- import distutils.core
- import distutils.command.install
- import distutils.command.install_data
- import distutils.command.install_lib
- import distutils.command.install_scripts
- import distutils.command.build_scripts
-except ImportError:
- sys.stderr.write("""Could not import distutils.
-
-Building or installing SCons from this package requires that the Python
-distutils be installed. See the README or README.txt file from this
-package for instructions on where to find distutils for installation on
-your system, or on how to install SCons from a different package.
-""")
- sys.exit(1)
+
+import distutils
+import distutils.core
+import distutils.command.install
+import distutils.command.install_data
+import distutils.command.install_lib
+import distutils.command.install_scripts
+import distutils.command.build_scripts
_install = distutils.command.install.install
_install_data = distutils.command.install_data.install_data
@@ -135,7 +140,7 @@ class install(_install):
'version-lib'
]
- if hasattr(os, 'symlink'):
+ if hasattr(os, 'link'):
user_options.append(
('hardlink-scons', None,
"hard link 'scons' to the version-numbered script, don't make a separate 'scons' copy"),
@@ -269,15 +274,11 @@ class install_scripts(_install_scripts):
self.copy_file(src, dst)
self.outfiles.append(dst)
- def report(self, msg, args):
- # Wrapper around self.announce, used by older distutils versions.
- self.announce(msg % args)
-
def run(self):
- # This "skip_build/build_scripts" block is cut-and-paste from
- # distutils.
+ # --- distutils copy/paste ---
if not self.skip_build:
self.run_command('build_scripts')
+ # --- /distutils copy/paste ---
# Custom SCons installation stuff.
if Options.hardlink_scons:
@@ -305,6 +306,9 @@ class install_scripts(_install_scripts):
base = os.path.basename(src)
scons = os.path.join(self.install_dir, base)
scons_ver = scons + '-' + Version
+ if is_win32:
+ scons += '.py'
+ scons_ver += '.py'
create_version_script(src, scons_ver)
create_basename_script(src, scons, scons_ver)
@@ -320,20 +324,19 @@ class install_scripts(_install_scripts):
self.copy_scons(src, scons_bat)
self.copy_scons(src, scons_version_bat)
- # This section is cut-and-paste from distutils, modulo being
- # able
+ # --- distutils copy/paste ---
if os.name == 'posix':
- try: report = distutils.log.info
- except AttributeError: report = self.report
# Set the executable bits (owner, group, and world) on
# all the scripts we just installed.
for file in self.get_outputs():
if self.dry_run:
- report("changing mode of %s", file)
+ # log.info("changing mode of %s", file)
+ pass
else:
mode = ((os.stat(file)[stat.ST_MODE]) | 0555) & 07777
- report("changing mode of %s", file)
+ # log.info("changing mode of %s to %o", file, mode)
os.chmod(file, mode)
+ # --- /distutils copy/paste ---
class build_scripts(_build_scripts):
def finalize_options(self):
@@ -378,11 +381,6 @@ scripts = [
'script/scons.bat',
]
-#if is_win32:
-# scripts = scripts + [
-# 'script/scons-post-install.py'
-# ]
-
arguments = {
'name' : "scons",
'version' : Version,