summaryrefslogtreecommitdiff
path: root/src/engine
diff options
context:
space:
mode:
authorLuca Falavigna <dktrkranz@debian.org>2011-09-10 11:25:54 +0200
committerLuca Falavigna <dktrkranz@debian.org>2011-09-10 11:25:54 +0200
commitf920539cfcaf32813d390bfa501a08ea8bf8ec89 (patch)
tree1b8d1d57e9b38d43d01c28521c2e34aff743adb5 /src/engine
parentf9b265b27769aff6cff204cea5402d69ead3dda0 (diff)
parentba4425ab5227fd9597fccd368bffff6bf1032149 (diff)
Merge commit 'upstream/2.1.0'
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/MANIFEST-xml.in4
-rw-r--r--src/engine/MANIFEST.in1
-rw-r--r--src/engine/README.txt167
-rw-r--r--src/engine/SCons/Action.py28
-rw-r--r--src/engine/SCons/Action.xml2
-rw-r--r--src/engine/SCons/ActionTests.py19
-rw-r--r--src/engine/SCons/Builder.py4
-rw-r--r--src/engine/SCons/BuilderTests.py4
-rw-r--r--src/engine/SCons/CacheDir.py4
-rw-r--r--src/engine/SCons/CacheDirTests.py4
-rw-r--r--src/engine/SCons/Debug.py4
-rw-r--r--src/engine/SCons/Defaults.py34
-rw-r--r--src/engine/SCons/Defaults.xml15
-rw-r--r--src/engine/SCons/DefaultsTests.py4
-rw-r--r--src/engine/SCons/Environment.py137
-rw-r--r--src/engine/SCons/Environment.xml2973
-rw-r--r--src/engine/SCons/EnvironmentTests.py19
-rw-r--r--src/engine/SCons/Errors.py4
-rw-r--r--src/engine/SCons/ErrorsTests.py4
-rw-r--r--src/engine/SCons/Executor.py4
-rw-r--r--src/engine/SCons/ExecutorTests.py4
-rw-r--r--src/engine/SCons/Job.py4
-rw-r--r--src/engine/SCons/JobTests.py4
-rw-r--r--src/engine/SCons/Memoize.py4
-rw-r--r--src/engine/SCons/MemoizeTests.py4
-rw-r--r--src/engine/SCons/Node/Alias.py4
-rw-r--r--src/engine/SCons/Node/AliasTests.py4
-rw-r--r--src/engine/SCons/Node/FS.py402
-rw-r--r--src/engine/SCons/Node/FSTests.py299
-rw-r--r--src/engine/SCons/Node/NodeTests.py4
-rw-r--r--src/engine/SCons/Node/Python.py4
-rw-r--r--src/engine/SCons/Node/PythonTests.py4
-rw-r--r--src/engine/SCons/Node/__init__.py11
-rw-r--r--src/engine/SCons/Options/BoolOption.py4
-rw-r--r--src/engine/SCons/Options/EnumOption.py4
-rw-r--r--src/engine/SCons/Options/ListOption.py4
-rw-r--r--src/engine/SCons/Options/PackageOption.py4
-rw-r--r--src/engine/SCons/Options/PathOption.py4
-rw-r--r--src/engine/SCons/Options/__init__.py4
-rw-r--r--src/engine/SCons/PathList.py4
-rw-r--r--src/engine/SCons/PathListTests.py4
-rw-r--r--src/engine/SCons/Platform/PlatformTests.py4
-rw-r--r--src/engine/SCons/Platform/__init__.py4
-rw-r--r--src/engine/SCons/Platform/__init__.xml2
-rw-r--r--src/engine/SCons/Platform/aix.py4
-rw-r--r--src/engine/SCons/Platform/cygwin.py4
-rw-r--r--src/engine/SCons/Platform/darwin.py30
-rw-r--r--src/engine/SCons/Platform/hpux.py4
-rw-r--r--src/engine/SCons/Platform/irix.py4
-rw-r--r--src/engine/SCons/Platform/os2.py4
-rw-r--r--src/engine/SCons/Platform/posix.py4
-rw-r--r--src/engine/SCons/Platform/posix.xml2
-rw-r--r--src/engine/SCons/Platform/sunos.py4
-rw-r--r--src/engine/SCons/Platform/sunos.xml2
-rw-r--r--src/engine/SCons/Platform/win32.py4
-rw-r--r--src/engine/SCons/Platform/win32.xml2
-rw-r--r--src/engine/SCons/SConf.py4
-rw-r--r--src/engine/SCons/SConfTests.py4
-rw-r--r--src/engine/SCons/SConsign.py12
-rw-r--r--src/engine/SCons/SConsignTests.py4
-rw-r--r--src/engine/SCons/Scanner/C.py4
-rw-r--r--src/engine/SCons/Scanner/CTests.py4
-rw-r--r--src/engine/SCons/Scanner/D.py4
-rw-r--r--src/engine/SCons/Scanner/Dir.py4
-rw-r--r--src/engine/SCons/Scanner/DirTests.py4
-rw-r--r--src/engine/SCons/Scanner/Fortran.py4
-rw-r--r--src/engine/SCons/Scanner/FortranTests.py4
-rw-r--r--src/engine/SCons/Scanner/IDL.py4
-rw-r--r--src/engine/SCons/Scanner/IDLTests.py4
-rw-r--r--src/engine/SCons/Scanner/LaTeX.py7
-rw-r--r--src/engine/SCons/Scanner/LaTeXTests.py4
-rw-r--r--src/engine/SCons/Scanner/Prog.py4
-rw-r--r--src/engine/SCons/Scanner/ProgTests.py4
-rw-r--r--src/engine/SCons/Scanner/RC.py6
-rw-r--r--src/engine/SCons/Scanner/RCTests.py15
-rw-r--r--src/engine/SCons/Scanner/ScannerTests.py4
-rw-r--r--src/engine/SCons/Scanner/__init__.py4
-rw-r--r--src/engine/SCons/Scanner/__init__.xml64
-rw-r--r--src/engine/SCons/Script/Interactive.py4
-rw-r--r--src/engine/SCons/Script/Main.py93
-rw-r--r--src/engine/SCons/Script/Main.xml710
-rw-r--r--src/engine/SCons/Script/MainTests.py4
-rw-r--r--src/engine/SCons/Script/SConsOptions.py10
-rw-r--r--src/engine/SCons/Script/SConscript.py4
-rw-r--r--src/engine/SCons/Script/SConscript.xml509
-rw-r--r--src/engine/SCons/Script/SConscriptTests.py4
-rw-r--r--src/engine/SCons/Script/__init__.py4
-rw-r--r--src/engine/SCons/Sig.py4
-rw-r--r--src/engine/SCons/Subst.py4
-rw-r--r--src/engine/SCons/Subst.xml46
-rw-r--r--src/engine/SCons/SubstTests.py8
-rw-r--r--src/engine/SCons/Taskmaster.py12
-rw-r--r--src/engine/SCons/TaskmasterTests.py4
-rw-r--r--src/engine/SCons/Tool/386asm.py4
-rw-r--r--src/engine/SCons/Tool/386asm.xml2
-rw-r--r--src/engine/SCons/Tool/BitKeeper.py4
-rw-r--r--src/engine/SCons/Tool/BitKeeper.xml28
-rw-r--r--src/engine/SCons/Tool/CVS.py4
-rw-r--r--src/engine/SCons/Tool/CVS.xml52
-rw-r--r--src/engine/SCons/Tool/FortranCommon.py21
-rw-r--r--src/engine/SCons/Tool/JavaCommon.py4
-rw-r--r--src/engine/SCons/Tool/JavaCommonTests.py4
-rw-r--r--src/engine/SCons/Tool/MSCommon/__init__.py4
-rw-r--r--src/engine/SCons/Tool/MSCommon/arch.py4
-rw-r--r--src/engine/SCons/Tool/MSCommon/common.py4
-rw-r--r--src/engine/SCons/Tool/MSCommon/netframework.py4
-rw-r--r--src/engine/SCons/Tool/MSCommon/sdk.py4
-rw-r--r--src/engine/SCons/Tool/MSCommon/vc.py15
-rw-r--r--src/engine/SCons/Tool/MSCommon/vs.py31
-rw-r--r--src/engine/SCons/Tool/Perforce.py4
-rw-r--r--src/engine/SCons/Tool/Perforce.xml45
-rw-r--r--src/engine/SCons/Tool/PharLapCommon.py4
-rw-r--r--src/engine/SCons/Tool/PharLapCommonTests.py4
-rw-r--r--src/engine/SCons/Tool/RCS.py4
-rw-r--r--src/engine/SCons/Tool/RCS.xml42
-rw-r--r--src/engine/SCons/Tool/SCCS.py4
-rw-r--r--src/engine/SCons/Tool/SCCS.xml38
-rw-r--r--src/engine/SCons/Tool/Subversion.py4
-rw-r--r--src/engine/SCons/Tool/Subversion.xml53
-rw-r--r--src/engine/SCons/Tool/ToolTests.py4
-rw-r--r--src/engine/SCons/Tool/__init__.py6
-rw-r--r--src/engine/SCons/Tool/__init__.xml20
-rw-r--r--src/engine/SCons/Tool/aixc++.py4
-rw-r--r--src/engine/SCons/Tool/aixc++.xml2
-rw-r--r--src/engine/SCons/Tool/aixcc.py4
-rw-r--r--src/engine/SCons/Tool/aixcc.xml2
-rw-r--r--src/engine/SCons/Tool/aixf77.py4
-rw-r--r--src/engine/SCons/Tool/aixf77.xml2
-rw-r--r--src/engine/SCons/Tool/aixlink.py4
-rw-r--r--src/engine/SCons/Tool/aixlink.xml2
-rw-r--r--src/engine/SCons/Tool/applelink.py4
-rw-r--r--src/engine/SCons/Tool/applelink.xml2
-rw-r--r--src/engine/SCons/Tool/ar.py4
-rw-r--r--src/engine/SCons/Tool/ar.xml2
-rw-r--r--src/engine/SCons/Tool/as.py4
-rw-r--r--src/engine/SCons/Tool/as.xml2
-rw-r--r--src/engine/SCons/Tool/bcc32.py4
-rw-r--r--src/engine/SCons/Tool/bcc32.xml2
-rw-r--r--src/engine/SCons/Tool/c++.py4
-rw-r--r--src/engine/SCons/Tool/c++.xml2
-rw-r--r--src/engine/SCons/Tool/cc.py4
-rw-r--r--src/engine/SCons/Tool/cc.xml2
-rw-r--r--src/engine/SCons/Tool/cvf.py4
-rw-r--r--src/engine/SCons/Tool/cvf.xml2
-rw-r--r--src/engine/SCons/Tool/default.py4
-rw-r--r--src/engine/SCons/Tool/default.xml2
-rw-r--r--src/engine/SCons/Tool/dmd.py31
-rw-r--r--src/engine/SCons/Tool/dmd.xml2
-rw-r--r--src/engine/SCons/Tool/dvi.py4
-rw-r--r--src/engine/SCons/Tool/dvi.xml2
-rw-r--r--src/engine/SCons/Tool/dvipdf.py5
-rw-r--r--src/engine/SCons/Tool/dvipdf.xml2
-rw-r--r--src/engine/SCons/Tool/dvips.py5
-rw-r--r--src/engine/SCons/Tool/dvips.xml2
-rw-r--r--src/engine/SCons/Tool/f03.py63
-rw-r--r--src/engine/SCons/Tool/f03.xml252
-rw-r--r--src/engine/SCons/Tool/f77.py4
-rw-r--r--src/engine/SCons/Tool/f77.xml2
-rw-r--r--src/engine/SCons/Tool/f90.py4
-rw-r--r--src/engine/SCons/Tool/f90.xml2
-rw-r--r--src/engine/SCons/Tool/f95.py4
-rw-r--r--src/engine/SCons/Tool/f95.xml2
-rw-r--r--src/engine/SCons/Tool/filesystem.py4
-rw-r--r--src/engine/SCons/Tool/fortran.py4
-rw-r--r--src/engine/SCons/Tool/fortran.xml2
-rw-r--r--src/engine/SCons/Tool/g++.py4
-rw-r--r--src/engine/SCons/Tool/g++.xml2
-rw-r--r--src/engine/SCons/Tool/g77.py4
-rw-r--r--src/engine/SCons/Tool/g77.xml2
-rw-r--r--src/engine/SCons/Tool/gas.py4
-rw-r--r--src/engine/SCons/Tool/gas.xml2
-rw-r--r--src/engine/SCons/Tool/gcc.py4
-rw-r--r--src/engine/SCons/Tool/gcc.xml2
-rw-r--r--src/engine/SCons/Tool/gfortran.py6
-rw-r--r--src/engine/SCons/Tool/gfortran.xml2
-rw-r--r--src/engine/SCons/Tool/gnulink.py5
-rw-r--r--src/engine/SCons/Tool/gnulink.xml2
-rw-r--r--src/engine/SCons/Tool/gs.py4
-rw-r--r--src/engine/SCons/Tool/gs.xml2
-rw-r--r--src/engine/SCons/Tool/hpc++.py4
-rw-r--r--src/engine/SCons/Tool/hpc++.xml2
-rw-r--r--src/engine/SCons/Tool/hpcc.py4
-rw-r--r--src/engine/SCons/Tool/hpcc.xml2
-rw-r--r--src/engine/SCons/Tool/hplink.py4
-rw-r--r--src/engine/SCons/Tool/hplink.xml2
-rw-r--r--src/engine/SCons/Tool/icc.py4
-rw-r--r--src/engine/SCons/Tool/icc.xml2
-rw-r--r--src/engine/SCons/Tool/icl.py4
-rw-r--r--src/engine/SCons/Tool/icl.xml2
-rw-r--r--src/engine/SCons/Tool/ifl.py4
-rw-r--r--src/engine/SCons/Tool/ifl.xml2
-rw-r--r--src/engine/SCons/Tool/ifort.py4
-rw-r--r--src/engine/SCons/Tool/ifort.xml2
-rw-r--r--src/engine/SCons/Tool/ilink.py4
-rw-r--r--src/engine/SCons/Tool/ilink.xml2
-rw-r--r--src/engine/SCons/Tool/ilink32.py4
-rw-r--r--src/engine/SCons/Tool/ilink32.xml2
-rw-r--r--src/engine/SCons/Tool/install.py60
-rw-r--r--src/engine/SCons/Tool/install.xml2
-rw-r--r--src/engine/SCons/Tool/intelc.py90
-rw-r--r--src/engine/SCons/Tool/intelc.xml2
-rw-r--r--src/engine/SCons/Tool/ipkg.py4
-rw-r--r--src/engine/SCons/Tool/jar.py12
-rw-r--r--src/engine/SCons/Tool/jar.xml2
-rw-r--r--src/engine/SCons/Tool/javac.py4
-rw-r--r--src/engine/SCons/Tool/javac.xml2
-rw-r--r--src/engine/SCons/Tool/javah.py4
-rw-r--r--src/engine/SCons/Tool/javah.xml2
-rw-r--r--src/engine/SCons/Tool/latex.py5
-rw-r--r--src/engine/SCons/Tool/latex.xml2
-rw-r--r--src/engine/SCons/Tool/lex.py4
-rw-r--r--src/engine/SCons/Tool/lex.xml2
-rw-r--r--src/engine/SCons/Tool/link.py11
-rw-r--r--src/engine/SCons/Tool/link.xml2
-rw-r--r--src/engine/SCons/Tool/linkloc.py4
-rw-r--r--src/engine/SCons/Tool/linkloc.xml2
-rw-r--r--src/engine/SCons/Tool/m4.py4
-rw-r--r--src/engine/SCons/Tool/m4.xml2
-rw-r--r--src/engine/SCons/Tool/masm.py4
-rw-r--r--src/engine/SCons/Tool/masm.xml2
-rw-r--r--src/engine/SCons/Tool/midl.py4
-rw-r--r--src/engine/SCons/Tool/midl.xml2
-rw-r--r--src/engine/SCons/Tool/mingw.py41
-rw-r--r--src/engine/SCons/Tool/mingw.xml2
-rw-r--r--src/engine/SCons/Tool/mslib.py4
-rw-r--r--src/engine/SCons/Tool/mslib.xml2
-rw-r--r--src/engine/SCons/Tool/mslink.py70
-rw-r--r--src/engine/SCons/Tool/mslink.xml41
-rw-r--r--src/engine/SCons/Tool/mssdk.py4
-rw-r--r--src/engine/SCons/Tool/mssdk.xml2
-rw-r--r--src/engine/SCons/Tool/msvc.py32
-rw-r--r--src/engine/SCons/Tool/msvc.xml2
-rw-r--r--src/engine/SCons/Tool/msvs.py536
-rw-r--r--src/engine/SCons/Tool/msvs.xml73
-rw-r--r--src/engine/SCons/Tool/msvsTests.py24
-rw-r--r--src/engine/SCons/Tool/mwcc.py4
-rw-r--r--src/engine/SCons/Tool/mwcc.xml2
-rw-r--r--src/engine/SCons/Tool/mwld.py4
-rw-r--r--src/engine/SCons/Tool/mwld.xml2
-rw-r--r--src/engine/SCons/Tool/nasm.py4
-rw-r--r--src/engine/SCons/Tool/nasm.xml2
-rw-r--r--src/engine/SCons/Tool/packaging.xml2
-rw-r--r--src/engine/SCons/Tool/packaging/__init__.py4
-rw-r--r--src/engine/SCons/Tool/packaging/__init__.xml25
-rw-r--r--src/engine/SCons/Tool/packaging/ipk.py4
-rw-r--r--src/engine/SCons/Tool/packaging/msi.py4
-rw-r--r--src/engine/SCons/Tool/packaging/rpm.py4
-rw-r--r--src/engine/SCons/Tool/packaging/src_tarbz2.py4
-rw-r--r--src/engine/SCons/Tool/packaging/src_targz.py4
-rw-r--r--src/engine/SCons/Tool/packaging/src_zip.py4
-rw-r--r--src/engine/SCons/Tool/packaging/tarbz2.py4
-rw-r--r--src/engine/SCons/Tool/packaging/targz.py4
-rw-r--r--src/engine/SCons/Tool/packaging/zip.py4
-rw-r--r--src/engine/SCons/Tool/pdf.py4
-rw-r--r--src/engine/SCons/Tool/pdf.xml2
-rw-r--r--src/engine/SCons/Tool/pdflatex.py5
-rw-r--r--src/engine/SCons/Tool/pdflatex.xml2
-rw-r--r--src/engine/SCons/Tool/pdftex.py5
-rw-r--r--src/engine/SCons/Tool/pdftex.xml2
-rw-r--r--src/engine/SCons/Tool/qt.py4
-rw-r--r--src/engine/SCons/Tool/qt.xml9
-rw-r--r--src/engine/SCons/Tool/rmic.py12
-rw-r--r--src/engine/SCons/Tool/rmic.xml2
-rw-r--r--src/engine/SCons/Tool/rpcgen.py4
-rw-r--r--src/engine/SCons/Tool/rpcgen.xml2
-rw-r--r--src/engine/SCons/Tool/rpm.py4
-rw-r--r--src/engine/SCons/Tool/sgiar.py4
-rw-r--r--src/engine/SCons/Tool/sgiar.xml2
-rw-r--r--src/engine/SCons/Tool/sgic++.py4
-rw-r--r--src/engine/SCons/Tool/sgic++.xml2
-rw-r--r--src/engine/SCons/Tool/sgicc.py4
-rw-r--r--src/engine/SCons/Tool/sgicc.xml2
-rw-r--r--src/engine/SCons/Tool/sgilink.py5
-rw-r--r--src/engine/SCons/Tool/sgilink.xml2
-rw-r--r--src/engine/SCons/Tool/sunar.py4
-rw-r--r--src/engine/SCons/Tool/sunar.xml2
-rw-r--r--src/engine/SCons/Tool/sunc++.py4
-rw-r--r--src/engine/SCons/Tool/sunc++.xml2
-rw-r--r--src/engine/SCons/Tool/suncc.py4
-rw-r--r--src/engine/SCons/Tool/suncc.xml2
-rw-r--r--src/engine/SCons/Tool/sunf77.py4
-rw-r--r--src/engine/SCons/Tool/sunf77.xml2
-rw-r--r--src/engine/SCons/Tool/sunf90.py4
-rw-r--r--src/engine/SCons/Tool/sunf90.xml2
-rw-r--r--src/engine/SCons/Tool/sunf95.py4
-rw-r--r--src/engine/SCons/Tool/sunf95.xml2
-rw-r--r--src/engine/SCons/Tool/sunlink.py5
-rw-r--r--src/engine/SCons/Tool/sunlink.xml2
-rw-r--r--src/engine/SCons/Tool/swig.py11
-rw-r--r--src/engine/SCons/Tool/swig.xml2
-rw-r--r--src/engine/SCons/Tool/tar.py4
-rw-r--r--src/engine/SCons/Tool/tar.xml2
-rw-r--r--src/engine/SCons/Tool/tex.py139
-rw-r--r--src/engine/SCons/Tool/tex.xml2
-rw-r--r--src/engine/SCons/Tool/textfile.py4
-rw-r--r--src/engine/SCons/Tool/textfile.xml2
-rw-r--r--src/engine/SCons/Tool/tlib.py4
-rw-r--r--src/engine/SCons/Tool/tlib.xml2
-rw-r--r--src/engine/SCons/Tool/wix.py4
-rw-r--r--src/engine/SCons/Tool/yacc.py14
-rw-r--r--src/engine/SCons/Tool/yacc.xml2
-rw-r--r--src/engine/SCons/Tool/zip.py4
-rw-r--r--src/engine/SCons/Tool/zip.xml2
-rw-r--r--src/engine/SCons/Util.py6
-rw-r--r--src/engine/SCons/UtilTests.py13
-rw-r--r--src/engine/SCons/Variables/BoolVariable.py4
-rw-r--r--src/engine/SCons/Variables/BoolVariableTests.py4
-rw-r--r--src/engine/SCons/Variables/EnumVariable.py6
-rw-r--r--src/engine/SCons/Variables/EnumVariableTests.py4
-rw-r--r--src/engine/SCons/Variables/ListVariable.py4
-rw-r--r--src/engine/SCons/Variables/ListVariableTests.py4
-rw-r--r--src/engine/SCons/Variables/PackageVariable.py4
-rw-r--r--src/engine/SCons/Variables/PackageVariableTests.py4
-rw-r--r--src/engine/SCons/Variables/PathVariable.py4
-rw-r--r--src/engine/SCons/Variables/PathVariableTests.py4
-rw-r--r--src/engine/SCons/Variables/VariablesTests.py4
-rw-r--r--src/engine/SCons/Variables/__init__.py4
-rw-r--r--src/engine/SCons/Warnings.py4
-rw-r--r--src/engine/SCons/WarningsTests.py4
-rw-r--r--src/engine/SCons/__init__.py12
-rw-r--r--src/engine/SCons/compat/__init__.py4
-rw-r--r--src/engine/SCons/compat/_scons_builtins.py4
-rw-r--r--src/engine/SCons/compat/_scons_collections.py4
-rw-r--r--src/engine/SCons/compat/_scons_dbm.py4
-rw-r--r--src/engine/SCons/compat/_scons_hashlib.py4
-rw-r--r--src/engine/SCons/compat/_scons_io.py4
-rw-r--r--src/engine/SCons/cpp.py4
-rw-r--r--src/engine/SCons/cppTests.py4
-rw-r--r--src/engine/SCons/dblite.py5
-rw-r--r--src/engine/SCons/exitfuncs.py4
-rw-r--r--src/engine/setup.cfg2
-rw-r--r--src/engine/setup.py74
332 files changed, 7352 insertions, 1206 deletions
diff --git a/src/engine/MANIFEST-xml.in b/src/engine/MANIFEST-xml.in
index 97f77e5..b6bafcf 100644
--- a/src/engine/MANIFEST-xml.in
+++ b/src/engine/MANIFEST-xml.in
@@ -5,6 +5,10 @@ SCons/Platform/__init__.xml
SCons/Platform/posix.xml
SCons/Platform/sunos.xml
SCons/Platform/win32.xml
+SCons/Scanner/__init__.xml
+SCons/Script/Main.xml
+SCons/Script/SConscript.xml
+SCons/Subst.xml
SCons/Tool/386asm.xml
SCons/Tool/BitKeeper.xml
SCons/Tool/CVS.xml
diff --git a/src/engine/MANIFEST.in b/src/engine/MANIFEST.in
index dd0feaf..377b7b7 100644
--- a/src/engine/MANIFEST.in
+++ b/src/engine/MANIFEST.in
@@ -84,6 +84,7 @@ SCons/Tool/dvips.py
SCons/Tool/f77.py
SCons/Tool/f90.py
SCons/Tool/f95.py
+SCons/Tool/f03.py
SCons/Tool/filesystem.py
SCons/Tool/fortran.py
SCons/Tool/FortranCommon.py
diff --git a/src/engine/README.txt b/src/engine/README.txt
deleted file mode 100644
index 5f8e664..0000000
--- a/src/engine/README.txt
+++ /dev/null
@@ -1,167 +0,0 @@
-###
-### THIS FILE IS NO LONGER USED. THIS IS THE README FILE FOR THE
-### SEPARATE BUILD ENGINE PACKAGE FROM THE ORIGINAL (DRAFT) PACKAGING
-### SCHEME. WE'RE SAVING THIS IN CASE WE NEED OR WANT TO RESURRECT
-### A SEPARATE BUILD ENGINE PACKAGE IN THE FUTURE.
-###
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
-# src/engine/README.txt 5134 2010/08/16 23:02:40 bdeegan
-
-
- SCons - a software construction tool
-
- Version 2.0.1
-
-
-This is an alpha release of the SCons build engine, a Python extension
-module for building software (and other files). The SCons build engine
-manages dependencies and executes commands or Python functions to update
-out-of-date files (or other objects).
-
-
-LATEST VERSION
-==============
-
-Before going further, you can check that this package you have is
-the latest version by checking the SCons download page at:
-
- http://www.scons.org/download.html
-
-
-ABOUT SCONS PACKAGES
-====================
-
-The complete SCons system is comprised of three separate packages:
-
- scons
- The scons script itself, plus the SCons build engine
- installed into an SCons-specific library directory.
-
- python-scons [THIS PACKAGE]
- The SCons build engine, installed into the standard
- Python library directory.
-
- scons-script
- Only the scons script itself.
-
-Depending on what you want to do with SCons, you may need to install
-additional (or other) packages:
-
- If you just want to use scons (the script) to build software:
-
- Do not install this package. Install the scons package instead,
- which contains a copy of both the script and the build engine.
- You will not need to install any other packages.
-
- If you do NOT want to use the scons script, but you want to use the
- SCons build engine in other Python software:
-
- Install this package. You do not need to install any other
- packages.
-
- If you want to use the scons script AND you want to use the SCons
- build engine in other Python software:
-
- Install this package AND the scons package.
-
- Note that this installs two separate copies of the build engine,
- one (in an SCons-specific library directory) used by the scons
- script itself and one (in the standard Python library) used by
- other software. This allows you the flexibility to upgrade
- one build engine without affecting the other.
-
- If you want the scons script and other Python software to use the
- same version of the build engine:
-
- Install this package AND the scons-script package.
-
-
-INSTALLATION
-============
-
-To install this package, simply run the provided Python-standard setup
-script as follows:
-
- # python setup.py
-
-You should have system installation privileges (that is, "root" or
-"Administrator") when running the setup.py script.
-
-
-DOCUMENTATION
-=============
-
-Documentation for SCons is available at:
-
- http://www.scons.org/doc.html
-
-
-LICENSING
-=========
-
-SCons is distributed under the MIT license, a full copy of which is
-available in the LICENSE.txt file. The MIT license is an approved Open
-Source license, which means:
-
- This software is OSI Certified Open Source Software. OSI
- Certified is a certification mark of the Open Source Initiative.
-
-More information about OSI certifications and Open Source software is
-available at:
-
- http://www.opensource.org/
-
-
-REPORTING BUGS
-==============
-
-You can report bugs either by following the "Tracker - Bugs" link
-on the SCons project page:
-
- http://sourceforge.net/projects/scons/
-
-or by sending mail to the SCons developers mailing list:
-
- scons-devel@lists.sourceforge.net
-
-
-MAILING LISTS
-=============
-
-A mailing list for users of SCons is available. You may send
-questions or comments to the list at:
-
- scons-users@lists.sourceforge.net
-
-You may subscribe to the mailing list at:
-
- http://lists.sourceforge.net/lists/listinfo/scons-users
-
-There is also a low-volume mailing list available for announcements
-about SCons. Subscribe at:
-
- http://lists.sourceforge.net/lists/listinfo/scons-announce
-
-
-FOR MORE INFORMATION
-====================
-
-Check the SCons web site at:
-
- http://www.scons.org/
-
-
-AUTHOR INFO
-===========
-
-Steven Knight
-knight at baldmt dot com
-http://www.baldmt.com/~knight/
-
-With more than a little help from:
- Chad Austin
- Charles Crain
- Steve Leblanc
- Anthony Roach
- Steven Shaw
-
diff --git a/src/engine/SCons/Action.py b/src/engine/SCons/Action.py
index 4300dd4..f4117a4 100644
--- a/src/engine/SCons/Action.py
+++ b/src/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/src/engine/SCons/Action.xml b/src/engine/SCons/Action.xml
index 2b6b076..48b995f 100644
--- a/src/engine/SCons/Action.xml
+++ b/src/engine/SCons/Action.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/ActionTests.py b/src/engine/SCons/ActionTests.py
index 9b3a949..ebc9bef 100644
--- a/src/engine/SCons/ActionTests.py
+++ b/src/engine/SCons/ActionTests.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/ActionTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/ActionTests.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
@@ -397,8 +397,12 @@ class ActionTestCase(unittest.TestCase):
def test_no_action(self):
"""Test when the Action() factory can't create an action object
"""
- a5 = SCons.Action.Action(1)
- assert a5 is None, a5
+ try:
+ a5 = SCons.Action.Action(1)
+ except TypeError:
+ pass
+ else:
+ assert 0, "Should have thrown a TypeError creating Action from an int."
def test_reentrance(self):
"""Test the Action() factory when the action is already an Action object
@@ -802,6 +806,13 @@ class _ActionActionTestCase(unittest.TestCase):
assert isinstance(sum.list[2], SCons.Action.CommandGeneratorAction)
assert isinstance(sum.list[3], SCons.Action.FunctionAction)
+ # OK to add None on either side (should be ignored)
+ sum = act1 + None
+ assert sum == act1
+
+ sum = None + act1
+ assert sum == act1
+
try:
sum = act2 + 1
except TypeError:
diff --git a/src/engine/SCons/Builder.py b/src/engine/SCons/Builder.py
index 0592bb4..8d480be 100644
--- a/src/engine/SCons/Builder.py
+++ b/src/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/src/engine/SCons/BuilderTests.py b/src/engine/SCons/BuilderTests.py
index 1b64d7d..1396ded 100644
--- a/src/engine/SCons/BuilderTests.py
+++ b/src/engine/SCons/BuilderTests.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/BuilderTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/BuilderTests.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
diff --git a/src/engine/SCons/CacheDir.py b/src/engine/SCons/CacheDir.py
index 68ee1ca..09fbce0 100644
--- a/src/engine/SCons/CacheDir.py
+++ b/src/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/src/engine/SCons/CacheDirTests.py b/src/engine/SCons/CacheDirTests.py
index 2c078f6..875840e 100644
--- a/src/engine/SCons/CacheDirTests.py
+++ b/src/engine/SCons/CacheDirTests.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/CacheDirTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/CacheDirTests.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
import shutil
diff --git a/src/engine/SCons/Debug.py b/src/engine/SCons/Debug.py
index f4eb65f..b28f77d 100644
--- a/src/engine/SCons/Debug.py
+++ b/src/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/src/engine/SCons/Defaults.py b/src/engine/SCons/Defaults.py
index f6b0fd1..c170940 100644
--- a/src/engine/SCons/Defaults.py
+++ b/src/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/src/engine/SCons/Defaults.xml b/src/engine/SCons/Defaults.xml
index dd4d1b9..b094ae9 100644
--- a/src/engine/SCons/Defaults.xml
+++ b/src/engine/SCons/Defaults.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
@@ -470,3 +470,16 @@ A function that converts a string into a list of Dir instances by
searching the repositories.
</summary>
</cvar>
+
+<scons_function name="DefaultEnvironment">
+<arguments signature="global">
+([args])
+</arguments>
+<summary>
+Creates and returns a default construction environment object.
+This construction environment is used internally by SCons
+in order to execute many of the global functions in this list,
+and to fetch source files transparently
+from source code management systems.
+</summary>
+</scons_function>
diff --git a/src/engine/SCons/DefaultsTests.py b/src/engine/SCons/DefaultsTests.py
index 6bb95db..b031190 100644
--- a/src/engine/SCons/DefaultsTests.py
+++ b/src/engine/SCons/DefaultsTests.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/DefaultsTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/DefaultsTests.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py
index d5206fa..de8e9ef 100644
--- a/src/engine/SCons/Environment.py
+++ b/src/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/src/engine/SCons/Environment.xml b/src/engine/SCons/Environment.xml
index 4e5408f..85ba340 100644
--- a/src/engine/SCons/Environment.xml
+++ b/src/engine/SCons/Environment.xml
@@ -1,9 +1,12 @@
<!--
-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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
-->
+
+<!-- Construction variables -->
+
<cvar name="BUILDERS">
<summary>
A dictionary mapping the names of the builders
@@ -185,3 +188,2971 @@ A list of the names of the Tool specifications
that are part of this construction environment.
</summary>
</cvar>
+
+<!-- Functions / Construction environment methods -->
+
+<scons_function name="Action">
+<arguments>
+(action, [cmd/str/fun, [var, ...]] [option=value, ...])
+</arguments>
+<summary>
+Creates an Action object for
+the specified
+<varname>action</varname>.
+See the section "Action Objects,"
+below, for a complete explanation of the arguments and behavior.
+
+Note that the
+<function>env.Action</function>()
+form of the invocation will expand
+construction variables in any argument strings,
+including the
+<varname>action</varname>
+argument, at the time it is called
+using the construction variables in the
+<varname>env</varname>
+construction environment through which
+<function>env.Action</function>()
+was called.
+The
+<function>Action</function>()
+form delays all variable expansion
+until the Action object is actually used.
+</summary>
+</scons_function>
+
+<scons_function name="AddMethod">
+<arguments signature="global">
+(object, function, [name])
+</arguments>
+<arguments signature="env">
+(function, [name])
+</arguments>
+<summary>
+When called with the
+<function>AddMethod</function>()
+form,
+adds the specified
+<varname>function</varname>
+to the specified
+<varname>object</varname>
+as the specified method
+<varname>name</varname>.
+When called with the
+<function>env.AddMethod</function>()
+form,
+adds the specified
+<varname>function</varname>
+to the construction environment
+<varname>env</varname>
+as the specified method
+<varname>name</varname>.
+In both cases, if
+<varname>name</varname>
+is omitted or
+<literal>None</literal>,
+the name of the
+specified
+<varname>function</varname>
+itself is used for the method name.
+
+Examples:
+
+<example>
+# Note that the first argument to the function to
+# be attached as a method must be the object through
+# which the method will be called; the Python
+# convention is to call it 'self'.
+def my_method(self, arg):
+ print "my_method() got", arg
+
+# Use the global AddMethod() function to add a method
+# to the Environment class. This
+AddMethod(Environment, my_method)
+env = Environment()
+env.my_method('arg')
+
+# Add the function as a method, using the function
+# name for the method call.
+env = Environment()
+env.AddMethod(my_method, 'other_method_name')
+env.other_method_name('another arg')
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="AddPostAction">
+<arguments>
+(target, action)
+</arguments>
+<summary>
+Arranges for the specified
+<varname>action</varname>
+to be performed
+after the specified
+<varname>target</varname>
+has been built.
+The specified action(s) may be
+an Action object, or anything that
+can be converted into an Action object
+(see below).
+
+When multiple targets are supplied,
+the action may be called multiple times,
+once after each action that generates
+one or more targets in the list.
+</summary>
+</scons_function>
+
+<scons_function name="AddPreAction">
+<arguments>
+(target, action)
+</arguments>
+<summary>
+Arranges for the specified
+<varname>action</varname>
+to be performed
+before the specified
+<varname>target</varname>
+is built.
+The specified action(s) may be
+an Action object, or anything that
+can be converted into an Action object
+(see below).
+
+When multiple targets are specified,
+the action(s) may be called multiple times,
+once before each action that generates
+one or more targets in the list.
+
+Note that if any of the targets are built in multiple steps,
+the action will be invoked just
+before the "final" action that specifically
+generates the specified target(s).
+For example, when building an executable program
+from a specified source
+<filename>.c</filename>
+file via an intermediate object file:
+
+<example>
+foo = Program('foo.c')
+AddPreAction(foo, 'pre_action')
+</example>
+
+The specified
+<literal>pre_action</literal>
+would be executed before
+&scons;
+calls the link command that actually
+generates the executable program binary
+<filename>foo</filename>,
+not before compiling the
+<filename>foo.c</filename>
+file into an object file.
+</summary>
+</scons_function>
+
+<scons_function name="Alias">
+<arguments>
+(alias, [targets, [action]])
+</arguments>
+<summary>
+Creates one or more phony targets that
+expand to one or more other targets.
+An optional
+<varname>action</varname>
+(command)
+or list of actions
+can be specified that will be executed
+whenever the any of the alias targets are out-of-date.
+Returns the Node object representing the alias,
+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.
+&f-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.
+
+Examples:
+
+<example>
+Alias('install')
+Alias('install', '/usr/bin')
+Alias(['install', 'install-lib'], '/usr/local/lib')
+
+env.Alias('install', ['/usr/local/bin', '/usr/local/lib'])
+env.Alias('install', ['/usr/local/man'])
+
+env.Alias('update', ['file1', 'file2'], "update_database $SOURCES")
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="AlwaysBuild">
+<arguments>
+(target, ...)
+</arguments>
+<summary>
+Marks each given
+<varname>target</varname>
+so that it is always assumed to be out of date,
+and will always be rebuilt if needed.
+Note, however, that
+&f-AlwaysBuild;
+does not add its target(s) to the default target list,
+so the targets will only be built
+if they are specified on the command line,
+or are a dependent of a target specified on the command line--but
+they will
+<emphasis>always</emphasis>
+be built if so specified.
+Multiple targets can be passed in to a single call to
+&f-AlwaysBuild;.
+</summary>
+</scons_function>
+
+<scons_function name="Append">
+<arguments signature="env">
+(key=val, [...])
+</arguments>
+<summary>
+Appends the specified keyword arguments
+to the end 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 Prepend method, below.)
+
+Example:
+
+<example>
+env.Append(CCFLAGS = ' -g', FOO = ['foo.yyy'])
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="AppendENVPath">
+<arguments signature="env">
+(name, newpath, [envname, sep, delete_existing])
+</arguments>
+<summary>
+This appends new path elements to the given path in the
+specified external environment
+(<literal>ENV</literal>
+by default).
+This will only add
+any particular path once (leaving the last one it encounters and
+ignoring the rest, to preserve path order),
+and to help assure this,
+will normalize all paths (using
+<function>os.path.normpath</function>
+and
+<function>os.path.normcase</function>).
+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
+<varname>delete_existing</varname>
+is 0, then adding a path that already exists
+will not move it to the end; it will stay where it is in the list.
+
+Example:
+
+<example>
+print 'before:',env['ENV']['INCLUDE']
+include_path = '/foo/bar:/foo'
+env.AppendENVPath('INCLUDE', include_path)
+print 'after:',env['ENV']['INCLUDE']
+
+yields:
+before: /foo:/biz
+after: /biz:/foo/bar:/foo
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="AppendUnique">
+<arguments signature="env">
+(key=val, [...], delete_existing=0)
+</arguments>
+<summary>
+Appends the specified keyword arguments
+to the end 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
+<emphasis>not</emphasis>
+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 end of the list.
+
+Example:
+
+<example>
+env.AppendUnique(CCFLAGS = '-g', FOO = ['foo.yyy'])
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="BuildDir">
+<arguments>
+(build_dir, src_dir, [duplicate])
+</arguments>
+<summary>
+Deprecated synonyms for
+&f-VariantDir;
+and
+<function>env.VariantDir</function>().
+The
+<varname>build_dir</varname>
+argument becomes the
+<varname>variant_dir</varname>
+argument of
+&f-VariantDir;
+or
+<function>env.VariantDir</function>().
+</summary>
+</scons_function>
+
+<scons_function name="Builder">
+<arguments>
+(action, [arguments])
+</arguments>
+<summary>
+Creates a Builder object for
+the specified
+<varname>action</varname>.
+See the section "Builder Objects,"
+below, for a complete explanation of the arguments and behavior.
+
+Note that the
+<function>env.Builder</function>()
+form of the invocation will expand
+construction variables in any arguments strings,
+including the
+<varname>action</varname>
+argument,
+at the time it is called
+using the construction variables in the
+<varname>env</varname>
+construction environment through which
+<function>env.Builder</function>()
+was called.
+The
+&f-Builder;
+form delays all variable expansion
+until after the Builder object is actually called.
+</summary>
+</scons_function>
+
+<scons_function name="CacheDir">
+<arguments>
+(cache_dir)
+</arguments>
+<summary>
+Specifies that
+&scons;
+will maintain a cache of derived files in
+<varname>cache_dir</varname>.
+The derived files in the cache will be shared
+among all the builds using the same
+&f-CacheDir;
+call.
+Specifying a
+<varname>cache_dir</varname>
+of
+<literal>None</literal>
+disables derived file caching.
+
+Calling
+<function>env.CacheDir</function>()
+will only affect targets built
+through the specified construction environment.
+Calling
+&f-CacheDir;
+sets a global default
+that will be used by all targets built
+through construction environments
+that do
+<emphasis>not</emphasis>
+have an
+<function>env.CacheDir</function>()
+specified.
+
+When a
+<function>CacheDir</function>()
+is being used and
+&scons;
+finds a derived file that needs to be rebuilt,
+it will first look in the cache to see if a
+derived file has already been built
+from identical input files and an identical build action
+(as incorporated into the MD5 build signature).
+If so,
+&scons;
+will retrieve the file from the cache.
+If the derived file is not present in the cache,
+&scons;
+will rebuild it and
+then place a copy of the built file in the cache
+(identified by its MD5 build signature),
+so that it may be retrieved by other
+builds that need to build the same derived file
+from identical inputs.
+
+Use of a specified
+&f-CacheDir;
+may be disabled for any invocation
+by using the
+<option>--cache-disable</option>
+option.
+
+If the
+<option>--cache-force</option>
+option is used,
+&scons;
+will place a copy of
+<emphasis>all</emphasis>
+derived files in the cache,
+even if they already existed
+and were not built by this invocation.
+This is useful to populate a cache
+the first time
+&f-CacheDir;
+is added to a build,
+or after using the
+<option>--cache-disable</option>
+option.
+
+When using
+&f-CacheDir;,
+&scons;
+will report,
+"Retrieved `file' from cache,"
+unless the
+<option>--cache-show</option>
+option is being used.
+When the
+<option>--cache-show</option>
+option is used,
+&scons;
+will print the action that
+<emphasis>would</emphasis>
+have been used to build the file,
+without any indication that
+the file was actually retrieved from the cache.
+This is useful to generate build logs
+that are equivalent regardless of whether
+a given derived file has been built in-place
+or retrieved from the cache.
+
+The
+&f-link-NoCache;
+method can be used to disable caching of specific files. This can be
+useful if inputs and/or outputs of some tool are impossible to
+predict or prohibitively large.
+</summary>
+</scons_function>
+
+<scons_function name="Clean">
+<arguments>
+(targets, files_or_dirs)
+</arguments>
+<summary>
+This specifies a list of files or directories which should be removed
+whenever the targets are specified with the
+<option>-c</option>
+command line option.
+The specified targets may be a list
+or an individual target.
+Multiple calls to
+&f-Clean;
+are legal,
+and create new targets or add files and directories to the
+clean list for the specified targets.
+
+Multiple files or directories should be specified
+either as separate arguments to the
+&f-Clean;
+method, or as a list.
+&f-Clean;
+will also accept the return value of any of the construction environment
+Builder methods.
+Examples:
+
+The related
+&f-link-NoClean;
+function overrides calling
+&f-Clean;
+for the same target,
+and any targets passed to both functions will
+<emphasis>not</emphasis>
+be removed by the
+<option>-c</option>
+option.
+
+Examples:
+
+<example>
+Clean('foo', ['bar', 'baz'])
+Clean('dist', env.Program('hello', 'hello.c'))
+Clean(['foo', 'bar'], 'something_else_to_clean')
+</example>
+
+In this example,
+installing the project creates a subdirectory for the documentation.
+This statement causes the subdirectory to be removed
+if the project is deinstalled.
+<example>
+Clean(docdir, os.path.join(docdir, projectname))
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="Clone">
+<arguments signature="env">
+([key=val, ...])
+</arguments>
+<summary>
+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:
+
+<example>
+env2 = env.Clone()
+env3 = env.Clone(CCFLAGS = '-g')
+</example>
+
+Additionally, a list of tools and a toolpath may be specified, as in
+the Environment constructor:
+
+<example>
+def MyTool(env): env['FOO'] = 'bar'
+env4 = env.Clone(tools = ['msvc', MyTool])
+</example>
+
+The
+<varname>parse_flags</varname>
+keyword argument is also recognized:
+
+<example>
+# create an environment for compiling programs that use wxWidgets
+wx_env = env.Clone(parse_flags = '!wx-config --cflags --cxxflags')
+</example>
+</summary>
+</scons_function>
+
+<builder name="Command">
+<summary>
+The &b-Command; "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 &f-link-Command; function description
+for the calling syntax and details.
+</summary>
+</builder>
+
+<scons_function name="Command">
+<arguments>
+(target, source, action, [key=val, ...])
+</arguments>
+<summary>
+Executes a specific action
+(or list of actions)
+to build a target file or files.
+This is more convenient
+than defining a separate Builder object
+for a single special-case build.
+
+As a special case, the
+<varname>source_scanner</varname>
+keyword argument can
+be used to specify
+a Scanner object
+that will be used to scan the sources.
+(The global
+<literal>DirScanner</literal>
+object can be used
+if any of the sources will be directories
+that must be scanned on-disk for
+changes to files that aren't
+already specified in other Builder of function calls.)
+
+Any other keyword arguments specified override any
+same-named existing construction variables.
+
+An action can be an external command,
+specified as a string,
+or a callable Python object;
+see "Action Objects," below,
+for more complete information.
+Also note that a string specifying an external command
+may be preceded by an
+<literal>@</literal>
+(at-sign)
+to suppress printing the command in question,
+or by a
+<literal>-</literal>
+(hyphen)
+to ignore the exit status of the external command.
+
+Examples:
+
+<example>
+env.Command('foo.out', 'foo.in',
+ "$FOO_BUILD &lt; $SOURCES &gt; $TARGET")
+
+env.Command('bar.out', 'bar.in',
+ ["rm -f $TARGET",
+ "$BAR_BUILD &lt; $SOURCES &gt; $TARGET"],
+ ENV = {'PATH' : '/usr/local/bin/'})
+
+def rename(env, target, source):
+ import os
+ os.rename('.tmp', str(target[0]))
+
+env.Command('baz.out', 'baz.in',
+ ["$BAZ_BUILD &lt; $SOURCES &gt; .tmp",
+ rename ])
+</example>
+
+Note that the
+&f-Command;
+function will usually assume, by default,
+that the specified targets and/or sources are Files,
+if no other part of the configuration
+identifies what type of entry it is.
+If necessary, you can explicitly specify
+that targets or source nodes should
+be treated as directoriese
+by using the
+&f-link-Dir;
+or
+<function>env.Dir</function>()
+functions.
+
+Examples:
+
+<example>
+env.Command('ddd.list', Dir('ddd'), 'ls -l $SOURCE > $TARGET')
+
+env['DISTDIR'] = 'destination/directory'
+env.Command(env.Dir('$DISTDIR')), None, make_distdir)
+</example>
+
+(Also note that SCons will usually
+automatically create any directory necessary to hold a target file,
+so you normally don't need to create directories by hand.)
+</summary>
+</scons_function>
+
+<scons_function name="Configure">
+<arguments signature="global">
+(env, [custom_tests, conf_dir, log_file, config_h])
+</arguments>
+<arguments signature="env">
+([custom_tests, conf_dir, log_file, config_h])
+</arguments>
+<summary>
+Creates a Configure object for integrated
+functionality similar to GNU autoconf.
+See the section "Configure Contexts,"
+below, for a complete explanation of the arguments and behavior.
+</summary>
+</scons_function>
+
+<scons_function name="Copy">
+<arguments signature="env">
+([key=val, ...])
+</arguments>
+<summary>
+A now-deprecated synonym for
+<function>env.Clone</function>().
+</summary>
+</scons_function>
+
+<scons_function name="Decider">
+<arguments>
+(function)
+</arguments>
+<summary>
+Specifies that all up-to-date decisions for
+targets built through this construction environment
+will be handled by the specified
+<varname>function</varname>.
+The
+<varname>function</varname>
+can be one of the following strings
+that specify the type of decision function
+to be performed:
+
+<variablelist>
+<varlistentry>
+<term><literal>timestamp-newer</literal></term>
+<listitem>
+<para>
+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.
+This is the behavior of the classic Make utility,
+and
+<literal>make</literal>
+can be used a synonym for
+<literal>timestamp-newer</literal>.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>timestamp-match</literal></term>
+<listitem>
+<para>
+Specifies that a target shall be considered out of date and rebuilt
+if the dependency's timestamp is different than the
+timestamp recorded the last time the target was built.
+This provides behavior very similar to the classic Make utility
+(in particular, files are not opened up so that their
+contents can be checksummed)
+except that the target will also be rebuilt if a
+dependency file has been restored to a version with an
+<emphasis>earlier</emphasis>
+timestamp, such as can happen when restoring files from backup archives.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>MD5</literal></term>
+<listitem>
+<para>
+Specifies that a target shall be considered out of date and rebuilt
+if the dependency's content has changed sine the last time
+the target was built,
+as determined be performing an MD5 checksum
+on the dependency's contents
+and comparing it to the checksum recorded the
+last time the target was built.
+<literal>content</literal>
+can be used as a synonym for
+<literal>MD5</literal>.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>MD5-timestamp</literal></term>
+<listitem>
+<para>
+Specifies that a target shall be considered out of date and rebuilt
+if the dependency's content has changed sine the last time
+the target was built,
+except that dependencies with a timestamp that matches
+the last time the target was rebuilt will be
+assumed to be up-to-date and
+<emphasis>not</emphasis>
+rebuilt.
+This provides behavior very similar
+to the
+<literal>MD5</literal>
+behavior of always checksumming file contents,
+with an optimization of not checking
+the contents of files whose timestamps haven't changed.
+The drawback is that SCons will
+<emphasis>not</emphasis>
+detect if a file's content has changed
+but its timestamp is the same,
+as might happen in an automated script
+that runs a build,
+updates a file,
+and runs the build again,
+all within a single second.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+Examples:
+
+<example>
+# Use exact timestamp matches by default.
+Decider('timestamp-match')
+
+# Use MD5 content signatures for any targets built
+# with the attached construction environment.
+env.Decider('content')
+</example>
+
+In addition to the above already-available functions,
+the
+<varname>function</varname>
+argument may be an actual Python function
+that takes the following three arguments:
+
+<variablelist>
+<varlistentry>
+<term><parameter>dependency</parameter></term>
+<listitem>
+<para>
+The Node (file) which
+should cause the
+<varname>target</varname>
+to be rebuilt
+if it has "changed" since the last tme
+<varname>target</varname>
+was built.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><parameter>target</parameter></term>
+<listitem>
+<para>
+The Node (file) being built.
+In the normal case,
+this is what should get rebuilt
+if the
+<varname>dependency</varname>
+has "changed."
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><parameter>prev_ni</parameter></term>
+<listitem>
+<para>
+Stored information about the state of the
+<varname>dependency</varname>
+the last time the
+<varname>target</varname>
+was built.
+This can be consulted to match various
+file characteristics
+such as the timestamp,
+size, or content signature.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+The
+<varname>function</varname>
+should return a
+<literal>True</literal>
+(non-zero)
+value if the
+<varname>dependency</varname>
+has "changed" since the last time
+the
+<varname>target</varname>
+was built
+(indicating that the target
+<emphasis>should</emphasis>
+be rebuilt),
+and
+<literal>False</literal>
+(zero)
+otherwise
+(indicating that the target should
+<emphasis>not</emphasis>
+be rebuilt).
+Note that the decision can be made
+using whatever criteria are appopriate.
+Ignoring some or all of the function arguments
+is perfectly normal.
+
+Example:
+
+<example>
+def my_decider(dependency, target, prev_ni):
+ return not os.path.exists(str(target))
+
+env.Decider(my_decider)
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="Depends">
+<arguments>
+(target, dependency)
+</arguments>
+<summary>
+Specifies an explicit dependency;
+the
+<varname>target</varname>
+will be rebuilt
+whenever the
+<varname>dependency</varname>
+has changed.
+Both the specified
+<varname>target</varname>
+and
+<varname>dependency</varname>
+can be a string
+(usually the path name of a file or directory)
+or Node objects,
+or a list of strings or Node objects
+(such as returned by a Builder call).
+This should only be necessary
+for cases where the dependency
+is not caught by a Scanner
+for the file.
+
+Example:
+
+<example>
+env.Depends('foo', 'other-input-file-for-foo')
+
+mylib = env.Library('mylib.c')
+installed_lib = env.Install('lib', mylib)
+bar = env.Program('bar.c')
+
+# Arrange for the library to be copied into the installation
+# directory before trying to build the "bar" program.
+# (Note that this is for example only. A "real" library
+# dependency would normally be configured through the $LIBS
+# and $LIBPATH variables, not using an env.Depends() call.)
+
+env.Depends(bar, installed_lib)
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="Dictionary">
+<arguments signature="env">
+([vars])
+</arguments>
+<summary>
+Returns a dictionary object
+containing copies of all of the
+construction variables in the environment.
+If there are any variable names specified,
+only the specified construction
+variables are returned in the dictionary.
+
+Example:
+
+<example>
+dict = env.Dictionary()
+cc_dict = env.Dictionary('CC', 'CCFLAGS', 'CCCOM')
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="Dir">
+<arguments>
+(name, [directory])
+</arguments>
+<summary>
+This returns a Directory Node,
+an object that represents the specified directory
+<varname>name</varname>.
+<varname>name</varname>
+can be a relative or absolute path.
+<varname>directory</varname>
+is an optional directory that will be used as the parent directory.
+If no
+<varname>directory</varname>
+is specified, the current script's directory is used as the parent.
+
+If
+<varname>name</varname>
+is a list, SCons returns a list of Dir nodes.
+Construction variables are expanded in
+<varname>name</varname>.
+
+Directory Nodes can be used anywhere you
+would supply a string as a directory name
+to a Builder method or function.
+Directory Nodes have attributes and methods
+that are useful in many situations;
+see "File and Directory Nodes," below.
+</summary>
+</scons_function>
+
+<scons_function name="Dump">
+<arguments signature="env">
+([key])
+</arguments>
+<summary>
+Returns a pretty printable representation of the environment.
+<varname>key</varname>,
+if not
+<literal>None</literal>,
+should be a string containing the name of the variable of interest.
+
+This SConstruct:
+
+<example>
+env=Environment()
+print env.Dump('CCCOM')
+</example>
+
+will print:
+
+<example>
+'$CC -c -o $TARGET $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS $SOURCES'
+</example>
+
+While this SConstruct:
+
+<example>
+env=Environment()
+print env.Dump()
+</example>
+
+will print:
+<example>
+{ 'AR': 'ar',
+ 'ARCOM': '$AR $ARFLAGS $TARGET $SOURCES\n$RANLIB $RANLIBFLAGS $TARGET',
+ 'ARFLAGS': ['r'],
+ 'AS': 'as',
+ 'ASCOM': '$AS $ASFLAGS -o $TARGET $SOURCES',
+ 'ASFLAGS': [],
+ ...
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="Environment">
+<arguments>
+([key=value, ...])
+</arguments>
+<summary>
+Return a new construction environment
+initialized with the specified
+<varname>key</varname><literal>=</literal><varname>value</varname>
+pairs.
+</summary>
+</scons_function>
+
+<scons_function name="Execute">
+<arguments>
+(action, [strfunction, varlist])
+</arguments>
+<summary>
+Executes an Action object.
+The specified
+<varname>action</varname>
+may be an Action object
+(see the section "Action Objects,"
+below, for a complete explanation of the arguments and behavior),
+or it may be a command-line string,
+list of commands,
+or executable Python function,
+each of which will be converted
+into an Action object
+and then executed.
+The exit value of the command
+or return value of the Python function
+will be returned.
+
+Note that
+&scons;
+will print an error message if the executed
+<varname>action</varname>
+fails--that is,
+exits with or returns a non-zero value.
+&scons;
+will
+<emphasis>not</emphasis>,
+however,
+automatically terminate the build
+if the specified
+<varname>action</varname>
+fails.
+If you want the build to stop in response to a failed
+&f-Execute;
+call,
+you must explicitly check for a non-zero return value:
+
+<example>
+Execute(Copy('file.out', 'file.in'))
+
+if Execute("mkdir sub/dir/ectory"):
+ # The mkdir failed, don't try to build.
+ Exit(1)
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="File">
+<arguments>
+(name, [directory])
+</arguments>
+<summary>
+This returns a
+File Node,
+an object that represents the specified file
+<varname>name</varname>.
+<varname>name</varname>
+can be a relative or absolute path.
+<varname>directory</varname>
+is an optional directory that will be used as the parent directory.
+
+If
+<varname>name</varname>
+is a list, SCons returns a list of File nodes.
+Construction variables are expanded in
+<varname>name</varname>.
+
+File Nodes can be used anywhere you
+would supply a string as a file name
+to a Builder method or function.
+File Nodes have attributes and methods
+that are useful in many situations;
+see "File and Directory Nodes," below.
+</summary>
+</scons_function>
+
+<scons_function name="FindFile">
+<arguments>
+(file, dirs)
+</arguments>
+<summary>
+Search for
+<varname>file</varname>
+in the path specified by
+<varname>dirs</varname>.
+<varname>dirs</varname>
+may be a list of directory names or a single directory name.
+In addition to searching for files that exist in the filesystem,
+this function also searches for derived files
+that have not yet been built.
+
+Example:
+
+<example>
+foo = env.FindFile('foo', ['dir1', 'dir2'])
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="FindInstalledFiles">
+<arguments>
+()
+</arguments>
+<summary>
+Returns the list of targets set up by the
+&b-link-Install;
+or
+&b-link-InstallAs;
+builders.
+
+This function serves as a convenient method to select the contents of
+a binary package.
+
+Example:
+
+<example>
+Install( '/bin', [ 'executable_a', 'executable_b' ] )
+
+# will return the file node list
+# [ '/bin/executable_a', '/bin/executable_b' ]
+FindInstalledFiles()
+
+Install( '/lib', [ 'some_library' ] )
+
+# will return the file node list
+# [ '/bin/executable_a', '/bin/executable_b', '/lib/some_library' ]
+FindInstalledFiles()
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="FindSourceFiles">
+<arguments>
+(node='"."')
+</arguments>
+<summary>
+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
+<varname>node</varname>
+which defaults to the '"."'-node. It will then return all leaves of
+<varname>node</varname>.
+These are all children which have no further children.
+
+This function is a convenient method to select the contents of a Source
+Package.
+
+Example:
+
+<example>
+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' )
+</example>
+
+As you can see build support files (SConstruct in the above example)
+will also be returned by this function.
+</summary>
+</scons_function>
+
+<scons_function name="Flatten">
+<arguments>
+(sequence)
+</arguments>
+<summary>
+Takes a sequence (that is, a Python list or tuple)
+that may contain nested sequences
+and returns a flattened list containing
+all of the individual elements in any sequence.
+This can be helpful for collecting
+the lists returned by calls to Builders;
+other Builders will automatically
+flatten lists specified as input,
+but direct Python manipulation of
+these lists does not.
+
+Examples:
+
+<example>
+foo = Object('foo.c')
+bar = Object('bar.c')
+
+# Because `foo' and `bar' are lists returned by the Object() Builder,
+# `objects' will be a list containing nested lists:
+objects = ['f1.o', foo, 'f2.o', bar, 'f3.o']
+
+# Passing such a list to another Builder is all right because
+# the Builder will flatten the list automatically:
+Program(source = objects)
+
+# If you need to manipulate the list directly using Python, you need to
+# call Flatten() yourself, or otherwise handle nested lists:
+for object in Flatten(objects):
+ print str(object)
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="GetBuildPath">
+<arguments>
+(file, [...])
+</arguments>
+<summary>
+Returns the
+&scons;
+path name (or names) for the specified
+<varname>file</varname>
+(or files).
+The specified
+<varname>file</varname>
+or files
+may be
+&scons;
+Nodes or strings representing path names.
+</summary>
+</scons_function>
+
+<scons_function name="Glob">
+<arguments>
+(pattern, [ondisk, source, strings])
+</arguments>
+<summary>
+Returns Nodes (or strings) that match the specified
+<varname>pattern</varname>,
+relative to the directory of the current
+&SConscript;
+file.
+The
+<function>env.Glob</function>()
+form performs string substition on
+<varname>pattern</varname>
+and returns whatever matches
+the resulting expanded pattern.
+
+The specified
+<varname>pattern</varname>
+uses Unix shell style metacharacters for matching:
+
+<example>
+ * matches everything
+ ? matches any single character
+ [seq] matches any character in seq
+ [!seq] matches any char not in seq
+</example>
+
+If the first character of a filename is a dot,
+it must be matched explicitly.
+Character matches do
+<emphasis>not</emphasis>
+span directory separators.
+
+The
+&f-Glob;
+knows about
+repositories
+(see the
+&f-link-Repository;
+function)
+and source directories
+(see the
+&f-link-VariantDir;
+function)
+and
+returns a Node (or string, if so configured)
+in the local (SConscript) directory
+if matching Node is found
+anywhere in a corresponding
+repository or source directory.
+
+The
+<varname>ondisk</varname>
+argument may be set to
+<literal>False</literal>
+(or any other non-true value)
+to disable the search for matches on disk,
+thereby only returning matches among
+already-configured File or Dir Nodes.
+The default behavior is to
+return corresponding Nodes
+for any on-disk matches found.
+
+The
+<varname>source</varname>
+argument may be set to
+<literal>True</literal>
+(or any equivalent value)
+to specify that,
+when the local directory is a
+&f-VariantDir;,
+the returned Nodes should be from the
+corresponding source directory,
+not the local directory.
+
+The
+<varname>strings</varname>
+argument may be set to
+<literal>True</literal>
+(or any equivalent value)
+to have the
+&f-Glob;
+function return strings, not Nodes,
+that represent the matched files or directories.
+The returned strings will be relative to
+the local (SConscript) directory.
+(Note that This may make it easier to perform
+arbitrary manipulation of file names,
+but if the returned strings are
+passed to a different
+&SConscript;
+file,
+any Node translation will be relative
+to the other
+&SConscript;
+directory,
+not the original
+&SConscript;
+directory.)
+
+Examples:
+
+<example>
+Program('foo', Glob('*.c'))
+Zip('/tmp/everything', Glob('.??*') + Glob('*'))
+</example>
+</summary>
+</scons_function>
+
+<!--
+<scons_function name="GlobalBuilders">
+<arguments signature="global">
+(flag)
+</arguments>
+<summary>
+When
+<varname>flag</varname>
+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
+<varname>flag</varname>
+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.
+</summary>
+</scons_function>
+-->
+
+<scons_function name="Ignore">
+<arguments>
+(target, dependency)
+</arguments>
+<summary>
+The specified dependency file(s)
+will be ignored when deciding if
+the target file(s) need to be rebuilt.
+
+You can also use
+&f-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
+as the dependency.
+
+Note that this will only remove the dependencies listed from
+the files built by default. It will still be built if that
+dependency is needed by another object being built.
+See the third and forth examples below.
+
+Examples:
+
+<example>
+env.Ignore('foo', 'foo.c')
+env.Ignore('bar', ['bar1.h', 'bar2.h'])
+env.Ignore('.','foobar.obj')
+env.Ignore('bar','bar/foobar.obj')
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="Literal">
+<arguments>
+(string)
+</arguments>
+<summary>
+The specified
+<varname>string</varname>
+will be preserved as-is
+and not have construction variables expanded.
+</summary>
+</scons_function>
+
+<scons_function name="Local">
+<arguments>
+(targets)
+</arguments>
+<summary>
+The specified
+<varname>targets</varname>
+will have copies made in the local tree,
+even if an already up-to-date copy
+exists in a repository.
+Returns a list of the target Node or Nodes.
+</summary>
+</scons_function>
+
+<!--
+<scons_function name="MergeShellPaths">
+<arguments signature="env">
+( arg ", [" prepend ])
+</arguments>
+<summary>
+Merges the elements of the specified
+<varname>arg</varname>,
+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
+<varname>arg</varname>
+must be a single value,
+so multiple strings must
+be passed in as a list,
+not as separate arguments to
+&f-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
+&f-link-AppendENVPath;
+or
+&f-link-PrependENVPath;
+depending on the
+<varname>prepend</varname>
+argument. See those functions for more details.
+
+Examples:
+
+<example>
+# 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 )
+</example>
+</summary>
+</scons_function>
+-->
+
+<scons_function name="MergeFlags">
+<arguments signature="env">
+(arg, [unique])
+</arguments>
+<summary>
+Merges the specified
+<varname>arg</varname>
+values to the construction environment's construction variables.
+If the
+<varname>arg</varname>
+argument is not a dictionary,
+it is converted to one by calling
+&f-link-env-ParseFlags;
+on the argument
+before the values are merged.
+Note that
+<varname>arg</varname>
+must be a single value,
+so multiple strings must
+be passed in as a list,
+not as separate arguments to
+&f-env-MergeFlags;.
+
+By default,
+duplicate values are eliminated;
+you can, however, specify
+<literal>unique=0</literal>
+to allow duplicate
+values to be added.
+When eliminating duplicate values,
+any construction variables that end with
+the string
+<literal>PATH</literal>
+keep the left-most unique value.
+All other construction variables keep
+the right-most unique value.
+
+Examples:
+
+<example>
+# Add an optimization flag to $CCFLAGS.
+env.MergeFlags('-O3')
+
+# Combine the flags returned from running pkg-config with an optimization
+# flag and merge the result into the construction variables.
+env.MergeFlags(['!pkg-config gtk+-2.0 --cflags', '-O3'])
+
+# Combine an optimization flag with the flags returned from running pkg-config
+# twice and merge the result into the construction variables.
+env.MergeFlags(['-O3',
+ '!pkg-config gtk+-2.0 --cflags --libs',
+ '!pkg-config libpng12 --cflags --libs'])
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="NoCache">
+<arguments>
+(target, ...)
+</arguments>
+<summary>
+Specifies a list of files which should
+<emphasis>not</emphasis>
+be cached whenever the
+&f-link-CacheDir;
+method has been activated.
+The specified targets may be a list
+or an individual target.
+
+Multiple files should be specified
+either as separate arguments to the
+&f-NoCache;
+method, or as a list.
+&f-NoCache;
+will also accept the return value of any of the construction environment
+Builder methods.
+
+Calling
+&f-NoCache;
+on directories and other non-File Node types has no effect because
+only File Nodes are cached.
+
+Examples:
+
+<example>
+NoCache('foo.elf')
+NoCache(env.Program('hello', 'hello.c'))
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="NoClean">
+<arguments>
+(target, ...)
+</arguments>
+<summary>
+Specifies a list of files or directories which should
+<emphasis>not</emphasis>
+be removed whenever the targets (or their dependencies)
+are specified with the
+<option>-c</option>
+command line option.
+The specified targets may be a list
+or an individual target.
+Multiple calls to
+&f-NoClean;
+are legal,
+and prevent each specified target
+from being removed by calls to the
+<option>-c</option>
+option.
+
+Multiple files or directories should be specified
+either as separate arguments to the
+&f-NoClean;
+method, or as a list.
+&f-NoClean;
+will also accept the return value of any of the construction environment
+Builder methods.
+
+Calling
+&f-NoClean;
+for a target overrides calling
+&f-link-Clean;
+for the same target,
+and any targets passed to both functions will
+<emphasis>not</emphasis>
+be removed by the
+<option>-c</option>
+option.
+
+Examples:
+
+<example>
+NoClean('foo.elf')
+NoClean(env.Program('hello', 'hello.c'))
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="ParseConfig">
+<arguments signature="env">
+(command, [function, unique])
+</arguments>
+<summary>
+Calls the specified
+<varname>function</varname>
+to modify the environment as specified by the output of
+<varname>command</varname>.
+The default
+<varname>function</varname>
+is
+&f-link-env-MergeFlags;,
+which expects the output of a typical
+<application>*-config</application>
+command
+(for example,
+<application>gtk-config</application>)
+and adds the options
+to the appropriate construction variables.
+By default,
+duplicate values are not
+added to any construction variables;
+you can specify
+<literal>unique=0</literal>
+to allow duplicate
+values to be added.
+
+Interpreted options
+and the construction variables they affect
+are as specified for the
+&f-link-env-ParseFlags;
+method (which this method calls).
+See that method's description, below,
+for a table of options and construction variables.
+</summary>
+</scons_function>
+
+<scons_function name="ParseDepends">
+<arguments>
+(filename, [must_exist, only_one])
+</arguments>
+<summary>
+Parses the contents of the specified
+<varname>filename</varname>
+as a list of dependencies in the style of
+&Make;
+or
+<application>mkdep</application>,
+and explicitly establishes all of the listed dependencies.
+
+By default,
+it is not an error
+if the specified
+<varname>filename</varname>
+does not exist.
+The optional
+<varname>must_exist</varname>
+argument may be set to a non-zero
+value to have
+scons
+throw an exception and
+generate an error if the file does not exist,
+or is otherwise inaccessible.
+
+The optional
+<varname>only_one</varname>
+argument may be set to a non-zero
+value to have
+scons
+thrown an exception and
+generate an error
+if the file contains dependency
+information for more than one target.
+This can provide a small sanity check
+for files intended to be generated
+by, for example, the
+<literal>gcc -M</literal>
+flag,
+which should typically only
+write dependency information for
+one output file into a corresponding
+<filename>.d</filename>
+file.
+
+The
+<varname>filename</varname>
+and all of the files listed therein
+will be interpreted relative to
+the directory of the
+&SConscript;
+file which calls the
+&f-ParseDepends;
+function.
+</summary>
+</scons_function>
+
+<scons_function name="ParseFlags">
+<arguments signature="env">
+(flags, ...)
+</arguments>
+<summary>
+Parses one or more strings containing
+typical command-line flags for GCC tool chains
+and returns a dictionary with the flag values
+separated into the appropriate SCons construction variables.
+This is intended as a companion to the
+&f-link-env-MergeFlags;
+method, but allows for the values in the returned dictionary
+to be modified, if necessary,
+before merging them into the construction environment.
+(Note that
+&f-env-MergeFlags;
+will call this method if its argument is not a dictionary,
+so it is usually not necessary to call
+&f-link-env-ParseFlags;
+directly unless you want to manipulate the values.)
+
+If the first character in any string is
+an exclamation mark (!),
+the rest of the string is executed as a command,
+and the output from the command is
+parsed as GCC tool chain command-line flags
+and added to the resulting dictionary.
+
+Flag values are translated accordig to the prefix found,
+and added to the following construction variables:
+
+<example>
+-arch CCFLAGS, LINKFLAGS
+-D CPPDEFINES
+-framework FRAMEWORKS
+-frameworkdir= FRAMEWORKPATH
+-include CCFLAGS
+-isysroot CCFLAGS, LINKFLAGS
+-I CPPPATH
+-l LIBS
+-L LIBPATH
+-mno-cygwin CCFLAGS, LINKFLAGS
+-mwindows LINKFLAGS
+-pthread CCFLAGS, LINKFLAGS
+-std= CFLAGS
+-Wa, ASFLAGS, CCFLAGS
+-Wl,-rpath= RPATH
+-Wl,-R, RPATH
+-Wl,-R RPATH
+-Wl, LINKFLAGS
+-Wp, CPPFLAGS
+- CCFLAGS
++ CCFLAGS, LINKFLAGS
+</example>
+
+Any other strings not associated with options
+are assumed to be the names of libraries
+and added to the
+&cv-LIBS;
+construction variable.
+
+Examples (all of which produce the same result):
+
+<example>
+dict = env.ParseFlags('-O2 -Dfoo -Dbar=1')
+dict = env.ParseFlags('-O2', '-Dfoo', '-Dbar=1')
+dict = env.ParseFlags(['-O2', '-Dfoo -Dbar=1'])
+dict = env.ParseFlags('-O2', '!echo -Dfoo -Dbar=1')
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="Platform">
+<arguments signature="global">
+(string)
+</arguments>
+<summary>
+The
+&f-Platform;
+form returns a callable object
+that can be used to initialize
+a construction environment using the
+platform keyword of the
+&f-Environment;
+function.
+
+Example:
+
+<example>
+env = Environment(platform = Platform('win32'))
+</example>
+
+The
+&f-env-Platform;
+form applies the callable object for the specified platform
+<varname>string</varname>
+to the environment through which the method was called.
+
+<example>
+env.Platform('posix')
+</example>
+
+Note that the
+<literal>win32</literal>
+platform adds the
+<literal>SystemDrive</literal>
+and
+<literal>SystemRoot</literal>
+variables from the user's external environment
+to the construction environment's
+&cv-link-ENV;
+dictionary.
+This is so that any executed commands
+that use sockets to connect with other systems
+(such as fetching source files from
+external CVS repository specifications like
+<literal>:pserver:anonymous@cvs.sourceforge.net:/cvsroot/scons</literal>)
+will work on Windows systems.
+</summary>
+</scons_function>
+
+<scons_function name="Prepend">
+<arguments signature="env">
+(key=val, [...])
+</arguments>
+<summary>
+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:
+
+<example>
+env.Prepend(CCFLAGS = '-g ', FOO = ['foo.yyy'])
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="PrependENVPath">
+<arguments signature="env">
+(name, newpath, [envname, sep, delete_existing])
+</arguments>
+<summary>
+This appends new path elements to the given path in the
+specified external environment
+(&cv-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
+<literal>os.path.normpath</literal>
+and
+<literal>os.path.normcase</literal>).
+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
+<varname>delete_existing</varname>
+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:
+
+<example>
+print 'before:',env['ENV']['INCLUDE']
+include_path = '/foo/bar:/foo'
+env.PrependENVPath('INCLUDE', include_path)
+print 'after:',env['ENV']['INCLUDE']
+</example>
+
+The above example will print:
+
+<example>
+before: /biz:/foo
+after: /foo/bar:/foo:/biz
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="PrependUnique">
+<arguments signature="env">
+(key=val, delete_existing=0, [...])
+</arguments>
+<summary>
+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
+<emphasis>not</emphasis>
+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:
+
+<example>
+env.PrependUnique(CCFLAGS = '-g', FOO = ['foo.yyy'])
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="Replace">
+<arguments signature="env">
+(key=val, [...])
+</arguments>
+<summary>
+Replaces construction variables in the Environment
+with the specified keyword arguments.
+
+Example:
+
+<example>
+env.Replace(CCFLAGS = '-g', FOO = 'foo.xxx')
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="Repository">
+<arguments>
+(directory)
+</arguments>
+<summary>
+Specifies that
+<varname>directory</varname>
+is a repository to be searched for files.
+Multiple calls to
+&f-Repository;
+are legal,
+and each one adds to the list of
+repositories that will be searched.
+
+To
+&scons;,
+a repository is a copy of the source tree,
+from the top-level directory on down,
+which may contain
+both source files and derived files
+that can be used to build targets in
+the local source tree.
+The canonical example would be an
+official source tree maintained by an integrator.
+If the repository contains derived files,
+then the derived files should have been built using
+&scons;,
+so that the repository contains the necessary
+signature information to allow
+&scons;
+to figure out when it is appropriate to
+use the repository copy of a derived file,
+instead of building one locally.
+
+Note that if an up-to-date derived file
+already exists in a repository,
+&scons;
+will
+<emphasis>not</emphasis>
+make a copy in the local directory tree.
+In order to guarantee that a local copy
+will be made,
+use the
+&f-link-Local;
+method.
+</summary>
+</scons_function>
+
+<scons_function name="Requires">
+<arguments>
+(target, prerequisite)
+</arguments>
+<summary>
+Specifies an order-only relationship
+between the specified target file(s)
+and the specified prerequisite file(s).
+The prerequisite file(s)
+will be (re)built, if necessary,
+<emphasis>before</emphasis>
+the target file(s),
+but the target file(s) do not actually
+depend on the prerequisites
+and will not be rebuilt simply because
+the prerequisite file(s) change.
+
+Example:
+
+<example>
+env.Requires('foo', 'file-that-must-be-built-before-foo')
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="Scanner">
+<arguments>
+(function, [argument, keys, path_function, node_class, node_factory, scan_check, recursive])
+</arguments>
+<summary>
+Creates a Scanner object for
+the specified
+<varname>function</varname>.
+See the section "Scanner Objects,"
+below, for a complete explanation of the arguments and behavior.
+</summary>
+</scons_function>
+
+<scons_function name="SConscriptChdir">
+<arguments>
+(value)
+</arguments>
+<summary>
+By default,
+&scons;
+changes its working directory
+to the directory in which each
+subsidiary SConscript file lives.
+This behavior may be disabled
+by specifying either:
+
+<example>
+SConscriptChdir(0)
+env.SConscriptChdir(0)
+</example>
+
+in which case
+&scons;
+will stay in the top-level directory
+while reading all SConscript files.
+(This may be necessary when building from repositories,
+when all the directories in which SConscript files may be found
+don't necessarily exist locally.)
+You may enable and disable
+this ability by calling
+SConscriptChdir()
+multiple times.
+
+Example:
+
+<example>
+env = Environment()
+SConscriptChdir(0)
+SConscript('foo/SConscript') # will not chdir to foo
+env.SConscriptChdir(1)
+SConscript('bar/SConscript') # will chdir to bar
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="SConsignFile">
+<arguments>
+([file, dbm_module])
+</arguments>
+<summary>
+This tells
+&scons;
+to store all file signatures
+in the specified database
+<varname>file</varname>.
+If the
+<varname>file</varname>
+name is omitted,
+<filename>.sconsign</filename>
+is used by default.
+(The actual file name(s) stored on disk
+may have an appropriated suffix appended
+by the
+<varname> dbm_module</varname>.)
+If
+<varname>file</varname>
+is not an absolute path name,
+the file is placed in the same directory as the top-level
+&SConstruct;
+file.
+
+If
+<varname>file</varname>
+is
+<literal>None</literal>,
+then
+&scons;
+will store file signatures
+in a separate
+<filename>.sconsign</filename>
+file in each directory,
+not in one global database file.
+(This was the default behavior
+prior to SCons 0.96.91 and 0.97.)
+
+The optional
+<varname>dbm_module</varname>
+argument can be used to specify
+which Python database module
+The default is to use a custom
+<filename>SCons.dblite</filename>
+module that uses pickled
+Python data structures,
+and which works on all Python versions.
+
+Examples:
+
+<example>
+# Explicitly stores signatures in ".sconsign.dblite"
+# in the top-level SConstruct directory (the
+# default behavior).
+SConsignFile()
+
+# Stores signatures in the file "etc/scons-signatures"
+# relative to the top-level SConstruct directory.
+SConsignFile("etc/scons-signatures")
+
+# Stores signatures in the specified absolute file name.
+SConsignFile("/home/me/SCons/signatures")
+
+# Stores signatures in a separate .sconsign file
+# in each directory.
+SConsignFile(None)
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="SetDefault">
+<arguments signature="env">
+(key=val, [...])
+</arguments>
+<summary>
+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:
+
+<example>
+env.SetDefault(FOO = 'foo')
+
+if 'FOO' not in env: env['FOO'] = 'foo'
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="SideEffect">
+<arguments>
+(side_effect, target)
+</arguments>
+<summary>
+Declares
+<varname>side_effect</varname>
+as a side effect of building
+<varname>target</varname>.
+Both
+<varname>side_effect</varname>
+and
+<varname>target</varname>
+can be a list, a file name, or a node.
+A side effect is a target file that is created or updated
+as a side effect of building other targets.
+For example, a Windows PDB
+file is created as a side effect of building the .obj
+files for a static library,
+and various log files are created updated
+as side effects of various TeX commands.
+If a target is a side effect of multiple build commands,
+&scons;
+will ensure that only one set of commands
+is executed at a time.
+Consequently, you only need to use this method
+for side-effect targets that are built as a result of
+multiple build commands.
+
+Because multiple build commands may update
+the same side effect file,
+by default the
+<varname>side_effect</varname>
+target is
+<emphasis>not</emphasis>
+automatically removed
+when the
+<varname>target</varname>
+is removed by the
+<option>-c</option>
+option.
+(Note, however, that the
+<varname>side_effect</varname>
+might be removed as part of
+cleaning the directory in which it lives.)
+If you want to make sure the
+<varname>side_effect</varname>
+is cleaned whenever a specific
+<varname>target</varname>
+is cleaned,
+you must specify this explicitly
+with the
+&f-link-Clean;
+or
+&f-env-Clean;
+function.
+</summary>
+</scons_function>
+
+<scons_function name="SourceCode">
+<arguments>
+(entries, builder)
+</arguments>
+<summary>
+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;.
+
+Arrange for non-existent source files to
+be fetched from a source code management system
+using the specified
+<varname>builder</varname>.
+The specified
+<varname>entries</varname>
+may be a Node, string or list of both,
+and may represent either individual
+source files or directories in which
+source files can be found.
+
+For any non-existent source files,
+&scons;
+will search up the directory tree
+and use the first
+&f-SourceCode;
+builder it finds.
+The specified
+<varname>builder</varname>
+may be
+<literal>None</literal>,
+in which case
+&scons;
+will not use a builder to fetch
+source files for the specified
+<varname>entries</varname>,
+even if a
+&f-SourceCode;
+builder has been specified
+for a directory higher up the tree.
+
+&scons;
+will, by default,
+fetch files from SCCS or RCS subdirectories
+without explicit configuration.
+This takes some extra processing time
+to search for the necessary
+source code management files on disk.
+You can avoid these extra searches
+and speed up your build a little
+by disabling these searches as follows:
+
+<example>
+env.SourceCode('.', None)
+</example>
+
+Note that if the specified
+<varname>builder</varname>
+is one you create by hand,
+it must have an associated
+construction environment to use
+when fetching a source file.
+
+&scons;
+provides a set of canned factory
+functions that return appropriate
+Builders for various popular
+source code management systems.
+Canonical examples of invocation include:
+
+<example>
+env.SourceCode('.', env.BitKeeper('/usr/local/BKsources'))
+env.SourceCode('src', env.CVS('/usr/local/CVSROOT'))
+env.SourceCode('/', env.RCS())
+env.SourceCode(['f1.c', 'f2.c'], env.SCCS())
+env.SourceCode('no_source.c', None)
+</example>
+<!-- env.SourceCode('.', env.Subversion('file:///usr/local/Subversion')) -->
+</summary>
+</scons_function>
+
+<scons_function name="SourceSignatures">
+<arguments>
+(type)
+</arguments>
+<summary>
+Note: Although it is not yet officially deprecated,
+use of this function is discouraged.
+See the
+&f-link-Decider;
+function for a more flexible and straightforward way
+to configure SCons' decision-making.
+
+The
+&f-SourceSignatures;
+function tells
+&scons;
+how to decide if a source file
+(a file that is not built from any other files)
+has changed since the last time it
+was used to build a particular target file.
+Legal values are
+<literal>MD5</literal>
+or
+<literal>timestamp</literal>.
+
+If the environment method is used,
+the specified type of source signature
+is only used when deciding whether targets
+built with that environment are up-to-date or must be rebuilt.
+If the global function is used,
+the specified type of source signature becomes the default
+used for all decisions
+about whether targets are up-to-date.
+
+<literal>MD5</literal>
+means
+&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.
+
+<literal>timestamp</literal>
+means
+&scons;
+decides that a source file has changed
+if its timestamp (modification time) has changed since
+the last time it was used to rebuild a particular target file.
+(Note that although this is similar to the behavior of Make,
+by default it will also rebuild if the dependency is
+<emphasis>older</emphasis>
+than the last time it was used to rebuild the target file.)
+
+There is no different between the two behaviors
+for Python
+&f-Value;
+node objects.
+
+<literal>MD5</literal>
+signatures take longer to compute,
+but are more accurate than
+<literal>timestamp</literal>
+signatures.
+The default value is
+<literal>MD5</literal>.
+
+Note that the default
+&f-link-TargetSignatures;
+setting (see below)
+is to use this
+&f-SourceSignatures;
+setting for any target files that are used
+to build other target files.
+Consequently, changing the value of
+&f-SourceSignatures;
+will, by default,
+affect the up-to-date decision for all files in the build
+(or all files built with a specific construction environment
+when
+&f-env-SourceSignatures;
+is used).
+</summary>
+</scons_function>
+
+<scons_function name="Split">
+<arguments>
+(arg)
+</arguments>
+<summary>
+Returns a list of file names or other objects.
+If arg is a string,
+it will be split on strings of white-space characters
+within the string,
+making it easier to write long lists of file names.
+If arg is already a list,
+the list will be returned untouched.
+If arg is any other type of object,
+it will be returned as a list
+containing just the object.
+
+Example:
+
+<example>
+files = Split("f1.c f2.c f3.c")
+files = env.Split("f4.c f5.c f6.c")
+files = Split("""
+ f7.c
+ f8.c
+ f9.c
+""")
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="subst">
+<arguments signature="env">
+(input, [raw, target, source, conv])
+</arguments>
+<summary>
+Performs construction variable interpolation
+on the specified string or sequence argument
+<varname>input</varname>.
+
+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
+<literal>$(</literal>
+and
+<literal>$)</literal>
+character sequences will be stripped from the returned string,
+The optional
+<varname>raw</varname>
+argument may be set to
+<literal>1</literal>
+if you want to preserve white space and
+<literal>$(</literal>-<literal>$)</literal>
+sequences.
+The
+<varname>raw</varname>
+argument may be set to
+<literal>2</literal>
+if you want to strip
+all characters between
+any
+<literal>$(</literal>
+and
+<literal>$)</literal>
+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
+<varname>target</varname>
+and
+<varname>source</varname>
+keyword arguments
+must be set to lists of
+target and source nodes, respectively,
+if you want the
+&cv-TARGET;,
+&cv-TARGETS;,
+&cv-SOURCE;
+and
+&cv-SOURCES;
+to be available for expansion.
+This is usually necessary if you are
+calling
+&f-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
+<varname>conv</varname>
+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
+&lambda;
+idiom to pass in an unnamed function
+that simply returns its unconverted argument.
+
+Example:
+
+<example>
+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)
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="TargetSignatures">
+<arguments>
+(type)
+</arguments>
+<summary>
+Note: Although it is not yet officially deprecated,
+use of this function is discouraged.
+See the
+&f-link-Decider;
+function for a more flexible and straightforward way
+to configure SCons' decision-making.
+
+The
+&f-TargetSignatures;
+function tells
+&scons;
+how to decide if a target file
+(a file that
+<emphasis>is</emphasis>
+built from any other files)
+has changed since the last time it
+was used to build some other target file.
+Legal values are
+<literal>"build"</literal>;
+<literal>"content"</literal>
+(or its synonym
+<literal>"MD5"</literal>);
+<literal>"timestamp"</literal>;
+or
+<literal>"source"</literal>.
+
+If the environment method is used,
+the specified type of target signature is only used
+for targets built with that environment.
+If the global function is used,
+the specified type of signature becomes the default
+used for all target files that
+don't have an explicit target signature type
+specified for their environments.
+
+<literal>"content"</literal>
+(or its synonym
+<literal>"MD5"</literal>)
+means
+&scons;
+decides that a target file has changed
+if the MD5 checksum of its contents has changed since
+the last time it was used to rebuild some other target file.
+This means
+&scons;
+will open up
+MD5 sum the contents
+of target files after they're built,
+and may decide that it does not need to rebuild
+"downstream" target files if a file was
+rebuilt with exactly the same contents as the last time.
+
+<literal>"timestamp"</literal>
+means
+&scons;
+decides that a target file has changed
+if its timestamp (modification time) has changed since
+the last time it was used to rebuild some other target file.
+(Note that although this is similar to the behavior of Make,
+by default it will also rebuild if the dependency is
+<emphasis>older</emphasis>
+than the last time it was used to rebuild the target file.)
+
+<literal>"source"</literal>
+means
+&scons;
+decides that a target file has changed
+as specified by the corresponding
+&f-SourceSignatures;
+setting
+(<literal>"MD5"</literal>
+or
+<literal>"timestamp"</literal>).
+This means that
+&scons;
+will treat all input files to a target the same way,
+regardless of whether they are source files
+or have been built from other files.
+
+<literal>"build"</literal>
+means
+&scons;
+decides that a target file has changed
+if it has been rebuilt in this invocation
+or if its content or timestamp have changed
+as specified by the corresponding
+&f-SourceSignatures;
+setting.
+This "propagates" the status of a rebuilt file
+so that other "downstream" target files
+will always be rebuilt,
+even if the contents or the timestamp
+have not changed.
+
+<literal>"build"</literal>
+signatures are fastest because
+<literal>"content"</literal>
+(or
+<literal>"MD5"</literal>)
+signatures take longer to compute,
+but are more accurate than
+<literal>"timestamp"</literal>
+signatures,
+and can prevent unnecessary "downstream" rebuilds
+when a target file is rebuilt to the exact same contents
+as the previous build.
+The
+<literal>"source"</literal>
+setting provides the most consistent behavior
+when other target files may be rebuilt from
+both source and target input files.
+The default value is
+<literal>"source"</literal>.
+
+Because the default setting is
+<literal>"source"</literal>,
+using
+&f-SourceSignatures;
+is generally preferable to
+&f-TargetSignatures;,
+so that the up-to-date decision
+will be consistent for all files
+(or all files built with a specific construction environment).
+Use of
+&f-TargetSignatures;
+provides specific control for how built target files
+affect their "downstream" dependencies.
+</summary>
+</scons_function>
+
+<scons_function name="Tool">
+<arguments>
+(string, [toolpath, **kw])
+</arguments>
+<summary>
+The
+&f-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.
+The object may be called with a construction
+environment as an argument,
+in which case the object will
+add the necessary variables
+to the construction environment
+and the name of the tool will be added to the
+&cv-link-TOOLS;
+construction variable.
+
+Additional keyword arguments are passed to the tool's
+<function>generate</function>()
+method.
+
+Examples:
+
+<example>
+env = Environment(tools = [ Tool('msvc') ])
+
+env = Environment()
+t = Tool('msvc')
+t(env) # adds 'msvc' to the TOOLS variable
+u = Tool('opengl', toolpath = ['tools'])
+u(env) # adds 'opengl' to the TOOLS variable
+</example>
+
+The
+&f-env-Tool;
+form of the function
+applies the callable object for the specified tool
+<varname>string</varname>
+to the environment through which the method was called.
+
+Additional keyword arguments are passed to the tool's
+<function>generate</function>()
+method.
+
+<example>
+env.Tool('gcc')
+env.Tool('opengl', toolpath = ['build/tools'])
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="Value">
+<arguments>
+(value, [built_value])
+</arguments>
+<summary>
+Returns a Node object representing the specified Python value. Value
+Nodes can be used as dependencies of targets. If the result of
+calling
+<function>str</function>(<varname>value</varname>)
+changes between SCons runs, any targets depending on
+<function>Value</function>(<varname>value</varname>)
+will be rebuilt.
+(This is true even when using timestamps to decide if
+files are up-to-date.)
+When using timestamp source signatures, Value Nodes'
+timestamps are equal to the system time when the Node is created.
+
+The returned Value Node object has a
+<function>write</function>()
+method that can be used to "build" a Value Node
+by setting a new value.
+The optional
+<varname>built_value</varname>
+argument can be specified
+when the Value Node is created
+to indicate the Node should already be considered
+"built."
+There is a corresponding
+<function>read</function>()
+method that will return the built value of the Node.
+
+Examples:
+
+<example>
+env = Environment()
+
+def create(target, source, env):
+ # A function that will write a 'prefix=$SOURCE'
+ # string into the file name specified as the
+ # $TARGET.
+ f = open(str(target[0]), 'wb')
+ f.write('prefix=' + source[0].get_contents())
+
+# Fetch the prefix= argument, if any, from the command
+# line, and use /usr/local as the default.
+prefix = ARGUMENTS.get('prefix', '/usr/local')
+
+# Attach a .Config() builder for the above function action
+# to the construction environment.
+env['BUILDERS']['Config'] = Builder(action = create)
+env.Config(target = 'package-config', source = Value(prefix))
+
+def build_value(target, source, env):
+ # A function that "builds" a Python Value by updating
+ # the the Python value with the contents of the file
+ # specified as the source of the Builder call ($SOURCE).
+ target[0].write(source[0].get_contents())
+
+output = env.Value('before')
+input = env.Value('after')
+
+# Attach a .UpdateValue() builder for the above function
+# action to the construction environment.
+env['BUILDERS']['UpdateValue'] = Builder(action = build_value)
+env.UpdateValue(target = Value(output), source = Value(input))
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="VariantDir">
+<arguments>
+(variant_dir, src_dir, [duplicate])
+</arguments>
+<summary>
+Use the
+&f-VariantDir;
+function to create a copy of your sources in another location:
+if a name under
+<varname>variant_dir</varname>
+is not found but exists under
+<varname>src_dir</varname>,
+the file or directory is copied to
+<varname>variant_dir</varname>.
+Target files can be built in a different directory
+than the original sources by simply refering to the sources (and targets)
+within the variant tree.
+
+&f-VariantDir;
+can be called multiple times with the same
+<varname>src_dir</varname>
+to set up multiple builds with different options
+(<varname>variants</varname>).
+The
+<varname>src_dir</varname>
+location must be in or underneath the SConstruct file's directory, and
+<varname>variant_dir</varname>
+may not be underneath
+<varname>src_dir</varname>.
+<!--
+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
+&scons;
+to physically duplicate the source files in the variant tree.
+Thus, a build performed in the variant tree is guaranteed to be identical
+to a build performed in the source tree even if
+intermediate source files are generated during the build,
+or preprocessors or other scanners search for included files
+relative to the source file,
+or individual compilers or other invoked tools are hard-coded
+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
+<option>--duplicate</option>
+command-line option.
+Moreover, only the files needed for the build are duplicated;
+files and directories that are not used are not present in
+<varname>variant_dir</varname>.
+
+Duplicating the source tree may be disabled by setting the
+<literal>duplicate</literal>
+argument to
+<literal>0</literal>
+(zero).
+This will cause
+&scons;
+to invoke Builders using the path names of source files in
+<varname>src_dir</varname>
+and the path names of derived files within
+<varname>variant_dir</varname>.
+This is always more efficient than
+<literal>duplicate=1</literal>,
+and is usually safe for most builds
+(but see above for cases that may cause problems).
+
+Note that
+&f-VariantDir;
+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
+<varname>variant_dir</varname>,
+regardless of the value of
+<literal>duplicate</literal>.
+This is how you tell
+&scons;
+which variant of a source tree to build:
+
+<example>
+# run src/SConscript in two variant directories
+VariantDir('build/variant1', 'src')
+SConscript('build/variant1/SConscript')
+VariantDir('build/variant2', 'src')
+SConscript('build/variant2/SConscript')
+</example>
+
+See also the
+&f-link-SConscript;
+function, described above,
+for another way to specify a variant directory
+in conjunction with calling a subsidiary SConscript file.
+
+Examples:
+
+<example>
+# use names in the build directory, not the source directory
+VariantDir('build', 'src', duplicate=0)
+Program('build/prog', 'build/source.c')
+</example>
+
+<example>
+# this builds both the source and docs in a separate subtree
+VariantDir('build', '.', duplicate=0)
+SConscript(dirs=['build/src','build/doc'])
+</example>
+
+<example>
+# same as previous example, but only uses SConscript
+SConscript(dirs='src', variant_dir='build/src', duplicate=0)
+SConscript(dirs='doc', variant_dir='build/doc', duplicate=0)
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="WhereIs">
+<arguments>
+(program, [path, pathext, reject])
+</arguments>
+<summary>
+Searches for the specified executable
+<varname>program</varname>,
+returning the full path name to the program
+if it is found,
+and returning None if not.
+Searches the specified
+<varname>path</varname>,
+the value of the calling environment's PATH
+(<literal>env['ENV']['PATH']</literal>),
+or the user's current external PATH
+(<literal>os.environ['PATH']</literal>)
+by default.
+On Windows systems, searches for executable
+programs with any of the file extensions
+listed in the specified
+<varname>pathext</varname>,
+the calling environment's PATHEXT
+(<literal>env['ENV']['PATHEXT']</literal>)
+or the user's current PATHEXT
+(<literal>os.environ['PATHEXT']</literal>)
+by default.
+Will not select any
+path name or names
+in the specified
+<varname>reject</varname>
+list, if any.
+</summary>
+</scons_function>
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py
index e7a851f..9486331 100644
--- a/src/engine/SCons/EnvironmentTests.py
+++ b/src/engine/SCons/EnvironmentTests.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/EnvironmentTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/EnvironmentTests.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
@@ -763,6 +763,7 @@ sys.exit(0)
'ASFLAGS' : [],
'CFLAGS' : [],
'CCFLAGS' : [],
+ 'CXXFLAGS' : [],
'CPPDEFINES' : [],
'CPPFLAGS' : [],
'CPPPATH' : [],
@@ -793,11 +794,14 @@ sys.exit(0)
"-Wl,-Rrpath3 " + \
"-Wp,-cpp " + \
"-std=c99 " + \
+ "-std=c++0x " + \
"-framework Carbon " + \
"-frameworkdir=fwd1 " + \
"-Ffwd2 " + \
"-F fwd3 " + \
+ "-dylib_file foo-dylib " + \
"-pthread " + \
+ "-fopenmp " + \
"-mno-cygwin -mwindows " + \
"-arch i386 -isysroot /tmp +DD64 " + \
"-DFOO -DBAR=value -D BAZ "
@@ -807,9 +811,10 @@ sys.exit(0)
assert d['ASFLAGS'] == ['-as'], d['ASFLAGS']
assert d['CFLAGS'] == ['-std=c99']
assert d['CCFLAGS'] == ['-X', '-Wa,-as',
- '-pthread', '-mno-cygwin',
+ '-pthread', '-fopenmp', '-mno-cygwin',
('-arch', 'i386'), ('-isysroot', '/tmp'),
- '+DD64'], d['CCFLAGS']
+ '+DD64'], repr(d['CCFLAGS'])
+ assert d['CXXFLAGS'] == ['-std=c++0x'], repr(d['CXXFLAGS'])
assert d['CPPDEFINES'] == ['FOO', ['BAR', 'value'], 'BAZ'], d['CPPDEFINES']
assert d['CPPFLAGS'] == ['-Wp,-cpp'], d['CPPFLAGS']
assert d['CPPPATH'] == ['/usr/include/fum',
@@ -822,11 +827,13 @@ sys.exit(0)
'C:\\Program Files\\ASCEND'], d['LIBPATH']
LIBS = list(map(str, d['LIBS']))
assert LIBS == ['xxx', 'yyy', 'ascend'], (d['LIBS'], LIBS)
- assert d['LINKFLAGS'] == ['-Wl,-link', '-pthread',
+ assert d['LINKFLAGS'] == ['-Wl,-link',
+ '-dylib_file', 'foo-dylib',
+ '-pthread', '-fopenmp',
'-mno-cygwin', '-mwindows',
('-arch', 'i386'),
('-isysroot', '/tmp'),
- '+DD64'], d['LINKFLAGS']
+ '+DD64'], repr(d['LINKFLAGS'])
assert d['RPATH'] == ['rpath1', 'rpath2', 'rpath3'], d['RPATH']
diff --git a/src/engine/SCons/Errors.py b/src/engine/SCons/Errors.py
index 63f9d41..2501e36 100644
--- a/src/engine/SCons/Errors.py
+++ b/src/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/src/engine/SCons/ErrorsTests.py b/src/engine/SCons/ErrorsTests.py
index 2643244..fb2eb6a 100644
--- a/src/engine/SCons/ErrorsTests.py
+++ b/src/engine/SCons/ErrorsTests.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/ErrorsTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/ErrorsTests.py 5357 2011/09/09 21:31:03 bdeegan"
import sys
import unittest
diff --git a/src/engine/SCons/Executor.py b/src/engine/SCons/Executor.py
index b31e348..f343568 100644
--- a/src/engine/SCons/Executor.py
+++ b/src/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/src/engine/SCons/ExecutorTests.py b/src/engine/SCons/ExecutorTests.py
index 077ae79..7f898f8 100644
--- a/src/engine/SCons/ExecutorTests.py
+++ b/src/engine/SCons/ExecutorTests.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/ExecutorTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/ExecutorTests.py 5357 2011/09/09 21:31:03 bdeegan"
import sys
import unittest
diff --git a/src/engine/SCons/Job.py b/src/engine/SCons/Job.py
index 7866bb4..04bb4c4 100644
--- a/src/engine/SCons/Job.py
+++ b/src/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/src/engine/SCons/JobTests.py b/src/engine/SCons/JobTests.py
index 145843c..85bc9ca 100644
--- a/src/engine/SCons/JobTests.py
+++ b/src/engine/SCons/JobTests.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/JobTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/JobTests.py 5357 2011/09/09 21:31:03 bdeegan"
import unittest
import random
diff --git a/src/engine/SCons/Memoize.py b/src/engine/SCons/Memoize.py
index c76d6a5..ea7d58f 100644
--- a/src/engine/SCons/Memoize.py
+++ b/src/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/src/engine/SCons/MemoizeTests.py b/src/engine/SCons/MemoizeTests.py
index 37f6874..a542807 100644
--- a/src/engine/SCons/MemoizeTests.py
+++ b/src/engine/SCons/MemoizeTests.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/MemoizeTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/MemoizeTests.py 5357 2011/09/09 21:31:03 bdeegan"
import sys
import unittest
diff --git a/src/engine/SCons/Node/Alias.py b/src/engine/SCons/Node/Alias.py
index c0f3ece..9996e64 100644
--- a/src/engine/SCons/Node/Alias.py
+++ b/src/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/src/engine/SCons/Node/AliasTests.py b/src/engine/SCons/Node/AliasTests.py
index 6551ea4..49debc5 100644
--- a/src/engine/SCons/Node/AliasTests.py
+++ b/src/engine/SCons/Node/AliasTests.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/Node/AliasTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Node/AliasTests.py 5357 2011/09/09 21:31:03 bdeegan"
import sys
import unittest
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py
index 0997fc0..9c1b05a 100644
--- a/src/engine/SCons/Node/FS.py
+++ b/src/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/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py
index 63b50ac..e471497 100644
--- a/src/engine/SCons/Node/FSTests.py
+++ b/src/engine/SCons/Node/FSTests.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
@@ -22,7 +22,7 @@
#
from __future__ import division
-__revision__ = "src/engine/SCons/Node/FSTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Node/FSTests.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
@@ -817,6 +817,107 @@ class FileBuildInfoTestCase(_tempdirTestCase):
assert format == expect, (repr(expect), repr(format))
class FSTestCase(_tempdirTestCase):
+ def test_needs_normpath(self):
+ """Test the needs_normpath Regular expression
+
+ This test case verifies that the regular expression used to
+ determine whether a path needs normalization works as
+ expected.
+ """
+ needs_normpath_match = SCons.Node.FS.needs_normpath_match
+
+ do_not_need_normpath = [
+ ".",
+ "/",
+ "/a",
+ "/aa",
+ "/a/",
+ "/aa/",
+ "/a/b",
+ "/aa/bb",
+ "/a/b/",
+ "/aa/bb/",
+
+ "",
+ "a",
+ "aa",
+ "a/",
+ "aa/",
+ "a/b",
+ "aa/bb",
+ "a/b/",
+ "aa/bb/",
+
+ "a.",
+ "a..",
+ "/a.",
+ "/a..",
+ "a./",
+ "a../",
+ "/a./",
+ "/a../",
+
+
+ ".a",
+ "..a",
+ "/.a",
+ "/..a",
+ ".a/",
+ "..a/",
+ "/.a/",
+ "/..a/",
+ ]
+ for p in do_not_need_normpath:
+ assert needs_normpath_match(p) is None, p
+
+ needs_normpath = [
+ "//",
+ "//a",
+ "//aa",
+ "//a/",
+ "//a/",
+ "/aa//",
+
+ "//a/b",
+ "//aa/bb",
+ "//a/b/",
+ "//aa/bb/",
+
+ "/a//b",
+ "/aa//bb",
+ "/a/b//",
+ "/aa/bb//",
+
+ "/a/b//",
+ "/aa/bb//",
+
+ "a//",
+ "aa//",
+ "a//b",
+ "aa//bb",
+ "a//b/",
+ "aa//bb/",
+ "a/b//",
+ "aa/bb//",
+
+ "..",
+ "/.",
+ "/..",
+ "./",
+ "../",
+ "/./",
+ "/../",
+
+ "a/.",
+ "a/..",
+ "./a",
+ "../a",
+ "a/./a",
+ "a/../a",
+ ]
+ for p in needs_normpath:
+ assert needs_normpath_match(p) is not None, p
+
def test_runTest(self):
"""Test FS (file system) Node operations
@@ -932,8 +1033,20 @@ class FSTestCase(_tempdirTestCase):
path = strip_slash(path_)
abspath = strip_slash(abspath_)
up_path = strip_slash(up_path_)
+
name = abspath.split(os.sep)[-1]
+ if not name:
+ if drive:
+ name = drive
+ else:
+ name = os.sep
+
+ if dir.up() is None:
+ dir_up_path = dir.path
+ else:
+ dir_up_path = dir.up().path
+
assert dir.name == name, \
"dir.name %s != expected name %s" % \
(dir.name, name)
@@ -946,15 +1059,16 @@ class FSTestCase(_tempdirTestCase):
assert dir.get_abspath() == abspath, \
"dir.abspath %s != expected absolute path %s" % \
(dir.get_abspath(), abspath)
- assert dir.up().path == up_path, \
+ assert dir_up_path == up_path, \
"dir.up().path %s != expected parent path %s" % \
- (dir.up().path, up_path)
+ (dir_up_path, up_path)
for sep in seps:
def Dir_test(lpath, path_, abspath_, up_path_, sep=sep, func=_do_Dir_test):
return func(lpath, path_, abspath_, up_path_, sep)
-
+
+ Dir_test('/', '/', '/', '/')
Dir_test('', './', sub_dir, sub)
Dir_test('foo', 'foo/', sub_dir_foo, './')
Dir_test('foo/bar', 'foo/bar/', sub_dir_foo_bar, 'foo/')
@@ -1423,12 +1537,12 @@ class FSTestCase(_tempdirTestCase):
test.subdir('sub', ['sub', 'dir'])
- def drive_workpath(drive, dirs, test=test):
+ def drive_workpath(dirs, test=test):
x = test.workpath(*dirs)
drive, path = os.path.splitdrive(x)
return 'X:' + path
- wp = drive_workpath('X:', [''])
+ wp = drive_workpath([''])
if wp[-1] in (os.sep, '/'):
tmp = os.path.split(wp[:-1])[0]
@@ -1441,13 +1555,13 @@ class FSTestCase(_tempdirTestCase):
tmp_foo = os.path.join(tmp, 'foo')
- foo = drive_workpath('X:', ['foo'])
- foo_bar = drive_workpath('X:', ['foo', 'bar'])
- sub = drive_workpath('X:', ['sub', ''])
- sub_dir = drive_workpath('X:', ['sub', 'dir', ''])
- sub_dir_foo = drive_workpath('X:', ['sub', 'dir', 'foo', ''])
- sub_dir_foo_bar = drive_workpath('X:', ['sub', 'dir', 'foo', 'bar', ''])
- sub_foo = drive_workpath('X:', ['sub', 'foo', ''])
+ foo = drive_workpath(['foo'])
+ foo_bar = drive_workpath(['foo', 'bar'])
+ sub = drive_workpath(['sub', ''])
+ sub_dir = drive_workpath(['sub', 'dir', ''])
+ sub_dir_foo = drive_workpath(['sub', 'dir', 'foo', ''])
+ sub_dir_foo_bar = drive_workpath(['sub', 'dir', 'foo', 'bar', ''])
+ sub_foo = drive_workpath(['sub', 'foo', ''])
fs = SCons.Node.FS.FS()
@@ -1490,7 +1604,6 @@ class FSTestCase(_tempdirTestCase):
os.path = ntpath
os.sep = '\\'
SCons.Node.FS.initialize_do_splitdrive()
- SCons.Node.FS.initialize_normpath_check()
for sep in seps:
@@ -1517,7 +1630,117 @@ class FSTestCase(_tempdirTestCase):
os.path = save_os_path
os.sep = save_os_sep
SCons.Node.FS.initialize_do_splitdrive()
- SCons.Node.FS.initialize_normpath_check()
+
+ def test_unc_path(self):
+ """Test UNC path look-ups"""
+
+ test = self.test
+
+ test.subdir('sub', ['sub', 'dir'])
+
+ def strip_slash(p):
+ if p[-1] == os.sep and len(p) > 3:
+ p = p[:-1]
+ return p
+
+ def unc_workpath(dirs, test=test):
+ import ntpath
+ x = apply(test.workpath, dirs)
+ drive, path = ntpath.splitdrive(x)
+ unc, path = ntpath.splitunc(path)
+ path = strip_slash(path)
+ return '//' + path[1:]
+
+ wp = unc_workpath([''])
+
+ if wp[-1] in (os.sep, '/'):
+ tmp = os.path.split(wp[:-1])[0]
+ else:
+ tmp = os.path.split(wp)[0]
+
+ parent_tmp = os.path.split(tmp)[0]
+
+ tmp_foo = os.path.join(tmp, 'foo')
+
+ foo = unc_workpath(['foo'])
+ foo_bar = unc_workpath(['foo', 'bar'])
+ sub = unc_workpath(['sub', ''])
+ sub_dir = unc_workpath(['sub', 'dir', ''])
+ sub_dir_foo = unc_workpath(['sub', 'dir', 'foo', ''])
+ sub_dir_foo_bar = unc_workpath(['sub', 'dir', 'foo', 'bar', ''])
+ sub_foo = unc_workpath(['sub', 'foo', ''])
+
+ fs = SCons.Node.FS.FS()
+
+ seps = [os.sep]
+ if os.sep != '/':
+ seps = seps + ['/']
+
+ def _do_Dir_test(lpath, path, up_path, sep, fileSys=fs):
+ dir = fileSys.Dir(lpath.replace('/', sep))
+
+ if os.sep != '/':
+ path = path.replace('/', os.sep)
+ up_path = up_path.replace('/', os.sep)
+
+ if path == os.sep + os.sep:
+ name = os.sep + os.sep
+ else:
+ name = path.split(os.sep)[-1]
+
+ if dir.up() is None:
+ dir_up_path = dir.path
+ else:
+ dir_up_path = dir.up().path
+
+ assert dir.name == name, \
+ "dir.name %s != expected name %s" % \
+ (dir.name, name)
+ assert dir.path == path, \
+ "dir.path %s != expected path %s" % \
+ (dir.path, path)
+ assert str(dir) == path, \
+ "str(dir) %s != expected path %s" % \
+ (str(dir), path)
+ assert dir_up_path == up_path, \
+ "dir.up().path %s != expected parent path %s" % \
+ (dir.up().path, up_path)
+
+ save_os_path = os.path
+ save_os_sep = os.sep
+ try:
+ import ntpath
+ os.path = ntpath
+ os.sep = '\\'
+ SCons.Node.FS.initialize_do_splitdrive()
+
+ for sep in seps:
+
+ def Dir_test(lpath, path_, up_path_, sep=sep, func=_do_Dir_test):
+ return func(lpath, path_, up_path_, sep)
+
+ Dir_test('//foo', '//foo', '//')
+ Dir_test('//foo/bar', '//foo/bar', '//foo')
+ Dir_test('//', '//', '//')
+ Dir_test('//..', '//', '//')
+ Dir_test('//foo/..', '//', '//')
+ Dir_test('//../foo', '//foo', '//')
+ Dir_test('//.', '//', '//')
+ Dir_test('//./.', '//', '//')
+ Dir_test('//foo/./bar', '//foo/bar', '//foo')
+ Dir_test('//foo/../bar', '//bar', '//')
+ Dir_test('//foo/../../bar', '//bar', '//')
+ Dir_test('//foo/bar/../..', '//', '//')
+ Dir_test('#//', wp, tmp)
+ Dir_test('#//../foo', tmp_foo, tmp)
+ Dir_test('#//../foo', tmp_foo, tmp)
+ Dir_test('#//foo/bar', foo_bar, foo)
+ Dir_test('#//foo/bar', foo_bar, foo)
+ Dir_test('#//', wp, tmp)
+ finally:
+ os.path = save_os_path
+ os.sep = save_os_sep
+ SCons.Node.FS.initialize_do_splitdrive()
def test_target_from_source(self):
"""Test the method for generating target nodes from sources"""
@@ -1571,6 +1794,46 @@ class FSTestCase(_tempdirTestCase):
above_path = os.path.join(*['..']*len(dirs) + ['above'])
above = d2.Dir(above_path)
+ def test_lookup_abs(self):
+ """Exercise the _lookup_abs function"""
+ test = self.test
+ fs = self.fs
+
+ root = fs.Dir('/')
+ d = root._lookup_abs('/tmp/foo-nonexistent/nonexistent-dir', SCons.Node.FS.Dir)
+ assert d.__class__ == SCons.Node.FS.Dir, str(d.__class__)
+
+ def test_lookup_uncpath(self):
+ """Testing looking up a UNC path on Windows"""
+ if sys.platform not in ('win32',):
+ return
+ test = self.test
+ fs = self.fs
+ path='//servername/C$/foo'
+ f = self.fs._lookup('//servername/C$/foo', fs.Dir('#'), SCons.Node.FS.File)
+ # before the fix in this commit, this returned 'C:\servername\C$\foo'
+ # Should be a normalized Windows UNC path as below.
+ assert str(f) == r'\\servername\C$\foo', \
+ 'UNC path %s got looked up as %s'%(path, f)
+
+ def test_unc_drive_letter(self):
+ """Test drive-letter lookup for windows UNC-style directories"""
+ if sys.platform not in ('win32',):
+ return
+ share = self.fs.Dir(r'\\SERVER\SHARE\Directory')
+ assert str(share) == r'\\SERVER\SHARE\Directory', str(share)
+
+ def test_UNC_dirs_2689(self):
+ """Test some UNC dirs that printed incorrectly and/or caused
+ infinite recursion errors prior to r5180 (SCons 2.1)."""
+ fs = self.fs
+ if sys.platform not in ('win32',):
+ return
+ p = fs.Dir(r"\\computername\sharename").abspath
+ assert p == r"\\computername\sharename", p
+ p = fs.Dir(r"\\\computername\sharename").abspath
+ assert p == r"\\computername\sharename", p
+
def test_rel_path(self):
"""Test the rel_path() method"""
test = self.test
@@ -1676,8 +1939,8 @@ class DirTestCase(_tempdirTestCase):
x.add_post_action('post')
e.must_be_same(SCons.Node.FS.Dir)
a = x.get_action_list()
- assert a[0] == 'pre', a
- assert a[2] == 'post', a
+ assert 'pre' in a, a
+ assert 'post' in a, a
def test_subclass(self):
"""Test looking up subclass of Dir nodes"""
diff --git a/src/engine/SCons/Node/NodeTests.py b/src/engine/SCons/Node/NodeTests.py
index 39e7fd8..416c134 100644
--- a/src/engine/SCons/Node/NodeTests.py
+++ b/src/engine/SCons/Node/NodeTests.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/Node/NodeTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Node/NodeTests.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
diff --git a/src/engine/SCons/Node/Python.py b/src/engine/SCons/Node/Python.py
index 3245005..b97f9d4 100644
--- a/src/engine/SCons/Node/Python.py
+++ b/src/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/src/engine/SCons/Node/PythonTests.py b/src/engine/SCons/Node/PythonTests.py
index 3e9e687..b91c2d3 100644
--- a/src/engine/SCons/Node/PythonTests.py
+++ b/src/engine/SCons/Node/PythonTests.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/Node/PythonTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Node/PythonTests.py 5357 2011/09/09 21:31:03 bdeegan"
import sys
import unittest
diff --git a/src/engine/SCons/Node/__init__.py b/src/engine/SCons/Node/__init__.py
index b737798..a832a5f 100644
--- a/src/engine/SCons/Node/__init__.py
+++ b/src/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/src/engine/SCons/Options/BoolOption.py b/src/engine/SCons/Options/BoolOption.py
index 4609967..2b86533 100644
--- a/src/engine/SCons/Options/BoolOption.py
+++ b/src/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/src/engine/SCons/Options/EnumOption.py b/src/engine/SCons/Options/EnumOption.py
index 1357984..5296209 100644
--- a/src/engine/SCons/Options/EnumOption.py
+++ b/src/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/src/engine/SCons/Options/ListOption.py b/src/engine/SCons/Options/ListOption.py
index 1f34cd6..5672689 100644
--- a/src/engine/SCons/Options/ListOption.py
+++ b/src/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/src/engine/SCons/Options/PackageOption.py b/src/engine/SCons/Options/PackageOption.py
index 1bb88b1..930c18f 100644
--- a/src/engine/SCons/Options/PackageOption.py
+++ b/src/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/src/engine/SCons/Options/PathOption.py b/src/engine/SCons/Options/PathOption.py
index 2e38de3..ebf0f24 100644
--- a/src/engine/SCons/Options/PathOption.py
+++ b/src/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/src/engine/SCons/Options/__init__.py b/src/engine/SCons/Options/__init__.py
index edb6273..b1428e9 100644
--- a/src/engine/SCons/Options/__init__.py
+++ b/src/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/src/engine/SCons/PathList.py b/src/engine/SCons/PathList.py
index 4b27193..0ba07f5 100644
--- a/src/engine/SCons/PathList.py
+++ b/src/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/src/engine/SCons/PathListTests.py b/src/engine/SCons/PathListTests.py
index 0bda79f..889e10e 100644
--- a/src/engine/SCons/PathListTests.py
+++ b/src/engine/SCons/PathListTests.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/PathListTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/PathListTests.py 5357 2011/09/09 21:31:03 bdeegan"
import sys
import unittest
diff --git a/src/engine/SCons/Platform/PlatformTests.py b/src/engine/SCons/Platform/PlatformTests.py
index a2b10f2..4996df7 100644
--- a/src/engine/SCons/Platform/PlatformTests.py
+++ b/src/engine/SCons/Platform/PlatformTests.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/Platform/PlatformTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Platform/PlatformTests.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
diff --git a/src/engine/SCons/Platform/__init__.py b/src/engine/SCons/Platform/__init__.py
index 7621e40..eb0108e 100644
--- a/src/engine/SCons/Platform/__init__.py
+++ b/src/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/src/engine/SCons/Platform/__init__.xml b/src/engine/SCons/Platform/__init__.xml
index f54d17f..0b6d102 100644
--- a/src/engine/SCons/Platform/__init__.xml
+++ b/src/engine/SCons/Platform/__init__.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Platform/aix.py b/src/engine/SCons/Platform/aix.py
index 821c9da..c48aaff 100644
--- a/src/engine/SCons/Platform/aix.py
+++ b/src/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/src/engine/SCons/Platform/cygwin.py b/src/engine/SCons/Platform/cygwin.py
index 8370ea6..c04f50a 100644
--- a/src/engine/SCons/Platform/cygwin.py
+++ b/src/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/src/engine/SCons/Platform/darwin.py b/src/engine/SCons/Platform/darwin.py
index 3a9c9eb..bed6fce 100644
--- a/src/engine/SCons/Platform/darwin.py
+++ b/src/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/src/engine/SCons/Platform/hpux.py b/src/engine/SCons/Platform/hpux.py
index 77d6db3..fbacc04 100644
--- a/src/engine/SCons/Platform/hpux.py
+++ b/src/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/src/engine/SCons/Platform/irix.py b/src/engine/SCons/Platform/irix.py
index ff0c323..2c3bc15 100644
--- a/src/engine/SCons/Platform/irix.py
+++ b/src/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/src/engine/SCons/Platform/os2.py b/src/engine/SCons/Platform/os2.py
index cdb4082..9c76419 100644
--- a/src/engine/SCons/Platform/os2.py
+++ b/src/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/src/engine/SCons/Platform/posix.py b/src/engine/SCons/Platform/posix.py
index 87de9df..6d99fdb 100644
--- a/src/engine/SCons/Platform/posix.py
+++ b/src/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/src/engine/SCons/Platform/posix.xml b/src/engine/SCons/Platform/posix.xml
index 1ac19ed..28adbf1 100644
--- a/src/engine/SCons/Platform/posix.xml
+++ b/src/engine/SCons/Platform/posix.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Platform/sunos.py b/src/engine/SCons/Platform/sunos.py
index 1501107..2344906 100644
--- a/src/engine/SCons/Platform/sunos.py
+++ b/src/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/src/engine/SCons/Platform/sunos.xml b/src/engine/SCons/Platform/sunos.xml
index ea0bbe9..4de59d6 100644
--- a/src/engine/SCons/Platform/sunos.xml
+++ b/src/engine/SCons/Platform/sunos.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Platform/win32.py b/src/engine/SCons/Platform/win32.py
index 7a232ae..fec9b4c 100644
--- a/src/engine/SCons/Platform/win32.py
+++ b/src/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/src/engine/SCons/Platform/win32.xml b/src/engine/SCons/Platform/win32.xml
index e0ce9d7..f2fef32 100644
--- a/src/engine/SCons/Platform/win32.xml
+++ b/src/engine/SCons/Platform/win32.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/SConf.py b/src/engine/SCons/SConf.py
index 7b43436..11d6245 100644
--- a/src/engine/SCons/SConf.py
+++ b/src/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/src/engine/SCons/SConfTests.py b/src/engine/SCons/SConfTests.py
index 1766def..d7dc827 100644
--- a/src/engine/SCons/SConfTests.py
+++ b/src/engine/SCons/SConfTests.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/SConfTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/SConfTests.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
diff --git a/src/engine/SCons/SConsign.py b/src/engine/SCons/SConsign.py
index 0d78a6d..bbe475b 100644
--- a/src/engine/SCons/SConsign.py
+++ b/src/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/src/engine/SCons/SConsignTests.py b/src/engine/SCons/SConsignTests.py
index 4e29af7..eebbacf 100644
--- a/src/engine/SCons/SConsignTests.py
+++ b/src/engine/SCons/SConsignTests.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/SConsignTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/SConsignTests.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import sys
diff --git a/src/engine/SCons/Scanner/C.py b/src/engine/SCons/Scanner/C.py
index 3ac769a..0b07c13 100644
--- a/src/engine/SCons/Scanner/C.py
+++ b/src/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/src/engine/SCons/Scanner/CTests.py b/src/engine/SCons/Scanner/CTests.py
index 0b1d751..559bb38 100644
--- a/src/engine/SCons/Scanner/CTests.py
+++ b/src/engine/SCons/Scanner/CTests.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/CTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/CTests.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
diff --git a/src/engine/SCons/Scanner/D.py b/src/engine/SCons/Scanner/D.py
index 2293ddd..b4b26ba 100644
--- a/src/engine/SCons/Scanner/D.py
+++ b/src/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/src/engine/SCons/Scanner/Dir.py b/src/engine/SCons/Scanner/Dir.py
index df0de4e..aa1239f 100644
--- a/src/engine/SCons/Scanner/Dir.py
+++ b/src/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/src/engine/SCons/Scanner/DirTests.py b/src/engine/SCons/Scanner/DirTests.py
index e67d983..7ab3f26 100644
--- a/src/engine/SCons/Scanner/DirTests.py
+++ b/src/engine/SCons/Scanner/DirTests.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/DirTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/DirTests.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
import sys
diff --git a/src/engine/SCons/Scanner/Fortran.py b/src/engine/SCons/Scanner/Fortran.py
index 63d34e4..13f670d 100644
--- a/src/engine/SCons/Scanner/Fortran.py
+++ b/src/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/src/engine/SCons/Scanner/FortranTests.py b/src/engine/SCons/Scanner/FortranTests.py
index 92f6c21..e19f162 100644
--- a/src/engine/SCons/Scanner/FortranTests.py
+++ b/src/engine/SCons/Scanner/FortranTests.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/FortranTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/FortranTests.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import os.path
diff --git a/src/engine/SCons/Scanner/IDL.py b/src/engine/SCons/Scanner/IDL.py
index 8ccda1b..206a106 100644
--- a/src/engine/SCons/Scanner/IDL.py
+++ b/src/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/src/engine/SCons/Scanner/IDLTests.py b/src/engine/SCons/Scanner/IDLTests.py
index 9e1cb8c..606bc23 100644
--- a/src/engine/SCons/Scanner/IDLTests.py
+++ b/src/engine/SCons/Scanner/IDLTests.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/IDLTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/IDLTests.py 5357 2011/09/09 21:31:03 bdeegan"
import TestCmd
import SCons.Scanner.IDL
diff --git a/src/engine/SCons/Scanner/LaTeX.py b/src/engine/SCons/Scanner/LaTeX.py
index ae542cf..913e64b 100644
--- a/src/engine/SCons/Scanner/LaTeX.py
+++ b/src/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/src/engine/SCons/Scanner/LaTeXTests.py b/src/engine/SCons/Scanner/LaTeXTests.py
index 2bbb9d6..00e6483 100644
--- a/src/engine/SCons/Scanner/LaTeXTests.py
+++ b/src/engine/SCons/Scanner/LaTeXTests.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/LaTeXTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/LaTeXTests.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
diff --git a/src/engine/SCons/Scanner/Prog.py b/src/engine/SCons/Scanner/Prog.py
index 0312132..0df80f8 100644
--- a/src/engine/SCons/Scanner/Prog.py
+++ b/src/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/src/engine/SCons/Scanner/ProgTests.py b/src/engine/SCons/Scanner/ProgTests.py
index 1d7a343..ba6e0a7 100644
--- a/src/engine/SCons/Scanner/ProgTests.py
+++ b/src/engine/SCons/Scanner/ProgTests.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/ProgTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/ProgTests.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
import sys
diff --git a/src/engine/SCons/Scanner/RC.py b/src/engine/SCons/Scanner/RC.py
index 9013a09..a650581 100644
--- a/src/engine/SCons/Scanner/RC.py
+++ b/src/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/src/engine/SCons/Scanner/RCTests.py b/src/engine/SCons/Scanner/RCTests.py
index 6f93413..2f09d78 100644
--- a/src/engine/SCons/Scanner/RCTests.py
+++ b/src/engine/SCons/Scanner/RCTests.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/RCTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/RCTests.py 5357 2011/09/09 21:31:03 bdeegan"
import TestCmd
import SCons.Scanner.RC
@@ -57,6 +57,7 @@ TEST_D3DFX D3DFX DISCARDABLE "testEffect.fx"
""")
+test.write('t3.rc','#include "t1.h"\r\n')
# Create dummy include files
headers = ['t1.h',
@@ -144,12 +145,22 @@ class RCScannerTestCase2(unittest.TestCase):
'testregis.rgs','testtypelib.tlb']
deps_match(self, deps, headers)
+class RCScannerTestCase3(unittest.TestCase):
+ def runTest(self):
+ path = []
+ env = DummyEnvironment(RCSUFFIXES=['.rc','.rc2'],
+ CPPPATH=path)
+ s = SCons.Scanner.RC.RCScan()
+ deps = s(env.File('t3.rc'), env, path)
+ headers = ['t1.h']
+ deps_match(self, deps, headers)
def suite():
suite = unittest.TestSuite()
suite.addTest(RCScannerTestCase1())
suite.addTest(RCScannerTestCase2())
+ suite.addTest(RCScannerTestCase3())
return suite
if __name__ == "__main__":
diff --git a/src/engine/SCons/Scanner/ScannerTests.py b/src/engine/SCons/Scanner/ScannerTests.py
index 140fc82..5d9607f 100644
--- a/src/engine/SCons/Scanner/ScannerTests.py
+++ b/src/engine/SCons/Scanner/ScannerTests.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/ScannerTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Scanner/ScannerTests.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
diff --git a/src/engine/SCons/Scanner/__init__.py b/src/engine/SCons/Scanner/__init__.py
index 1a8dcbc..d2d7a62 100644
--- a/src/engine/SCons/Scanner/__init__.py
+++ b/src/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/src/engine/SCons/Scanner/__init__.xml b/src/engine/SCons/Scanner/__init__.xml
new file mode 100644
index 0000000..f16de90
--- /dev/null
+++ b/src/engine/SCons/Scanner/__init__.xml
@@ -0,0 +1,64 @@
+<!--
+Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
+
+This file is processed by the bin/SConsDoc.py module.
+See its __doc__ string for a discussion of the format.
+-->
+
+<scons_function name="FindPathDirs">
+<arguments signature="global">
+(variable)
+</arguments>
+<summary>
+Returns a function
+(actually a callable Python object)
+intended to be used as the
+<varname>path_function</varname>
+of a Scanner object.
+The returned object will look up the specified
+<varname>variable</varname>
+in a construction environment
+and treat the construction variable's value as a list of
+directory paths that should be searched
+(like
+&cv-link-CPPPATH;,
+&cv-link-LIBPATH;,
+etc.).
+
+Note that use of
+&f-FindPathDirs;
+is generally preferable to
+writing your own
+<varname>path_function</varname>
+for the following reasons:
+1) The returned list will contain all appropriate directories
+found in source trees
+(when
+&f-link-VariantDir;
+is used)
+or in code repositories
+(when
+&f-Repository;
+or the
+<option>-Y</option>
+option are used).
+2) scons will identify expansions of
+<varname>variable</varname>
+that evaluate to the same list of directories as,
+in fact, the same list,
+and avoid re-scanning the directories for files,
+when possible.
+
+Example:
+
+<example>
+def my_scan(node, env, path, arg):
+ # Code to scan file contents goes here...
+ return include_files
+
+scanner = Scanner(name = 'myscanner',
+ function = my_scan,
+ path_function = FindPathDirs('MYPATH'))
+</example>
+</summary>
+</scons_function>
diff --git a/src/engine/SCons/Script/Interactive.py b/src/engine/SCons/Script/Interactive.py
index e2906d4..f2151fa 100644
--- a/src/engine/SCons/Script/Interactive.py
+++ b/src/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/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py
index 31bcff3..2f00e5c 100644
--- a/src/engine/SCons/Script/Main.py
+++ b/src/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/src/engine/SCons/Script/Main.xml b/src/engine/SCons/Script/Main.xml
new file mode 100644
index 0000000..9c97826
--- /dev/null
+++ b/src/engine/SCons/Script/Main.xml
@@ -0,0 +1,710 @@
+<!--
+Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
+
+This file is processed by the bin/SConsDoc.py module.
+See its __doc__ string for a discussion of the format.
+-->
+
+<scons_function name="AddOption">
+<arguments signature="global">
+(arguments)
+</arguments>
+<summary>
+This function adds a new command-line option to be recognized.
+The specified
+<varname>arguments</varname>
+are the same as supported by the standard Python
+<function>optparse.add_option</function>()
+method (with a few additional capabilities noted below);
+see the documentation for
+<literal>optparse</literal>
+for a thorough discussion of its option-processing capabities.
+
+In addition to the arguments and values supported by the
+<function>optparse.add_option</function>()
+method,
+the SCons
+&f-AddOption;
+function allows you to set the
+<literal>nargs</literal>
+keyword value to
+<literal>'?'</literal>
+(a string with just the question mark)
+to indicate that the specified long option(s) take(s) an
+<emphasis>optional</emphasis>
+argument.
+When
+<literal>nargs = '?'</literal>
+is passed to the
+&f-AddOption;
+function, the
+<literal>const</literal>
+keyword argument
+may be used to supply the "default"
+value that should be used when the
+option is specified on the command line
+without an explicit argument.
+
+If no
+<literal>default=</literal>
+keyword argument is supplied when calling
+&f-AddOption;,
+the option will have a default value of
+<literal>None</literal>.
+
+Once a new command-line option has been added with
+&f-AddOption;,
+the option value may be accessed using
+&f-GetOption;
+or
+<function>env.GetOption</function>().
+The value may also be set, using
+&f-SetOption;
+or
+<function>env.SetOption</function>(),
+if conditions in a
+&SConscript;
+require overriding any default value.
+Note, however, that a
+value specified on the command line will
+<emphasis>always</emphasis>
+override a value set by any SConscript file.
+
+Any specified
+<literal>help=</literal>
+strings for the new option(s)
+will be displayed by the
+<option>-H</option>
+or
+<option>-h</option>
+options
+(the latter only if no other help text is
+specified in the SConscript files).
+The help text for the local options specified by
+&f-AddOption;
+will appear below the SCons options themselves,
+under a separate
+<literal>Local Options</literal>
+heading.
+The options will appear in the help text
+in the order in which the
+&f-AddOption;
+calls occur.
+
+Example:
+
+<example>
+AddOption('--prefix',
+ dest='prefix',
+ nargs=1, type='string',
+ action='store',
+ metavar='DIR',
+ help='installation prefix')
+env = Environment(PREFIX = GetOption('prefix'))
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="GetBuildFailures">
+<arguments signature="global">
+()
+</arguments>
+<summary>
+Returns a list of exceptions for the
+actions that failed while
+attempting to build targets.
+Each element in the returned list is a
+<classname>BuildError</classname>
+object
+with the following attributes
+that record various aspects
+of the build failure:
+
+<literal>.node</literal>
+The node that was being built
+when the build failure occurred.
+
+<literal>.status</literal>
+The numeric exit status
+returned by the command or Python function
+that failed when trying to build the
+specified Node.
+
+<literal>.errstr</literal>
+The SCons error string
+describing the build failure.
+(This is often a generic
+message like "Error 2"
+to indicate that an executed
+command exited with a status of 2.)
+
+<literal>.filename</literal>
+The name of the file or
+directory that actually caused the failure.
+This may be different from the
+<literal>.node</literal>
+attribute.
+For example,
+if an attempt to build a target named
+<filename>sub/dir/target</filename>
+fails because the
+<filename>sub/dir</filename>
+directory could not be created,
+then the
+<literal>.node</literal>
+attribute will be
+<filename>sub/dir/target</filename>
+but the
+<literal>.filename</literal>
+attribute will be
+<filename>sub/dir</filename>.
+
+<literal>.executor</literal>
+The SCons Executor object
+for the target Node
+being built.
+This can be used to retrieve
+the construction environment used
+for the failed action.
+
+<literal>.action</literal>
+The actual SCons Action object that failed.
+This will be one specific action
+out of the possible list of
+actions that would have been
+executed to build the target.
+
+<literal>.command</literal>
+The actual expanded command that was executed and failed,
+after expansion of
+&cv-link-TARGET;,
+&cv-link-SOURCE;,
+and other construction variables.
+
+Note that the
+&f-GetBuildFailures;
+function
+will always return an empty list
+until any build failure has occurred,
+which means that
+&f-GetBuildFailures;
+will always return an empty list
+while the
+&SConscript;
+files are being read.
+Its primary intended use is
+for functions that will be
+executed before SCons exits
+by passing them to the
+standard Python
+<function>atexit.register</function>()
+function.
+Example:
+
+<example>
+import atexit
+
+def print_build_failures():
+ from SCons.Script import GetBuildFailures
+ for bf in GetBuildFailures():
+ print "%s failed: %s" % (bf.node, bf.errstr)
+
+atexit.register(print_build_failures)
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="GetOption">
+<arguments>
+(name)
+</arguments>
+<summary>
+This function provides a way to query the value of
+SCons options set on scons command line
+(or set using the
+&f-link-SetOption;
+function).
+The options supported are:
+
+<variablelist>
+<varlistentry>
+<term><literal>cache_debug</literal></term>
+<listitem>
+<para>
+which corresponds to --cache-debug;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>cache_disable</literal></term>
+<listitem>
+<para>
+which corresponds to --cache-disable;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>cache_force</literal></term>
+<listitem>
+<para>
+which corresponds to --cache-force;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>cache_show</literal></term>
+<listitem>
+<para>
+which corresponds to --cache-show;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>clean</literal></term>
+<listitem>
+<para>
+which corresponds to -c, --clean and --remove;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>config</literal></term>
+<listitem>
+<para>
+which corresponds to --config;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>directory</literal></term>
+<listitem>
+<para>
+which corresponds to -C and --directory;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>diskcheck</literal></term>
+<listitem>
+<para>
+which corresponds to --diskcheck
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>duplicate</literal></term>
+<listitem>
+<para>
+which corresponds to --duplicate;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>file</literal></term>
+<listitem>
+<para>
+which corresponds to -f, --file, --makefile and --sconstruct;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>help</literal></term>
+<listitem>
+<para>
+which corresponds to -h and --help;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>ignore_errors</literal></term>
+<listitem>
+<para>
+which corresponds to --ignore-errors;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>implicit_cache</literal></term>
+<listitem>
+<para>
+which corresponds to --implicit-cache;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>implicit_deps_changed</literal></term>
+<listitem>
+<para>
+which corresponds to --implicit-deps-changed;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>implicit_deps_unchanged</literal></term>
+<listitem>
+<para>
+which corresponds to --implicit-deps-unchanged;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>interactive</literal></term>
+<listitem>
+<para>
+which corresponds to --interact and --interactive;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>keep_going</literal></term>
+<listitem>
+<para>
+which corresponds to -k and --keep-going;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>max_drift</literal></term>
+<listitem>
+<para>
+which corresponds to --max-drift;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>no_exec</literal></term>
+<listitem>
+<para>
+which corresponds to -n, --no-exec, --just-print, --dry-run and --recon;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>no_site_dir</literal></term>
+<listitem>
+<para>
+which corresponds to --no-site-dir;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>num_jobs</literal></term>
+<listitem>
+<para>
+which corresponds to -j and --jobs;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>profile_file</literal></term>
+<listitem>
+<para>
+which corresponds to --profile;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>question</literal></term>
+<listitem>
+<para>
+which corresponds to -q and --question;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>random</literal></term>
+<listitem>
+<para>
+which corresponds to --random;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>repository</literal></term>
+<listitem>
+<para>
+which corresponds to -Y, --repository and --srcdir;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>silent</literal></term>
+<listitem>
+<para>
+which corresponds to -s, --silent and --quiet;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>site_dir</literal></term>
+<listitem>
+<para>
+which corresponds to --site-dir;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>stack_size</literal></term>
+<listitem>
+<para>
+which corresponds to --stack-size;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>taskmastertrace_file</literal></term>
+<listitem>
+<para>
+which corresponds to --taskmastertrace; and
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>warn</literal></term>
+<listitem>
+<para>
+which corresponds to --warn and --warning.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+See the documentation for the
+corresponding command line object for information about each specific
+option.
+</summary>
+</scons_function>
+
+<scons_function name="Progress">
+<arguments signature="global">
+(callable, [interval])
+</arguments>
+<arguments signature="global">
+(string, [interval, file, overwrite])
+</arguments>
+<arguments signature="global">
+(list_of_strings, [interval, file, overwrite])
+</arguments>
+<summary>
+Allows SCons to show progress made during the build
+by displaying a string or calling a function while
+evaluating Nodes (e.g. files).
+
+If the first specified argument is a Python callable
+(a function or an object that has a
+<function>__call__</function>()
+method),
+the function will be called
+once every
+<varname>interval</varname>
+times a Node is evaluated.
+The callable will be passed the evaluated Node
+as its only argument.
+(For future compatibility,
+it's a good idea to also add
+<literal>*args</literal>
+and
+<literal>**kw</literal>
+as arguments to your function or method.
+This will prevent the code from breaking
+if SCons ever changes the interface
+to call the function with additional arguments in the future.)
+
+An example of a simple custom progress function
+that prints a string containing the Node name
+every 10 Nodes:
+
+<example>
+def my_progress_function(node, *args, **kw):
+ print 'Evaluating node %s!' % node
+Progress(my_progress_function, interval=10)
+</example>
+
+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
+<literal>\r</literal>
+(a carriage return)
+at the end so that the string
+will overwrite itself on a display:
+
+<example>
+import sys
+class ProgressCounter(object):
+ count = 0
+ def __call__(self, node, *args, **kw):
+ self.count += 100
+ sys.stderr.write('Evaluated %s nodes\r' % self.count)
+Progress(ProgressCounter(), interval=100)
+</example>
+
+If the first argument
+&f-link-Progress;
+is a string,
+the string will be displayed
+every
+<varname>interval</varname>
+evaluated Nodes.
+The default is to print the string on standard output;
+an alternate output stream
+may be specified with the
+<literal>file=</literal>
+argument.
+The following will print a series of dots
+on the error output,
+one dot for every 100 evaluated Nodes:
+
+<example>
+import sys
+Progress('.', interval=100, file=sys.stderr)
+</example>
+
+If the string contains the verbatim substring
+&cv-TARGET;,
+it will be replaced with the Node.
+Note that, for performance reasons, this is
+<emphasis>not</emphasis>
+a regular SCons variable substition,
+so you can not use other variables
+or use curly braces.
+The following example will print the name of
+every evaluated Node,
+using a
+<literal>\r</literal>
+(carriage return) to cause each line to overwritten by the next line,
+and the
+<literal>overwrite=</literal>
+keyword argument to make sure the previously-printed
+file name is overwritten with blank spaces:
+
+<example>
+import sys
+Progress('$TARGET\r', overwrite=True)
+</example>
+
+If the first argument to
+&f-Progress;
+is a list of strings,
+then each string in the list will be displayed
+in rotating fashion every
+<varname>interval</varname>
+evaluated Nodes.
+This can be used to implement a "spinner"
+on the user's screen as follows:
+
+<example>
+Progress(['-\r', '\\\r', '|\r', '/\r'], interval=5)
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="Precious">
+<arguments>
+(target, ...)
+</arguments>
+<summary>
+Marks each given
+<varname>target</varname>
+as precious so it is not deleted before it is rebuilt. Normally
+&scons;
+deletes a target before building it.
+Multiple targets can be passed in to a single call to
+&f-Precious;.
+</summary>
+</scons_function>
+
+<scons_function name="SetOption">
+<arguments>
+(name, value)
+</arguments>
+<summary>
+This function provides a way to set a select subset of the scons command
+line options from a SConscript file. The options supported are:
+
+<variablelist>
+<varlistentry>
+<term><literal>clean</literal></term>
+<listitem>
+<para>
+which corresponds to -c, --clean and --remove;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>duplicate</literal></term>
+<listitem>
+<para>
+which corresponds to --duplicate;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>help</literal></term>
+<listitem>
+<para>
+which corresponds to -h and --help;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>implicit_cache</literal></term>
+<listitem>
+<para>
+which corresponds to --implicit-cache;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>max_drift</literal></term>
+<listitem>
+<para>
+which corresponds to --max-drift;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>no_exec</literal></term>
+<listitem>
+<para>
+which corresponds to -n, --no-exec, --just-print, --dry-run and --recon;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>num_jobs</literal></term>
+<listitem>
+<para>
+which corresponds to -j and --jobs;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>random</literal></term>
+<listitem>
+<para>
+which corresponds to --random; and
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal>stack_size</literal></term>
+<listitem>
+<para>
+which corresponds to --stack-size.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+See the documentation for the
+corresponding command line object for information about each specific
+option.
+
+Example:
+
+<example>
+SetOption('max_drift', 1)
+</example>
+</summary>
+</scons_function>
diff --git a/src/engine/SCons/Script/MainTests.py b/src/engine/SCons/Script/MainTests.py
index 923f791..06780d8 100644
--- a/src/engine/SCons/Script/MainTests.py
+++ b/src/engine/SCons/Script/MainTests.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/MainTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Script/MainTests.py 5357 2011/09/09 21:31:03 bdeegan"
import unittest
import SCons.Errors
diff --git a/src/engine/SCons/Script/SConsOptions.py b/src/engine/SCons/Script/SConsOptions.py
index 8afedf6..79d9927 100644
--- a/src/engine/SCons/Script/SConsOptions.py
+++ b/src/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/src/engine/SCons/Script/SConscript.py b/src/engine/SCons/Script/SConscript.py
index 5e896f1..ee5e290 100644
--- a/src/engine/SCons/Script/SConscript.py
+++ b/src/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/src/engine/SCons/Script/SConscript.xml b/src/engine/SCons/Script/SConscript.xml
new file mode 100644
index 0000000..f24ca78
--- /dev/null
+++ b/src/engine/SCons/Script/SConscript.xml
@@ -0,0 +1,509 @@
+<!--
+Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
+
+This file is processed by the bin/SConsDoc.py module.
+See its __doc__ string for a discussion of the format.
+-->
+
+<scons_function name="Default">
+<arguments>
+(targets)
+</arguments>
+<summary>
+This specifies a list of default targets,
+which will be built by
+&scons;
+if no explicit targets are given on the command line.
+Multiple calls to
+&f-Default;
+are legal,
+and add to the list of default targets.
+
+Multiple targets should be specified as
+separate arguments to the
+&f-Default;
+method, or as a list.
+&f-Default;
+will also accept the Node returned by any
+of a construction environment's
+builder methods.
+
+Examples:
+
+<example>
+Default('foo', 'bar', 'baz')
+env.Default(['a', 'b', 'c'])
+hello = env.Program('hello', 'hello.c')
+env.Default(hello)
+</example>
+
+An argument to
+&f-Default;
+of
+<literal>None</literal>
+will clear all default targets.
+Later calls to
+&f-Default;
+will add to the (now empty) default-target list
+like normal.
+
+The current list of targets added using the
+&f-Default;
+function or method is available in the
+<literal>DEFAULT_TARGETS</literal>
+list;
+see below.
+</summary>
+</scons_function>
+
+<scons_function name="EnsurePythonVersion">
+<arguments>
+(major, minor)
+</arguments>
+<summary>
+Ensure that the Python version is at least
+<varname>major</varname>.<varname>minor</varname>.
+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.
+
+Example:
+
+<example>
+EnsurePythonVersion(2,2)
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="EnsureSConsVersion">
+<arguments>
+(major, minor, [revision])
+</arguments>
+<summary>
+Ensure that the SCons version is at least
+<varname>major.minor</varname>,
+or
+<varname>major.minor.revision</varname>.
+if
+<varname>revision</varname>
+is specified.
+This function will
+print out an error message and exit SCons with a non-zero exit code if the
+actual SCons version is not late enough.
+
+Examples:
+
+<example>
+EnsureSConsVersion(0,14)
+
+EnsureSConsVersion(0,96,90)
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="Exit">
+<arguments>
+([value])
+</arguments>
+<summary>
+This tells
+&scons;
+to exit immediately
+with the specified
+<varname>value</varname>.
+A default exit value of
+<literal>0</literal>
+(zero)
+is used if no value is specified.
+</summary>
+</scons_function>
+
+<scons_function name="Export">
+<arguments>
+(vars)
+</arguments>
+<summary>
+This tells
+&scons;
+to export a list of variables from the current
+SConscript file to all other SConscript files.
+The exported variables are kept in a global collection,
+so subsequent calls to
+&f-Export;
+will over-write previous exports that have the same name.
+Multiple variable names can be passed to
+&f-Export;
+as separate arguments or as a list.
+Keyword arguments can be used to provide names and their values.
+A dictionary can be used to map variables to a different name when exported.
+Both local variables and global variables can be exported.
+
+Examples:
+
+<example>
+env = Environment()
+# Make env available for all SConscript files to Import().
+Export("env")
+
+package = 'my_name'
+# Make env and package available for all SConscript files:.
+Export("env", "package")
+
+# Make env and package available for all SConscript files:
+Export(["env", "package"])
+
+# Make env available using the name debug:
+Export(debug = env)
+
+# Make env available using the name debug:
+Export({"debug":env})
+</example>
+
+Note that the
+&f-SConscript;
+function supports an
+<varname>exports</varname>
+argument that makes it easier to to export a variable or
+set of variables to a single SConscript file.
+See the description of the
+&f-SConscript;
+function, below.
+</summary>
+</scons_function>
+
+<scons_function name="GetLaunchDir">
+<arguments>
+()
+</arguments>
+<summary>
+Returns the absolute path name of the directory from which
+&scons;
+was initially invoked.
+This can be useful when using the
+<option>-u</option>,
+<option>-U</option>
+or
+<option>-D</option>
+options, which internally
+change to the directory in which the
+&SConstruct;
+file is found.
+</summary>
+</scons_function>
+
+<scons_function name="Help">
+<arguments>
+(text)
+</arguments>
+<summary>
+This specifies help text to be printed if the
+<option>-h</option>
+argument is given to
+&scons;.
+If
+&f-Help;
+is called multiple times, the text is appended together in the order
+that
+&f-Help;
+is called.
+</summary>
+</scons_function>
+
+<scons_function name="Import">
+<arguments>
+(vars)
+</arguments>
+<summary>
+This tells
+&scons;
+to import a list of variables into the current SConscript file. This
+will import variables that were exported with
+&f-Export;
+or in the
+<varname>exports</varname>
+argument to
+&f-link-SConscript;.
+Variables exported by
+&f-SConscript;
+have precedence.
+Multiple variable names can be passed to
+&f-Import;
+as separate arguments or as a list. The variable "*" can be used
+to import all variables.
+
+Examples:
+
+<example>
+Import("env")
+Import("env", "variable")
+Import(["env", "variable"])
+Import("*")
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="Return">
+<arguments signature="global">
+([vars..., stop=])
+</arguments>
+<summary>
+By default,
+this stops processing the current SConscript
+file and returns to the calling SConscript file
+the values of the variables named in the
+<varname>vars</varname>
+string arguments.
+Multiple strings contaning variable names may be passed to
+&f-Return;.
+Any strings that contain white space
+
+The optional
+<literal>stop=</literal>
+keyword argument may be set to a false value
+to continue processing the rest of the SConscript
+file after the
+&f-Return;
+call.
+This was the default behavior prior to SCons 0.98.
+However, the values returned
+are still the values of the variables in the named
+<varname>vars</varname>
+at the point
+&f-Return;
+is called.
+
+Examples:
+
+<example>
+# Returns without returning a value.
+Return()
+
+# Returns the value of the 'foo' Python variable.
+Return("foo")
+
+# Returns the values of the Python variables 'foo' and 'bar'.
+Return("foo", "bar")
+
+# Returns the values of Python variables 'val1' and 'val2'.
+Return('val1 val2')
+</example>
+</summary>
+</scons_function>
+
+<scons_function name="SConscript">
+<arguments>
+(scripts, [exports, variant_dir, duplicate])
+<!-- (scripts, [exports, variant_dir, src_dir, duplicate]) -->
+</arguments>
+<arguments>
+(dirs=subdirs, [name=script, exports, variant_dir, duplicate])
+<!-- (dirs=subdirs, [name=script, exports, variant_dir, src_dir, duplicate]) -->
+</arguments>
+<summary>
+This tells
+&scons;
+to execute
+one or more subsidiary SConscript (configuration) files.
+Any variables returned by a called script using
+&f-link-Return;
+will be returned by the call to
+&f-SConscript;.
+There are two ways to call the
+&f-SConscript;
+function.
+
+The first way you can call
+&f-SConscript;
+is to explicitly specify one or more
+<varname>scripts</varname>
+as the first argument.
+A single script may be specified as a string;
+multiple scripts must be specified as a list
+(either explicitly or as created by
+a function like
+&f-Split;).
+Examples:
+<example>
+SConscript('SConscript') # run SConscript in the current directory
+SConscript('src/SConscript') # run SConscript in the src directory
+SConscript(['src/SConscript', 'doc/SConscript'])
+config = SConscript('MyConfig.py')
+</example>
+
+The second way you can call
+&f-SConscript;
+is to specify a list of (sub)directory names
+as a
+<literal>dirs=</literal><varname>subdirs</varname>
+keyword argument.
+In this case,
+&scons;
+will, by default,
+execute a subsidiary configuration file named
+&SConscript;
+in each of the specified directories.
+You may specify a name other than
+&SConscript;
+by supplying an optional
+<literal>name=</literal><varname>script</varname>
+keyword argument.
+The first three examples below have the same effect
+as the first three examples above:
+<example>
+SConscript(dirs='.') # run SConscript in the current directory
+SConscript(dirs='src') # run SConscript in the src directory
+SConscript(dirs=['src', 'doc'])
+SConscript(dirs=['sub1', 'sub2'], name='MySConscript')
+</example>
+
+The optional
+<varname>exports</varname>
+argument provides a list of variable names or a dictionary of
+named values to export to the
+<varname>script(s)</varname>.
+These variables are locally exported only to the specified
+<varname>script(s)</varname>,
+and do not affect the global pool of variables used by the
+&f-Export;
+function.
+<!-- If multiple dirs are provided, each script gets a fresh export. -->
+The subsidiary
+<varname>script(s)</varname>
+must use the
+&f-link-Import;
+function to import the variables.
+Examples:
+<example>
+foo = SConscript('sub/SConscript', exports='env')
+SConscript('dir/SConscript', exports=['env', 'variable'])
+SConscript(dirs='subdir', exports='env variable')
+SConscript(dirs=['one', 'two', 'three'], exports='shared_info')
+</example>
+
+If the optional
+<varname>variant_dir</varname>
+argument is present, it causes an effect equivalent to the
+&f-link-VariantDir;
+method described below.
+(If
+<varname>variant_dir</varname>
+is not present, the
+<!-- <varname>src_dir</varname> and -->
+<varname>duplicate</varname>
+<!-- arguments are ignored.) -->
+argument is ignored.)
+The
+<varname>variant_dir</varname>
+<!--
+and
+<varname>src_dir</varname>
+arguments are interpreted relative to the directory of the calling
+-->
+argument is interpreted relative to the directory of the calling
+&SConscript;
+file.
+See the description of the
+&f-VariantDir;
+function below for additional details and restrictions.
+
+If
+<varname>variant_dir</varname>
+is present,
+<!--
+but
+<varname>src_dir</varname>
+is not,
+-->
+the source directory is the directory in which the
+&SConscript;
+file resides and the
+&SConscript;
+file is evaluated as if it were in the
+<varname>variant_dir</varname>
+directory:
+<example>
+SConscript('src/SConscript', variant_dir = 'build')
+</example>
+
+is equivalent to
+
+<example>
+VariantDir('build', 'src')
+SConscript('build/SConscript')
+</example>
+
+This later paradigm is often used when the sources are
+in the same directory as the
+&SConstruct;:
+
+<example>
+SConscript('SConscript', variant_dir = 'build')
+</example>
+
+is equivalent to
+
+<example>
+VariantDir('build', '.')
+SConscript('build/SConscript')
+</example>
+
+<!--
+If
+<varname>variant_dir</varname>
+and"
+<varname>src_dir</varname>
+are both present,
+xxxxx everything is in a state of confusion.
+<example>
+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.
+</example>
+is equivalent to
+<example>
+????????????????
+</example>
+and what about this alternative?
+TODO??? SConscript('build/SConscript', src_dir='src')
+-->
+
+Here are some composite examples:
+
+<example>
+# collect the configuration information and use it to build src and doc
+shared_info = SConscript('MyConfig.py')
+SConscript('src/SConscript', exports='shared_info')
+SConscript('doc/SConscript', exports='shared_info')
+</example>
+
+<example>
+# build debugging and production versions. SConscript
+# can use Dir('.').path to determine variant.
+SConscript('SConscript', variant_dir='debug', duplicate=0)
+SConscript('SConscript', variant_dir='prod', duplicate=0)
+</example>
+
+<example>
+# build debugging and production versions. SConscript
+# is passed flags to use.
+opts = { 'CPPDEFINES' : ['DEBUG'], 'CCFLAGS' : '-pgdb' }
+SConscript('SConscript', variant_dir='debug', duplicate=0, exports=opts)
+opts = { 'CPPDEFINES' : ['NODEBUG'], 'CCFLAGS' : '-O' }
+SConscript('SConscript', variant_dir='prod', duplicate=0, exports=opts)
+</example>
+
+<example>
+# build common documentation and compile for different architectures
+SConscript('doc/SConscript', variant_dir='build/doc', duplicate=0)
+SConscript('src/SConscript', variant_dir='build/x86', duplicate=0)
+SConscript('src/SConscript', variant_dir='build/ppc', duplicate=0)
+</example>
+</summary>
+</scons_function>
diff --git a/src/engine/SCons/Script/SConscriptTests.py b/src/engine/SCons/Script/SConscriptTests.py
index 6d855ef..ebd89fc 100644
--- a/src/engine/SCons/Script/SConscriptTests.py
+++ b/src/engine/SCons/Script/SConscriptTests.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/SConscriptTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Script/SConscriptTests.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.Script.SConscript
diff --git a/src/engine/SCons/Script/__init__.py b/src/engine/SCons/Script/__init__.py
index b4545ec..f2503ae 100644
--- a/src/engine/SCons/Script/__init__.py
+++ b/src/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/src/engine/SCons/Sig.py b/src/engine/SCons/Sig.py
index 2a9bc8e..51c1b1a 100644
--- a/src/engine/SCons/Sig.py
+++ b/src/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/src/engine/SCons/Subst.py b/src/engine/SCons/Subst.py
index 84e7150..d0c8c38 100644
--- a/src/engine/SCons/Subst.py
+++ b/src/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/src/engine/SCons/Subst.xml b/src/engine/SCons/Subst.xml
new file mode 100644
index 0000000..debc8c3
--- /dev/null
+++ b/src/engine/SCons/Subst.xml
@@ -0,0 +1,46 @@
+<!--
+Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
+
+This file is processed by the bin/SConsDoc.py module.
+See its __doc__ string for a discussion of the format.
+-->
+
+<scons_function name="AllowSubstExceptions">
+<arguments signature="global">
+([exception, ...])
+</arguments>
+<summary>
+Specifies the exceptions that will be allowed
+when expanding construction variables.
+By default,
+any construction variable expansions that generate a
+<literal>NameError</literal>
+or
+<literal>IndexError</literal>
+exception will expand to a
+<literal>''</literal>
+(a null string) and not cause scons to fail.
+All exceptions not in the specified list
+will generate an error message
+and terminate processing.
+
+If
+&f-AllowSubstExceptions;
+is called multiple times,
+each call completely overwrites the previous list
+of allowed exceptions.
+
+Example:
+
+<example>
+# Requires that all construction variable names exist.
+# (You may wish to do this if you want to enforce strictly
+# that all construction variables must be defined before use.)
+AllowSubstExceptions()
+
+# Also allow a string containing a zero-division expansion
+# like '${1 / 0}' to evalute to ''.
+AllowSubstExceptions(IndexError, NameError, ZeroDivisionError)
+</example>
+</summary>
+</scons_function>
diff --git a/src/engine/SCons/SubstTests.py b/src/engine/SCons/SubstTests.py
index 502043b..0494aa0 100644
--- a/src/engine/SCons/SubstTests.py
+++ b/src/engine/SCons/SubstTests.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/SubstTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/SubstTests.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
@@ -550,8 +550,10 @@ class scons_subst_TestCase(SubstTestCase):
expect = [
# Python 2.3, 2.4
"TypeError `unsubscriptable object' trying to evaluate `${NONE[2]}'",
- # Python 2.5 and later
+ # Python 2.5, 2.6
"TypeError `'NoneType' object is unsubscriptable' trying to evaluate `${NONE[2]}'",
+ # Python 2.7 and later
+ "TypeError `'NoneType' object is not subscriptable' trying to evaluate `${NONE[2]}'",
]
assert str(e) in expect, e
else:
diff --git a/src/engine/SCons/Taskmaster.py b/src/engine/SCons/Taskmaster.py
index 019b2d7..e98a859 100644
--- a/src/engine/SCons/Taskmaster.py
+++ b/src/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/src/engine/SCons/TaskmasterTests.py b/src/engine/SCons/TaskmasterTests.py
index a9be079..8c026af 100644
--- a/src/engine/SCons/TaskmasterTests.py
+++ b/src/engine/SCons/TaskmasterTests.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
@@ -22,7 +22,7 @@
#
from __future__ import division
-__revision__ = "src/engine/SCons/TaskmasterTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/TaskmasterTests.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
diff --git a/src/engine/SCons/Tool/386asm.py b/src/engine/SCons/Tool/386asm.py
index 1ba99fa..27748cb 100644
--- a/src/engine/SCons/Tool/386asm.py
+++ b/src/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/src/engine/SCons/Tool/386asm.xml b/src/engine/SCons/Tool/386asm.xml
index 7474317..8d45681 100644
--- a/src/engine/SCons/Tool/386asm.xml
+++ b/src/engine/SCons/Tool/386asm.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/BitKeeper.py b/src/engine/SCons/Tool/BitKeeper.py
index 8c8991a..2b8297b 100644
--- a/src/engine/SCons/Tool/BitKeeper.py
+++ b/src/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/src/engine/SCons/Tool/BitKeeper.xml b/src/engine/SCons/Tool/BitKeeper.xml
index 9dd464a..3ca8e22 100644
--- a/src/engine/SCons/Tool/BitKeeper.xml
+++ b/src/engine/SCons/Tool/BitKeeper.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
@@ -56,3 +56,29 @@ Options that are passed to the BitKeeper
subcommand.
</summary>
</cvar>
+
+<scons_function name="BitKeeper">
+<arguments signature="env">
+()
+</arguments>
+<summary>
+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
+&f-SourceCode;
+function.
+
+This function is deprecated. For details, see the entry for the
+&f-SourceCode;
+function.
+
+Example:
+
+<example>
+env.SourceCode('.', env.BitKeeper())
+</example>
+</summary>
+</scons_function>
diff --git a/src/engine/SCons/Tool/CVS.py b/src/engine/SCons/Tool/CVS.py
index 5d511f0..f1d3561 100644
--- a/src/engine/SCons/Tool/CVS.py
+++ b/src/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/src/engine/SCons/Tool/CVS.xml b/src/engine/SCons/Tool/CVS.xml
index d0a9357..4a0397e 100644
--- a/src/engine/SCons/Tool/CVS.xml
+++ b/src/engine/SCons/Tool/CVS.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
@@ -64,3 +64,53 @@ This is referenced in the default
&cv-link-CVSFLAGS; value.
</summary>
</cvar>
+
+<scons_function name="CVS">
+<arguments signature="env">
+(repository, module)
+</arguments>
+<summary>
+A factory function that
+returns a Builder object
+to be used to fetch source files
+from the specified
+CVS
+<varname>repository</varname>.
+The returned Builder
+is intended to be passed to the
+&f-link-SourceCode;
+function.
+
+This function is deprecated. For details, see the entry for the
+&f-SourceCode;
+function.
+
+The optional specified
+<varname>module</varname>
+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.
+
+Examples:
+
+<example>
+# Will fetch foo/bar/src.c
+# from /usr/local/CVSROOT/foo/bar/src.c.
+env.SourceCode('.', env.CVS('/usr/local/CVSROOT'))
+
+# Will fetch bar/src.c
+# from /usr/local/CVSROOT/foo/bar/src.c.
+env.SourceCode('.', env.CVS('/usr/local/CVSROOT', 'foo'))
+
+# Will fetch src.c
+# from /usr/local/CVSROOT/foo/bar/src.c.
+env.SourceCode('.', env.CVS('/usr/local/CVSROOT', 'foo/bar'))
+</example>
+</summary>
+</scons_function>
diff --git a/src/engine/SCons/Tool/FortranCommon.py b/src/engine/SCons/Tool/FortranCommon.py
index 2194158..4311cac 100644
--- a/src/engine/SCons/Tool/FortranCommon.py
+++ b/src/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/src/engine/SCons/Tool/JavaCommon.py b/src/engine/SCons/Tool/JavaCommon.py
index 0a38409..f1eab72 100644
--- a/src/engine/SCons/Tool/JavaCommon.py
+++ b/src/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/src/engine/SCons/Tool/JavaCommonTests.py b/src/engine/SCons/Tool/JavaCommonTests.py
index 5c74b57..9168983 100644
--- a/src/engine/SCons/Tool/JavaCommonTests.py
+++ b/src/engine/SCons/Tool/JavaCommonTests.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/JavaCommonTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/JavaCommonTests.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
import sys
diff --git a/src/engine/SCons/Tool/MSCommon/__init__.py b/src/engine/SCons/Tool/MSCommon/__init__.py
index 780a97c..a5e19e6 100644
--- a/src/engine/SCons/Tool/MSCommon/__init__.py
+++ b/src/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/src/engine/SCons/Tool/MSCommon/arch.py b/src/engine/SCons/Tool/MSCommon/arch.py
index 28ef0f1..0abb9f1 100644
--- a/src/engine/SCons/Tool/MSCommon/arch.py
+++ b/src/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/src/engine/SCons/Tool/MSCommon/common.py b/src/engine/SCons/Tool/MSCommon/common.py
index 9f3df2d..b99cd77 100644
--- a/src/engine/SCons/Tool/MSCommon/common.py
+++ b/src/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/src/engine/SCons/Tool/MSCommon/netframework.py b/src/engine/SCons/Tool/MSCommon/netframework.py
index 66c5586..a69a924 100644
--- a/src/engine/SCons/Tool/MSCommon/netframework.py
+++ b/src/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/src/engine/SCons/Tool/MSCommon/sdk.py b/src/engine/SCons/Tool/MSCommon/sdk.py
index 6355998..1fc5751 100644
--- a/src/engine/SCons/Tool/MSCommon/sdk.py
+++ b/src/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/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py
index 0aeb3e7..6e3965e 100644
--- a/src/engine/SCons/Tool/MSCommon/vc.py
+++ b/src/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/src/engine/SCons/Tool/MSCommon/vs.py b/src/engine/SCons/Tool/MSCommon/vs.py
index 529d443..ee53e51 100644
--- a/src/engine/SCons/Tool/MSCommon/vs.py
+++ b/src/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/src/engine/SCons/Tool/Perforce.py b/src/engine/SCons/Tool/Perforce.py
index 9ae64b8..40192d0 100644
--- a/src/engine/SCons/Tool/Perforce.py
+++ b/src/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/src/engine/SCons/Tool/Perforce.xml b/src/engine/SCons/Tool/Perforce.xml
index 740977b..cc0f801 100644
--- a/src/engine/SCons/Tool/Perforce.xml
+++ b/src/engine/SCons/Tool/Perforce.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
@@ -45,3 +45,46 @@ If this is not set, then &cv-link-P4COM; (the command line) is displayed.
General options that are passed to Perforce.
</summary>
</cvar>
+
+<scons_function name="Perforce">
+<arguments signature="env">
+()
+</arguments>
+<summary>
+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
+&f-SourceCode;
+function.
+
+This function is deprecated. For details, see the entry for the
+&f-SourceCode;
+function.
+
+Example:
+
+<example>
+env.SourceCode('.', env.Perforce())
+</example>
+
+Perforce uses a number of external
+environment variables for its operation.
+Consequently, this function adds the
+following variables from the user's external environment
+to the construction environment's
+ENV dictionary:
+P4CHARSET,
+P4CLIENT,
+P4LANGUAGE,
+P4PASSWD,
+P4PORT,
+P4USER,
+SystemRoot,
+USER,
+and
+USERNAME.
+</summary>
+</scons_function>
diff --git a/src/engine/SCons/Tool/PharLapCommon.py b/src/engine/SCons/Tool/PharLapCommon.py
index 7d7a022..6f53400 100644
--- a/src/engine/SCons/Tool/PharLapCommon.py
+++ b/src/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/src/engine/SCons/Tool/PharLapCommonTests.py b/src/engine/SCons/Tool/PharLapCommonTests.py
index 1a8ee33..118bc47 100644
--- a/src/engine/SCons/Tool/PharLapCommonTests.py
+++ b/src/engine/SCons/Tool/PharLapCommonTests.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/PharLapCommonTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/PharLapCommonTests.py 5357 2011/09/09 21:31:03 bdeegan"
import unittest
import os.path
diff --git a/src/engine/SCons/Tool/RCS.py b/src/engine/SCons/Tool/RCS.py
index 10e3e71..b6ff0b5 100644
--- a/src/engine/SCons/Tool/RCS.py
+++ b/src/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/src/engine/SCons/Tool/RCS.xml b/src/engine/SCons/Tool/RCS.xml
index a8049e6..6942164 100644
--- a/src/engine/SCons/Tool/RCS.xml
+++ b/src/engine/SCons/Tool/RCS.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
@@ -59,3 +59,43 @@ If this is not set, then &cv-link-RCS_COCOM;
Options that are passed to the &cv-link-RCS_CO; command.
</summary>
</cvar>
+
+<scons_function name="RCS">
+<arguments signature="env">
+()
+</arguments>
+<summary>
+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
+&f-SourceCode;
+function:
+
+This function is deprecated. For details, see the entry for the
+&f-SourceCode;
+function.
+
+Examples:
+
+<example>
+env.SourceCode('.', env.RCS())
+</example>
+
+Note that
+&scons;
+will fetch source files
+from RCS subdirectories automatically,
+so configuring RCS
+as demonstrated in the above example
+should only be necessary if
+you are fetching from
+RCS,v
+files in the same
+directory as the source files,
+or if you need to explicitly specify RCS
+for a specific subdirectory.
+</summary>
+</scons_function>
diff --git a/src/engine/SCons/Tool/SCCS.py b/src/engine/SCons/Tool/SCCS.py
index 1cedb0a..666eb3c 100644
--- a/src/engine/SCons/Tool/SCCS.py
+++ b/src/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/src/engine/SCons/Tool/SCCS.xml b/src/engine/SCons/Tool/SCCS.xml
index 3d16eee..e8aa066 100644
--- a/src/engine/SCons/Tool/SCCS.xml
+++ b/src/engine/SCons/Tool/SCCS.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
@@ -56,3 +56,39 @@ This can be set, for example, to
to check out editable files from SCCS.
</summary>
</cvar>
+
+<scons_function name="SCCS">
+<arguments signature="env">
+()
+</arguments>
+<summary>
+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
+&f-link-SourceCode;
+function.
+
+Example:
+
+<example>
+env.SourceCode('.', env.SCCS())
+</example>
+
+Note that
+&scons;
+will fetch source files
+from SCCS subdirectories automatically,
+so configuring SCCS
+as demonstrated in the above example
+should only be necessary if
+you are fetching from
+<filename>s.SCCS</filename>
+files in the same
+directory as the source files,
+or if you need to explicitly specify SCCS
+for a specific subdirectory.
+</summary>
+</scons_function>
diff --git a/src/engine/SCons/Tool/Subversion.py b/src/engine/SCons/Tool/Subversion.py
index 5708184..37377ed 100644
--- a/src/engine/SCons/Tool/Subversion.py
+++ b/src/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/src/engine/SCons/Tool/Subversion.xml b/src/engine/SCons/Tool/Subversion.xml
index d0d0e74..5e36259 100644
--- a/src/engine/SCons/Tool/Subversion.xml
+++ b/src/engine/SCons/Tool/Subversion.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
@@ -45,3 +45,54 @@ General options that are passed to Subversion.
</summary>
</cvar>
-->
+
+<!--
+<scons_function name="Subversion">
+<arguments signature="global">
+(repository, module)
+</arguments>
+<summary>
+A factory function that
+returns a Builder object
+to be used to fetch source files
+from the specified Subversion
+<varname>repository</varname>.
+The returned Builder
+is intended to be passed to the
+&f-link-SourceCode;
+function.
+
+The optional specified
+<varname>module</varname>
+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, see the entry for the
+&f-SourceCode;
+function.
+
+Example:
+
+<example>
+# 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'))
+</example>
+</summary>
+</scons_function>
+-->
diff --git a/src/engine/SCons/Tool/ToolTests.py b/src/engine/SCons/Tool/ToolTests.py
index 0817fa8..4c00932 100644
--- a/src/engine/SCons/Tool/ToolTests.py
+++ b/src/engine/SCons/Tool/ToolTests.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/ToolTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/ToolTests.py 5357 2011/09/09 21:31:03 bdeegan"
import sys
import unittest
diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py
index 416d8de..ba90b06 100644
--- a/src/engine/SCons/Tool/__init__.py
+++ b/src/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/src/engine/SCons/Tool/__init__.xml b/src/engine/SCons/Tool/__init__.xml
index a8a8507..788d096 100644
--- a/src/engine/SCons/Tool/__init__.xml
+++ b/src/engine/SCons/Tool/__init__.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
@@ -365,3 +365,21 @@ SCons also treats
as C++ files.
</summary>
</cvar>
+
+<cvar name="LIBEMITTER">
+<summary>
+TODO
+</summary>
+</cvar>
+
+<cvar name="SHLIBEMITTER">
+<summary>
+TODO
+</summary>
+</cvar>
+
+<cvar name="PROGEMITTER">
+<summary>
+TODO
+</summary>
+</cvar>
diff --git a/src/engine/SCons/Tool/aixc++.py b/src/engine/SCons/Tool/aixc++.py
index bc2d0e8..93f8e9e 100644
--- a/src/engine/SCons/Tool/aixc++.py
+++ b/src/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/src/engine/SCons/Tool/aixc++.xml b/src/engine/SCons/Tool/aixc++.xml
index 74c9807..9625b9b 100644
--- a/src/engine/SCons/Tool/aixc++.xml
+++ b/src/engine/SCons/Tool/aixc++.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/aixcc.py b/src/engine/SCons/Tool/aixcc.py
index c1dcb16..230bfb3 100644
--- a/src/engine/SCons/Tool/aixcc.py
+++ b/src/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/src/engine/SCons/Tool/aixcc.xml b/src/engine/SCons/Tool/aixcc.xml
index c2e22da..6de042f 100644
--- a/src/engine/SCons/Tool/aixcc.xml
+++ b/src/engine/SCons/Tool/aixcc.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/aixf77.py b/src/engine/SCons/Tool/aixf77.py
index 477ec30..2348851 100644
--- a/src/engine/SCons/Tool/aixf77.py
+++ b/src/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/src/engine/SCons/Tool/aixf77.xml b/src/engine/SCons/Tool/aixf77.xml
index d13141b..d0fc696 100644
--- a/src/engine/SCons/Tool/aixf77.xml
+++ b/src/engine/SCons/Tool/aixf77.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/aixlink.py b/src/engine/SCons/Tool/aixlink.py
index eba4916..473c6b8 100644
--- a/src/engine/SCons/Tool/aixlink.py
+++ b/src/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/src/engine/SCons/Tool/aixlink.xml b/src/engine/SCons/Tool/aixlink.xml
index 1edf052..33d3353 100644
--- a/src/engine/SCons/Tool/aixlink.xml
+++ b/src/engine/SCons/Tool/aixlink.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/applelink.py b/src/engine/SCons/Tool/applelink.py
index a23a437..e989b03 100644
--- a/src/engine/SCons/Tool/applelink.py
+++ b/src/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/src/engine/SCons/Tool/applelink.xml b/src/engine/SCons/Tool/applelink.xml
index ef7574a..82c5eff 100644
--- a/src/engine/SCons/Tool/applelink.xml
+++ b/src/engine/SCons/Tool/applelink.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/ar.py b/src/engine/SCons/Tool/ar.py
index dab9586..dcb2676 100644
--- a/src/engine/SCons/Tool/ar.py
+++ b/src/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/src/engine/SCons/Tool/ar.xml b/src/engine/SCons/Tool/ar.xml
index d15623a..c48a87c 100644
--- a/src/engine/SCons/Tool/ar.xml
+++ b/src/engine/SCons/Tool/ar.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/as.py b/src/engine/SCons/Tool/as.py
index 7d5f872..1b1187a 100644
--- a/src/engine/SCons/Tool/as.py
+++ b/src/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/src/engine/SCons/Tool/as.xml b/src/engine/SCons/Tool/as.xml
index bb59f41..cf0db33 100644
--- a/src/engine/SCons/Tool/as.xml
+++ b/src/engine/SCons/Tool/as.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/bcc32.py b/src/engine/SCons/Tool/bcc32.py
index 664c3de..580aa72 100644
--- a/src/engine/SCons/Tool/bcc32.py
+++ b/src/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/src/engine/SCons/Tool/bcc32.xml b/src/engine/SCons/Tool/bcc32.xml
index 717232b..c2e5f87 100644
--- a/src/engine/SCons/Tool/bcc32.xml
+++ b/src/engine/SCons/Tool/bcc32.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/c++.py b/src/engine/SCons/Tool/c++.py
index e19523b..6667d06 100644
--- a/src/engine/SCons/Tool/c++.py
+++ b/src/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/src/engine/SCons/Tool/c++.xml b/src/engine/SCons/Tool/c++.xml
index 9394fb4..decd9a6 100644
--- a/src/engine/SCons/Tool/c++.xml
+++ b/src/engine/SCons/Tool/c++.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/cc.py b/src/engine/SCons/Tool/cc.py
index 291673f..4501457 100644
--- a/src/engine/SCons/Tool/cc.py
+++ b/src/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/src/engine/SCons/Tool/cc.xml b/src/engine/SCons/Tool/cc.xml
index ffeba4b..d10d34f 100644
--- a/src/engine/SCons/Tool/cc.xml
+++ b/src/engine/SCons/Tool/cc.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/cvf.py b/src/engine/SCons/Tool/cvf.py
index 7c2114d..cb8da4f 100644
--- a/src/engine/SCons/Tool/cvf.py
+++ b/src/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/src/engine/SCons/Tool/cvf.xml b/src/engine/SCons/Tool/cvf.xml
index 1ee6f08..4c1920e 100644
--- a/src/engine/SCons/Tool/cvf.xml
+++ b/src/engine/SCons/Tool/cvf.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/default.py b/src/engine/SCons/Tool/default.py
index ddd5c34..552de36 100644
--- a/src/engine/SCons/Tool/default.py
+++ b/src/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/src/engine/SCons/Tool/default.xml b/src/engine/SCons/Tool/default.xml
index 3469287..4470b53 100644
--- a/src/engine/SCons/Tool/default.xml
+++ b/src/engine/SCons/Tool/default.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/dmd.py b/src/engine/SCons/Tool/dmd.py
index 2a48b95..fc83194 100644
--- a/src/engine/SCons/Tool/dmd.py
+++ b/src/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/src/engine/SCons/Tool/dmd.xml b/src/engine/SCons/Tool/dmd.xml
index 7782275..82e89e7 100644
--- a/src/engine/SCons/Tool/dmd.xml
+++ b/src/engine/SCons/Tool/dmd.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/dvi.py b/src/engine/SCons/Tool/dvi.py
index 6fcb96d..204821b 100644
--- a/src/engine/SCons/Tool/dvi.py
+++ b/src/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/src/engine/SCons/Tool/dvi.xml b/src/engine/SCons/Tool/dvi.xml
index acf509b..14d3720 100644
--- a/src/engine/SCons/Tool/dvi.xml
+++ b/src/engine/SCons/Tool/dvi.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/dvipdf.py b/src/engine/SCons/Tool/dvipdf.py
index fb5627e..0347d2c 100644
--- a/src/engine/SCons/Tool/dvipdf.py
+++ b/src/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/src/engine/SCons/Tool/dvipdf.xml b/src/engine/SCons/Tool/dvipdf.xml
index 7444bba..3eebcff 100644
--- a/src/engine/SCons/Tool/dvipdf.xml
+++ b/src/engine/SCons/Tool/dvipdf.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/dvips.py b/src/engine/SCons/Tool/dvips.py
index de84053..02f8e49 100644
--- a/src/engine/SCons/Tool/dvips.py
+++ b/src/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/src/engine/SCons/Tool/dvips.xml b/src/engine/SCons/Tool/dvips.xml
index 77a3bc4..abbc48c 100644
--- a/src/engine/SCons/Tool/dvips.xml
+++ b/src/engine/SCons/Tool/dvips.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/f03.py b/src/engine/SCons/Tool/f03.py
new file mode 100644
index 0000000..896c03b
--- /dev/null
+++ b/src/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/src/engine/SCons/Tool/f03.xml b/src/engine/SCons/Tool/f03.xml
new file mode 100644
index 0000000..ff83a8a
--- /dev/null
+++ b/src/engine/SCons/Tool/f03.xml
@@ -0,0 +1,252 @@
+<!--
+Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
+
+This file is processed by the bin/SConsDoc.py module.
+See its __doc__ string for a discussion of the format.
+-->
+<tool name="f03">
+<summary>
+Set construction variables for generic POSIX Fortran 03 compilers.
+</summary>
+<sets>
+F03
+F03FLAGS
+F03COM
+F03PPCOM
+SHF03
+SHF03FLAGS
+SHF03COM
+SHF03PPCOM
+_F03INCFLAGS
+</sets>
+<uses>
+F03COMSTR
+F03PPCOMSTR
+SHF03COMSTR
+SHF03PPCOMSTR
+</uses>
+</tool>
+
+<cvar name="F03">
+<summary>
+The Fortran 03 compiler.
+You should normally set the &cv-link-FORTRAN; variable,
+which specifies the default Fortran compiler
+for all Fortran versions.
+You only need to set &cv-link-F03; if you need to use a specific compiler
+or compiler version for Fortran 03 files.
+</summary>
+</cvar>
+
+<cvar name="F03COM">
+<summary>
+The command line used to compile a Fortran 03 source file to an object file.
+You only need to set &cv-link-F03COM; if you need to use a specific
+command line for Fortran 03 files.
+You should normally set the &cv-link-FORTRANCOM; variable,
+which specifies the default command line
+for all Fortran versions.
+</summary>
+</cvar>
+
+<cvar name="F03COMSTR">
+<summary>
+The string displayed when a Fortran 03 source file
+is compiled to an object file.
+If this is not set, then &cv-link-F03COM; or &cv-link-FORTRANCOM;
+(the command line) is displayed.
+</summary>
+</cvar>
+
+<cvar name="F03FILESUFFIXES">
+<summary>
+The list of file extensions for which the F03 dialect will be used. By
+default, this is ['.f03']
+</summary>
+</cvar>
+
+<cvar name="F03PPFILESUFFIXES">
+<summary>
+The list of file extensions for which the compilation + preprocessor pass for
+F03 dialect will be used. By default, this is empty
+</summary>
+</cvar>
+
+<cvar name="F03FLAGS">
+<summary>
+General user-specified options that are passed to the Fortran 03 compiler.
+Note that this variable does
+<emphasis>not</emphasis>
+contain
+<option>-I</option>
+(or similar) include search path options
+that scons generates automatically from &cv-link-F03PATH;.
+See
+&cv-link-_F03INCFLAGS;
+below,
+for the variable that expands to those options.
+You only need to set &cv-link-F03FLAGS; if you need to define specific
+user options for Fortran 03 files.
+You should normally set the &cv-link-FORTRANFLAGS; variable,
+which specifies the user-specified options
+passed to the default Fortran compiler
+for all Fortran versions.
+</summary>
+</cvar>
+
+<cvar name="_F03INCFLAGS">
+<summary>
+An automatically-generated construction variable
+containing the Fortran 03 compiler command-line options
+for specifying directories to be searched for include files.
+The value of &cv-link-_F03INCFLAGS; is created
+by appending &cv-link-INCPREFIX; and &cv-link-INCSUFFIX;
+to the beginning and end
+of each directory in &cv-link-F03PATH;.
+</summary>
+</cvar>
+
+<cvar name="F03PATH">
+<summary>
+The list of directories that the Fortran 03 compiler will search for include
+directories. The implicit dependency scanner will search these
+directories for include files. Don't explicitly put include directory
+arguments in &cv-link-F03FLAGS; because the result will be non-portable
+and the directories will not be searched by the dependency scanner. Note:
+directory names in &cv-link-F03PATH; will be looked-up relative to the SConscript
+directory when they are used in a command. To force
+&scons;
+to look-up a directory relative to the root of the source tree use #:
+You only need to set &cv-link-F03PATH; if you need to define a specific
+include path for Fortran 03 files.
+You should normally set the &cv-link-FORTRANPATH; variable,
+which specifies the include path
+for the default Fortran compiler
+for all Fortran versions.
+
+<example>
+env = Environment(F03PATH='#/include')
+</example>
+
+The directory look-up can also be forced using the
+&Dir;()
+function:
+
+<example>
+include = Dir('include')
+env = Environment(F03PATH=include)
+</example>
+
+The directory list will be added to command lines
+through the automatically-generated
+&cv-link-_F03INCFLAGS;
+construction variable,
+which is constructed by
+appending the values of the
+&cv-link-INCPREFIX; and &cv-link-INCSUFFIX;
+construction variables
+to the beginning and end
+of each directory in &cv-link-F03PATH;.
+Any command lines you define that need
+the F03PATH directory list should
+include &cv-link-_F03INCFLAGS;:
+
+<example>
+env = Environment(F03COM="my_compiler $_F03INCFLAGS -c -o $TARGET $SOURCE")
+</example>
+</summary>
+</cvar>
+
+<cvar name="F03PPCOM">
+<summary>
+The command line used to compile a Fortran 03 source file to an object file
+after first running the file through the C preprocessor.
+Any options specified in the &cv-link-F03FLAGS; and &cv-link-CPPFLAGS; construction variables
+are included on this command line.
+You only need to set &cv-link-F03PPCOM; if you need to use a specific
+C-preprocessor command line for Fortran 03 files.
+You should normally set the &cv-link-FORTRANPPCOM; variable,
+which specifies the default C-preprocessor command line
+for all Fortran versions.
+</summary>
+</cvar>
+
+<cvar name="F03PPCOMSTR">
+<summary>
+The string displayed when a Fortran 03 source file
+is compiled to an object file
+after first running the file through the C preprocessor.
+If this is not set, then &cv-link-F03PPCOM; or &cv-link-FORTRANPPCOM;
+(the command line) is displayed.
+</summary>
+</cvar>
+
+<cvar name="SHF03">
+<summary>
+The Fortran 03 compiler used for generating shared-library objects.
+You should normally set the &cv-link-SHFORTRAN; variable,
+which specifies the default Fortran compiler
+for all Fortran versions.
+You only need to set &cv-link-SHF03; if you need to use a specific compiler
+or compiler version for Fortran 03 files.
+</summary>
+</cvar>
+
+<cvar name="SHF03COM">
+<summary>
+The command line used to compile a Fortran 03 source file
+to a shared-library object file.
+You only need to set &cv-link-SHF03COM; if you need to use a specific
+command line for Fortran 03 files.
+You should normally set the &cv-link-SHFORTRANCOM; variable,
+which specifies the default command line
+for all Fortran versions.
+</summary>
+</cvar>
+
+<cvar name="SHF03COMSTR">
+<summary>
+The string displayed when a Fortran 03 source file
+is compiled to a shared-library object file.
+If this is not set, then &cv-link-SHF03COM; or &cv-link-SHFORTRANCOM;
+(the command line) is displayed.
+</summary>
+</cvar>
+
+<cvar name="SHF03FLAGS">
+<summary>
+Options that are passed to the Fortran 03 compiler
+to generated shared-library objects.
+You only need to set &cv-link-SHF03FLAGS; if you need to define specific
+user options for Fortran 03 files.
+You should normally set the &cv-link-SHFORTRANFLAGS; variable,
+which specifies the user-specified options
+passed to the default Fortran compiler
+for all Fortran versions.
+</summary>
+</cvar>
+
+<cvar name="SHF03PPCOM">
+<summary>
+The command line used to compile a Fortran 03 source file to a
+shared-library object file
+after first running the file through the C preprocessor.
+Any options specified in the &cv-link-SHF03FLAGS; and &cv-link-CPPFLAGS; construction variables
+are included on this command line.
+You only need to set &cv-link-SHF03PPCOM; if you need to use a specific
+C-preprocessor command line for Fortran 03 files.
+You should normally set the &cv-link-SHFORTRANPPCOM; variable,
+which specifies the default C-preprocessor command line
+for all Fortran versions.
+</summary>
+</cvar>
+
+<cvar name="SHF03PPCOMSTR">
+<summary>
+The string displayed when a Fortran 03 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 &cv-link-SHF03PPCOM; or &cv-link-SHFORTRANPPCOM;
+(the command line) is displayed.
+</summary>
+</cvar>
diff --git a/src/engine/SCons/Tool/f77.py b/src/engine/SCons/Tool/f77.py
index cc2c852..db538d8 100644
--- a/src/engine/SCons/Tool/f77.py
+++ b/src/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/src/engine/SCons/Tool/f77.xml b/src/engine/SCons/Tool/f77.xml
index f498898..1d0623c 100644
--- a/src/engine/SCons/Tool/f77.xml
+++ b/src/engine/SCons/Tool/f77.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/f90.py b/src/engine/SCons/Tool/f90.py
index a2c6147..bb7e381 100644
--- a/src/engine/SCons/Tool/f90.py
+++ b/src/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/src/engine/SCons/Tool/f90.xml b/src/engine/SCons/Tool/f90.xml
index d598a24..8ebbfc3 100644
--- a/src/engine/SCons/Tool/f90.xml
+++ b/src/engine/SCons/Tool/f90.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/f95.py b/src/engine/SCons/Tool/f95.py
index cadf23e..06fcc78 100644
--- a/src/engine/SCons/Tool/f95.py
+++ b/src/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/src/engine/SCons/Tool/f95.xml b/src/engine/SCons/Tool/f95.xml
index 247f511..d50c654 100644
--- a/src/engine/SCons/Tool/f95.xml
+++ b/src/engine/SCons/Tool/f95.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/filesystem.py b/src/engine/SCons/Tool/filesystem.py
index 290d8d5..a91aeb1 100644
--- a/src/engine/SCons/Tool/filesystem.py
+++ b/src/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/src/engine/SCons/Tool/fortran.py b/src/engine/SCons/Tool/fortran.py
index ae0960a..b955e7c 100644
--- a/src/engine/SCons/Tool/fortran.py
+++ b/src/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/src/engine/SCons/Tool/fortran.xml b/src/engine/SCons/Tool/fortran.xml
index 02e0cb8..76077af 100644
--- a/src/engine/SCons/Tool/fortran.xml
+++ b/src/engine/SCons/Tool/fortran.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/g++.py b/src/engine/SCons/Tool/g++.py
index dcd2406..c2ded0f 100644
--- a/src/engine/SCons/Tool/g++.py
+++ b/src/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/src/engine/SCons/Tool/g++.xml b/src/engine/SCons/Tool/g++.xml
index 5036606..0a73f92 100644
--- a/src/engine/SCons/Tool/g++.xml
+++ b/src/engine/SCons/Tool/g++.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/g77.py b/src/engine/SCons/Tool/g77.py
index f5bea8b..9ff3df6 100644
--- a/src/engine/SCons/Tool/g77.py
+++ b/src/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/src/engine/SCons/Tool/g77.xml b/src/engine/SCons/Tool/g77.xml
index 42e46e7..fc32cb2 100644
--- a/src/engine/SCons/Tool/g77.xml
+++ b/src/engine/SCons/Tool/g77.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/gas.py b/src/engine/SCons/Tool/gas.py
index 637a111..0a5ed9f 100644
--- a/src/engine/SCons/Tool/gas.py
+++ b/src/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/src/engine/SCons/Tool/gas.xml b/src/engine/SCons/Tool/gas.xml
index 70b67f2..bdfa35b 100644
--- a/src/engine/SCons/Tool/gas.xml
+++ b/src/engine/SCons/Tool/gas.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/gcc.py b/src/engine/SCons/Tool/gcc.py
index c93c05f..d8d18bc 100644
--- a/src/engine/SCons/Tool/gcc.py
+++ b/src/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/src/engine/SCons/Tool/gcc.xml b/src/engine/SCons/Tool/gcc.xml
index a36a849..09921bc 100644
--- a/src/engine/SCons/Tool/gcc.xml
+++ b/src/engine/SCons/Tool/gcc.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/gfortran.py b/src/engine/SCons/Tool/gfortran.py
index ed522f4..143af4c 100644
--- a/src/engine/SCons/Tool/gfortran.py
+++ b/src/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/src/engine/SCons/Tool/gfortran.xml b/src/engine/SCons/Tool/gfortran.xml
index 6fcc722..a6a6850 100644
--- a/src/engine/SCons/Tool/gfortran.xml
+++ b/src/engine/SCons/Tool/gfortran.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/gnulink.py b/src/engine/SCons/Tool/gnulink.py
index 1204535..a80611e 100644
--- a/src/engine/SCons/Tool/gnulink.py
+++ b/src/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/src/engine/SCons/Tool/gnulink.xml b/src/engine/SCons/Tool/gnulink.xml
index 3112ae1..bfd5620 100644
--- a/src/engine/SCons/Tool/gnulink.xml
+++ b/src/engine/SCons/Tool/gnulink.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/gs.py b/src/engine/SCons/Tool/gs.py
index ac0247f..fbcb782 100644
--- a/src/engine/SCons/Tool/gs.py
+++ b/src/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/src/engine/SCons/Tool/gs.xml b/src/engine/SCons/Tool/gs.xml
index 71ad4a6..bc64994 100644
--- a/src/engine/SCons/Tool/gs.xml
+++ b/src/engine/SCons/Tool/gs.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/hpc++.py b/src/engine/SCons/Tool/hpc++.py
index d34f600..d2bb579 100644
--- a/src/engine/SCons/Tool/hpc++.py
+++ b/src/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/src/engine/SCons/Tool/hpc++.xml b/src/engine/SCons/Tool/hpc++.xml
index b0e962c..96064ed 100644
--- a/src/engine/SCons/Tool/hpc++.xml
+++ b/src/engine/SCons/Tool/hpc++.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/hpcc.py b/src/engine/SCons/Tool/hpcc.py
index 1503c57..38ae2f2 100644
--- a/src/engine/SCons/Tool/hpcc.py
+++ b/src/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/src/engine/SCons/Tool/hpcc.xml b/src/engine/SCons/Tool/hpcc.xml
index 9425c39..ce8a50b 100644
--- a/src/engine/SCons/Tool/hpcc.xml
+++ b/src/engine/SCons/Tool/hpcc.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/hplink.py b/src/engine/SCons/Tool/hplink.py
index db5ff00..5ebe94d 100644
--- a/src/engine/SCons/Tool/hplink.py
+++ b/src/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/src/engine/SCons/Tool/hplink.xml b/src/engine/SCons/Tool/hplink.xml
index c8065fe..cfb32ec 100644
--- a/src/engine/SCons/Tool/hplink.xml
+++ b/src/engine/SCons/Tool/hplink.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/icc.py b/src/engine/SCons/Tool/icc.py
index 0accbf6..10111ec 100644
--- a/src/engine/SCons/Tool/icc.py
+++ b/src/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/src/engine/SCons/Tool/icc.xml b/src/engine/SCons/Tool/icc.xml
index cb9b373..9b334a2 100644
--- a/src/engine/SCons/Tool/icc.xml
+++ b/src/engine/SCons/Tool/icc.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/icl.py b/src/engine/SCons/Tool/icl.py
index ded400d..1ef7d3a 100644
--- a/src/engine/SCons/Tool/icl.py
+++ b/src/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/src/engine/SCons/Tool/icl.xml b/src/engine/SCons/Tool/icl.xml
index 8972a84..3b43508 100644
--- a/src/engine/SCons/Tool/icl.xml
+++ b/src/engine/SCons/Tool/icl.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/ifl.py b/src/engine/SCons/Tool/ifl.py
index fabf864..dac5670 100644
--- a/src/engine/SCons/Tool/ifl.py
+++ b/src/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/src/engine/SCons/Tool/ifl.xml b/src/engine/SCons/Tool/ifl.xml
index 2239fbe..939b300 100644
--- a/src/engine/SCons/Tool/ifl.xml
+++ b/src/engine/SCons/Tool/ifl.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/ifort.py b/src/engine/SCons/Tool/ifort.py
index 7d50c5a..c6768e9 100644
--- a/src/engine/SCons/Tool/ifort.py
+++ b/src/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/src/engine/SCons/Tool/ifort.xml b/src/engine/SCons/Tool/ifort.xml
index 35dbc4c..2be2d95 100644
--- a/src/engine/SCons/Tool/ifort.xml
+++ b/src/engine/SCons/Tool/ifort.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/ilink.py b/src/engine/SCons/Tool/ilink.py
index 7a255a7..73d7622 100644
--- a/src/engine/SCons/Tool/ilink.py
+++ b/src/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/src/engine/SCons/Tool/ilink.xml b/src/engine/SCons/Tool/ilink.xml
index 557d11c..44859cf 100644
--- a/src/engine/SCons/Tool/ilink.xml
+++ b/src/engine/SCons/Tool/ilink.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/ilink32.py b/src/engine/SCons/Tool/ilink32.py
index 1af9af1..ebdf435 100644
--- a/src/engine/SCons/Tool/ilink32.py
+++ b/src/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/src/engine/SCons/Tool/ilink32.xml b/src/engine/SCons/Tool/ilink32.xml
index 39acc11..ae890e9 100644
--- a/src/engine/SCons/Tool/ilink32.xml
+++ b/src/engine/SCons/Tool/ilink32.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/install.py b/src/engine/SCons/Tool/install.py
index 9c04710..58e2dc7 100644
--- a/src/engine/SCons/Tool/install.py
+++ b/src/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/src/engine/SCons/Tool/install.xml b/src/engine/SCons/Tool/install.xml
index 9efaff5..dfed350 100644
--- a/src/engine/SCons/Tool/install.xml
+++ b/src/engine/SCons/Tool/install.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/intelc.py b/src/engine/SCons/Tool/intelc.py
index 08f97c0..552fada 100644
--- a/src/engine/SCons/Tool/intelc.py
+++ b/src/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/src/engine/SCons/Tool/intelc.xml b/src/engine/SCons/Tool/intelc.xml
index 22f8f96..34936b0 100644
--- a/src/engine/SCons/Tool/intelc.xml
+++ b/src/engine/SCons/Tool/intelc.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/ipkg.py b/src/engine/SCons/Tool/ipkg.py
index 7558bd2..2ad08ab 100644
--- a/src/engine/SCons/Tool/ipkg.py
+++ b/src/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/src/engine/SCons/Tool/jar.py b/src/engine/SCons/Tool/jar.py
index 21c5ce4..6ebd762 100644
--- a/src/engine/SCons/Tool/jar.py
+++ b/src/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/src/engine/SCons/Tool/jar.xml b/src/engine/SCons/Tool/jar.xml
index 3226b7f..74012a5 100644
--- a/src/engine/SCons/Tool/jar.xml
+++ b/src/engine/SCons/Tool/jar.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/javac.py b/src/engine/SCons/Tool/javac.py
index df3c030..5a43b25 100644
--- a/src/engine/SCons/Tool/javac.py
+++ b/src/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/src/engine/SCons/Tool/javac.xml b/src/engine/SCons/Tool/javac.xml
index a6c08b2..1e694c7 100644
--- a/src/engine/SCons/Tool/javac.xml
+++ b/src/engine/SCons/Tool/javac.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/javah.py b/src/engine/SCons/Tool/javah.py
index a022884..ccdfb3c 100644
--- a/src/engine/SCons/Tool/javah.py
+++ b/src/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/src/engine/SCons/Tool/javah.xml b/src/engine/SCons/Tool/javah.xml
index 2dc71e8..34d6012 100644
--- a/src/engine/SCons/Tool/javah.xml
+++ b/src/engine/SCons/Tool/javah.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/latex.py b/src/engine/SCons/Tool/latex.py
index 65ff78a..b746ad1 100644
--- a/src/engine/SCons/Tool/latex.py
+++ b/src/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/src/engine/SCons/Tool/latex.xml b/src/engine/SCons/Tool/latex.xml
index d53e118..e33fce7 100644
--- a/src/engine/SCons/Tool/latex.xml
+++ b/src/engine/SCons/Tool/latex.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/lex.py b/src/engine/SCons/Tool/lex.py
index 9344173..25f7c3b 100644
--- a/src/engine/SCons/Tool/lex.py
+++ b/src/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/src/engine/SCons/Tool/lex.xml b/src/engine/SCons/Tool/lex.xml
index 8ee5043..fb90280 100644
--- a/src/engine/SCons/Tool/lex.xml
+++ b/src/engine/SCons/Tool/lex.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/link.py b/src/engine/SCons/Tool/link.py
index 0210d7e..067099a 100644
--- a/src/engine/SCons/Tool/link.py
+++ b/src/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/src/engine/SCons/Tool/link.xml b/src/engine/SCons/Tool/link.xml
index f4e4922..412ccdd 100644
--- a/src/engine/SCons/Tool/link.xml
+++ b/src/engine/SCons/Tool/link.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/linkloc.py b/src/engine/SCons/Tool/linkloc.py
index 283eacb..d520100 100644
--- a/src/engine/SCons/Tool/linkloc.py
+++ b/src/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/src/engine/SCons/Tool/linkloc.xml b/src/engine/SCons/Tool/linkloc.xml
index df2f534..9ab4188 100644
--- a/src/engine/SCons/Tool/linkloc.xml
+++ b/src/engine/SCons/Tool/linkloc.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/m4.py b/src/engine/SCons/Tool/m4.py
index ac59e48..8d997a4 100644
--- a/src/engine/SCons/Tool/m4.py
+++ b/src/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/src/engine/SCons/Tool/m4.xml b/src/engine/SCons/Tool/m4.xml
index dcc77c8..3438553 100644
--- a/src/engine/SCons/Tool/m4.xml
+++ b/src/engine/SCons/Tool/m4.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/masm.py b/src/engine/SCons/Tool/masm.py
index 2d02440..bbed9bb 100644
--- a/src/engine/SCons/Tool/masm.py
+++ b/src/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/src/engine/SCons/Tool/masm.xml b/src/engine/SCons/Tool/masm.xml
index 1ddc2fc..4350489 100644
--- a/src/engine/SCons/Tool/masm.xml
+++ b/src/engine/SCons/Tool/masm.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/midl.py b/src/engine/SCons/Tool/midl.py
index 65a4f12..5381df3 100644
--- a/src/engine/SCons/Tool/midl.py
+++ b/src/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/src/engine/SCons/Tool/midl.xml b/src/engine/SCons/Tool/midl.xml
index 758313b..5d9216c 100644
--- a/src/engine/SCons/Tool/midl.xml
+++ b/src/engine/SCons/Tool/midl.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/mingw.py b/src/engine/SCons/Tool/mingw.py
index 4344bc1..1df68bc 100644
--- a/src/engine/SCons/Tool/mingw.py
+++ b/src/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/src/engine/SCons/Tool/mingw.xml b/src/engine/SCons/Tool/mingw.xml
index 517f375..0fe64dc 100644
--- a/src/engine/SCons/Tool/mingw.xml
+++ b/src/engine/SCons/Tool/mingw.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/mslib.py b/src/engine/SCons/Tool/mslib.py
index d3ed3dc..cbd1cd7 100644
--- a/src/engine/SCons/Tool/mslib.py
+++ b/src/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/src/engine/SCons/Tool/mslib.xml b/src/engine/SCons/Tool/mslib.xml
index 113ce48..a25bb6d 100644
--- a/src/engine/SCons/Tool/mslib.xml
+++ b/src/engine/SCons/Tool/mslib.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/mslink.py b/src/engine/SCons/Tool/mslink.py
index 1d1bc08..ac533c8 100644
--- a/src/engine/SCons/Tool/mslink.py
+++ b/src/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/src/engine/SCons/Tool/mslink.xml b/src/engine/SCons/Tool/mslink.xml
index fd1075b..1f9b9b9 100644
--- a/src/engine/SCons/Tool/mslink.xml
+++ b/src/engine/SCons/Tool/mslink.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
@@ -94,6 +94,43 @@ see the entry for that variable for specific examples.
</summary>
</cvar>
+<cvar name="WINDOWS_EMBED_MANIFEST">
+<summary>
+Set this variable to True or 1 to embed the compiler-generated manifest
+(normally <literal>${TARGET}.manifest</literal>)
+into all Windows exes and DLLs built with this environment,
+as a resource during their link step.
+This is done using &cv-link-MT; and &cv-link-MTEXECOM; and &cv-link-MTSHLIBCOM;.
+</summary>
+</cvar>
+
+<cvar name="MT">
+<summary>
+The program used on Windows systems to embed manifests into DLLs and EXEs.
+See also &cv-link-WINDOWS_EMBED_MANIFEST;.
+</summary>
+</cvar>
+
+<cvar name="MTFLAGS">
+<summary>
+Flags passed to the &cv-link-MT; manifest embedding program (Windows only).
+</summary>
+</cvar>
+
+<cvar name="MTEXECOM">
+<summary>
+The Windows command line used to embed manifests into executables.
+See also &cv-link-MTSHLIBCOM;.
+</summary>
+</cvar>
+
+<cvar name="MTSHLIBCOM">
+<summary>
+The Windows command line used to embed manifests into shared libraries (DLLs).
+See also &cv-link-MTEXECOM;.
+</summary>
+</cvar>
+
<cvar name="REGSVR">
<summary>
The program used on Windows systems
@@ -185,7 +222,7 @@ files generated by Microsoft Visua C/C++ 8.
<cvar name="WINDOWSDEFPREFIX">
<summary>
-The prefix used for Windows <filename>.def</filename>file names.
+The prefix used for Windows <filename>.def</filename> file names.
</summary>
</cvar>
diff --git a/src/engine/SCons/Tool/mssdk.py b/src/engine/SCons/Tool/mssdk.py
index 6b89873..500b792 100644
--- a/src/engine/SCons/Tool/mssdk.py
+++ b/src/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/src/engine/SCons/Tool/mssdk.xml b/src/engine/SCons/Tool/mssdk.xml
index c30c5b0..2449b82 100644
--- a/src/engine/SCons/Tool/mssdk.xml
+++ b/src/engine/SCons/Tool/mssdk.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/msvc.py b/src/engine/SCons/Tool/msvc.py
index 66c3e10..e8e20a6 100644
--- a/src/engine/SCons/Tool/msvc.py
+++ b/src/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/src/engine/SCons/Tool/msvc.xml b/src/engine/SCons/Tool/msvc.xml
index 9456730..985e385 100644
--- a/src/engine/SCons/Tool/msvc.xml
+++ b/src/engine/SCons/Tool/msvc.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py
index e6f07e5..c9b7970 100644
--- a/src/engine/SCons/Tool/msvs.py
+++ b/src/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/src/engine/SCons/Tool/msvs.xml b/src/engine/SCons/Tool/msvs.xml
index d97cff3..ca3bf03 100644
--- a/src/engine/SCons/Tool/msvs.xml
+++ b/src/engine/SCons/Tool/msvs.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
@@ -146,7 +146,7 @@ on the file name in compilation error messages
displayed in the Visual Studio console output window.
This can be remedied by adding the
Visual C/C++
-.B /FC
+<literal>/FC</literal>
compiler option to the &cv-link-CCFLAGS; variable
so that the compiler will print
the full path name of any
@@ -219,8 +219,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:
<example>
@@ -287,21 +285,6 @@ will generate an error.
</summary>
</cvar>
-<cvar name="MSVS_PROJECT_BASE_PATH">
-<summary>
-The string
-placed in a generated Microsoft Visual Studio solution file
-as the value of the
-<literal>SccProjectFilePathRelativizedFromConnection0</literal>
-and
-<literal>SccProjectFilePathRelativizedFromConnection1</literal>
-attributes of the
-<literal>GlobalSection(SourceCodeControl)</literal>
-section.
-There is no default value.
-</summary>
-</cvar>
-
<cvar name="MSVS_PROJECT_GUID">
<summary>
The string
@@ -309,12 +292,7 @@ placed in a generated Microsoft Visual Studio project file
as the value of the
<literal>ProjectGUID</literal>
attribute.
-The string is also placed in the
-<literal>SolutionUniqueID</literal>
-attribute of the
-<literal>GlobalSection(SourceCodeControl)</literal>
-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.
</summary>
</cvar>
@@ -332,24 +310,33 @@ There is no default value.
</summary>
</cvar>
-<cvar name="MSVS_SCC_LOCAL_PATH">
+<cvar name="MSVS_SCC_CONNECTION_ROOT">
<summary>
-The path name
-placed in a generated Microsoft Visual Studio project file
-as the value of the
+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
<literal>SccLocalPath</literal>
attribute
-if the
-<envar>MSVS_SCC_PROVIDER</envar>
-construction variable is also set.
-The path name is also placed in the
-<literal>SccLocalPath0</literal>
-and
-<literal>SccLocalPath1</literal>
+of the project file
+and as the values of the
+<literal>SccProjectFilePathRelativizedFromConnection[i]</literal>
+(where [i] ranges from 0 to the number of projects in the solution)
attributes of the
<literal>GlobalSection(SourceCodeControl)</literal>
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
+<literal>SccLocalPath[i]</literal>
+(where [i] ranges from 0 to the number of projects in the solution)
+attributes of the
+<literal>GlobalSection(SourceCodeControl)</literal>
+section of the Microsoft Visual Studio solution file.
+This is used only
+if the
+<envar>MSVS_SCC_PROVIDER</envar>
+construction variable is also set.
+The default value is the current working directory.
</summary>
</cvar>
@@ -359,7 +346,15 @@ The project name
placed in a generated Microsoft Visual Studio project file
as the value of the
<literal>SccProjectName</literal>
-attribute.
+attribute
+if the
+<envar>MSVS_SCC_PROVIDER</envar>
+construction variable is also set.
+In this case the string is also placed in the
+<literal>SccProjectName0</literal>
+attribute of the
+<literal>GlobalSection(SourceCodeControl)</literal>
+section of the Microsoft Visual Studio solution file.
There is no default value.
</summary>
</cvar>
@@ -372,7 +367,7 @@ as the value of the
<literal>SccProvider</literal>
attribute.
The string is also placed in the
-<literal>SccProvider1</literal>
+<literal>SccProvider0</literal>
attribute of the
<literal>GlobalSection(SourceCodeControl)</literal>
section of the Microsoft Visual Studio solution file.
diff --git a/src/engine/SCons/Tool/msvsTests.py b/src/engine/SCons/Tool/msvsTests.py
index e01793d..4bf30cd 100644
--- a/src/engine/SCons/Tool/msvsTests.py
+++ b/src/engine/SCons/Tool/msvsTests.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/msvsTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Tool/msvsTests.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import sys
@@ -475,18 +475,28 @@ class DummyRegistry(object):
self.parse(data)
def parse(self, data):
- parent = self.root
+ parents = [None, None]
+ parents[0] = self.root
keymatch = re.compile('^\[(.*)\]$')
valmatch = re.compile('^(?:"(.*)"|[@])="(.*)"$')
for line in data:
m1 = keymatch.match(line)
if m1:
- # add a key, set it to current parent
- parent = self.root.addKey(m1.group(1))
+ # add a key, set it to current parent.
+ # Also create subkey for Wow6432Node of HKLM\Software;
+ # that's where it looks on a 64-bit machine (tests will fail w/o this)
+ parents[0] = self.root.addKey(m1.group(1))
+ if 'HKEY_LOCAL_MACHINE\\Software' in m1.group(1):
+ p1 = m1.group(1).replace('HKEY_LOCAL_MACHINE\\Software', 'HKEY_LOCAL_MACHINE\\Software\\Wow6432Node')
+ parents[1] = self.root.addKey(p1)
+ else:
+ parents[1] = None
else:
m2 = valmatch.match(line)
if m2:
- parent.addValue(m2.group(1),m2.group(2))
+ for p in parents:
+ if p:
+ p.addValue(m2.group(1),m2.group(2))
def OpenKeyEx(self,root,key):
if root == SCons.Util.HKEY_CLASSES_ROOT:
@@ -690,7 +700,7 @@ class msvs80TestCase(msvsTestCase):
class msvsEmptyTestCase(msvsTestCase):
"""Test Empty Registry"""
registry = DummyRegistry(regdata_none)
- default_version = '9.0'
+ default_version = '10.0'
highest_version = None
number_of_versions = 0
install_locs = {
diff --git a/src/engine/SCons/Tool/mwcc.py b/src/engine/SCons/Tool/mwcc.py
index d61510e..849aa74 100644
--- a/src/engine/SCons/Tool/mwcc.py
+++ b/src/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/src/engine/SCons/Tool/mwcc.xml b/src/engine/SCons/Tool/mwcc.xml
index 3c93dae..4d01fa1 100644
--- a/src/engine/SCons/Tool/mwcc.xml
+++ b/src/engine/SCons/Tool/mwcc.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/mwld.py b/src/engine/SCons/Tool/mwld.py
index d881627..a8cf2a6 100644
--- a/src/engine/SCons/Tool/mwld.py
+++ b/src/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/src/engine/SCons/Tool/mwld.xml b/src/engine/SCons/Tool/mwld.xml
index 25432a9..0faf55d 100644
--- a/src/engine/SCons/Tool/mwld.xml
+++ b/src/engine/SCons/Tool/mwld.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/nasm.py b/src/engine/SCons/Tool/nasm.py
index d759e41..5641518 100644
--- a/src/engine/SCons/Tool/nasm.py
+++ b/src/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/src/engine/SCons/Tool/nasm.xml b/src/engine/SCons/Tool/nasm.xml
index 7e02d40..c7f7c0a 100644
--- a/src/engine/SCons/Tool/nasm.xml
+++ b/src/engine/SCons/Tool/nasm.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/packaging.xml b/src/engine/SCons/Tool/packaging.xml
index 2470c07..9514f25 100644
--- a/src/engine/SCons/Tool/packaging.xml
+++ b/src/engine/SCons/Tool/packaging.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/packaging/__init__.py b/src/engine/SCons/Tool/packaging/__init__.py
index 35029f2..9d1978b 100644
--- a/src/engine/SCons/Tool/packaging/__init__.py
+++ b/src/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/src/engine/SCons/Tool/packaging/__init__.xml b/src/engine/SCons/Tool/packaging/__init__.xml
index 3221e87..e4718dd 100644
--- a/src/engine/SCons/Tool/packaging/__init__.xml
+++ b/src/engine/SCons/Tool/packaging/__init__.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
@@ -502,7 +502,6 @@ field in the RPM
</cvar>
-
<!--
THE FOLLOWING AREN'T CONSTRUCTION VARIABLES,
@@ -627,24 +626,32 @@ TODO
-->
-<!--
-<builder name="Tag">
+<scons_function name="Tag">
+<arguments signature="global">
+(node, tags)
+</arguments>
<summary>
-Leaves hints for the Package() Builder on how specific
-files or directories should be packaged.
+Annotates file or directory Nodes with
+information about how the
+&b-link-Package;
+Builder should package those files or directories.
All tags are optional.
+Examples:
+
<example>
# makes sure the built library will be installed with 0644 file
# access mode
-Tag( Library( 'lib.c' ), unix-attr="0644" )
+Tag( Library( 'lib.c' ), UNIX_ATTR="0644" )
# marks file2.txt to be a documentation file
-Tag( 'file2.txt', doc )
+Tag( 'file2.txt', DOC )
</example>
</summary>
-</builder>
+</scons_function>
+
+<!--
<function name="FindSourceFiles">
<summary>
A convenience function which returns all leaves of the build tree.
diff --git a/src/engine/SCons/Tool/packaging/ipk.py b/src/engine/SCons/Tool/packaging/ipk.py
index 09fc779..2aaa722 100644
--- a/src/engine/SCons/Tool/packaging/ipk.py
+++ b/src/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/src/engine/SCons/Tool/packaging/msi.py b/src/engine/SCons/Tool/packaging/msi.py
index 4cc8071..ccb3596 100644
--- a/src/engine/SCons/Tool/packaging/msi.py
+++ b/src/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/src/engine/SCons/Tool/packaging/rpm.py b/src/engine/SCons/Tool/packaging/rpm.py
index a09457b..4baa016 100644
--- a/src/engine/SCons/Tool/packaging/rpm.py
+++ b/src/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/src/engine/SCons/Tool/packaging/src_tarbz2.py b/src/engine/SCons/Tool/packaging/src_tarbz2.py
index a6ea750..af7e9ce 100644
--- a/src/engine/SCons/Tool/packaging/src_tarbz2.py
+++ b/src/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/src/engine/SCons/Tool/packaging/src_targz.py b/src/engine/SCons/Tool/packaging/src_targz.py
index 7474ea6..202afa2 100644
--- a/src/engine/SCons/Tool/packaging/src_targz.py
+++ b/src/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/src/engine/SCons/Tool/packaging/src_zip.py b/src/engine/SCons/Tool/packaging/src_zip.py
index d81f54c..4efef3d 100644
--- a/src/engine/SCons/Tool/packaging/src_zip.py
+++ b/src/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/src/engine/SCons/Tool/packaging/tarbz2.py b/src/engine/SCons/Tool/packaging/tarbz2.py
index c01d7bc..3a3cbcb 100644
--- a/src/engine/SCons/Tool/packaging/tarbz2.py
+++ b/src/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/src/engine/SCons/Tool/packaging/targz.py b/src/engine/SCons/Tool/packaging/targz.py
index 6a3282d..9a742df 100644
--- a/src/engine/SCons/Tool/packaging/targz.py
+++ b/src/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/src/engine/SCons/Tool/packaging/zip.py b/src/engine/SCons/Tool/packaging/zip.py
index 462aa47..9749a6c 100644
--- a/src/engine/SCons/Tool/packaging/zip.py
+++ b/src/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/src/engine/SCons/Tool/pdf.py b/src/engine/SCons/Tool/pdf.py
index e022105..fb30cb8 100644
--- a/src/engine/SCons/Tool/pdf.py
+++ b/src/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/src/engine/SCons/Tool/pdf.xml b/src/engine/SCons/Tool/pdf.xml
index 9f26aec..af055ff 100644
--- a/src/engine/SCons/Tool/pdf.xml
+++ b/src/engine/SCons/Tool/pdf.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/pdflatex.py b/src/engine/SCons/Tool/pdflatex.py
index 203b635..40a120b 100644
--- a/src/engine/SCons/Tool/pdflatex.py
+++ b/src/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/src/engine/SCons/Tool/pdflatex.xml b/src/engine/SCons/Tool/pdflatex.xml
index 28b43ec..2096451 100644
--- a/src/engine/SCons/Tool/pdflatex.xml
+++ b/src/engine/SCons/Tool/pdflatex.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/pdftex.py b/src/engine/SCons/Tool/pdftex.py
index b31c966..8b72502 100644
--- a/src/engine/SCons/Tool/pdftex.py
+++ b/src/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/src/engine/SCons/Tool/pdftex.xml b/src/engine/SCons/Tool/pdftex.xml
index d9c4701..865634e 100644
--- a/src/engine/SCons/Tool/pdftex.xml
+++ b/src/engine/SCons/Tool/pdftex.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/qt.py b/src/engine/SCons/Tool/qt.py
index 7ce6c99..d0ff108 100644
--- a/src/engine/SCons/Tool/qt.py
+++ b/src/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/src/engine/SCons/Tool/qt.xml b/src/engine/SCons/Tool/qt.xml
index 1231c8d..9e0e5a5 100644
--- a/src/engine/SCons/Tool/qt.xml
+++ b/src/engine/SCons/Tool/qt.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
@@ -88,7 +88,7 @@ variables &cv-link-CPPPATH;,
&cv-link-LIBPATH; and
&cv-link-LIBS; may be modified
and the variables
-PROGEMITTER, SHLIBEMITTER and LIBEMITTER
+&cv-link-PROGEMITTER;, &cv-link-SHLIBEMITTER; and &cv-link-LIBEMITTER;
are modified. Because the build-performance is affected when using this tool,
you have to explicitly specify it at Environment creation:
@@ -104,8 +104,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
+&b-Moc();
+builder method.
<emphasis Role="strong">Automatic moc file generation from cxx files.</emphasis>
As stated in the qt documentation, include the moc file at the end of
diff --git a/src/engine/SCons/Tool/rmic.py b/src/engine/SCons/Tool/rmic.py
index 9262336..84266a7 100644
--- a/src/engine/SCons/Tool/rmic.py
+++ b/src/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/src/engine/SCons/Tool/rmic.xml b/src/engine/SCons/Tool/rmic.xml
index cf5c066..8135ee6 100644
--- a/src/engine/SCons/Tool/rmic.xml
+++ b/src/engine/SCons/Tool/rmic.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/rpcgen.py b/src/engine/SCons/Tool/rpcgen.py
index 46f1209..76f98f2 100644
--- a/src/engine/SCons/Tool/rpcgen.py
+++ b/src/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/src/engine/SCons/Tool/rpcgen.xml b/src/engine/SCons/Tool/rpcgen.xml
index 03c0a63..89bad6f 100644
--- a/src/engine/SCons/Tool/rpcgen.xml
+++ b/src/engine/SCons/Tool/rpcgen.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/rpm.py b/src/engine/SCons/Tool/rpm.py
index d9a661a..f6ae365 100644
--- a/src/engine/SCons/Tool/rpm.py
+++ b/src/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/src/engine/SCons/Tool/sgiar.py b/src/engine/SCons/Tool/sgiar.py
index b56de2b..3dcbdaf 100644
--- a/src/engine/SCons/Tool/sgiar.py
+++ b/src/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/src/engine/SCons/Tool/sgiar.xml b/src/engine/SCons/Tool/sgiar.xml
index dc77b1f..78778dc 100644
--- a/src/engine/SCons/Tool/sgiar.xml
+++ b/src/engine/SCons/Tool/sgiar.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/sgic++.py b/src/engine/SCons/Tool/sgic++.py
index 45c64cf..e67974d 100644
--- a/src/engine/SCons/Tool/sgic++.py
+++ b/src/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/src/engine/SCons/Tool/sgic++.xml b/src/engine/SCons/Tool/sgic++.xml
index b3a2a0c..26891dc 100644
--- a/src/engine/SCons/Tool/sgic++.xml
+++ b/src/engine/SCons/Tool/sgic++.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/sgicc.py b/src/engine/SCons/Tool/sgicc.py
index 27f8317..3f8af89 100644
--- a/src/engine/SCons/Tool/sgicc.py
+++ b/src/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/src/engine/SCons/Tool/sgicc.xml b/src/engine/SCons/Tool/sgicc.xml
index ed0c7f6..68ceae1 100644
--- a/src/engine/SCons/Tool/sgicc.xml
+++ b/src/engine/SCons/Tool/sgicc.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/sgilink.py b/src/engine/SCons/Tool/sgilink.py
index 7aef1fe..cb6658f 100644
--- a/src/engine/SCons/Tool/sgilink.py
+++ b/src/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/src/engine/SCons/Tool/sgilink.xml b/src/engine/SCons/Tool/sgilink.xml
index b93d7aa..24bf9c7 100644
--- a/src/engine/SCons/Tool/sgilink.xml
+++ b/src/engine/SCons/Tool/sgilink.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/sunar.py b/src/engine/SCons/Tool/sunar.py
index 30e5dd6..32641e0 100644
--- a/src/engine/SCons/Tool/sunar.py
+++ b/src/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/src/engine/SCons/Tool/sunar.xml b/src/engine/SCons/Tool/sunar.xml
index e1b6ae7..66f4ab9 100644
--- a/src/engine/SCons/Tool/sunar.xml
+++ b/src/engine/SCons/Tool/sunar.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/sunc++.py b/src/engine/SCons/Tool/sunc++.py
index d127e16..de404da 100644
--- a/src/engine/SCons/Tool/sunc++.py
+++ b/src/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/src/engine/SCons/Tool/sunc++.xml b/src/engine/SCons/Tool/sunc++.xml
index 0ebd76b..324f374 100644
--- a/src/engine/SCons/Tool/sunc++.xml
+++ b/src/engine/SCons/Tool/sunc++.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/suncc.py b/src/engine/SCons/Tool/suncc.py
index 14898c7..b937dc4 100644
--- a/src/engine/SCons/Tool/suncc.py
+++ b/src/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/src/engine/SCons/Tool/suncc.xml b/src/engine/SCons/Tool/suncc.xml
index 666c36e..aaba573 100644
--- a/src/engine/SCons/Tool/suncc.xml
+++ b/src/engine/SCons/Tool/suncc.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/sunf77.py b/src/engine/SCons/Tool/sunf77.py
index 499a3a7..4f22d56 100644
--- a/src/engine/SCons/Tool/sunf77.py
+++ b/src/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/src/engine/SCons/Tool/sunf77.xml b/src/engine/SCons/Tool/sunf77.xml
index a315b61..7ab6766 100644
--- a/src/engine/SCons/Tool/sunf77.xml
+++ b/src/engine/SCons/Tool/sunf77.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/sunf90.py b/src/engine/SCons/Tool/sunf90.py
index 9fa9191..f080085 100644
--- a/src/engine/SCons/Tool/sunf90.py
+++ b/src/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/src/engine/SCons/Tool/sunf90.xml b/src/engine/SCons/Tool/sunf90.xml
index 1a79eec..d2f0945 100644
--- a/src/engine/SCons/Tool/sunf90.xml
+++ b/src/engine/SCons/Tool/sunf90.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/sunf95.py b/src/engine/SCons/Tool/sunf95.py
index 13e5ef9..3e4351e 100644
--- a/src/engine/SCons/Tool/sunf95.py
+++ b/src/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/src/engine/SCons/Tool/sunf95.xml b/src/engine/SCons/Tool/sunf95.xml
index 7e76223..4e4b6f4 100644
--- a/src/engine/SCons/Tool/sunf95.xml
+++ b/src/engine/SCons/Tool/sunf95.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/sunlink.py b/src/engine/SCons/Tool/sunlink.py
index 502008d..3952baa 100644
--- a/src/engine/SCons/Tool/sunlink.py
+++ b/src/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/src/engine/SCons/Tool/sunlink.xml b/src/engine/SCons/Tool/sunlink.xml
index 407f6b1..95054dd 100644
--- a/src/engine/SCons/Tool/sunlink.xml
+++ b/src/engine/SCons/Tool/sunlink.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/swig.py b/src/engine/SCons/Tool/swig.py
index d02bbe8..c773cd5 100644
--- a/src/engine/SCons/Tool/swig.py
+++ b/src/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/src/engine/SCons/Tool/swig.xml b/src/engine/SCons/Tool/swig.xml
index 72be0c3..a8577a1 100644
--- a/src/engine/SCons/Tool/swig.xml
+++ b/src/engine/SCons/Tool/swig.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/tar.py b/src/engine/SCons/Tool/tar.py
index 55a405b..774312c 100644
--- a/src/engine/SCons/Tool/tar.py
+++ b/src/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/src/engine/SCons/Tool/tar.xml b/src/engine/SCons/Tool/tar.xml
index a27cb2f..906318f 100644
--- a/src/engine/SCons/Tool/tar.xml
+++ b/src/engine/SCons/Tool/tar.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/tex.py b/src/engine/SCons/Tool/tex.py
index 23226db..79da6be 100644
--- a/src/engine/SCons/Tool/tex.py
+++ b/src/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/src/engine/SCons/Tool/tex.xml b/src/engine/SCons/Tool/tex.xml
index 3cd7d87..7bcfb13 100644
--- a/src/engine/SCons/Tool/tex.xml
+++ b/src/engine/SCons/Tool/tex.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/textfile.py b/src/engine/SCons/Tool/textfile.py
index d4b1b0f..b849e71 100644
--- a/src/engine/SCons/Tool/textfile.py
+++ b/src/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/src/engine/SCons/Tool/textfile.xml b/src/engine/SCons/Tool/textfile.xml
index 61a25f1..0d2171f 100644
--- a/src/engine/SCons/Tool/textfile.xml
+++ b/src/engine/SCons/Tool/textfile.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/tlib.py b/src/engine/SCons/Tool/tlib.py
index 157c210..918d3cd 100644
--- a/src/engine/SCons/Tool/tlib.py
+++ b/src/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/src/engine/SCons/Tool/tlib.xml b/src/engine/SCons/Tool/tlib.xml
index 022a5f0..2e7b296 100644
--- a/src/engine/SCons/Tool/tlib.xml
+++ b/src/engine/SCons/Tool/tlib.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/wix.py b/src/engine/SCons/Tool/wix.py
index 44b5d0f..208e96d 100644
--- a/src/engine/SCons/Tool/wix.py
+++ b/src/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/src/engine/SCons/Tool/yacc.py b/src/engine/SCons/Tool/yacc.py
index 9f95bd1..60e1a83 100644
--- a/src/engine/SCons/Tool/yacc.py
+++ b/src/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/src/engine/SCons/Tool/yacc.xml b/src/engine/SCons/Tool/yacc.xml
index 974b52b..b69afbc 100644
--- a/src/engine/SCons/Tool/yacc.xml
+++ b/src/engine/SCons/Tool/yacc.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Tool/zip.py b/src/engine/SCons/Tool/zip.py
index 0f30147..fe2f4be 100644
--- a/src/engine/SCons/Tool/zip.py
+++ b/src/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/src/engine/SCons/Tool/zip.xml b/src/engine/SCons/Tool/zip.xml
index 51a8194..02eeae7 100644
--- a/src/engine/SCons/Tool/zip.xml
+++ b/src/engine/SCons/Tool/zip.xml
@@ -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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
diff --git a/src/engine/SCons/Util.py b/src/engine/SCons/Util.py
index 1ffbd03..cedd78c 100644
--- a/src/engine/SCons/Util.py
+++ b/src/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/src/engine/SCons/UtilTests.py b/src/engine/SCons/UtilTests.py
index 3b60cfa..1866ef6 100644
--- a/src/engine/SCons/UtilTests.py
+++ b/src/engine/SCons/UtilTests.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/UtilTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/UtilTests.py 5357 2011/09/09 21:31:03 bdeegan"
import SCons.compat
@@ -668,7 +668,7 @@ class UtilTestCase(unittest.TestCase):
def test_LogicalLines(self):
"""Test the LogicalLines class"""
- fobj = io.StringIO(r"""
+ content = r"""
foo \
bar \
baz
@@ -676,7 +676,12 @@ foo
bling \
bling \ bling
bling
-""")
+"""
+ try:
+ fobj = io.StringIO(content)
+ except TypeError:
+ # Python 2.7 and beyond require unicode strings.
+ fobj = io.StringIO(unicode(content))
lines = LogicalLines(fobj).readlines()
assert lines == [
diff --git a/src/engine/SCons/Variables/BoolVariable.py b/src/engine/SCons/Variables/BoolVariable.py
index f41537b..dc2bf40 100644
--- a/src/engine/SCons/Variables/BoolVariable.py
+++ b/src/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/src/engine/SCons/Variables/BoolVariableTests.py b/src/engine/SCons/Variables/BoolVariableTests.py
index c75e8f4..941862f 100644
--- a/src/engine/SCons/Variables/BoolVariableTests.py
+++ b/src/engine/SCons/Variables/BoolVariableTests.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/Variables/BoolVariableTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Variables/BoolVariableTests.py 5357 2011/09/09 21:31:03 bdeegan"
import sys
import unittest
diff --git a/src/engine/SCons/Variables/EnumVariable.py b/src/engine/SCons/Variables/EnumVariable.py
index c9cdbb7..60a3c5d 100644
--- a/src/engine/SCons/Variables/EnumVariable.py
+++ b/src/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/src/engine/SCons/Variables/EnumVariableTests.py b/src/engine/SCons/Variables/EnumVariableTests.py
index 79d3ae6..1e61da1 100644
--- a/src/engine/SCons/Variables/EnumVariableTests.py
+++ b/src/engine/SCons/Variables/EnumVariableTests.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/Variables/EnumVariableTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Variables/EnumVariableTests.py 5357 2011/09/09 21:31:03 bdeegan"
import sys
import unittest
diff --git a/src/engine/SCons/Variables/ListVariable.py b/src/engine/SCons/Variables/ListVariable.py
index 8f28706..eb3ad8a 100644
--- a/src/engine/SCons/Variables/ListVariable.py
+++ b/src/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/src/engine/SCons/Variables/ListVariableTests.py b/src/engine/SCons/Variables/ListVariableTests.py
index 710e30b..0182314 100644
--- a/src/engine/SCons/Variables/ListVariableTests.py
+++ b/src/engine/SCons/Variables/ListVariableTests.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/Variables/ListVariableTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Variables/ListVariableTests.py 5357 2011/09/09 21:31:03 bdeegan"
import copy
import sys
diff --git a/src/engine/SCons/Variables/PackageVariable.py b/src/engine/SCons/Variables/PackageVariable.py
index c8bfeb8..ffa5db5 100644
--- a/src/engine/SCons/Variables/PackageVariable.py
+++ b/src/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/src/engine/SCons/Variables/PackageVariableTests.py b/src/engine/SCons/Variables/PackageVariableTests.py
index 86c3e0b..7e3de9c 100644
--- a/src/engine/SCons/Variables/PackageVariableTests.py
+++ b/src/engine/SCons/Variables/PackageVariableTests.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/Variables/PackageVariableTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Variables/PackageVariableTests.py 5357 2011/09/09 21:31:03 bdeegan"
import sys
import unittest
diff --git a/src/engine/SCons/Variables/PathVariable.py b/src/engine/SCons/Variables/PathVariable.py
index 0cf8cd3..1076a8d 100644
--- a/src/engine/SCons/Variables/PathVariable.py
+++ b/src/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/src/engine/SCons/Variables/PathVariableTests.py b/src/engine/SCons/Variables/PathVariableTests.py
index 51adf21..6ec82d2 100644
--- a/src/engine/SCons/Variables/PathVariableTests.py
+++ b/src/engine/SCons/Variables/PathVariableTests.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/Variables/PathVariableTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Variables/PathVariableTests.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
import sys
diff --git a/src/engine/SCons/Variables/VariablesTests.py b/src/engine/SCons/Variables/VariablesTests.py
index 99c849b..f4a5c86 100644
--- a/src/engine/SCons/Variables/VariablesTests.py
+++ b/src/engine/SCons/Variables/VariablesTests.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/Variables/VariablesTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/Variables/VariablesTests.py 5357 2011/09/09 21:31:03 bdeegan"
import sys
import unittest
diff --git a/src/engine/SCons/Variables/__init__.py b/src/engine/SCons/Variables/__init__.py
index a2c4218..3c5ca53 100644
--- a/src/engine/SCons/Variables/__init__.py
+++ b/src/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/src/engine/SCons/Warnings.py b/src/engine/SCons/Warnings.py
index 89f7ce9..f20e65e 100644
--- a/src/engine/SCons/Warnings.py
+++ b/src/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/src/engine/SCons/WarningsTests.py b/src/engine/SCons/WarningsTests.py
index a26dd58..60bc725 100644
--- a/src/engine/SCons/WarningsTests.py
+++ b/src/engine/SCons/WarningsTests.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/WarningsTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/WarningsTests.py 5357 2011/09/09 21:31:03 bdeegan"
import sys
import unittest
diff --git a/src/engine/SCons/__init__.py b/src/engine/SCons/__init__.py
index f623225..950b314 100644
--- a/src/engine/SCons/__init__.py
+++ b/src/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/src/engine/SCons/compat/__init__.py b/src/engine/SCons/compat/__init__.py
index 1dc5cc5..39edff2 100644
--- a/src/engine/SCons/compat/__init__.py
+++ b/src/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/src/engine/SCons/compat/_scons_builtins.py b/src/engine/SCons/compat/_scons_builtins.py
index 5daae95..63dde01 100644
--- a/src/engine/SCons/compat/_scons_builtins.py
+++ b/src/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/src/engine/SCons/compat/_scons_collections.py b/src/engine/SCons/compat/_scons_collections.py
index 8cae268..8975b44 100644
--- a/src/engine/SCons/compat/_scons_collections.py
+++ b/src/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/src/engine/SCons/compat/_scons_dbm.py b/src/engine/SCons/compat/_scons_dbm.py
index 8c53b8c..e8f7e4b 100644
--- a/src/engine/SCons/compat/_scons_dbm.py
+++ b/src/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/src/engine/SCons/compat/_scons_hashlib.py b/src/engine/SCons/compat/_scons_hashlib.py
index e38f6a8..991e29a 100644
--- a/src/engine/SCons/compat/_scons_hashlib.py
+++ b/src/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/src/engine/SCons/compat/_scons_io.py b/src/engine/SCons/compat/_scons_io.py
index e7eb5ee..9b04e98 100644
--- a/src/engine/SCons/compat/_scons_io.py
+++ b/src/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/src/engine/SCons/cpp.py b/src/engine/SCons/cpp.py
index 496d3f4..3015b53 100644
--- a/src/engine/SCons/cpp.py
+++ b/src/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/src/engine/SCons/cppTests.py b/src/engine/SCons/cppTests.py
index af675d6..a9c99d5 100644
--- a/src/engine/SCons/cppTests.py
+++ b/src/engine/SCons/cppTests.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/cppTests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/engine/SCons/cppTests.py 5357 2011/09/09 21:31:03 bdeegan"
import sys
import unittest
diff --git a/src/engine/SCons/dblite.py b/src/engine/SCons/dblite.py
index ea24e6a..f4ba90a 100644
--- a/src/engine/SCons/dblite.py
+++ b/src/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/src/engine/SCons/exitfuncs.py b/src/engine/SCons/exitfuncs.py
index a72fe03..7dd2bfe 100644
--- a/src/engine/SCons/exitfuncs.py
+++ b/src/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/src/engine/setup.cfg b/src/engine/setup.cfg
deleted file mode 100644
index 94ede1f..0000000
--- a/src/engine/setup.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-[bdist_rpm]
-group = Development/Tools
diff --git a/src/engine/setup.py b/src/engine/setup.py
deleted file mode 100644
index d116063..0000000
--- a/src/engine/setup.py
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "src/engine/setup.py 5134 2010/08/16 23:02:40 bdeegan"
-
-import os
-import os.path
-import sys
-
-(head, tail) = os.path.split(sys.argv[0])
-
-if head:
- os.chdir(head)
- sys.argv[0] = tail
-
-# Code to figure out the package name from the current directory.
-# May come in handy to allow this setup.py to switch-hit between
-# python-scons and python2-scons.
-#head, package = os.path.split(os.getcwd())
-#suffix = "-2.0.1"
-#if package[-len(suffix):] == suffix:
-# package = package[:-len(suffix)]
-
-package = 'python-scons'
-
-from distutils.core import setup
-
-ver = {
- 'python-scons': '1.5',
- 'python2-scons': '2.1',
-}
-
-setup(name = package,
- version = "2.0.1",
- description = "SCons Python %s extension modules" % ver[package],
- long_description = """SCons is an Open Source software construction tool--that is, a build tool; an
-improved substitute for the classic Make utility; a better way to build
-software.""",
- author = "Steven Knight",
- author_email = "knight@baldmt.com",
- url = "http://www.scons.org/",
- licence = "MIT, freely distributable",
- keywords = "scons, cons, make, build tool, make tool",
- packages = ["SCons",
- "SCons.Node",
- "SCons.Scanner",
- "SCons.Sig",
- "SCons.Script"])
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4: