summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Falavigna <dktrkranz@debian.org>2011-09-10 11:25:53 +0200
committerLuca Falavigna <dktrkranz@debian.org>2011-09-10 11:25:53 +0200
commitba4425ab5227fd9597fccd368bffff6bf1032149 (patch)
treeb286bf4e65900f6a7604c001dc2ad94fec12e768
parent84c6f9729dbbc175431874957d0654310410bd6f (diff)
Imported Upstream version 2.1.0upstream/2.1.0
-rw-r--r--LICENSE2
-rw-r--r--SConstruct22
-rw-r--r--bin/calibrate.py6
-rw-r--r--bin/docdiff16
-rw-r--r--bin/docrun16
-rw-r--r--bin/docupdate16
-rw-r--r--bin/import-test.py4
-rw-r--r--bin/linecount.py4
-rw-r--r--bin/restore.sh28
-rw-r--r--bin/scons-doc.py95
-rw-r--r--bin/scons-proc.py174
-rw-r--r--bin/sconsexamples.py505
-rwxr-xr-xbin/scp-sourceforge38
-rw-r--r--bin/update-release-info.py18
-rwxr-xr-xbin/xmlagenda.py18
-rw-r--r--doc/SConscript145
-rw-r--r--doc/design/scons.mod2
-rw-r--r--doc/developer/architecture.xml2
-rw-r--r--doc/developer/branches.xml2
-rw-r--r--doc/developer/copyright.xml2
-rw-r--r--doc/developer/cycle.xml2
-rw-r--r--doc/developer/main.xml2
-rw-r--r--doc/developer/packaging.xml2
-rw-r--r--doc/developer/preface.xml2
-rw-r--r--doc/developer/sourcetree.xml2
-rw-r--r--doc/developer/testing.xml2
-rw-r--r--doc/man/scons-time.16
-rw-r--r--doc/man/scons.14200
-rw-r--r--doc/man/sconsign.16
-rw-r--r--doc/python10/scons.mod2
-rw-r--r--doc/scons.mod4
-rw-r--r--doc/user/MANIFEST1
-rw-r--r--doc/user/README2
-rw-r--r--doc/user/actions.in2
-rw-r--r--doc/user/actions.xml2
-rw-r--r--doc/user/add-method.in2
-rw-r--r--doc/user/add-method.xml3
-rw-r--r--doc/user/alias.in2
-rw-r--r--doc/user/alias.xml2
-rw-r--r--doc/user/ant.in2
-rw-r--r--doc/user/ant.xml2
-rw-r--r--doc/user/build-install.in25
-rw-r--r--doc/user/build-install.xml25
-rw-r--r--doc/user/builders-built-in.in2
-rw-r--r--doc/user/builders-built-in.xml3
-rw-r--r--doc/user/builders-commands.in4
-rw-r--r--doc/user/builders-commands.xml2
-rw-r--r--doc/user/builders-writing.in63
-rw-r--r--doc/user/builders-writing.xml59
-rw-r--r--doc/user/builders.in2
-rw-r--r--doc/user/builders.xml2
-rw-r--r--doc/user/caching.in2
-rw-r--r--doc/user/caching.xml2
-rw-r--r--doc/user/command-line.in6
-rw-r--r--doc/user/command-line.xml17
-rw-r--r--doc/user/copyright.in2
-rw-r--r--doc/user/copyright.xml2
-rw-r--r--doc/user/depends.in61
-rw-r--r--doc/user/depends.xml60
-rw-r--r--doc/user/environments.in22
-rw-r--r--doc/user/environments.xml10
-rw-r--r--doc/user/errors.in2
-rw-r--r--doc/user/errors.xml2
-rw-r--r--doc/user/example.in2
-rw-r--r--doc/user/example.xml2
-rw-r--r--doc/user/factories.in4
-rw-r--r--doc/user/factories.xml2
-rw-r--r--doc/user/file-removal.in2
-rw-r--r--doc/user/file-removal.xml2
-rw-r--r--doc/user/functions.in38
-rw-r--r--doc/user/functions.xml38
-rw-r--r--doc/user/hierarchy.in6
-rw-r--r--doc/user/hierarchy.xml4
-rw-r--r--doc/user/install.in2
-rw-r--r--doc/user/install.xml2
-rw-r--r--doc/user/java.in6
-rw-r--r--doc/user/java.xml2
-rw-r--r--doc/user/less-simple.in2
-rw-r--r--doc/user/less-simple.xml4
-rw-r--r--doc/user/libraries.in2
-rw-r--r--doc/user/libraries.xml5
-rw-r--r--doc/user/main.in53
-rw-r--r--doc/user/main.xml53
-rw-r--r--doc/user/make.in2
-rw-r--r--doc/user/make.xml2
-rw-r--r--doc/user/mergeflags.in2
-rw-r--r--doc/user/mergeflags.xml2
-rw-r--r--doc/user/misc.in12
-rw-r--r--doc/user/misc.xml6
-rw-r--r--doc/user/nodes.in2
-rw-r--r--doc/user/nodes.xml4
-rw-r--r--doc/user/output.in4
-rw-r--r--doc/user/output.xml2
-rw-r--r--doc/user/parseconfig.in2
-rw-r--r--doc/user/parseconfig.xml2
-rw-r--r--doc/user/parseflags.in2
-rw-r--r--doc/user/parseflags.xml3
-rw-r--r--doc/user/preface.in6
-rw-r--r--doc/user/preface.xml2
-rw-r--r--doc/user/python.in2
-rw-r--r--doc/user/python.xml2
-rw-r--r--doc/user/repositories.in6
-rw-r--r--doc/user/repositories.xml6
-rw-r--r--doc/user/run.in2
-rw-r--r--doc/user/run.xml2
-rw-r--r--doc/user/scanners.in17
-rw-r--r--doc/user/scanners.xml17
-rw-r--r--doc/user/sconf.in6
-rw-r--r--doc/user/sconf.xml4
-rw-r--r--doc/user/separate.in2
-rw-r--r--doc/user/separate.xml2
-rw-r--r--doc/user/sideeffect.in2
-rw-r--r--doc/user/sideeffect.xml2
-rw-r--r--doc/user/simple.in10
-rw-r--r--doc/user/simple.xml10
-rw-r--r--doc/user/sourcecode.in2
-rw-r--r--doc/user/sourcecode.xml2
-rw-r--r--doc/user/tasks.in6
-rw-r--r--doc/user/tasks.xml2
-rw-r--r--doc/user/tools.in2
-rw-r--r--doc/user/tools.xml2
-rw-r--r--doc/user/troubleshoot.in49
-rw-r--r--doc/user/troubleshoot.xml57
-rw-r--r--doc/user/variables.in2
-rw-r--r--doc/user/variables.xml2
-rw-r--r--doc/user/variants.in2
-rw-r--r--doc/user/variants.xml3
-rw-r--r--src/Announce.txt19
-rw-r--r--src/CHANGES.txt255
-rw-r--r--src/LICENSE.txt2
-rw-r--r--src/README.txt18
-rw-r--r--src/RELEASE.txt152
-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.py (renamed from src/script/setup.py)52
-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
-rw-r--r--src/script/README.txt169
-rw-r--r--src/script/scons-post-install.py91
-rw-r--r--src/script/scons-time.py4
-rw-r--r--src/script/scons.bat11
-rw-r--r--src/script/scons.py44
-rw-r--r--src/script/sconsign.py41
-rw-r--r--src/script/setup.cfg2
-rw-r--r--src/setup.cfg1
-rw-r--r--src/setup.py78
-rw-r--r--src/test_aegistests.py4
-rw-r--r--src/test_files.py4
-rw-r--r--src/test_interrupts.py4
-rw-r--r--src/test_pychecker.py4
-rw-r--r--src/test_setup.py4
-rw-r--r--src/test_strings.py10
479 files changed, 8982 insertions, 6731 deletions
diff --git a/LICENSE b/LICENSE
index 77421fa..c0de36f 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/SConstruct b/SConstruct
index 4f73381..ab6e2d5 100644
--- a/SConstruct
+++ b/SConstruct
@@ -5,13 +5,13 @@
# When this gets changed, you must also change the copyright_years string
# in QMTest/TestSCons.py so the test scripts look for the right string.
-copyright_years = '2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010'
+copyright_years = '2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011'
# This gets inserted into the man pages to reflect the month of release.
-month_year = 'August 2010'
+month_year = 'September 2011'
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -43,7 +43,7 @@ import sys
import tempfile
project = 'scons'
-default_version = '2.0.1'
+default_version = '2.1.0'
copyright = "Copyright (c) %s The SCons Foundation" % copyright_years
platform = distutils.util.get_platform()
@@ -794,7 +794,7 @@ for p in [ scons ]:
#
# Now run everything in src_file through the sed command we
- # concocted to expand SConstruct, 2.0.1, etc.
+ # concocted to expand SConstruct, 2.1.0, etc.
#
for b in src_files:
s = p['filemap'].get(b, b)
@@ -1093,7 +1093,9 @@ for p in [ scons ]:
]
for script in scripts:
- #commands.append("mv %s/%s %s/%s.py" % (local, script, local, script))
+ # add .py extension for scons-local scripts on non-windows platforms
+ if platform == "win32":
+ break
local_script = os.path.join(build_dir_local, script)
commands.append(Move(local_script + '.py', local_script))
@@ -1116,9 +1118,14 @@ for p in [ scons ]:
Local(l)
if gzip:
+ if platform == "win32":
+ # avoid problem with tar interpreting c:/ as a remote machine
+ tar_cargs = '-cz --force-local -f'
+ else:
+ tar_cargs = '-czf'
env.Command(dist_local_tar_gz,
local_targets,
- "cd %s && tar czf $( ${TARGET.abspath} $) *" % build_dir_local)
+ "cd %s && tar %s $( ${TARGET.abspath} $) *" % (build_dir_local, tar_cargs))
unpack_targets = [os.path.join(test_local_tar_gz_dir, x) for x in rf]
commands = [Delete(test_local_tar_gz_dir),
@@ -1198,7 +1205,6 @@ if sfiles:
'.hgt/*',
'.svnt/*',
'*.aeignore',
- '*.cvsignore',
'*.hgignore',
'www/*',
]
diff --git a/bin/calibrate.py b/bin/calibrate.py
index f377869..72a6ac7 100644
--- a/bin/calibrate.py
+++ b/bin/calibrate.py
@@ -64,7 +64,11 @@ def main(argv=None):
output = p.communicate()[0]
vm = variable_re.search(output)
em = elapsed_re.search(output)
- elapsed = float(em.group(1))
+ try:
+ elapsed = float(em.group(1))
+ except AttributeError:
+ print output
+ raise
print "run %3d: %7.3f: %s" % (run, elapsed, ' '.join(vm.groups()))
if opts.min < elapsed and elapsed < opts.max:
good += 1
diff --git a/bin/docdiff b/bin/docdiff
deleted file mode 100644
index c7adb05..0000000
--- a/bin/docdiff
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-if test $# -eq 0; then
- for f in doc/user/*.in; do
- xml=doc/user/`basename $f .in`.xml
- echo $f:
- python bin/scons-doc.py $f | diff $DIFFFLAGS $xml -
- done
-else
- for a in $*; do
- f=doc/user/$a.in
- xml=doc/user/$a.xml
- echo $f:
- python bin/scons-doc.py $f | diff $DIFFFLAGS $xml -
- done
-fi
diff --git a/bin/docrun b/bin/docrun
deleted file mode 100644
index ad8ea9f..0000000
--- a/bin/docrun
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-if test $# -eq 0; then
- for f in doc/user/*.in; do
- xml=doc/user/`basename $f .in`.xml
- echo $f:
- python bin/scons-doc.py $f
- done
-else
- for a in $*; do
- f=doc/user/$a.in
- xml=doc/user/$a.xml
- echo $f:
- python bin/scons-doc.py $f
- done
-fi
diff --git a/bin/docupdate b/bin/docupdate
deleted file mode 100644
index cd9b532..0000000
--- a/bin/docupdate
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-if test $# -eq 0; then
- for f in doc/user/*.in; do
- xml=doc/user/`basename $f .in`.xml
- echo $f:
- python bin/scons-doc.py $f > $xml
- done
-else
- for a in $*; do
- f=doc/user/$a.in
- xml=doc/user/$a.xml
- echo $f:
- python bin/scons-doc.py $f > $xml
- done
-fi
diff --git a/bin/import-test.py b/bin/import-test.py
index 4991aee..cb95ff2 100644
--- a/bin/import-test.py
+++ b/bin/import-test.py
@@ -1,6 +1,6 @@
#!/usr/bin/env 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
#
# tree2test.py - turn a directory tree into TestSCons code
#
@@ -25,7 +25,7 @@
# """ triple-quotes will need to have their contents edited by hand.
#
-__revision__ = "bin/import-test.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "bin/import-test.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
import sys
diff --git a/bin/linecount.py b/bin/linecount.py
index 9d0be94..7121ebd 100644
--- a/bin/linecount.py
+++ b/bin/linecount.py
@@ -1,6 +1,6 @@
#!/usr/bin/env 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
#
# Count statistics about SCons test and source files. This must be run
# against a fully-populated tree (for example, one that's been freshly
@@ -23,7 +23,7 @@
# interesting one for most purposes.
from __future__ import division
-__revision__ = "bin/linecount.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "bin/linecount.py 5357 2011/09/09 21:31:03 bdeegan"
import os.path
diff --git a/bin/restore.sh b/bin/restore.sh
index 6db56f1..3aab7ae 100644
--- a/bin/restore.sh
+++ b/bin/restore.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env sh
#
-# Simple hack script to restore __revision__, __COPYRIGHT_, 2.0.1
+# Simple hack script to restore __revision__, __COPYRIGHT_, 2.1.0
# and other similar variables to what gets checked in to source. This
# comes in handy when people send in diffs based on the released source.
#
@@ -22,9 +22,9 @@ header() {
for i in `find $DIRS -name '*.py'`; do
header $i
ed $i <<EOF
-g/Copyright (c) 2001.*SCons Foundation/s//Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation/p
+g/Copyright (c) 2001.*SCons Foundation/s//Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation/p
w
-/^__revision__ = /s/= .*/= "bin/restore.sh 5134 2010/08/16 23:02:40 bdeegan"/p
+/^__revision__ = /s/= .*/= "bin/restore.sh 5357 2011/09/09 21:31:03 bdeegan"/p
w
q
EOF
@@ -33,9 +33,9 @@ done
for i in `find $DIRS -name 'scons.bat'`; do
header $i
ed $i <<EOF
-g/Copyright (c) 2001.*SCons Foundation/s//Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation/p
+g/Copyright (c) 2001.*SCons Foundation/s//Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation/p
w
-/^@REM src\/script\/scons.bat/s/@REM .* knight/@REM bin/restore.sh 5134 2010/08/16 23:02:40 bdeegan/p
+/^@REM src\/script\/scons.bat/s/@REM .* knight/@REM bin/restore.sh 5357 2011/09/09 21:31:03 bdeegan/p
w
q
EOF
@@ -44,13 +44,13 @@ done
for i in `find $DIRS -name '__init__.py' -o -name 'scons.py' -o -name 'sconsign.py'`; do
header $i
ed $i <<EOF
-/^__version__ = /s/= .*/= "2.0.1"/p
+/^__version__ = /s/= .*/= "2.1.0"/p
w
-/^__build__ = /s/= .*/= "r5134"/p
+/^__build__ = /s/= .*/= "r5357[MODIFIED]"/p
w
-/^__buildsys__ = /s/= .*/= "cooldog"/p
+/^__buildsys__ = /s/= .*/= "ubuntu"/p
w
-/^__date__ = /s/= .*/= "2010/08/16 23:02:40"/p
+/^__date__ = /s/= .*/= "2011/09/09 21:31:03"/p
w
/^__developer__ = /s/= .*/= "bdeegan"/p
w
@@ -61,7 +61,7 @@ done
for i in `find $DIRS -name 'setup.py'`; do
header $i
ed $i <<EOF
-/^ *version = /s/= .*/= "2.0.1",/p
+/^ *version = /s/= .*/= "2.1.0",/p
w
q
EOF
@@ -70,11 +70,11 @@ done
for i in `find $DIRS -name '*.txt'`; do
header $i
ed $i <<EOF
-g/Copyright (c) 2001.*SCons Foundation/s//Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation/p
+g/Copyright (c) 2001.*SCons Foundation/s//Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation/p
w
-/# [^ ]* 0.96.[CD][0-9]* [0-9\/]* [0-9:]* knight$/s/.*/# bin/restore.sh 5134 2010/08/16 23:02:40 bdeegan/p
+/# [^ ]* 0.96.[CD][0-9]* [0-9\/]* [0-9:]* knight$/s/.*/# bin/restore.sh 5357 2011/09/09 21:31:03 bdeegan/p
w
-/Version [0-9][0-9]*\.[0-9][0-9]*/s//Version 2.0.1/p
+/Version [0-9][0-9]*\.[0-9][0-9]*/s//Version 2.1.0/p
w
q
EOF
@@ -83,7 +83,7 @@ done
for i in `find $DIRS -name '*.xml'`; do
header $i
ed $i <<EOF
-g/Copyright (c) 2001.*SCons Foundation/s//Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation/p
+g/Copyright (c) 2001.*SCons Foundation/s//Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation/p
w
q
EOF
diff --git a/bin/scons-doc.py b/bin/scons-doc.py
index 14e862c..f99dfa7 100644
--- a/bin/scons-doc.py
+++ b/bin/scons-doc.py
@@ -26,6 +26,23 @@
# and inserting it into examples in our DocBook
# documentation
#
+# Synopsis:
+#
+# scons-doc [OPTIONS] [.in files]
+#
+# When no input files are given, the folder doc/user/* is searched for .in files.
+#
+# Available options:
+#
+# -d, --diff create examples for the .in file and output a unified
+# diff against the related .xml file
+# -r, --run create examples for the .in file, but do not change
+# any files
+# -s, --simple_diff use a simpler output for the diff mode (no unified
+# diff!)
+# -u, --update create examples for the .in file and update the
+# related .xml file
+#
# This script looks for some SGML tags that describe SCons example
# configurations and commands to execute in those configurations, and
# uses TestCmd.py to execute the commands and insert the output from
@@ -95,6 +112,7 @@ import re
import sgmllib
import sys
import time
+import glob
sys.path.append(os.path.join(os.getcwd(), 'QMTest'))
sys.path.append(os.path.join(os.getcwd(), 'build', 'QMTest'))
@@ -811,7 +829,7 @@ class MySGML(sgmllib.SGMLParser):
delattr(self, 'f')
self.afunclist = self.afunclist[:-1]
-def process(filename):
+def process(filename, fout=sys.stdout):
if filename == '-':
f = sys.stdin
else:
@@ -829,7 +847,7 @@ def process(filename):
first_line, data = data.split('\n', 1)
sys.stdout.write(first_line + '\n')
- x = MySGML(sys.stdout)
+ x = MySGML(fout)
for c in data:
x.feed(c)
x.close()
@@ -841,13 +859,76 @@ def main(argv=None):
argv = sys.argv
parser = optparse.OptionParser()
- opts, args = parser.parse_args(argv[1:])
+ parser.add_option('-d', '--diff',
+ action='store_true', dest='diff', default=False,
+ help='create examples for the .in file and output a unified diff against the related .xml file')
+ parser.add_option('-r', '--run',
+ action='store_true', dest='run', default=False,
+ help='create examples for the .in file, but do not change any files')
+ parser.add_option('-s', '--simple_diff',
+ action='store_true', dest='simple', default=False,
+ help='use a simpler output for the diff mode (no unified diff!)')
+ parser.add_option('-u', '--update',
+ action='store_true', dest='update', default=False,
+ help='create examples for the .in file and update the related .xml file')
- if not args:
- args = ['-']
+ opts, args = parser.parse_args(argv[1:])
- for arg in args:
- process(arg)
+ if opts.diff:
+ import StringIO
+ import difflib
+
+ if not args:
+ args = glob.glob('doc/user/*.in')
+ for arg in sorted(args):
+ diff = None
+ s = StringIO.StringIO()
+ process(arg,s)
+ filename = arg[:-2]+'xml'
+ try:
+ fxml = open(filename, 'r')
+ xmlcontent = fxml.read()
+ fxml.close()
+ if opts.simple:
+ diff = list(difflib.context_diff(xmlcontent.splitlines(),
+ s.getvalue().splitlines(),
+ fromfile=arg, tofile=filename))
+ else:
+ diff = list(difflib.unified_diff(xmlcontent.splitlines(),
+ s.getvalue().splitlines(),
+ fromfile=arg, tofile=filename,
+ lineterm=''))
+ except EnvironmentError, e:
+ sys.stderr.write('%s: %s\n' % (filename, e))
+
+ s.close()
+ if diff:
+ print "%s:" % arg
+ print '\n'.join(diff)
+ elif opts.run:
+ if not args:
+ args = glob.glob('doc/user/*.in')
+ for arg in sorted(args):
+ print "%s:" % arg
+ process(arg)
+ elif opts.update:
+ if not args:
+ args = glob.glob('doc/user/*.in')
+ for arg in sorted(args):
+ print "%s:" % arg
+ filename = arg[:-2]+'xml'
+ try:
+ fxml = open(filename, 'w')
+ process(arg, fxml)
+ fxml.close()
+ except EnvironmentError, e:
+ sys.stderr.write('%s: %s\n' % (filename, e))
+ else:
+ if not args:
+ args = ['-']
+
+ for arg in args:
+ process(arg)
if __name__ == "__main__":
sys.exit(main())
diff --git a/bin/scons-proc.py b/bin/scons-proc.py
index 7cdb618..6d15816 100644
--- a/bin/scons-proc.py
+++ b/bin/scons-proc.py
@@ -10,10 +10,11 @@
# and/or .mod files contining the ENTITY definitions for each item,
# or in man-page-formatted output.
#
-import os
-import sys
import getopt
+import os
import re
+import string
+import sys
import xml.sax
try:
from io import StringIO
@@ -153,9 +154,7 @@ class SCons_XML_to_XML(SCons_XML):
for v in self.values:
f.write('\n<varlistentry id="%s%s">\n' %
(v.prefix, v.idfunc()))
- for term in v.termfunc():
- f.write('<term><%s>%s</%s></term>\n' %
- (v.tag, term, v.tag))
+ f.write('%s\n' % v.xml_term())
f.write('<listitem>\n')
for chunk in v.summary.body:
f.write(str(chunk))
@@ -212,23 +211,41 @@ class SCons_XML_to_XML(SCons_XML):
class SCons_XML_to_man(SCons_XML):
def write(self, filename):
+ """
+ Converts the contents of the specified filename from DocBook XML
+ to man page macros.
+
+ This does not do an intelligent job. In particular, it doesn't
+ actually use the structured nature of XML to handle arbitrary
+ input. Instead, we're using text replacement and regular
+ expression substitutions to convert observed patterns into the
+ macros we want. To the extent that we're relatively consistent
+ with our input .xml, this works, but could easily break if handed
+ input that doesn't match these specific expectations.
+ """
if not filename:
return
f = self.fopen(filename)
chunks = []
for v in self.values:
- chunks.extend(v.mansep())
- chunks.extend(v.initial_chunks())
+ chunks.extend(v.man_separator())
+ chunks.extend(v.initial_man_chunks())
chunks.extend(list(map(str, v.summary.body)))
body = ''.join(chunks)
+
+ # Simple transformation of examples into our defined macros for those.
body = body.replace('<programlisting>', '.ES')
body = body.replace('</programlisting>', '.EE')
+
+ # Replace groupings of <para> tags and surrounding newlines
+ # with single blank lines.
body = body.replace('\n</para>\n<para>\n', '\n\n')
body = body.replace('<para>\n', '')
body = body.replace('<para>', '\n')
body = body.replace('</para>\n', '')
+ # Convert <variablelist> and its child tags.
body = body.replace('<variablelist>\n', '.RS 10\n')
# Handling <varlistentry> needs to be rationalized and made
# consistent. Right now, the <term> values map to arbitrary,
@@ -240,35 +257,54 @@ class SCons_XML_to_man(SCons_XML):
body = body.replace('</varlistentry>\n', '')
body = body.replace('</variablelist>\n', '.RE\n')
+ # Get rid of unnecessary .IP macros, and unnecessary blank lines
+ # in front of .IP macros.
body = re.sub(r'\.EE\n\n+(?!\.IP)', '.EE\n.IP\n', body)
+ body = body.replace('\n.EE\n.IP\n.ES\n', '\n.EE\n\n.ES\n')
body = body.replace('\n.IP\n\'\\"', '\n\n\'\\"')
- body = re.sub('&(scons|SConstruct|SConscript|jar|Make|lambda);', r'\\fB\1\\fP', body)
+
+ # Convert various named entities and tagged names to nroff
+ # in-line font conversions (\fB, \fI, \fP).
+ body = re.sub('&(scons|SConstruct|SConscript|Dir|jar|Make|lambda);',
+ r'\\fB\1\\fP', body)
body = re.sub('&(TARGET|TARGETS|SOURCE|SOURCES);', r'\\fB$\1\\fP', body)
- body = body.replace('&Dir;', r'\fBDir\fP')
- body = body.replace('&target;', r'\fItarget\fP')
- body = body.replace('&source;', r'\fIsource\fP')
+ body = re.sub('&(target|source);', r'\\fI\1\\fP', body)
body = re.sub('&b(-link)?-([^;]*);', r'\\fB\2\\fP()', body)
- body = re.sub('&cv(-link)?-([^;]*);', r'$\2', body)
+ body = re.sub('&cv(-link)?-([^;]*);', r'\\fB$\2\\fP', body)
body = re.sub('&f(-link)?-env-([^;]*);', r'\\fBenv.\2\\fP()', body)
body = re.sub('&f(-link)?-([^;]*);', r'\\fB\2\\fP()', body)
body = re.sub(r'<(application|command|envar|filename|function|literal|option)>([^<]*)</\1>',
r'\\fB\2\\fP', body)
body = re.sub(r'<(classname|emphasis|varname)>([^<]*)</\1>',
r'\\fI\2\\fP', body)
+
+ # Convert groupings of font conversions (\fB, \fI, \fP) to
+ # man page .B, .BR, .I, .IR, .R, .RB and .RI macros.
body = re.compile(r'^\\f([BI])([^\\]* [^\\]*)\\fP\s*$', re.M).sub(r'.\1 "\2"', body)
body = re.compile(r'^\\f([BI])(.*)\\fP\s*$', re.M).sub(r'.\1 \2', body)
body = re.compile(r'^\\f([BI])(.*)\\fP(\S+)$', re.M).sub(r'.\1R \2 \3', body)
+ body = re.compile(r'^(\.B)( .*)\\fP(.*)\\fB(.*)$', re.M).sub(r'\1R\2 \3 \4', body)
+ body = re.compile(r'^(\.B)R?( .*)\\fP(.*)\\fI(.*)$', re.M).sub(r'\1I\2\3 \4', body)
+ body = re.compile(r'^(\.I)( .*)\\fP\\fB(.*)\\fP\\fI(.*)$', re.M).sub(r'\1R\2 \3 \4', body)
body = re.compile(r'^(\S+)\\f([BI])(.*)\\fP$', re.M).sub(r'.R\2 \1 \3', body)
body = re.compile(r'^(\S+)\\f([BI])(.*)\\fP([^\s\\]+)$', re.M).sub(r'.R\2 \1 \3 \4', body)
body = re.compile(r'^(\.R[BI].*[\S])\s+$;', re.M).sub(r'\1', body)
+
+ # Convert &lt; and &gt; entities to literal < and > characters.
body = body.replace('&lt;', '<')
body = body.replace('&gt;', '>')
- body = re.sub(r'\\([^f])', r'\\\\\1', body)
+
+ # Backslashes. Oh joy.
+ body = re.sub(r'\\(?=[^f])', r'\\\\', body)
body = re.compile("^'\\\\\\\\", re.M).sub("'\\\\", body)
+ body = re.compile(r'^\.([BI]R?) ([^"]\S*\\\\\S+[^"])$', re.M).sub(r'.\1 "\2"', body)
+
+ # Put backslashes in front of various hyphens that need
+ # to be long em-dashes.
body = re.compile(r'^\.([BI]R?) --', re.M).sub(r'.\1 \-\-', body)
body = re.compile(r'^\.([BI]R?) -', re.M).sub(r'.\1 \-', body)
- body = re.compile(r'^\.([BI]R?) (\S+)\\\\(\S+)$', re.M).sub(r'.\1 "\2\\\\\\\\\2"', body)
body = re.compile(r'\\f([BI])-', re.M).sub(r'\\f\1\-', body)
+
f.write(body)
class Proxy(object):
@@ -290,34 +326,91 @@ class Proxy(object):
return cmp(self.__subject, other)
return cmp(self.__dict__, other.__dict__)
-class Builder(Proxy):
+class SConsThing(Proxy):
+ def idfunc(self):
+ return self.name
+ def xml_term(self):
+ return '<term>%s</term>' % self.name
+
+class Builder(SConsThing):
description = 'builder'
prefix = 'b-'
tag = 'function'
- def idfunc(self):
- return self.name
- def termfunc(self):
- return ['%s()' % self.name, 'env.%s()' % self.name]
+ def xml_term(self):
+ return ('<term><synopsis><%s>%s()</%s></synopsis>\n<synopsis><%s>env.%s()</%s></synopsis></term>' %
+ (self.tag, self.name, self.tag, self.tag, self.name, self.tag))
def entityfunc(self):
return self.name
- def mansep(self):
+ def man_separator(self):
return ['\n', "'\\" + '"'*69 + '\n']
- def initial_chunks(self):
- return [ '.IP %s\n' % t for t in self.termfunc() ]
+ def initial_man_chunks(self):
+ return [ '.IP %s()\n.IP env.%s()\n' % (self.name, self.name) ]
-class Function(Proxy):
+class Function(SConsThing):
description = 'function'
prefix = 'f-'
tag = 'function'
- def idfunc(self):
- return self.name
- def termfunc(self):
- return ['%s()' % self.name, 'env.%s()' % self.name]
+ def args_to_xml(self, arg):
+ s = ''.join(arg.body).strip()
+ result = []
+ for m in re.findall('([a-zA-Z/_]+=?|[^a-zA-Z/_]+)', s):
+ if m[0] in string.letters:
+ if m[-1] == '=':
+ result.append('<literal>%s</literal>=' % m[:-1])
+ else:
+ result.append('<varname>%s</varname>' % m)
+ else:
+ result.append(m)
+ return ''.join(result)
+ def xml_term(self):
+ try:
+ arguments = self.arguments
+ except AttributeError:
+ arguments = ['()']
+ result = ['<term>']
+ for arg in arguments:
+ try:
+ signature = arg.signature
+ except AttributeError:
+ signature = "both"
+ s = self.args_to_xml(arg)
+ if signature in ('both', 'global'):
+ result.append('<synopsis>%s%s</synopsis>\n' % (self.name, s)) #<br>
+ if signature in ('both', 'env'):
+ result.append('<synopsis><varname>env</varname>.%s%s</synopsis>' % (self.name, s))
+ result.append('</term>')
+ return ''.join(result)
def entityfunc(self):
return self.name
- def mansep(self):
+ def man_separator(self):
return ['\n', "'\\" + '"'*69 + '\n']
- def initial_chunks(self):
+ def args_to_man(self, arg):
+ """Converts the contents of an <arguments> tag, which
+ specifies a function's calling signature, into a series
+ of tokens that alternate between literal tokens
+ (to be displayed in roman or bold face) and variable
+ names (to be displayed in italics).
+
+ This is complicated by the presence of Python "keyword=var"
+ arguments, where "keyword=" should be displayed literally,
+ and "var" should be displayed in italics. We do this by
+ detecting the keyword= var portion and appending it to the
+ previous string, if any.
+ """
+ s = ''.join(arg.body).strip()
+ result = []
+ for m in re.findall('([a-zA-Z/_]+=?|[^a-zA-Z/_]+)', s):
+ if m[-1] == '=' and result:
+ if result[-1][-1] == '"':
+ result[-1] = result[-1][:-1] + m + '"'
+ else:
+ result[-1] += m
+ else:
+ if ' ' in m:
+ m = '"%s"' % m
+ result.append(m)
+ return ' '.join(result)
+ def initial_man_chunks(self):
try:
arguments = self.arguments
except AttributeError:
@@ -328,40 +421,35 @@ class Function(Proxy):
signature = arg.signature
except AttributeError:
signature = "both"
+ s = self.args_to_man(arg)
if signature in ('both', 'global'):
- result.append('.TP\n.RI %s%s\n' % (self.name, arg))
+ result.append('.TP\n.RI %s%s\n' % (self.name, s))
if signature in ('both', 'env'):
- result.append('.TP\n.IR env .%s%s\n' % (self.name, arg))
+ result.append('.TP\n.IR env .%s%s\n' % (self.name, s))
return result
-class Tool(Proxy):
+class Tool(SConsThing):
description = 'tool'
prefix = 't-'
tag = 'literal'
def idfunc(self):
return self.name.replace('+', 'X')
- def termfunc(self):
- return [self.name]
def entityfunc(self):
return self.name
- def mansep(self):
+ def man_separator(self):
return ['\n']
- def initial_chunks(self):
+ def initial_man_chunks(self):
return ['.IP %s\n' % self.name]
-class Variable(Proxy):
+class Variable(SConsThing):
description = 'construction variable'
prefix = 'cv-'
tag = 'envar'
- def idfunc(self):
- return self.name
- def termfunc(self):
- return [self.name]
def entityfunc(self):
return '$' + self.name
- def mansep(self):
+ def man_separator(self):
return ['\n']
- def initial_chunks(self):
+ def initial_man_chunks(self):
return ['.IP %s\n' % self.name]
if output_type == '--man':
diff --git a/bin/sconsexamples.py b/bin/sconsexamples.py
deleted file mode 100644
index 6d3b2de..0000000
--- a/bin/sconsexamples.py
+++ /dev/null
@@ -1,505 +0,0 @@
-#!/usr/bin/env python2
-#
-# scons_examples.py - an SGML preprocessor for capturing SCons output
-# and inserting into examples in our DocBook
-# documentation
-#
-
-# This script looks for some SGML tags that describe SCons example
-# configurations and commands to execute in those configurations, and
-# uses TestCmd.py to execute the commands and insert the output into
-# the output SGML. This way, we can run a script and update all of
-# our example output without having to do a lot of laborious by-hand
-# checking.
-#
-# An "SCons example" looks like this, and essentially describes a set of
-# input files (program source files as well as SConscript files):
-#
-# <scons_example name="ex1">
-# <file name="SConstruct" printme="1">
-# env = Environment()
-# env.Program('foo')
-# </file>
-# <file name="foo.c">
-# int main() { printf("foo.c\n"); }
-# </file>
-# </scons_example>
-#
-# The <file> contents within the <scons_example> tag will get written
-# into a temporary directory whenever example output needs to be
-# generated. By default, the <file> contents are not inserted into text
-# directly, unless you set the "printme" attribute on one or more files,
-# in which case they will get inserted within a <programlisting> tag.
-# This makes it easy to define the example at the appropriate
-# point in the text where you intend to show the SConstruct file.
-#
-# Note that you should usually give the <scons_example> a "name"
-# attribute so that you can refer to the example configuration later to
-# run SCons and generate output.
-#
-# If you just want to show a file's contents without worry about running
-# SCons, there's a shorter <sconstruct> tag:
-#
-# <sconstruct>
-# env = Environment()
-# env.Program('foo')
-# </sconstruct>
-#
-# This is essentially equivalent to <scons_example><file printme="1">,
-# but it's more straightforward.
-#
-# SCons output is generated from the following sort of tag:
-#
-# <scons_output example="ex1" os="posix">
-# <command>scons -Q foo</command>
-# <command>scons -Q foo</command>
-# </scons_output>
-#
-# You tell it which example to use with the "example" attribute, and
-# then give it a list of <command> tags to execute. You can also supply
-# an "os" tag, which specifies the type of operating system this example
-# is intended to show; if you omit this, default value is "posix".
-#
-# The generated SGML will show the command line (with the appropriate
-# command-line prompt for the operating system), execute the command in
-# a temporary directory with the example files, capture the standard
-# output from SCons, and insert it into the text as appropriate.
-# Error output gets passed through to your error output so you
-# can see if there are any problems executing the command.
-
-import os
-import os.path
-import re
-import sgmllib
-import sys
-
-sys.path.append(os.path.join(os.getcwd(), 'etc'))
-sys.path.append(os.path.join(os.getcwd(), 'build', 'etc'))
-
-scons_py = os.path.join('bootstrap', 'src', 'script', 'scons.py')
-if not os.path.exists(scons_py):
- scons_py = os.path.join('src', 'script', 'scons.py')
-
-scons_lib_dir = os.path.join(os.getcwd(), 'bootstrap', 'src', 'engine')
-if not os.path.exists(scons_lib_dir):
- scons_lib_dir = os.path.join(os.getcwd(), 'src', 'engine')
-
-import TestCmd
-
-# The regular expression that identifies entity references in the
-# standard sgmllib omits the underscore from the legal characters.
-# Override it with our own regular expression that adds underscore.
-sgmllib.entityref = re.compile('&([a-zA-Z][-_.a-zA-Z0-9]*)[^-_a-zA-Z0-9]')
-
-class DataCollector(object):
- """Generic class for collecting data between a start tag and end
- tag. We subclass for various types of tags we care about."""
- def __init__(self):
- self.data = ""
- def afunc(self, data):
- self.data = self.data + data
-
-class Example(DataCollector):
- """An SCons example. This is essentially a list of files that
- will get written to a temporary directory to collect output
- from one or more SCons runs."""
- def __init__(self):
- DataCollector.__init__(self)
- self.files = []
- self.dirs = []
-
-class File(DataCollector):
- """A file, that will get written out to a temporary directory
- for one or more SCons runs."""
- def __init__(self, name):
- DataCollector.__init__(self)
- self.name = name
-
-class Directory(DataCollector):
- """A directory, that will get created in a temporary directory
- for one or more SCons runs."""
- def __init__(self, name):
- DataCollector.__init__(self)
- self.name = name
-
-class Output(DataCollector):
- """Where the command output goes. This is essentially
- a list of commands that will get executed."""
- def __init__(self):
- DataCollector.__init__(self)
- self.commandlist = []
-
-class Command(DataCollector):
- """A tag for where the command output goes. This is essentially
- a list of commands that will get executed."""
- pass
-
-Prompt = {
- 'posix' : '% ',
- 'win32' : 'C:\\>'
-}
-
-# Magick SCons hackery.
-#
-# So that our examples can still use the default SConstruct file, we
-# actually feed the following into SCons via stdin and then have it
-# SConscript() the SConstruct file. This stdin wrapper creates a set
-# of ToolSurrogates for the tools for the appropriate platform. These
-# Surrogates print output like the real tools and behave like them
-# without actually having to be on the right platform or have the right
-# tool installed.
-#
-# The upshot: We transparently change the world out from under the
-# top-level SConstruct file in an example just so we can get the
-# command output.
-
-Stdin = """\
-import SCons.Defaults
-
-platform = '%s'
-
-class Curry(object):
- def __init__(self, fun, *args, **kwargs):
- self.fun = fun
- self.pending = args[:]
- self.kwargs = kwargs.copy()
-
- def __call__(self, *args, **kwargs):
- if kwargs and self.kwargs:
- kw = self.kwargs.copy()
- kw.update(kwargs)
- else:
- kw = kwargs or self.kwargs
-
- return self.fun(*self.pending + args, **kw)
-
-def Str(target, source, env, cmd=""):
- result = []
- for cmd in env.subst_list(cmd, target=target, source=source):
- result.append(" ".join(map(str, cmd)))
- return '\\n'.join(result)
-
-class ToolSurrogate(object):
- def __init__(self, tool, variable, func):
- self.tool = tool
- self.variable = variable
- self.func = func
- def __call__(self, env):
- t = Tool(self.tool)
- t.generate(env)
- orig = env[self.variable]
- env[self.variable] = Action(self.func, strfunction=Curry(Str, cmd=orig))
-
-def Null(target, source, env):
- pass
-
-def Cat(target, source, env):
- target = str(target[0])
- f = open(target, "wb")
- for src in map(str, source):
- f.write(open(src, "rb").read())
- f.close()
-
-ToolList = {
- 'posix' : [('cc', 'CCCOM', Cat),
- ('link', 'LINKCOM', Cat),
- ('tar', 'TARCOM', Null),
- ('zip', 'ZIPCOM', Null)],
- 'win32' : [('msvc', 'CCCOM', Cat),
- ('mslink', 'LINKCOM', Cat)]
-}
-
-tools = map(lambda t: ToolSurrogate(*t), ToolList[platform])
-
-SCons.Defaults.ConstructionEnvironment.update({
- 'PLATFORM' : platform,
- 'TOOLS' : tools,
-})
-
-SConscript('SConstruct')
-"""
-
-class MySGML(sgmllib.SGMLParser):
- """A subclass of the standard Python sgmllib SGML parser.
- """
- def __init__(self):
- sgmllib.SGMLParser.__init__(self)
- self.examples = {}
- self.afunclist = []
-
- def handle_data(self, data):
- try:
- f = self.afunclist[-1]
- except IndexError:
- sys.stdout.write(data)
- else:
- f(data)
-
- def handle_comment(self, data):
- sys.stdout.write('<!--' + data + '-->')
-
- def handle_decl(self, data):
- sys.stdout.write('<!' + data + '>')
-
- def unknown_starttag(self, tag, attrs):
- try:
- f = self.example.afunc
- except AttributeError:
- f = sys.stdout.write
- if not attrs:
- f('<' + tag + '>')
- else:
- f('<' + tag)
- for name, value in attrs:
- f(' ' + name + '=' + '"' + value + '"')
- f('>')
-
- def unknown_endtag(self, tag):
- sys.stdout.write('</' + tag + '>')
-
- def unknown_entityref(self, ref):
- sys.stdout.write('&' + ref + ';')
-
- def unknown_charref(self, ref):
- sys.stdout.write('&#' + ref + ';')
-
- def start_scons_example(self, attrs):
- t = [t for t in attrs if t[0] == 'name']
- if t:
- name = t[0][1]
- try:
- e = self.examples[name]
- except KeyError:
- e = self.examples[name] = Example()
- else:
- e = Example()
- for name, value in attrs:
- setattr(e, name, value)
- self.e = e
- self.afunclist.append(e.afunc)
-
- def end_scons_example(self):
- e = self.e
- files = [f for f in e.files if f.printme]
- if files:
- sys.stdout.write('<programlisting>')
- for f in files:
- if f.printme:
- i = len(f.data) - 1
- while f.data[i] == ' ':
- i = i - 1
- output = f.data[:i+1].replace('__ROOT__', '')
- sys.stdout.write(output)
- if e.data and e.data[0] == '\n':
- e.data = e.data[1:]
- sys.stdout.write(e.data + '</programlisting>')
- delattr(self, 'e')
- self.afunclist = self.afunclist[:-1]
-
- def start_file(self, attrs):
- try:
- e = self.e
- except AttributeError:
- self.error("<file> tag outside of <scons_example>")
- t = [t for t in attrs if t[0] == 'name']
- if not t:
- self.error("no <file> name attribute found")
- try:
- e.prefix
- except AttributeError:
- e.prefix = e.data
- e.data = ""
- f = File(t[0][1])
- f.printme = None
- for name, value in attrs:
- setattr(f, name, value)
- e.files.append(f)
- self.afunclist.append(f.afunc)
-
- def end_file(self):
- self.e.data = ""
- self.afunclist = self.afunclist[:-1]
-
- def start_directory(self, attrs):
- try:
- e = self.e
- except AttributeError:
- self.error("<directory> tag outside of <scons_example>")
- t = [t for t in attrs if t[0] == 'name']
- if not t:
- self.error("no <directory> name attribute found")
- try:
- e.prefix
- except AttributeError:
- e.prefix = e.data
- e.data = ""
- d = Directory(t[0][1])
- for name, value in attrs:
- setattr(d, name, value)
- e.dirs.append(d)
- self.afunclist.append(d.afunc)
-
- def end_directory(self):
- self.e.data = ""
- self.afunclist = self.afunclist[:-1]
-
- def start_scons_example_file(self, attrs):
- t = [t for t in attrs if t[0] == 'example']
- if not t:
- self.error("no <scons_example_file> example attribute found")
- exname = t[0][1]
- try:
- e = self.examples[exname]
- except KeyError:
- self.error("unknown example name '%s'" % exname)
- fattrs = [t for t in attrs if t[0] == 'name']
- if not fattrs:
- self.error("no <scons_example_file> name attribute found")
- fname = fattrs[0][1]
- f = [f for f in e.files if f.name == fname]
- if not f:
- self.error("example '%s' does not have a file named '%s'" % (exname, fname))
- self.f = f[0]
-
- def end_scons_example_file(self):
- f = self.f
- sys.stdout.write('<programlisting>')
- i = len(f.data) - 1
- while f.data[i] == ' ':
- i = i - 1
- sys.stdout.write(f.data[:i+1] + '</programlisting>')
- delattr(self, 'f')
-
- def start_scons_output(self, attrs):
- t = [t for t in attrs if t[0] == 'example']
- if not t:
- self.error("no <scons_output> example attribute found")
- exname = t[0][1]
- try:
- e = self.examples[exname]
- except KeyError:
- self.error("unknown example name '%s'" % exname)
- # Default values for an example.
- o = Output()
- o.os = 'posix'
- o.e = e
- # Locally-set.
- for name, value in attrs:
- setattr(o, name, value)
- self.o = o
- self.afunclist.append(o.afunc)
-
- def end_scons_output(self):
- o = self.o
- e = o.e
- t = TestCmd.TestCmd(workdir='', combine=1)
- t.subdir('ROOT', 'WORK')
- for d in e.dirs:
- dir = t.workpath('WORK', d.name)
- if not os.path.exists(dir):
- os.makedirs(dir)
- for f in e.files:
- i = 0
- while f.data[i] == '\n':
- i = i + 1
- lines = f.data[i:].split('\n')
- i = 0
- while lines[0][i] == ' ':
- i = i + 1
- lines = [l[i:] for l in lines]
- path = f.name.replace('__ROOT__', t.workpath('ROOT'))
- dir, name = os.path.split(f.name)
- if dir:
- dir = t.workpath('WORK', dir)
- if not os.path.exists(dir):
- os.makedirs(dir)
- content = '\n'.join(lines)
- content = content.replace('__ROOT__',
- t.workpath('ROOT'))
- t.write(t.workpath('WORK', f.name), content)
- i = len(o.prefix)
- while o.prefix[i-1] != '\n':
- i = i - 1
- sys.stdout.write('<literallayout>' + o.prefix[:i])
- p = o.prefix[i:]
- for c in o.commandlist:
- sys.stdout.write(p + Prompt[o.os])
- d = c.data.replace('__ROOT__', '')
- sys.stdout.write('<userinput>' + d + '</userinput>\n')
- e = c.data.replace('__ROOT__', t.workpath('ROOT'))
- args = e.split()[1:]
- os.environ['SCONS_LIB_DIR'] = scons_lib_dir
- t.run(interpreter = sys.executable,
- program = scons_py,
- arguments = '-f - ' + ' '.join(args),
- chdir = t.workpath('WORK'),
- stdin = Stdin % o.os)
- out = t.stdout().replace(t.workpath('ROOT'), '')
- if out:
- lines = out.split('\n')
- if lines:
- while lines[-1] == '':
- lines = lines[:-1]
- for l in lines:
- sys.stdout.write(p + l + '\n')
- #err = t.stderr()
- #if err:
- # sys.stderr.write(err)
- if o.data[0] == '\n':
- o.data = o.data[1:]
- sys.stdout.write(o.data + '</literallayout>')
- delattr(self, 'o')
- self.afunclist = self.afunclist[:-1]
-
- def start_command(self, attrs):
- try:
- o = self.o
- except AttributeError:
- self.error("<command> tag outside of <scons_output>")
- try:
- o.prefix
- except AttributeError:
- o.prefix = o.data
- o.data = ""
- c = Command()
- o.commandlist.append(c)
- self.afunclist.append(c.afunc)
-
- def end_command(self):
- self.o.data = ""
- self.afunclist = self.afunclist[:-1]
-
- def start_sconstruct(self, attrs):
- sys.stdout.write('<programlisting>')
-
- def end_sconstruct(self):
- sys.stdout.write('</programlisting>')
-
-try:
- file = sys.argv[1]
-except IndexError:
- file = '-'
-
-if file == '-':
- f = sys.stdin
-else:
- try:
- f = open(file, 'r')
- except IOError, msg:
- print file, ":", msg
- sys.exit(1)
-
-data = f.read()
-if f is not sys.stdin:
- f.close()
-
-x = MySGML()
-for c in data:
- x.feed(c)
-x.close()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/bin/scp-sourceforge b/bin/scp-sourceforge
new file mode 100755
index 0000000..ad761d1
--- /dev/null
+++ b/bin/scp-sourceforge
@@ -0,0 +1,38 @@
+#!/bin/bash
+set -x
+set -e
+
+if [ -z "$1" ]; then
+ echo usage: $0 SourceForgeUserName
+ exit
+fi
+
+SF_USER=$1
+
+rm -rf sf
+for p in scons scons-src scons-local
+do
+ mkdir -p sf/$p/$VERSION
+ cp -p src/Announce.txt \
+ build/scons/CHANGES.txt \
+ build/scons/RELEASE.txt \
+ sf/$p/$VERSION
+done
+
+cp -p build/dist/scons-$VERSION-1.noarch.rpm \
+ build/dist/scons-$VERSION-1.src.rpm \
+ build/dist/scons-$VERSION.tar.gz \
+ build/dist/scons-$VERSION.win32.exe \
+ build/dist/scons-$VERSION.zip \
+ sf/scons/$VERSION
+cp -p build/dist/scons-local-$VERSION.tar.gz \
+ build/dist/scons-local-$VERSION.zip \
+ sf/scons-src/$VERSION
+cp -p build/dist/scons-src-$VERSION.tar.gz \
+ build/dist/scons-src-$VERSION.zip \
+ sf/scons-local/$VERSION
+
+# Transmit them in this order, since the most-recent is displayed at the top
+scp -r sf/scons-local/ sf/scons-src/ sf/scons/ \
+ $SF_USER,scons@frs.sourceforge.net:/home/pfs/project/s/sc/scons
+rm -rf sf
diff --git a/bin/update-release-info.py b/bin/update-release-info.py
index 7e11c4b..1c84466 100644
--- a/bin/update-release-info.py
+++ b/bin/update-release-info.py
@@ -36,7 +36,7 @@ In 'post' mode, files are prepared for the next release cycle:
src/Announce.txt.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -57,7 +57,7 @@ In 'post' mode, files are prepared for the next release cycle:
# 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__ = "bin/update-release-info.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "bin/update-release-info.py 5357 2011/09/09 21:31:03 bdeegan"
import os
import sys
@@ -114,12 +114,18 @@ if version_tuple[3] != 'final':
else:
yyyy,mm,dd,_,_,_ = release_date
version_tuple = version_tuple[:4] + ((yyyy*100 + mm)*100 + dd,)
- version_string = '.'.join(map(str, version_tuple))
+
+import pdb
+pdb.set_trace()
+
+if mode == 'final' or mode == 'release':
+ version_string = '.'.join(map(str, version_tuple[0:3]))
else:
- # Final release doesn't have type or builddate in version string
- version_string = '.'.join(map(str, version_tuple[:3]))
+ version_string = '.'.join(map(str, version_tuple))
version_type = version_tuple[3]
+
+
if DEBUG: print 'version string', version_string
if version_type not in ['alpha', 'beta', 'candidate', 'final']:
@@ -188,7 +194,9 @@ class UpdateFile(object):
'''
XXX
'''
+ if DEBUG: print "content before:%s"%self.content
self.content = self.match_rel.sub(replacement, self.content, count)
+ if DEBUG: print "content after :%s"%self.content
# Determine the release date and the pattern to match a date
# Mon, 05 Jun 2010 21:17:15 -0700
diff --git a/bin/xmlagenda.py b/bin/xmlagenda.py
index 7937331..b3cd520 100755
--- a/bin/xmlagenda.py
+++ b/bin/xmlagenda.py
@@ -1,11 +1,15 @@
#!/usr/bin/env python
-# Download the issues from Issuzilla as XML; this creates a file named
-# 'issues.xml'. Run this script to translate 'issues.xml' into a CSV
-# file named 'editlist.csv'. Upload the CSV into a Google spreadsheet.
+# Query the scons.tigris.org database for the issues of interest.
+# The typical triage query is found on http://www.scons.org/wiki/BugParty
-# In the spreadsheet, select the last column and pick "delete-->column" (it
-# was added by the upload to allow for expansion and we don't need it).
+# Download the issues from Issuezilla as XML; this creates a file
+# named 'issues.xml'. Run this script in the dir containing
+# issues.xml (or pass full path as arg to this script) to translate
+# 'issues.xml' into a CSV file named 'editlist.csv'. Upload the CSV
+# into a Google spreadsheet.
+
+# In the spreadsheet:
# Select all the columns and pick "align-->top"
# Select the ID and votes columns and pick "align-->right"
# Select the priority column and pick "align-->center"
@@ -17,7 +21,7 @@
# The team members
# FIXME: These names really should be external to this script
-team = sorted('Steven Gary Greg Ken Jim David Bill Sergey Jason'.split())
+team = sorted('Steven Gary Greg Ken Jim Bill Jason Dirk Anatoly'.split())
# The elements to be picked out of the issue
PickList = [
@@ -85,6 +89,8 @@ for issue in issues:
writer.writerow(['','','','','','',''])
for member in team: writer.writerow(['','',member,'','','',''])
+print "Exported %d issues to editlist.csv. Ready to upload to Google."%len(issues)
+
# Local Variables:
# tab-width:4
# indent-tabs-mode:nil
diff --git a/doc/SConscript b/doc/SConscript
index e0b3f71..54b620e 100644
--- a/doc/SConscript
+++ b/doc/SConscript
@@ -3,7 +3,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
@@ -43,7 +43,7 @@ dist_doc_tar_gz = '$DISTDIR/scons-doc-${VERSION}.tar.gz'
# if lynx is available to do the dump.
#
fig2dev = whereis('fig2dev')
-epydoc = whereis('epydoc')
+epydoc_cli = whereis('epydoc')
groff = whereis('groff')
lynx = whereis('lynx')
man2html = whereis('man2html')
@@ -121,7 +121,7 @@ scons_doc_files = list(map(chop, open(manifest_xml_in).readlines()))
scons_doc_files = [File('#src/engine/'+x).rstr() for x in scons_doc_files]
if not jw:
- print "jw not found, skipping building User Guide."
+ print "doc: jw not found, skipping building User Guide."
else:
#
# Always create a version.xml file containing the version information
@@ -151,6 +151,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT.
builders_gen = os.path.join(build, 'user', 'builders.gen')
builders_mod = os.path.join(build, 'user', 'builders.mod')
+ functions_gen = os.path.join(build, 'user', 'functions.gen')
+ functions_mod = os.path.join(build, 'user', 'functions.mod')
tools_gen = os.path.join(build, 'user', 'tools.gen')
tools_mod = os.path.join(build, 'user', 'tools.mod')
variables_gen = os.path.join(build, 'user', 'variables.gen')
@@ -163,11 +165,12 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT.
# vs. the other. The *.gen and *.mod targets will still be dependent
# on the list of the files themselves.
doc_output_files = [builders_gen, builders_mod,
+ functions_gen, functions_mod,
tools_gen, tools_mod,
variables_gen, variables_mod]
b = env.Command(doc_output_files,
scons_doc_files,
- "$PYTHON $SCONS_PROC_PY --xml -b ${TARGETS[0]},${TARGETS[1]} -t ${TARGETS[2]},${TARGETS[3]} -v ${TARGETS[4]},${TARGETS[5]} $( $SOURCES $)")
+ "$PYTHON $SCONS_PROC_PY --xml -b ${TARGETS[0]},${TARGETS[1]} -f ${TARGETS[2]},${TARGETS[3]} -t ${TARGETS[4]},${TARGETS[5]} -v ${TARGETS[6]},${TARGETS[7]} $( $SOURCES $)")
env.Depends(b, "$SCONS_PROC_PY")
env.Local(b)
@@ -403,11 +406,11 @@ for m in man_page_list:
x = orig_env.SCons_revision(os.path.join(build, 'man', m),
os.path.join('man', m))
-man_i_files = ['builders.man', 'tools.man', 'variables.man']
+man_i_files = ['builders.man', 'functions.man', 'tools.man', 'variables.man']
man_intermediate_files = [os.path.join(build, 'man', x) for x in man_i_files]
-cmd = "$PYTHON $SCONS_PROC_PY --man -b ${TARGETS[0]} -t ${TARGETS[1]} -v ${TARGETS[2]} $( $SOURCES $)"
+cmd = "$PYTHON $SCONS_PROC_PY --man -b ${TARGETS[0]} -f ${TARGETS[1]} -t ${TARGETS[2]} -v ${TARGETS[3]} $( $SOURCES $)"
man_intermediate_files = env.Command(man_intermediate_files,
scons_doc_files,
cmd)
@@ -458,8 +461,79 @@ for man_1 in man_page_list:
tar_deps.append(html)
tar_list.append(html)
-if not epydoc:
- print "epydoc not found, skipping building API documentation."
+if not epydoc_cli:
+ try:
+ import epydoc
+ except ImportError:
+ epydoc = None
+ else:
+ # adding Epydoc builder using imported module
+ def epydoc_builder_action(target, source, env):
+ """
+ Take a list of `source` files and build docs for them in
+ `target` dir.
+
+ `target` and `source` are lists.
+
+ Uses OUTDIR and EPYDOCFLAGS environment variables.
+
+ http://www.scons.org/doc/2.0.1/HTML/scons-user/x3594.html
+ """
+
+ # the epydoc build process is the following:
+ # 1. build documentation index
+ # 2. feed doc index to writer for docs
+
+ from epydoc.docbuilder import build_doc_index
+ from epydoc.docwriter.html import HTMLWriter
+ from epydoc.docwriter.latex import LatexWriter
+
+ # first arg is a list where can be names of python package dirs,
+ # python files, object names or objects itself
+ docindex = build_doc_index([str(src) for src in source])
+ if docindex == None:
+ return -1
+
+ if env['EPYDOCFLAGS'] == '--html':
+ html_writer = HTMLWriter(docindex,
+ docformat='restructuredText',
+ prj_name='SCons',
+ prj_url='http://www.scons.org/')
+ try:
+ html_writer.write(env['OUTDIR'])
+ except OSError: # If directory cannot be created or any file cannot
+ # be created or written to.
+ return -2
+
+ """
+ # PDF support requires external Linux utilites, so it's not crossplatform.
+ # Leaving for now.
+ # http://epydoc.svn.sourceforge.net/viewvc/epydoc/trunk/epydoc/src/epydoc/cli.py
+
+ elif env['EPYDOCFLAGS'] == '--pdf':
+ pdf_writer = LatexWriter(docindex,
+ docformat='restructuredText',
+ prj_name='SCons',
+ prj_url='http://www.scons.org/')
+ """
+ return 0
+
+ epydoc_commands = [
+ Delete('$OUTDIR'),
+ epydoc_builder_action,
+ Touch('$TARGET'),
+ ]
+
+else: # epydoc_cli is found
+ epydoc_commands = [
+ Delete('$OUTDIR'),
+ '$EPYDOC $EPYDOCFLAGS --debug --output $OUTDIR --docformat=restructuredText --name SCons --url http://www.scons.org/ $SOURCES',
+ Touch('$TARGET'),
+ ]
+
+
+if not epydoc_cli and not epydoc:
+ print "doc: epydoc not found, skipping building API documentation."
else:
# XXX Should be in common with reading the same thing in
# the SConstruct file.
@@ -475,40 +549,37 @@ else:
e = os.path.join(build, '..', 'scons', 'engine')
sources = [os.path.join(e, x) for x in sources]
- epydoc_commands = [
- Delete('$OUTDIR'),
- '$EPYDOC $EPYDOCFLAGS --debug --output $OUTDIR --docformat=restructuredText --name SCons --url http://www.scons.org/ $SOURCES',
- Touch('$TARGET'),
- ]
-
htmldir = os.path.join(build, 'HTML', 'scons-api')
env.Command('${OUTDIR}/index.html', sources, epydoc_commands,
- EPYDOC=epydoc, EPYDOCFLAGS='--html', OUTDIR=htmldir)
+ EPYDOC=epydoc_cli, EPYDOCFLAGS='--html', OUTDIR=htmldir)
tar_deps.append(htmldir)
tar_list.append(htmldir)
- # PDF and PostScript and TeX are built from the
- # same invocation.
- api_dir = os.path.join(build, 'scons-api')
- api_pdf = os.path.join(api_dir, 'api.pdf')
- api_ps = os.path.join(api_dir, 'api.ps')
- api_tex = os.path.join(api_dir, 'api.tex')
- api_targets = [api_pdf, api_ps, api_tex]
- env.Command(api_targets, sources, epydoc_commands,
- EPYDOC=epydoc, EPYDOCFLAGS='--pdf', OUTDIR=api_dir)
- Local(api_targets)
-
- pdf_install = os.path.join(build, 'PDF', 'scons-api.pdf')
- env.InstallAs(pdf_install, api_pdf)
- tar_deps.append(pdf_install)
- tar_list.append(pdf_install)
- Local(pdf_install)
-
- ps_install = os.path.join(build, 'PS', 'scons-api.ps')
- env.InstallAs(ps_install, api_ps)
- tar_deps.append(ps_install)
- tar_list.append(ps_install)
- Local(ps_install)
+ if not epydoc_cli:
+ print "doc: command line epydoc is not found, skipping PDF/PS/Tex output"
+ else:
+ # PDF and PostScript and TeX are built from the
+ # same invocation.
+ api_dir = os.path.join(build, 'scons-api')
+ api_pdf = os.path.join(api_dir, 'api.pdf')
+ api_ps = os.path.join(api_dir, 'api.ps')
+ api_tex = os.path.join(api_dir, 'api.tex')
+ api_targets = [api_pdf, api_ps, api_tex]
+ env.Command(api_targets, sources, epydoc_commands,
+ EPYDOC=epydoc_cli, EPYDOCFLAGS='--pdf', OUTDIR=api_dir)
+ Local(api_targets)
+
+ pdf_install = os.path.join(build, 'PDF', 'scons-api.pdf')
+ env.InstallAs(pdf_install, api_pdf)
+ tar_deps.append(pdf_install)
+ tar_list.append(pdf_install)
+ Local(pdf_install)
+
+ ps_install = os.path.join(build, 'PS', 'scons-api.ps')
+ env.InstallAs(ps_install, api_ps)
+ tar_deps.append(ps_install)
+ tar_list.append(ps_install)
+ Local(ps_install)
#
# Now actually create the tar file of the documentation,
diff --git a/doc/design/scons.mod b/doc/design/scons.mod
index 012bc3e..33538fb 100644
--- a/doc/design/scons.mod
+++ b/doc/design/scons.mod
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
An SCons-specific DTD module, for use with SCons DocBook
documentation, that contains names, phrases, acronyms, etc. used
diff --git a/doc/developer/architecture.xml b/doc/developer/architecture.xml
index e7c2f56..c122148 100644
--- a/doc/developer/architecture.xml
+++ b/doc/developer/architecture.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/developer/branches.xml b/doc/developer/branches.xml
index 8f88c3c..b88bccf 100644
--- a/doc/developer/branches.xml
+++ b/doc/developer/branches.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/developer/copyright.xml b/doc/developer/copyright.xml
index d718e5e..f89ef84 100644
--- a/doc/developer/copyright.xml
+++ b/doc/developer/copyright.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/developer/cycle.xml b/doc/developer/cycle.xml
index bb34db5..cca4422 100644
--- a/doc/developer/cycle.xml
+++ b/doc/developer/cycle.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/developer/main.xml b/doc/developer/main.xml
index c72ad38..25c56bf 100644
--- a/doc/developer/main.xml
+++ b/doc/developer/main.xml
@@ -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
diff --git a/doc/developer/packaging.xml b/doc/developer/packaging.xml
index 2ecae8c..50d8e7b 100644
--- a/doc/developer/packaging.xml
+++ b/doc/developer/packaging.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/developer/preface.xml b/doc/developer/preface.xml
index da2964c..b61d7b8 100644
--- a/doc/developer/preface.xml
+++ b/doc/developer/preface.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/developer/sourcetree.xml b/doc/developer/sourcetree.xml
index 3c89189..305a134 100644
--- a/doc/developer/sourcetree.xml
+++ b/doc/developer/sourcetree.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/developer/testing.xml b/doc/developer/testing.xml
index ea01780..1287e19 100644
--- a/doc/developer/testing.xml
+++ b/doc/developer/testing.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/man/scons-time.1 b/doc/man/scons-time.1
index dda1c13..69db49a 100644
--- a/doc/man/scons-time.1
+++ b/doc/man/scons-time.1
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+.\" Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining
.\" a copy of this software and associated documentation files (the
@@ -19,7 +19,7 @@
.\" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
.\" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.\"
-.\" doc/man/scons-time.1 5134 2010/08/16 23:02:40 bdeegan
+.\" doc/man/scons-time.1 5357 2011/09/09 21:31:03 bdeegan
.\"
.\" ES - Example Start - indents and turns off line fill
.de ES
@@ -98,7 +98,7 @@
[\fB--which=\fIWHICH\fR]
[\fIARGUMENTS\fR]
..
-.TH SCONS-TIME 1 "August 2010"
+.TH SCONS-TIME 1 "September 2011"
.SH NAME
scons-time \- generate and display SCons timing information
'\"==========================================================================
diff --git a/doc/man/scons.1 b/doc/man/scons.1
index 5d2b795..bd0d965 100644
--- a/doc/man/scons.1
+++ b/doc/man/scons.1
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+.\" Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining
.\" a copy of this software and associated documentation files (the
@@ -19,9 +19,9 @@
.\" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
.\" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.\"
-.\" doc/man/scons.1 5134 2010/08/16 23:02:40 bdeegan
+.\" doc/man/scons.1 5357 2011/09/09 21:31:03 bdeegan
.\"
-.TH SCONS 1 "August 2010"
+.TH SCONS 1 "September 2011"
.\" ES - Example Start - indents and turns off line fill
.rm ES
.de ES
@@ -100,17 +100,17 @@ file,
.B scons
looks for a directory named
.I site_scons
-in the directory containing the
+in various system directories (see below) and the directory containing the
.I SConstruct
-file; if it exists,
+file; for each of those dirs which exists,
.I site_scons
-is added to sys.path,
+is prepended to sys.path,
the file
.IR site_scons/site_init.py ,
is evaluated if it exists,
and the directory
.I site_scons/site_tools
-is added to the default toolpath if it exist.
+is prepended to the default toolpath if it exists.
See the
.I --no-site-dir
and
@@ -601,6 +601,12 @@ have been compiled with optimization
files).
.TP
+--debug=duplicate
+Print a line for each unlink/relink (or copy) of a variant file from
+its source file. Includes debugging info for unlinking stale variant
+files, as well as unlinking old targets before building them.
+
+.TP
--debug=dtree
A synonym for the newer
.B --tree=derived
@@ -664,6 +670,18 @@ Re-run SCons under the control of the
Python debugger.
.TP
+--debug=prepare
+Print a line each time any target (internal or external)
+is prepared for building.
+.B scons
+prints this for each target it considers, even if that
+target is up to date (see also --debug=explain).
+This can help debug problems with targets that aren't being
+built; it shows whether
+.B scons
+is at least considering them or not.
+
+.TP
--debug=presub
Print the raw command line used to build each target
before the construction environment variables are substituted.
@@ -1095,13 +1113,13 @@ any out-of-date target files, but do not execute the commands.
.RI --no-site-dir
Prevents the automatic addition of the standard
.I site_scons
-dir to
+dirs to
.IR sys.path .
Also prevents loading the
.I site_scons/site_init.py
-module if it exists, and prevents adding
+modules if they exist, and prevents adding their
.I site_scons/site_tools
-to the toolpath.
+dirs to the toolpath.
.\" .TP
.\" .RI -o " file" ", --old-file=" file ", --assume-old=" file
@@ -1182,7 +1200,7 @@ Ignored for compatibility with GNU
.RI --site-dir= dir
Uses the named dir as the site dir rather than the default
.I site_scons
-dir. This dir will get prepended to
+dirs. This dir will get prepended to
.IR sys.path ,
the module
.IR dir /site_init.py
@@ -1190,6 +1208,48 @@ will get loaded if it exists, and
.IR dir /site_tools
will get added to the default toolpath.
+The default set of
+.I site_scons
+dirs used when
+.I --site-dir
+is not specified depends on the system platform, as follows. Note
+that the directories are examined in the order given, from most
+generic to most specific, so the last-executed site_init.py file is
+the most specific one (which gives it the chance to override
+everything else), and the dirs are prepended to the paths, again so
+the last dir examined comes first in the resulting path.
+
+.IP "Windows:"
+.nf
+ %ALLUSERSPROFILE/Application Data/scons/site_scons
+ %USERPROFILE%/Local Settings/Application Data/scons/site_scons
+ %APPDATA%/scons/site_scons
+ %HOME%/.scons/site_scons
+ ./site_scons
+.fi
+.IP "Mac OS X:"
+.nf
+ /Library/Application Support/SCons/site_scons
+ /opt/local/share/scons/site_scons (for MacPorts)
+ /sw/share/scons/site_scons (for Fink)
+ $HOME/Library/Application Support/SCons/site_scons
+ $HOME/.scons/site_scons
+ ./site_scons
+.fi
+.IP "Solaris:"
+.nf
+ /opt/sfw/scons/site_scons
+ /usr/share/scons/site_scons
+ $HOME/.scons/site_scons
+ ./site_scons
+.fi
+.IP "Linux, HPUX, and other Posix-like systems:"
+.nf
+ /usr/share/scons/site_scons
+ $HOME/.scons/site_scons
+ ./site_scons
+.fi
+
.TP
.RI --stack-size= KILOBYTES
Set the size stack used to run threads to
@@ -2269,7 +2329,7 @@ Builders by adding them
to the
.B SourceFileScanner
object.
-See the section "Scanner Objects,"
+See the section "Scanner Objects"
below, for more information about
defining your own Scanner objects
and using the
@@ -2351,4049 +2411,34 @@ and global functions supported by
include:
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Action( action ", [" cmd/str/fun ", [" var ", ...]] [" option = value ", ...])"
-.TP
-.IR env .Action( action ", [" cmd/str/fun ", [" var ", ...]] [" option = value ", ...])"
-Creates an Action object for
-the specified
-.IR action .
-See the section "Action Objects,"
-below, for a complete explanation of the arguments and behavior.
-
-Note that the
-.BR env.Action ()
-form of the invocation will expand
-construction variables in any argument strings,
-including the
-.I action
-argument, at the time it is called
-using the construction variables in the
-.I env
-construction environment through which
-.BR env.Action ()
-was called.
-The
-.BR Action ()
-form delays all variable expansion
-until the Action object is actually used.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI AddMethod( object, function ", [" name ])
-.TP
-.RI env.AddMethod( function ", [" name ])
-When called with the
-.BR AddMethod ()
-form,
-adds the specified
-.I function
-to the specified
-.I object
-as the specified method
-.IR name .
-When called with the
-.BR env.AddMethod ()
-form,
-adds the specified
-.I function
-to the construction environment
-.I env
-as the specified method
-.IR name .
-In both cases, if
-.I name
-is omitted or
-.BR None ,
-the name of the
-specified
-.I function
-itself is used for the method name.
-
-Examples:
-
-.ES
-# 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')
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI AddOption( arguments )
-This function adds a new command-line option to be recognized.
-The specified
-.I arguments
-are the same as supported by the standard Python
-.BR optparse.add_option ()
-method (with a few additional capabilities noted below);
-see the documentation for
-.B optparse
-for a thorough discussion of its option-processing capabities.
-
-In addition to the arguments and values supported by the
-.B optparse.add_option ()
-method,
-the SCons
-.BR AddOption ()
-function allows you to set the
-.B nargs
-keyword value to
-.B '?'
-(a string with just the question mark)
-to indicate that the specified long option(s) take(s) an
-.I optional
-argument.
-When
-.B "nargs = '?'"
-is passed to the
-.BR AddOption ()
-function, the
-.B const
-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
-.B default=
-keyword argument is supplied when calling
-.BR AddOption (),
-the option will have a default value of
-.BR None .
-
-Once a new command-line option has been added with
-.BR AddOption (),
-the option value may be accessed using
-.BR GetOption ()
-or
-.BR env.GetOption ().
-\" NOTE: in SCons 1.x or 2.0, user options will be settable, but not yet.
-\" Uncomment this when that works. See tigris issue 2105.
-\" The value may also be set, using
-\" .BR SetOption ()
-\" or
-\" .BR env.SetOption (),
-\" if conditions in a
-\" .B SConscript
-\" require overriding any default value.
-\" Note, however, that a
-\" value specified on the command line will
-\" .I always
-\" override a value set by any SConscript file.
-
-Any specified
-.B help=
-strings for the new option(s)
-will be displayed by the
-.B -H
-or
-.B -h
-options
-(the latter only if no other help text is
-specified in the SConscript files).
-The help text for the local options specified by
-.BR AddOption ()
-will appear below the SCons options themselves,
-under a separate
-.B "Local Options"
-heading.
-The options will appear in the help text
-in the order in which the
-.BR AddOption ()
-calls occur.
-
-Example:
-
-.ES
-AddOption('--prefix',
- dest='prefix',
- nargs=1, type='string',
- action='store',
- metavar='DIR',
- help='installation prefix')
-env = Environment(PREFIX = GetOption('prefix'))
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI AddPostAction( target ", " action )
-.TP
-.RI env.AddPostAction( target ", " action )
-Arranges for the specified
-.I action
-to be performed
-after the specified
-.I target
-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.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI AddPreAction( target ", " action )
-.TP
-.RI env.AddPreAction( target ", " action )
-Arranges for the specified
-.I action
-to be performed
-before the specified
-.I target
-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
-.B .c
-file via an intermediate object file:
-
-.ES
-foo = Program('foo.c')
-AddPreAction(foo, 'pre_action')
-.EE
-
-The specified
-.B pre_action
-would be executed before
-.B scons
-calls the link command that actually
-generates the executable program binary
-.BR foo ,
-not before compiling the
-.B foo.c
-file into an object file.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Alias( alias ", [" targets ", [" action ]])
-.TP
-.RI env.Alias( alias ", [" targets ", [" action ]])
-Creates one or more phony targets that
-expand to one or more other targets.
-An optional
-.I action
-(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.
-.B 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:
-
-.ES
-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")
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI AllowSubstExceptions([ exception ", ...])"
-Specifies the exceptions that will be allowed
-when expanding construction variables.
-By default,
-any construction variable expansions that generate a
-.B NameError
-or
-.BR IndexError
-exception will expand to a
-.B ''
-(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
-.B AllowSubstExceptions
-is called multiple times,
-each call completely overwrites the previous list
-of allowed exceptions.
-
-Example:
-
-.ES
-# 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)
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI AlwaysBuild( target ", ...)"
-.TP
-.RI env.AlwaysBuild( target ", ...)"
-Marks each given
-.I target
-so that it is always assumed to be out of date,
-and will always be rebuilt if needed.
-Note, however, that
-.BR 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
-.I always
-be built if so specified.
-Multiple targets can be passed in to a single call to
-.BR AlwaysBuild ().
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.Append( key = val ", [...])"
-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:
-
-.ES
-env.Append(CCFLAGS = ' -g', FOO = ['foo.yyy'])
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.AppendENVPath( name ", " newpath ", [" envname ", " sep ", " delete_existing ])
-This appends new path elements to the given path in the
-specified external environment
-.RB ( ENV
-by default).
-This will only add
-any particular path once (leaving the last one it encounters and
-ignoring the rest, to preserve path order),
-and to help assure this,
-will normalize all paths (using
-.B os.path.normpath
-and
-.BR os.path.normcase ).
-This can also handle the
-case where the given old path variable is a list instead of a
-string, in which case a list will be returned instead of a string.
-
-If
-.I delete_existing
-is 0, then adding a path that already exists
-will not move it to the end; it will stay where it is in the list.
-
-Example:
-
-.ES
-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
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.AppendUnique( key = val ", [...], delete_existing=0)"
-Appends the specified keyword arguments
-to the end of construction variables in the environment.
-If the Environment does not have
-the specified construction variable,
-it is simply added to the environment.
-If the construction variable being appended to is a list,
-then any value(s) that already exist in the
-construction variable will
-.I not
-be added again to the list.
-However, if delete_existing is 1,
-existing matching values are removed first, so
-existing values in the arg list move to the end of the list.
-
-Example:
-
-.ES
-env.AppendUnique(CCFLAGS = '-g', FOO = ['foo.yyy'])
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-env.BitKeeper()
-A factory function that
-returns a Builder object
-to be used to fetch source files
-using BitKeeper.
-The returned Builder
-is intended to be passed to the
-.B SourceCode
-function.
-
-This function is deprecated. For details, see the entry for the
-.B SourceCode
-function.
-
-Example:
-
-.ES
-env.SourceCode('.', env.BitKeeper())
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI BuildDir( build_dir ", " src_dir ", [" duplicate ])
-.TP
-.RI env.BuildDir( build_dir ", " src_dir ", [" duplicate ])
-Deprecated synonyms for
-.BR VariantDir ()
-and
-.BR env.VariantDir ().
-The
-.I build_dir
-argument becomes the
-.I variant_dir
-argument of
-.BR VariantDir ()
-or
-.BR env.VariantDir ().
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Builder( action ", [" arguments ])
-.TP
-.RI env.Builder( action ", [" arguments ])
-Creates a Builder object for
-the specified
-.IR action .
-See the section "Builder Objects,"
-below, for a complete explanation of the arguments and behavior.
-
-Note that the
-.BR env.Builder ()
-form of the invocation will expand
-construction variables in any arguments strings,
-including the
-.I action
-argument,
-at the time it is called
-using the construction variables in the
-.B env
-construction environment through which
-.BR env.Builder ()
-was called.
-The
-.BR Builder ()
-form delays all variable expansion
-until after the Builder object is actually called.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI CacheDir( cache_dir )
-.TP
-.RI env.CacheDir( cache_dir )
-Specifies that
-.B scons
-will maintain a cache of derived files in
-.I cache_dir .
-The derived files in the cache will be shared
-among all the builds using the same
-.BR CacheDir ()
-call.
-Specifying a
-.I cache_dir
-of
-.B None
-disables derived file caching.
-
-Calling
-.BR env.CacheDir ()
-will only affect targets built
-through the specified construction environment.
-Calling
-.BR CacheDir ()
-sets a global default
-that will be used by all targets built
-through construction environments
-that do
-.I not
-have an
-.BR env.CacheDir ()
-specified.
-
-When a
-.BR CacheDir ()
-is being used and
-.B 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,
-.B scons
-will retrieve the file from the cache.
-If the derived file is not present in the cache,
-.B 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
-.BR CacheDir()
-may be disabled for any invocation
-by using the
-.B --cache-disable
-option.
-
-If the
-.B --cache-force
-option is used,
-.B scons
-will place a copy of
-.I all
-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
-.BR CacheDir ()
-is added to a build,
-or after using the
-.B --cache-disable
-option.
-
-When using
-.BR CacheDir (),
-.B scons
-will report,
-"Retrieved `file' from cache,"
-unless the
-.B --cache-show
-option is being used.
-When the
-.B --cache-show
-option is used,
-.B scons
-will print the action that
-.I would
-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
-.BR 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.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Clean( targets ", " files_or_dirs )
-.TP
-.RI env.Clean( targets ", " files_or_dirs )
-This specifies a list of files or directories which should be removed
-whenever the targets are specified with the
-.B -c
-command line option.
-The specified targets may be a list
-or an individual target.
-Multiple calls to
-.BR 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
-.BR Clean ()
-method, or as a list.
-.BR Clean ()
-will also accept the return value of any of the construction environment
-Builder methods.
-Examples:
-
-The related
-.BR NoClean ()
-function overrides calling
-.BR Clean ()
-for the same target,
-and any targets passed to both functions will
-.I not
-be removed by the
-.B -c
-option.
-
-Examples:
-
-.ES
-Clean('foo', ['bar', 'baz'])
-Clean('dist', env.Program('hello', 'hello.c'))
-Clean(['foo', 'bar'], 'something_else_to_clean')
-.EE
-
-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.
-.ES
-Clean(docdir, os.path.join(docdir, projectname))
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Command( target ", " source ", " action ", [" key = val ", ...])"
-.TP
-.RI env.Command( target ", " source ", " action ", [" key = val ", ...])"
-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
-.B source_scanner
-keyword argument can
-be used to specify
-a Scanner object
-that will be used to scan the sources.
-(The global
-.B DirScanner
-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
-.B @
-(at-sign)
-to suppress printing the command in question,
-or by a
-.B \-
-(hyphen)
-to ignore the exit status of the external command.
-
-Examples:
-
-.ES
-env.Command('foo.out', 'foo.in',
- "$FOO_BUILD < $SOURCES > $TARGET")
-
-env.Command('bar.out', 'bar.in',
- ["rm -f $TARGET",
- "$BAR_BUILD < $SOURCES > $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 < $SOURCES > .tmp",
- rename ])
-.EE
-
-.IP
-Note that the
-.BR 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
-.BR Dir ()
-or
-.BR env.Dir ()
-functions.
-
-Examples:
-
-.ES
-env.Command('ddd.list', Dir('ddd'), 'ls -l $SOURCE > $TARGET')
-
-env['DISTDIR'] = 'destination/directory'
-env.Command(env.Dir('$DISTDIR')), None, make_distdir)
-.EE
-
-.IP
-(Also note that SCons will usually
-automatically create any directory necessary to hold a target file,
-so you normally don't need to create directories by hand.)
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Configure( env ", [" custom_tests ", " conf_dir ", " log_file ", " config_h ])
-.TP
-.RI env.Configure([ custom_tests ", " conf_dir ", " log_file ", " config_h ])
-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.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.Clone([ key = val ", ...])"
-Return a separate copy of a construction environment.
-If there are any keyword arguments specified,
-they are added to the returned copy,
-overwriting any existing values
-for the keywords.
-
-Example:
-
-.ES
-env2 = env.Clone()
-env3 = env.Clone(CCFLAGS = '-g')
-.EE
-.IP
-Additionally, a list of tools and a toolpath may be specified, as in
-the Environment constructor:
-
-.ES
-def MyTool(env): env['FOO'] = 'bar'
-env4 = env.Clone(tools = ['msvc', MyTool])
-.EE
-
-The
-.I parse_flags
-keyword argument is also recognized:
-
-.ES
-# create an environment for compiling programs that use wxWidgets
-wx_env = env.Clone(parse_flags = '!wx-config --cflags --cxxflags')
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.Copy([ key = val ", ...])"
-A now-deprecated synonym for
-.BR env.Clone() .
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.CVS( repository ", " module )
-A factory function that
-returns a Builder object
-to be used to fetch source files
-from the specified
-CVS
-.IR repository .
-The returned Builder
-is intended to be passed to the
-.B SourceCode
-function.
-
-The optional specified
-.I module
-will be added to the beginning
-of all repository path names;
-this can be used, in essence,
-to strip initial directory names
-from the repository path names,
-so that you only have to
-replicate part of the repository
-directory hierarchy in your
-local build directory.
-
-This function is deprecated. For details, see the entry for the
-.B SourceCode
-function.
-
-Examples:
-
-.ES
-# 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'))
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Decider( function )
-.TP
-.RI env.Decider( function )
-Specifies that all up-to-date decisions for
-targets built through this construction environment
-will be handled by the specified
-.IR function .
-The
-.I function
-can be one of the following strings
-that specify the type of decision function
-to be performed:
-
-.RS 10
-.HP 6
-.B timestamp-newer
-Specifies that a target shall be considered out of date and rebuilt
-if the dependency's timestamp is newer than the target file's timestamp.
-This is the behavior of the classic Make utility,
-and
-.B make
-can be used a synonym for
-.BR timestamp-newer .
-
-.HP 6
-.B timestamp-match
-Specifies that a target shall be considered out of date and rebuilt
-if the dependency's timestamp is different than the
-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
-.I earlier
-timestamp, such as can happen when restoring files from backup archives.
-
-.HP 6
-.B MD5
-Specifies that a target shall be considered out of date and rebuilt
-if the dependency's content has changed sine the last time
-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.
-.B content
-can be used as a synonym for
-.BR MD5 .
-
-.HP 6
-.B MD5-timestamp
-Specifies that a target shall be considered out of date and rebuilt
-if the dependency's content has changed sine the last time
-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
-.I not
-rebuilt.
-This provides behavior very similar
-to the
-.B MD5
-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
-.I not
-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.
-.RE
-
-.IP
-Examples:
-
-.ES
-# 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')
-.EE
-
-.IP
-In addition to the above already-available functions,
-the
-.I function
-argument may be an actual Python function
-that takes the following three arguments:
-
-.RS 10
-.IP dependency
-The Node (file) which
-should cause the
-.I target
-to be rebuilt
-if it has "changed" since the last tme
-.I target was built.
-
-.IP target
-The Node (file) being built.
-In the normal case,
-this is what should get rebuilt
-if the
-.I dependency
-has "changed."
-
-.IP prev_ni
-Stored information about the state of the
-.I dependency
-the last time the
-.I target
-was built.
-This can be consulted to match various
-file characteristics
-such as the timestamp,
-size, or content signature.
-.RE
-
-.IP
-The
-.I function
-should return a
-.B True
-(non-zero)
-value if the
-.I dependency
-has "changed" since the last time
-the
-.I target
-was built
-(indicating that the target
-.I should
-be rebuilt),
-and
-.B False
-(zero)
-otherwise
-(indicating that the target should
-.I not
-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:
-
-.ES
-def my_decider(dependency, target, prev_ni):
- return not os.path.exists(str(target))
-
-env.Decider(my_decider)
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Default( targets )
-.TP
-.RI env.Default( targets )
-This specifies a list of default targets,
-which will be built by
-.B scons
-if no explicit targets are given on the command line.
-Multiple calls to
-.BR Default ()
-are legal,
-and add to the list of default targets.
-
-Multiple targets should be specified as
-separate arguments to the
-.BR Default ()
-method, or as a list.
-.BR Default ()
-will also accept the Node returned by any
-of a construction environment's
-builder methods.
-
-Examples:
-
-.ES
-Default('foo', 'bar', 'baz')
-env.Default(['a', 'b', 'c'])
-hello = env.Program('hello', 'hello.c')
-env.Default(hello)
-.EE
-.IP
-An argument to
-.BR Default ()
-of
-.B None
-will clear all default targets.
-Later calls to
-.BR Default ()
-will add to the (now empty) default-target list
-like normal.
-
-The current list of targets added using the
-.BR Default ()
-function or method is available in the
-.B DEFAULT_TARGETS
-list;
-see below.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI DefaultEnvironment([ args ])
-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.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Depends( target ", " dependency )
-.TP
-.RI env.Depends( target ", " dependency )
-Specifies an explicit dependency;
-the
-.I target
-will be rebuilt
-whenever the
-.I dependency
-has changed.
-Both the specified
-.I target
-and
-.I dependency
-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:
-
-.ES
-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)
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.Dictionary([ vars ])
-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:
-
-.ES
-dict = env.Dictionary()
-cc_dict = env.Dictionary('CC', 'CCFLAGS', 'CCCOM')
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Dir( name ", [" directory ])
-.TP
-.RI env.Dir( name ", [" directory ])
-This returns a Directory Node,
-an object that represents the specified directory
-.IR name .
-.I name
-can be a relative or absolute path.
-.I directory
-is an optional directory that will be used as the parent directory.
-If no
-.I directory
-is specified, the current script's directory is used as the parent.
-
-If
-.I name
-is a list, SCons returns a list of Dir nodes.
-Construction variables are expanded in
-.IR name .
-
-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.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.Dump([ key ])
-Returns a pretty printable representation of the environment.
-.IR key ,
-if not
-.IR None ,
-should be a string containing the name of the variable of interest.
-
-This SConstruct:
-.ES
-env=Environment()
-print env.Dump('CCCOM')
-.EE
-.IP
-will print:
-.ES
-\&'$CC -c -o $TARGET $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS $SOURCES'
-.EE
-
-.ES
-env=Environment()
-print env.Dump()
-.EE
-.IP
-will print:
-.ES
-{ 'AR': 'ar',
- 'ARCOM': '$AR $ARFLAGS $TARGET $SOURCES\n$RANLIB $RANLIBFLAGS $TARGET',
- 'ARFLAGS': ['r'],
- 'AS': 'as',
- 'ASCOM': '$AS $ASFLAGS -o $TARGET $SOURCES',
- 'ASFLAGS': [],
- ...
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI EnsurePythonVersion( major ", " minor )
-.TP
-.RI env.EnsurePythonVersion( major ", " minor )
-Ensure that the Python version is at least
-.IR major . minor .
-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:
-
-.ES
-EnsurePythonVersion(2,2)
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI EnsureSConsVersion( major ", " minor ", [" revision ])
-.TP
-.RI env.EnsureSConsVersion( major ", " minor ", [" revision ])
-Ensure that the SCons version is at least
-.IR major.minor ,
-or
-.IR major.minor.revision .
-if
-.I revision
-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:
-
-.ES
-EnsureSConsVersion(0,14)
-
-EnsureSConsVersion(0,96,90)
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Environment([ key = value ", ...])"
-.TP
-.RI env.Environment([ key = value ", ...])"
-Return a new construction environment
-initialized with the specified
-.IR key = value
-pairs.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Execute( action ", [" strfunction ", " varlist ])
-.TP
-.RI env.Execute( action ", [" strfunction ", " varlist ])
-Executes an Action object.
-The specified
-.IR action
-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
-.B scons
-will print an error message if the executed
-.I action
-fails--that is,
-exits with or returns a non-zero value.
-.B scons
-will
-.I not ,
-however,
-automatically terminate the build
-if the specified
-.I action
-fails.
-If you want the build to stop in response to a failed
-.BR Execute ()
-call,
-you must explicitly check for a non-zero return value:
-
-.ES
-Execute(Copy('file.out', 'file.in'))
-
-if Execute("mkdir sub/dir/ectory"):
- # The mkdir failed, don't try to build.
- Exit(1)
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Exit([ value ])
-.TP
-.RI env.Exit([ value ])
-This tells
-.B scons
-to exit immediately
-with the specified
-.IR value .
-A default exit value of
-.B 0
-(zero)
-is used if no value is specified.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Export( vars )
-.TP
-.RI env.Export( vars )
-This tells
-.B 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
-.BR Export ()
-will over-write previous exports that have the same name.
-Multiple variable names can be passed to
-.BR 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:
-
-.ES
-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})
-.EE
-
-.IP
-Note that the
-.BR SConscript ()
-function supports an
-.I exports
-argument that makes it easier to to export a variable or
-set of variables to a single SConscript file.
-See the description of the
-.BR SConscript ()
-function, below.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI File( name ", [" directory ])
-.TP
-.RI env.File( name ", [" directory ])
-This returns a
-File Node,
-an object that represents the specified file
-.IR name .
-.I name
-can be a relative or absolute path.
-.I directory
-is an optional directory that will be used as the parent directory.
-
-If
-.I name
-is a list, SCons returns a list of File nodes.
-Construction variables are expanded in
-.IR name .
-
-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.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI FindFile( file ", " dirs )
-.TP
-.RI env.FindFile( file ", " dirs )
-Search for
-.I file
-in the path specified by
-.IR dirs .
-.I dirs
-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:
-
-.ES
-foo = env.FindFile('foo', ['dir1', 'dir2'])
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI FindInstalledFiles( )
-.TP
-.RI env.FindInstalledFiles( )
-Returns the list of targets set up by the
-.B Install()
-or
-.B InstallAs()
-builders.
-
-This function serves as a convenient method to select the contents of
-a binary package.
-
-Example:
-
-.ES
-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()
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI FindSourceFiles( node = '"."' )
-.TP
-.RI env.FindSourceFiles( node = '"."' )
-
-Returns the list of nodes which serve as the source of the built files.
-It does so by inspecting the dependency tree starting at the optional
-argument
-.B node
-which defaults to the '"."'-node. It will then return all leaves of
-.B node.
-These are all children which have no further children.
-
-This function is a convenient method to select the contents of a Source
-Package.
-
-Example:
-
-.ES
-Program( 'src/main_a.c' )
-Program( 'src/main_b.c' )
-Program( 'main_c.c' )
-
-# returns ['main_c.c', 'src/main_a.c', 'SConstruct', 'src/main_b.c']
-FindSourceFiles()
-
-# returns ['src/main_b.c', 'src/main_a.c' ]
-FindSourceFiles( 'src' )
-.EE
-
-.IP
-As you can see build support files (SConstruct in the above example)
-will also be returned by this function.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI FindPathDirs( variable )
-Returns a function
-(actually a callable Python object)
-intended to be used as the
-.B path_function
-of a Scanner object.
-The returned object will look up the specified
-.I variable
-in a construction environment
-and treat the construction variable's value as a list of
-directory paths that should be searched
-(like
-.BR CPPPATH ,
-.BR LIBPATH ,
-etc.).
-
-Note that use of
-.BR FindPathDirs ()
-is generally preferable to
-writing your own
-.B path_function
-for the following reasons:
-1) The returned list will contain all appropriate directories
-found in source trees
-(when
-.BR VariantDir ()
-is used)
-or in code repositories
-(when
-.BR Repository ()
-or the
-.B \-Y
-option are used).
-2) scons will identify expansions of
-.I variable
-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:
-
-.ES
-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'))
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Flatten( sequence )
-.TP
-.RI env.Flatten( sequence )
-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:
-
-.ES
-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)
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI GetBuildFailures()
-Returns a list of exceptions for the
-actions that failed while
-attempting to build targets.
-Each element in the returned list is a
-.B BuildError
-object
-with the following attributes
-that record various aspects
-of the build failure:
-
-.B .node
-The node that was being built
-when the build failure occurred.
-
-.B .status
-The numeric exit status
-returned by the command or Python function
-that failed when trying to build the
-specified Node.
-
-.B .errstr
-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.)
-
-.B .filename
-The name of the file or
-directory that actually caused the failure.
-This may be different from the
-.B .node
-attribute.
-For example,
-if an attempt to build a target named
-.B sub/dir/target
-fails because the
-.B sub/dir
-directory could not be created,
-then the
-.B .node
-attribute will be
-.B sub/dir/target
-but the
-.B .filename
-attribute will be
-.BR sub/dir .
-
-.B .executor
-The SCons Executor object
-for the target Node
-being built.
-This can be used to retrieve
-the construction environment used
-for the failed action.
-
-.B .action
-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.
-
-.B .command
-The actual expanded command that was executed and failed,
-after expansion of
-.BR $TARGET ,
-.BR $SOURCE ,
-and other construction variables.
-
-Note that the
-.BR GetBuildFailures ()
-function
-will always return an empty list
-until any build failure has occurred,
-which means that
-.BR GetBuildFailures ()
-will always return an empty list
-while the
-.B 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
-.BR atexit.register ()
-function.
-Example:
-
-.ES
-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)
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI GetBuildPath( file ", [" ... ])
-.TP
-.RI env.GetBuildPath( file ", [" ... ])
-Returns the
-.B scons
-path name (or names) for the specified
-.I file
-(or files).
-The specified
-.I file
-or files
-may be
-.B scons
-Nodes or strings representing path names.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI GetLaunchDir()
-.TP
-.RI env.GetLaunchDir()
-Returns the absolute path name of the directory from which
-.B scons
-was initially invoked.
-This can be useful when using the
-.BR \-u ,
-.BR \-U
-or
-.BR \-D
-options, which internally
-change to the directory in which the
-.B SConstruct
-file is found.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI GetOption( name )
-.TP
-.RI env.GetOption( name )
-This function provides a way to query the value of
-SCons options set on scons command line
-(or set using the
-.IR SetOption ()
-function).
-The options supported are:
-
-.RS 10
-.TP 6
-.B cache_debug
-which corresponds to --cache-debug;
-.TP 6
-.B cache_disable
-which corresponds to --cache-disable;
-.TP 6
-.B cache_force
-which corresponds to --cache-force;
-.TP 6
-.B cache_show
-which corresponds to --cache-show;
-.TP 6
-.B clean
-which corresponds to -c, --clean and --remove;
-.TP 6
-.B config
-which corresponds to --config;
-.TP 6
-.B directory
-which corresponds to -C and --directory;
-.TP 6
-.B diskcheck
-which corresponds to --diskcheck
-.TP 6
-.B duplicate
-which corresponds to --duplicate;
-.TP 6
-.B file
-which corresponds to -f, --file, --makefile and --sconstruct;
-.TP 6
-.B help
-which corresponds to -h and --help;
-.TP 6
-.B ignore_errors
-which corresponds to --ignore-errors;
-.TP 6
-.B implicit_cache
-which corresponds to --implicit-cache;
-.TP 6
-.B implicit_deps_changed
-which corresponds to --implicit-deps-changed;
-.TP 6
-.B implicit_deps_unchanged
-which corresponds to --implicit-deps-unchanged;
-.TP 6
-.B interactive
-which corresponds to --interact and --interactive;
-.TP 6
-.B keep_going
-which corresponds to -k and --keep-going;
-.TP 6
-.B max_drift
-which corresponds to --max-drift;
-.TP 6
-.B no_exec
-which corresponds to -n, --no-exec, --just-print, --dry-run and --recon;
-.TP 6
-.B no_site_dir
-which corresponds to --no-site-dir;
-.TP 6
-.B num_jobs
-which corresponds to -j and --jobs;
-.TP 6
-.B profile_file
-which corresponds to --profile;
-.TP 6
-.B question
-which corresponds to -q and --question;
-.TP 6
-.B random
-which corresponds to --random;
-.TP 6
-.B repository
-which corresponds to -Y, --repository and --srcdir;
-.TP 6
-.B silent
-which corresponds to -s, --silent and --quiet;
-.TP 6
-.B site_dir
-which corresponds to --site-dir;
-.TP 6
-.B stack_size
-which corresponds to --stack-size;
-.TP 6
-.B taskmastertrace_file
-which corresponds to --taskmastertrace; and
-.TP 6
-.B warn
-which corresponds to --warn and --warning.
-.RE
-
-.IP
-See the documentation for the
-corresponding command line object for information about each specific
-option.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Glob( pattern ", [" ondisk ", " source ", " strings ])
-.TP
-.RI env.Glob( pattern ", [" ondisk ", " source ", " strings ])
-Returns Nodes (or strings) that match the specified
-.IR pattern ,
-relative to the directory of the current
-.B SConscript
-file.
-The
-.BR env.Glob ()
-form performs string substition on
-.I pattern
-and returns whatever matches
-the resulting expanded pattern.
-
-The specified
-.I pattern
-uses Unix shell style metacharacters for matching:
-
-.ES
- * matches everything
- ? matches any single character
- [seq] matches any character in seq
- [!seq] matches any char not in seq
-.EE
-
-.IP
-If the first character of a filename is a dot,
-it must be matched explicitly.
-Character matches do
-.I not
-span directory separators.
-
-The
-.BR Glob ()
-knows about
-repositories
-(see the
-.BR Repository ()
-function)
-and source directories
-(see the
-.BR 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
-.B ondisk
-argument may be set to
-.B False
-(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
-.B source
-argument may be set to
-.B True
-(or any equivalent value)
-to specify that,
-when the local directory is a
-.BR VariantDir (),
-the returned Nodes should be from the
-corresponding source directory,
-not the local directory.
-
-The
-.B strings
-argument may be set to
-.B True
-(or any equivalent value)
-to have the
-.BR 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
-.B SConscript
-file,
-any Node translation will be relative
-to the other
-.B SConscript
-directory,
-not the original
-.B SConscript
-directory.)
-
-Examples:
-
-.ES
-Program('foo', Glob('*.c'))
-Zip('/tmp/everything', Glob('.??*') + Glob('*'))
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-'\".TP
-'\".RI GlobalBuilders( flag )
-'\"When
-'\".B flag
-'\"is non-zero,
-'\"adds the names of the default builders
-'\"(Program, Library, etc.)
-'\"to the global name space
-'\"so they can be called without an explicit construction environment.
-'\"(This is the default.)
-'\"When
-'\".B
-'\"flag is zero,
-'\"the names of the default builders are removed
-'\"from the global name space
-'\"so that an explicit construction environment is required
-'\"to call all builders.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Help( text )
-.TP
-.RI env.Help( text )
-This specifies help text to be printed if the
-.B -h
-argument is given to
-.BR scons .
-If
-.BR Help
-is called multiple times, the text is appended together in the order
-that
-.BR Help
-is called.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Ignore( target ", " dependency )
-.TP
-.RI env.Ignore( target ", " dependency )
-The specified dependency file(s)
-will be ignored when deciding if
-the target file(s) need to be rebuilt.
-
-You can also use
-.BR Ignore()
-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:
-
-.ES
-env.Ignore('foo', 'foo.c')
-env.Ignore('bar', ['bar1.h', 'bar2.h'])
-env.Ignore('.','foobar.obj')
-env.Ignore('bar','bar/foobar.obj')
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Import( vars )
-.TP
-.RI env.Import( vars )
-This tells
-.B scons
-to import a list of variables into the current SConscript file. This
-will import variables that were exported with
-.BR Export ()
-or in the
-.I exports
-argument to
-.BR SConscript ().
-Variables exported by
-.BR SConscript ()
-have precedence.
-Multiple variable names can be passed to
-.BR Import ()
-as separate arguments or as a list. The variable "*" can be used
-to import all variables.
-
-Examples:
-
-.ES
-Import("env")
-Import("env", "variable")
-Import(["env", "variable"])
-Import("*")
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Literal( string )
-.TP
-.RI env.Literal( string )
-The specified
-.I string
-will be preserved as-is
-and not have construction variables expanded.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Local( targets )
-.TP
-.RI env.Local( targets )
-The specified
-.I targets
-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.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-\" .TP
-\" .RI env.MergeShellPaths( arg ", [" prepend ])
-\" Merges the elements of the specified
-\" .IR arg ,
-\" which must be a dictionary, to the construction
-\" environment's copy of the shell environment
-\" in env['ENV'].
-\" (This is the environment which is passed
-\" to subshells spawned by SCons.)
-\" Note that
-\" .I arg
-\" must be a single value,
-\" so multiple strings must
-\" be passed in as a list,
-\" not as separate arguments to
-\" .BR env.MergeShellPaths ().
-
-\" New values are prepended to the environment variable by default,
-\" unless prepend=0 is specified.
-\" Duplicate values are always eliminated,
-\" since this function calls
-\" .B AppendENVPath
-\" or
-\" .B PrependENVPath
-\" depending on the
-\" .I prepend
-\" argument. See those functions for more details.
-
-\" Examples:
-
-\" .ES
-\" # Prepend a path to the shell PATH.
-\" env.MergeShellPaths({'PATH':'/usr/local/bin'} )
-\" # Append two dirs to the shell INCLUDE.
-\" env.MergeShellPaths({'INCLUDE':['c:/inc1', 'c:/inc2']}, prepend=0 )
-
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.MergeFlags( arg ", [" unique ])
-Merges the specified
-.I arg
-values to the construction environment's construction variables.
-If the
-.I arg
-argument is not a dictionary,
-it is converted to one by calling
-.B env.ParseFlags()
-on the argument
-before the values are merged.
-Note that
-.I arg
-must be a single value,
-so multiple strings must
-be passed in as a list,
-not as separate arguments to
-.BR env.MergeFlags ().
-
-By default,
-duplicate values are eliminated;
-you can, however, specify
-.B unique=0
-to allow duplicate
-values to be added.
-When eliminating duplicate values,
-any construction variables that end with
-the string
-.B PATH
-keep the left-most unique value.
-All other construction variables keep
-the right-most unique value.
-
-Examples:
-
-.ES
-# 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'])
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI NoCache( target ", ...)"
-.TP
-.RI env.NoCache( target ", ...)"
-Specifies a list of files which should
-.I not
-be cached whenever the
-.BR 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
-.BR NoCache ()
-method, or as a list.
-.BR NoCache ()
-will also accept the return value of any of the construction environment
-Builder methods.
-
-Calling
-.BR NoCache ()
-on directories and other non-File Node types has no effect because
-only File Nodes are cached.
-
-Examples:
-
-.ES
-NoCache('foo.elf')
-NoCache(env.Program('hello', 'hello.c'))
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI NoClean( target ", ...)"
-.TP
-.RI env.NoClean( target ", ...)"
-Specifies a list of files or directories which should
-.I not
-be removed whenever the targets (or their dependencies)
-are specified with the
-.B -c
-command line option.
-The specified targets may be a list
-or an individual target.
-Multiple calls to
-.BR NoClean ()
-are legal,
-and prevent each specified target
-from being removed by calls to the
-.B -c
-option.
-
-Multiple files or directories should be specified
-either as separate arguments to the
-.BR NoClean ()
-method, or as a list.
-.BR NoClean ()
-will also accept the return value of any of the construction environment
-Builder methods.
-
-Calling
-.BR NoClean ()
-for a target overrides calling
-.BR Clean ()
-for the same target,
-and any targets passed to both functions will
-.I not
-be removed by the
-.B -c
-option.
-
-Examples:
-
-.ES
-NoClean('foo.elf')
-NoClean(env.Program('hello', 'hello.c'))
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.ParseConfig( command ", [" function ", " unique ])
-Calls the specified
-.I function
-to modify the environment as specified by the output of
-.I command .
-The default
-.I function
-is
-.BR env.MergeFlags (),
-which expects the output of a typical
-.I *-config command
-(for example,
-.BR gtk-config )
-and adds the options
-to the appropriate construction variables.
-By default,
-duplicate values are not
-added to any construction variables;
-you can specify
-.B unique=0
-to allow duplicate
-values to be added.
-
-Interpreted options
-and the construction variables they affect
-are as specified for the
-.BR env.ParseFlags ()
-method (which this method calls).
-See that method's description, below,
-for a table of options and construction variables.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI ParseDepends( filename ", [" must_exist ", " only_one ])
-.TP
-.RI env.ParseDepends( filename ", [" must_exist ", " only_one ])
-Parses the contents of the specified
-.I filename
-as a list of dependencies in the style of
-.BR Make
-or
-.BR mkdep ,
-and explicitly establishes all of the listed dependencies.
-
-By default,
-it is not an error
-if the specified
-.I filename
-does not exist.
-The optional
-.I must_exist
-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
-.I only_one
-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
-.B gcc -M
-flag,
-which should typically only
-write dependency information for
-one output file into a corresponding
-.B .d
-file.
-
-The
-.I filename
-and all of the files listed therein
-will be interpreted relative to
-the directory of the
-.I SConscript
-file which calls the
-.B ParseDepends
-function.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.ParseFlags( flags ", ...)"
-Parses one or more strings containing
-typical command-line flags for GCC tool chains
-and returns a dictionary with the flag values
-separated into the appropriate SCons construction variables.
-This is intended as a companion to the
-.BR 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
-.BR env.MergeFlags ()
-will call this method if its argument is not a dictionary,
-so it is usually not necessary to call
-.BR 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:
-
-.ES
--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
-.EE
-
-.IP
-Any other strings not associated with options
-are assumed to be the names of libraries
-and added to the
-.B LIBS
-construction variable.
-
-Examples (all of which produce the same result):
-
-.ES
-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')
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-env.Perforce()
-A factory function that
-returns a Builder object
-to be used to fetch source files
-from the Perforce source code management system.
-The returned Builder
-is intended to be passed to the
-.B SourceCode
-function.
-
-This function is deprecated. For details, see the entry for the
-.B SourceCode
-function.
-
-Example:
-
-.ES
-env.SourceCode('.', env.Perforce())
-.EE
-.IP
-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.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Platform( string )
-Returns a callable object
-that can be used to initialize
-a construction environment using the
-platform keyword of the Environment() method.
-
-Example:
-
-.ES
-env = Environment(platform = Platform('win32'))
-.EE
-.TP
-.RI env.Platform( string )
-Applies the callable object for the specified platform
-.I string
-to the environment through which the method was called.
-
-.ES
-env.Platform('posix')
-.EE
-.IP
-Note that the
-.B win32
-platform adds the
-.B SystemDrive
-and
-.B SystemRoot
-variables from the user's external environment
-to the construction environment's
-.B 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
-.BR :pserver:anonymous@cvs.sourceforge.net:/cvsroot/scons )
-will work on Windows systems.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Progress( callable ", [" interval ])
-.TP
-.RI Progress( string ", [" interval ", " file ", " overwrite ])
-.TP
-.RI Progress( list_of_strings ", [" interval ", " file ", " overwrite ])
-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
-.BR __call__ ()
-method),
-the function will be called
-once every
-.I interval
-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
-.B *args
-and
-.B **kw
-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:
-
-.ES
-def my_progress_function(node, *args, **kw):
- print 'Evaluating node %s!' % node
-Progress(my_progress_function, interval=10)
-.EE
-.IP
-A more complicated example of a custom progress display object
-that prints a string containing a count
-every 100 evaluated Nodes.
-Note the use of
-.B \\\\r
-(a carriage return)
-at the end so that the string
-will overwrite itself on a display:
-
-.ES
-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)
-.EE
-.IP
-If the first argument
-.BR Progress ()
-is a string,
-the string will be displayed
-every
-.I interval
-evaluated Nodes.
-The default is to print the string on standard output;
-an alternate output stream
-may be specified with the
-.B file=
-argument.
-The following will print a series of dots
-on the error output,
-one dot for every 100 evaluated Nodes:
-
-.ES
-import sys
-Progress('.', interval=100, file=sys.stderr)
-.EE
-.IP
-If the string contains the verbatim substring
-.B $TARGET,
-it will be replaced with the Node.
-Note that, for performance reasons, this is
-.I not
-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
-.B \\\\r
-(carriage return) to cause each line to overwritten by the next line,
-and the
-.B overwrite=
-keyword argument to make sure the previously-printed
-file name is overwritten with blank spaces:
-
-.ES
-import sys
-Progress('$TARGET\\r', overwrite=True)
-.EE
-.IP
-If the first argument to
-.BR Progress ()
-is a list of strings,
-then each string in the list will be displayed
-in rotating fashion every
-.I interval
-evaluated Nodes.
-This can be used to implement a "spinner"
-on the user's screen as follows:
-
-.ES
-Progress(['-\\r', '\\\\\\r', '|\\r', '/\\r'], interval=5)
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Precious( target ", ...)"
-.TP
-.RI env.Precious( target ", ...)"
-Marks each given
-.I target
-as precious so it is not deleted before it is rebuilt. Normally
-.B scons
-deletes a target before building it.
-Multiple targets can be passed in to a single call to
-.BR Precious ().
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.Prepend( key = val ", [...])"
-Appends the specified keyword arguments
-to the beginning of construction variables in the environment.
-If the Environment does not have
-the specified construction variable,
-it is simply added to the environment.
-If the values of the construction variable
-and the keyword argument are the same type,
-then the two values will be simply added together.
-Otherwise, the construction variable
-and the value of the keyword argument
-are both coerced to lists,
-and the lists are added together.
-(See also the Append method, above.)
-
-Example:
-
-.ES
-env.Prepend(CCFLAGS = '-g ', FOO = ['foo.yyy'])
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.PrependENVPath( name ", " newpath ", [" envname ", " sep ", " delete_existing ])
-This appends new path elements to the given path in the
-specified external environment
-.RB ( ENV
-by default).
-This will only add
-any particular path once (leaving the first one it encounters and
-ignoring the rest, to preserve path order),
-and to help assure this,
-will normalize all paths (using
-.B os.path.normpath
-and
-.BR os.path.normcase ).
-This can also handle the
-case where the given old path variable is a list instead of a
-string, in which case a list will be returned instead of a string.
-
-If
-.I delete_existing
-is 0, then adding a path that already exists
-will not move it to the beginning;
-it will stay where it is in the list.
-
-Example:
-
-.ES
-print 'before:',env['ENV']['INCLUDE']
-include_path = '/foo/bar:/foo'
-env.PrependENVPath('INCLUDE', include_path)
-print 'after:',env['ENV']['INCLUDE']
-.EE
-
-The above exmaple will print:
-
-.ES
-before: /biz:/foo
-after: /foo/bar:/foo:/biz
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.PrependUnique( key = val ", delete_existing=0, [...])"
-Appends the specified keyword arguments
-to the beginning of construction variables in the environment.
-If the Environment does not have
-the specified construction variable,
-it is simply added to the environment.
-If the construction variable being appended to is a list,
-then any value(s) that already exist in the
-construction variable will
-.I not
-be added again to the list.
-However, if delete_existing is 1,
-existing matching values are removed first, so
-existing values in the arg list move to the front of the list.
-
-Example:
-
-.ES
-env.PrependUnique(CCFLAGS = '-g', FOO = ['foo.yyy'])
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-env.RCS()
-A factory function that
-returns a Builder object
-to be used to fetch source files
-from RCS.
-The returned Builder
-is intended to be passed to the
-.B SourceCode
-function:
-
-This function is deprecated. For details, see the entry for the
-.B SourceCode
-function.
-
-Examples:
-
-.ES
-env.SourceCode('.', env.RCS())
-.EE
-.IP
-Note that
-.B 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.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.Replace( key = val ", [...])"
-Replaces construction variables in the Environment
-with the specified keyword arguments.
-
-Example:
-
-.ES
-env.Replace(CCFLAGS = '-g', FOO = 'foo.xxx')
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Repository( directory )
-.TP
-.RI env.Repository( directory )
-Specifies that
-.I directory
-is a repository to be searched for files.
-Multiple calls to
-.BR Repository ()
-are legal,
-and each one adds to the list of
-repositories that will be searched.
-
-To
-.BR 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
-.BR scons ,
-so that the repository contains the necessary
-signature information to allow
-.B 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,
-.B scons
-will
-.I not
-make a copy in the local directory tree.
-In order to guarantee that a local copy
-will be made,
-use the
-.B Local()
-method.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Requires( target ", " prerequisite )
-.TP
-.RI env.Requires( target ", " prerequisite )
-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,
-.I before
-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:
-
-.ES
-env.Requires('foo', 'file-that-must-be-built-before-foo')
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Return([ vars "... , " stop= ])
-By default,
-this stops processing the current SConscript
-file and returns to the calling SConscript file
-the values of the variables named in the
-.I vars
-string arguments.
-Multiple strings contaning variable names may be passed to
-.BR Return ().
-Any strings that contain white space
-
-The optional
-.B stop=
-keyword argument may be set to a false value
-to continue processing the rest of the SConscript
-file after the
-.BR 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
-.I vars
-at the point
-.BR Return ()
-is called.
-
-Examples:
-
-.ES
-# 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')
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Scanner( function ", [" argument ", " keys ", " path_function ", " node_class ", " node_factory ", " scan_check ", " recursive ])
-.TP
-.RI env.Scanner( function ", [" argument ", " keys ", " path_function ", " node_class ", " node_factory ", " scan_check ", " recursive ])
-Creates a Scanner object for
-the specified
-.IR function .
-See the section "Scanner Objects,"
-below, for a complete explanation of the arguments and behavior.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-env.SCCS()
-A factory function that
-returns a Builder object
-to be used to fetch source files
-from SCCS.
-The returned Builder
-is intended to be passed to the
-.B SourceCode
-function.
-
-This function is deprecated. For details, see the entry for the
-.B SourceCode
-function.
-
-Example:
-
-.ES
-env.SourceCode('.', env.SCCS())
-.EE
-.IP
-Note that
-.B 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
-.I s.SCCS
-files in the same
-directory as the source files,
-or if you need to explicitly specify SCCS
-for a specific subdirectory.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI SConscript( scripts ", [" exports ", " variant_dir ", " duplicate ])
-'\" .RI SConscript( scripts ", [" exports ", " variant_dir ", " src_dir ", " duplicate ])
-.TP
-.RI env.SConscript( scripts ", [" exports ", " variant_dir ", " duplicate ])
-'\" .RI env.SConscript( scripts ", [" exports ", " variant_dir ", " src_dir ", " duplicate ])
-.TP
-.RI SConscript(dirs= subdirs ", [name=" script ", " exports ", " variant_dir ", " duplicate ])
-'\" .RI SConscript(dirs= subdirs ", [name=" script ", " exports ", " variant_dir ", " src_dir ", " duplicate ])
-.TP
-.RI env.SConscript(dirs= subdirs ", [name=" script ", " exports ", " variant_dir ", " duplicate ])
-'\" .RI env.SConscript(dirs= subdirs ", [name=" script ", " exports ", " variant_dir ", " src_dir ", " duplicate ])
-This tells
-.B scons
-to execute
-one or more subsidiary SConscript (configuration) files.
-Any variables returned by a called script using
-.BR Return ()
-will be returned by the call to
-.BR SConscript ().
-There are two ways to call the
-.BR SConscript ()
-function.
-
-The first way you can call
-.BR SConscript ()
-is to explicitly specify one or more
-.I scripts
-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
-.BR Split ()).
-Examples:
-.ES
-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')
-.EE
-
-The second way you can call
-.BR SConscript ()
-is to specify a list of (sub)directory names
-as a
-.RI dirs= subdirs
-keyword argument.
-In this case,
-.B scons
-will, by default,
-execute a subsidiary configuration file named
-.B SConscript
-in each of the specified directories.
-You may specify a name other than
-.B SConscript
-by supplying an optional
-.RI name= script
-keyword argument.
-The first three examples below have the same effect
-as the first three examples above:
-.ES
-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')
-.EE
-
-The optional
-.I exports
-argument provides a list of variable names or a dictionary of
-named values to export to the
-.IR script(s) .
-These variables are locally exported only to the specified
-.IR script(s) ,
-and do not affect the global pool of variables used by the
-.BR Export ()
-function.
-'\"If multiple dirs are provided, each script gets a fresh export.
-The subsidiary
-.I script(s)
-must use the
-.BR Import ()
-function to import the variables.
-Examples:
-.ES
-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')
-.EE
-
-If the optional
-.I variant_dir
-argument is present, it causes an effect equivalent to the
-.BR VariantDir ()
-method described below.
-(If
-.I variant_dir
-is not present, the
-'\" .IR src_dir and
-.I duplicate
-'\" arguments are ignored.)
-argument is ignored.)
-The
-.I variant_dir
-'\" and
-'\" .I src_dir
-'\" arguments are interpreted relative to the directory of the calling
-argument is interpreted relative to the directory of the calling
-.B SConscript
-file.
-See the description of the
-.BR VariantDir ()
-function below for additional details and restrictions.
-
-If
-.I variant_dir
-is present,
-'\" but
-'\" .IR src_dir " is not,"
-the source directory is the directory in which the
-.B SConscript
-file resides and the
-.B SConscript
-file is evaluated as if it were in the
-.I variant_dir
-directory:
-.ES
-SConscript('src/SConscript', variant_dir = 'build')
-.EE
-is equivalent to
-.ES
-VariantDir('build', 'src')
-SConscript('build/SConscript')
-.EE
-This later paradigm is often used when the sources are
-in the same directory as the
-.BR SConstruct:
-.ES
-SConscript('SConscript', variant_dir = 'build')
-.EE
-is equivalent to
-.ES
-VariantDir('build', '.')
-SConscript('build/SConscript')
-.EE
-
-'\" If
-'\" .IR variant_dir " and"
-'\" .IR src_dir " are both present,"
-'\" xxxxx everything is in a state of confusion.
-'\" .ES
-'\" SConscript(dirs = 'src', variant_dir = 'build', src_dir = '.')
-'\" runs src/SConscript in build/src, but
-'\" SConscript(dirs = 'lib', variant_dir = 'build', src_dir = 'src')
-'\" runs lib/SConscript (in lib!). However,
-'\" SConscript(dirs = 'src', variant_dir = 'build', src_dir = 'src')
-'\" runs src/SConscript in build. Moreover,
-'\" SConscript(dirs = 'src/lib', variant_dir = 'build', src_dir = 'src')
-'\" runs src/lib/SConscript in build/lib. Moreover,
-'\" SConscript(dirs = 'build/src/lib', variant_dir = 'build', src_dir = 'src')
-'\" can't find build/src/lib/SConscript, even though it ought to exist.
-'\" .EE
-'\" is equivalent to
-'\" .ES
-'\" ????????????????
-'\" .EE
-'\" and what about this alternative?
-'\"TODO??? SConscript('build/SConscript', src_dir='src')
-
-Here are some composite examples:
-
-.ES
-# 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')
-.EE
-
-.ES
-# 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)
-.EE
-
-.ES
-# 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)
-.EE
-
-.ES
-# 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)
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI SConscriptChdir( value )
-.TP
-.RI env.SConscriptChdir( value )
-By default,
-.B scons
-changes its working directory
-to the directory in which each
-subsidiary SConscript file lives.
-This behavior may be disabled
-by specifying either:
-
-.ES
-SConscriptChdir(0)
-env.SConscriptChdir(0)
-.EE
-.IP
-in which case
-.B 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:
-
-.ES
-env = Environment()
-SConscriptChdir(0)
-SConscript('foo/SConscript') # will not chdir to foo
-env.SConscriptChdir(1)
-SConscript('bar/SConscript') # will chdir to bar
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI SConsignFile([ file , dbm_module ])
-.TP
-.RI env.SConsignFile([ file , dbm_module ])
-This tells
-.B scons
-to store all file signatures
-in the specified database
-.IR file .
-If the
-.I file
-name is omitted,
-.B .sconsign
-is used by default.
-(The actual file name(s) stored on disk
-may have an appropriated suffix appended
-by the
-.IR dbm_module .)
-If
-.I file
-is not an absolute path name,
-the file is placed in the same directory as the top-level
-.B SConstruct
-file.
-
-If
-.I file
-is
-.BR None ,
-then
-.B scons
-will store file signatures
-in a separate
-.B .sconsign
-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
-.I dbm_module
-argument can be used to specify
-which Python database module
-The default is to use a custom
-.B SCons.dblite
-module that uses pickled
-Python data structures,
-and which works on all Python versions.
-
-Examples:
-
-.ES
-# 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)
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.SetDefault(key = val ", [...])"
-Sets construction variables to default values specified with the keyword
-arguments if (and only if) the variables are not already set.
-The following statements are equivalent:
-
-.ES
-env.SetDefault(FOO = 'foo')
-
-if 'FOO' not in env: env['FOO'] = 'foo'
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI SetOption( name ", " value )
-.TP
-.RI env.SetOption( name ", " value )
-This function provides a way to set a select subset of the scons command
-line options from a SConscript file. The options supported are:
-
-.RS 10
-.TP 6
-.B clean
-which corresponds to -c, --clean and --remove;
-.TP 6
-.B duplicate
-which corresponds to --duplicate;
-.TP 6
-.B help
-which corresponds to -h and --help;
-.TP 6
-.B implicit_cache
-which corresponds to --implicit-cache;
-.TP 6
-.B max_drift
-which corresponds to --max-drift;
-.TP 6
-.B no_exec
-which corresponds to -n, --no-exec, --just-print, --dry-run and --recon;
-.TP 6
-.B num_jobs
-which corresponds to -j and --jobs;
-.TP 6
-.B random
-which corresponds to --random; and
-.TP 6
-.B stack_size
-which corresponds to --stack-size.
-.RE
-
-.IP
-See the documentation for the
-corresponding command line object for information about each specific
-option.
-
-Example:
-
-.ES
-SetOption('max_drift', 1)
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI SideEffect( side_effect ", " target )
-.TP
-.RI env.SideEffect( side_effect ", " target )
-Declares
-.I side_effect
-as a side effect of building
-.IR target .
-Both
-.I side_effect
-and
-.I target
-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,
-.B 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
-.I side_effect
-target is
-.I not
-automatically removed
-when the
-.I target
-is removed by the
-.B -c
-option.
-(Note, however, that the
-.I side_effect
-might be removed as part of
-cleaning the directory in which it lives.)
-If you want to make sure the
-.I side_effect
-is cleaned whenever a specific
-.I target
-is cleaned,
-you must specify this explicitly
-with the
-.BR Clean ()
-or
-.BR env.Clean ()
-function.
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI SourceCode( entries ", " builder )
-.TP
-.RI env.SourceCode( entries ", " builder )
-This function and its associate factory functions are deprecated.
-There is no replacement.
-The intended use was to keep a local tree in sync with an archive,
-but in actuality the function only causes the archive
-to be fetched on the first run.
-Synchronizing with the archive is best done external to SCons.
-
-Arrange for non-existent source files to
-be fetched from a source code management system
-using the specified
-.IR builder .
-The specified
-.I entries
-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,
-.B scons
-will search up the directory tree
-and use the first
-.B SourceCode
-builder it finds.
-The specified
-.I builder
-may be
-.BR None ,
-in which case
-.B scons
-will not use a builder to fetch
-source files for the specified
-.IR entries ,
-even if a
-.B SourceCode
-builder has been specified
-for a directory higher up the tree.
-
-.B 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:
-
-.ES
-env.SourceCode('.', None)
-.EE
-
-.IP
-Note that if the specified
-.I builder
-is one you create by hand,
-it must have an associated
-construction environment to use
-when fetching a source file.
-
-.B scons
-provides a set of canned factory
-functions that return appropriate
-Builders for various popular
-source code management systems.
-Canonical examples of invocation include:
-
-.ES
-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)
-.EE
-'\"env.SourceCode('.', env.Subversion('file:///usr/local/Subversion'))
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI env.subst( input ", [" raw ", " target ", " source ", " conv ])
-Performs construction variable interpolation
-on the specified string or sequence argument
-.IR input .
-
-By default,
-leading or trailing white space will
-be removed from the result.
-and all sequences of white space
-will be compressed to a single space character.
-Additionally, any
-.B $(
-and
-.B $)
-character sequences will be stripped from the returned string,
-The optional
-.I raw
-argument may be set to
-.B 1
-if you want to preserve white space and
-.BR $( - $)
-sequences.
-The
-.I raw
-argument may be set to
-.B 2
-if you want to strip
-all characters between
-any
-.B $(
-and
-.B $)
-pairs
-(as is done for signature calculation).
-
-If the input is a sequence
-(list or tuple),
-the individual elements of
-the sequence will be expanded,
-and the results will be returned as a list.
-
-The optional
-.I target
-and
-.I source
-keyword arguments
-must be set to lists of
-target and source nodes, respectively,
-if you want the
-.BR $TARGET ,
-.BR $TARGETS ,
-.BR $SOURCE
-and
-.BR $SOURCES
-to be available for expansion.
-This is usually necessary if you are
-calling
-.BR env.subst ()
-from within a Python function used
-as an SCons action.
-
-Returned string values or sequence elements
-are converted to their string representation by default.
-The optional
-.I conv
-argument
-may specify a conversion function
-that will be used in place of
-the default.
-For example, if you want Python objects
-(including SCons Nodes)
-to be returned as Python objects,
-you can use the Python
-.B lambda
-idiom to pass in an unnamed function
-that simply returns its unconverted argument.
-
-Example:
-
-.ES
-print env.subst("The C compiler is: $CC")
-
-def compile(target, source, env):
- sourceDir = env.subst("${SOURCE.srcdir}",
- target=target,
- source=source)
-
-source_nodes = env.subst('$EXPAND_TO_NODELIST',
- conv=lambda x: x)
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-'\".TP
-'\".RI Subversion( repository ", " module )
-'\"A factory function that
-'\"returns a Builder object
-'\"to be used to fetch source files
-'\"from the specified Subversion
-'\".IR repository .
-'\"The returned Builder
-'\"is intended to be passed to the
-'\".B SourceCode
-'\"function.
-'\"
-'\"The optional specified
-'\".I module
-'\"will be added to the beginning
-'\"of all repository path names;
-'\"this can be used, in essence,
-'\"to strip initial directory names
-'\"from the repository path names,
-'\"so that you only have to
-'\"replicate part of the repository
-'\"directory hierarchy in your
-'\"local build directory.
-'\"
-'\"This function is deprecated. For details, see the entry for the
-'\".B SourceCode
-'\"function.
-'\"
-'\"Example:
-'\"
-'\".ES
-'\"# Will fetch foo/bar/src.c
-'\"# from /usr/local/Subversion/foo/bar/src.c.
-'\"env.SourceCode('.', env.Subversion('file:///usr/local/Subversion'))
+'\" BEGIN GENERATED FUNCTION DESCRIPTIONS
'\"
-'\"# Will fetch bar/src.c
-'\"# from /usr/local/Subversion/foo/bar/src.c.
-'\"env.SourceCode('.', env.Subversion('file:///usr/local/Subversion', 'foo'))
+'\" The descriptions below of the various SCons functions are generated
+'\" from the .xml files that live next to the various Python modules in
+'\" the build enginer library. If you're reading this [gnt]roff file
+'\" with an eye towards patching this man page, you can still submit
+'\" a diff against this text, but it will have to be translated to a
+'\" diff against the underlying .xml file before the patch is actually
+'\" accepted. If you do that yourself, it will make it easier to
+'\" integrate the patch.
'\"
-'\"# Will fetch src.c
-'\"# from /usr/local/Subversion/foo/bar/src.c.
-'\"env.SourceCode('.', env.Subversion('file:///usr/local/Subversion', 'foo/bar'))
-'\".EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI SourceSignatures( type )
-.TP
-.RI env.SourceSignatures( type )
-Note: Although it is not yet officially deprecated,
-use of this function is discouraged.
-See the
-.BR Decider ()
-function for a more flexible and straightforward way
-to configure SCons' decision-making.
-
-The
-.BR SourceSignatures ()
-function tells
-.B 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
-.B "MD5"
-or
-.BR "timestamp" .
-
-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.
-
-.B "MD5"
-means
-.B scons
-decides that a source file has changed
-if the MD5 checksum of its contents has changed since
-the last time it was used to rebuild a particular target file.
-
-.B "timestamp"
-means
-.B 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
-.I older
-than the last time it was used to rebuild the target file.)
-
-There is no different between the two behaviors
-for Python
-.BR Value ()
-node objects.
-
-.B "MD5"
-signatures take longer to compute,
-but are more accurate than
-.B "timestamp"
-signatures.
-The default value is
-.BR "MD5" .
-
-Note that the default
-.BR TargetSignatures ()
-setting (see below)
-is to use this
-.BR SourceSignatures ()
-setting for any target files that are used
-to build other target files.
-Consequently, changing the value of
-.BR 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
-.BR env.SourceSignatures ()
-is used).
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Split( arg )
-.TP
-.RI env.Split( arg )
-Returns a list of file names or other objects.
-If arg is a string,
-it will be split on strings of white-space characters
-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:
-
-.ES
-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
-""")
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Tag( node ", " tags )
-Annotates file or directory Nodes with
-information about how the
-.BR Package ()
-Builder should package those files or directories.
-All tags are optional.
-
-Examples:
-
-.ES
-# makes sure the built library will be installed with 0644 file
-# access mode
-Tag( Library( 'lib.c' ), UNIX_ATTR="0644" )
-
-# marks file2.txt to be a documentation file
-Tag( 'file2.txt', DOC )
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI TargetSignatures( type )
-.TP
-.RI env.TargetSignatures( type )
-Note: Although it is not yet officially deprecated,
-use of this function is discouraged.
-See the
-.BR Decider ()
-function for a more flexible and straightforward way
-to configure SCons' decision-making.
-
-The
-.BR TargetSignatures ()
-function tells
-.B scons
-how to decide if a target file
-(a file that
-.I is
-built from any other files)
-has changed since the last time it
-was used to build some other target file.
-Legal values are
-.BR "build" ;
-.BR "content"
-(or its synonym
-.BR "MD5" );
-.BR "timestamp" ;
-or
-.BR "source" .
-
-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.
-
-.B "content"
-(or its synonym
-.BR "MD5" )
-means
-.B 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
-.B 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.
-
-.B "timestamp"
-means
-.B 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
-.I older
-than the last time it was used to rebuild the target file.)
-
-.B "source"
-means
-.B scons
-decides that a target file has changed
-as specified by the corresponding
-.BR SourceSignatures ()
-setting
-.BR "" ( "MD5"
-or
-.BR "timestamp" ).
-This means that
-.B 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.
-
-.B "build"
-means
-.B 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
-.BR 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.
-
-.B "build"
-signatures are fastest because
-.B "content"
-(or
-.BR "MD5" )
-signatures take longer to compute,
-but are more accurate than
-.B "timestamp"
-signatures,
-and can prevent unnecessary "downstream" rebuilds
-when a target file is rebuilt to the exact same contents
-as the previous build.
-The
-.B "source"
-setting provides the most consistent behavior
-when other target files may be rebuilt from
-both source and target input files.
-The default value is
-.BR "source" .
-
-Because the default setting is
-.BR "source" ,
-using
-.BR SourceSignatures ()
-is generally preferable to
-.BR 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
-.BR TargetSignatures ()
-provides specific control for how built target files
-affect their "downstream" dependencies.
-
+'\" BEGIN GENERATED FUNCTION DESCRIPTIONS
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Tool( string [, toolpath ", " **kw ])
-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
-.B $TOOLS
-construction variable.
-
-Additional keyword arguments are passed to the tool's
-.B generate()
-method.
-
-Examples:
-
-.ES
-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
-.EE
-.TP
-.RI env.Tool( string [, toolpath ", " **kw ])
-Applies the callable object for the specified tool
-.I string
-to the environment through which the method was called.
-
-Additional keyword arguments are passed to the tool's
-.B generate()
-method.
-
-.ES
-env.Tool('gcc')
-env.Tool('opengl', toolpath = ['build/tools'])
-.EE
-
+.so functions.man
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI Value( value ", [" built_value ])
-.TP
-.RI env.Value( value ", [" built_value ])
-Returns a Node object representing the specified Python value. Value
-Nodes can be used as dependencies of targets. If the result of
-calling
-.BR str( value )
-changes between SCons runs, any targets depending on
-.BR Value( value )
-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
-.BR write ()
-method that can be used to "build" a Value Node
-by setting a new value.
-The optional
-.I built_value
-argument can be specified
-when the Value Node is created
-to indicate the Node should already be considered
-"built."
-There is a corresponding
-.BR read ()
-method that will return the built value of the Node.
-
-Examples:
-
-.ES
-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))
-.EE
-
-'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI VariantDir( variant_dir ", " src_dir ", [" duplicate ])
-.TP
-.RI env.VariantDir( variant_dir ", " src_dir ", [" duplicate ])
-Use the
-.BR VariantDir ()
-function to create a copy of your sources in another location:
-if a name under
-.IR variant_dir
-is not found but exists under
-.IR src_dir ,
-the file or directory is copied to
-.IR variant_dir .
-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.
-
-.BR VariantDir ()
-can be called multiple times with the same
-.I src_dir
-to set up multiple builds with different options
-.RI ( variants ).
-The
-.I src_dir
-location must be in or underneath the SConstruct file's directory, and
-.I variant_dir
-may not be underneath
-.IR src_dir .
-'\"TODO: Can the above restrictions be clarified or relaxed?
-'\"TODO: The latter restriction is clearly not completely right;
-'\"TODO: src_dir = '.' works fine with a build dir under it.
-
-The default behavior is for
-.B scons
-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
-.IR --duplicate
-command-line option.
-Moreover, only the files needed for the build are duplicated;
-files and directories that are not used are not present in
-.IR variant_dir .
-
-Duplicating the source tree may be disabled by setting the
-.I duplicate
-argument to 0 (zero).
-This will cause
-.B scons
-to invoke Builders using the path names of source files in
-.I src_dir
-and the path names of derived files within
-.IR variant_dir .
-This is always more efficient than
-.IR duplicate =1,
-and is usually safe for most builds
-(but see above for cases that may cause problems).
-
-Note that
-.BR 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
-.I variant_dir ,
-regardless of the value of
-.IR duplicate .
-This is how you tell
-.B scons
-which variant of a source tree to build:
-
-.ES
-# run src/SConscript in two variant directories
-VariantDir('build/variant1', 'src')
-SConscript('build/variant1/SConscript')
-VariantDir('build/variant2', 'src')
-SConscript('build/variant2/SConscript')
-.EE
-
-.IP
-See also the
-.BR SConscript ()
-function, described above,
-for another way to specify a variant directory
-in conjunction with calling a subsidiary SConscript file.
-
-Examples:
-
-.ES
-# use names in the build directory, not the source directory
-VariantDir('build', 'src', duplicate=0)
-Program('build/prog', 'build/source.c')
-.EE
-
-.ES
-# this builds both the source and docs in a separate subtree
-VariantDir('build', '.', duplicate=0)
-SConscript(dirs=['build/src','build/doc'])
-.EE
-
-.ES
-# 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)
-.EE
-
+'\" END GENERATED FUNCTION DESCRIPTIONS
+'\"
+'\" The descriptions above of the various SCons functions are generated
+'\" from the .xml files that live next to the various Python modules in
+'\" the build enginer library. If you're reading this [gnt]roff file
+'\" with an eye towards patching this man page, you can still submit
+'\" a diff against this text, but it will have to be translated to a
+'\" diff against the underlying .xml file before the patch is actually
+'\" accepted. If you do that yourself, it will make it easier to
+'\" integrate the patch.
+'\"
+'\" END GENERATED FUNCTION DESCRIPTIONS
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.TP
-.RI WhereIs( program ", [" path ", " pathext ", " reject ])
-.TP
-.RI env.WhereIs( program ", [" path ", " pathext ", " reject ])
-
-Searches for the specified executable
-.I program,
-returning the full path name to the program
-if it is found,
-and returning None if not.
-Searches the specified
-.I path,
-the value of the calling environment's PATH
-(env['ENV']['PATH']),
-or the user's current external PATH
-(os.environ['PATH'])
-by default.
-On Windows systems, searches for executable
-programs with any of the file extensions
-listed in the specified
-.I pathext,
-the calling environment's PATHEXT
-(env['ENV']['PATHEXT'])
-or the user's current PATHEXT
-(os.environ['PATHEXT'])
-by default.
-Will not select any
-path name or names
-in the specified
-.I reject
-list, if any.
.SS SConscript Variables
In addition to the global functions and methods,
@@ -8105,14 +4150,14 @@ implicit dependencies
based only on the target file
and the construction environment,
.I not
-for implicit
-(See the section "Scanner Objects," below,
+for implicit dependencies based on source files.
+(See the section "Scanner Objects" below,
for information about creating Scanner objects.)
.IP source_scanner
A Scanner object that
will be invoked to
-find implicit dependences in
+find implicit dependencies in
any source files
used to build this target file.
This is where you would
@@ -8129,7 +4174,7 @@ for on-disk changes to files
that
.B scons
does not know about from other Builder or function calls.
-(See the section "Scanner Objects," below,
+(See the section "Scanner Objects" below,
for information about creating your own Scanner objects.)
.IP target_factory
@@ -9234,7 +5279,7 @@ to enclose arbitrary Python code to be evaluated.
(In fact, this is how the above modifiers are substituted,
they are simply attributes of the Python objects
that represent TARGET, SOURCES, etc.)
-See the section "Python Code Substitution," below,
+See the section "Python Code Substitution" below,
for more thorough examples of
how this can be used.
@@ -9411,9 +5456,9 @@ function accepts the following arguments:
This can be either:
1) a Python function that will process
the Node (file)
-and return a list of strings (file names)
+and return a list of File Nodes
representing the implicit
-dependencies found in the contents;
+dependencies (file names) found in the contents;
or:
2) a dictionary that maps keys
(typically the file suffix, but see below for more discussion)
@@ -9587,7 +5632,7 @@ def xyz_scan(node, env, path):
XYZScanner = Scanner(xyz_scan)
-SourceFileScanner.add_scanner('.xyx', XYZScanner)
+SourceFileScanner.add_scanner('.xyz', XYZScanner)
env.Program('my_prog', ['file1.c', 'file2.f', 'file3.xyz'])
.EE
@@ -9856,7 +5901,7 @@ include_re = re.compile(r'^include\\s+(\\S+)$', re.M)
def kfile_scan(node, env, path, arg):
contents = node.get_text_contents()
includes = include_re.findall(contents)
- return includes
+ return env.File(includes)
kscan = Scanner(name = 'kfile',
function = kfile_scan,
@@ -9872,6 +5917,14 @@ env.Command('bar', bar_in, 'kprocess $SOURCES > $TARGET')
bar_in.target_scanner = kscan
.EE
+It is important to note that you
+have to return a list of File nodes from the scan function, simple
+strings for the file names won't do. As in the examples we are showing here,
+you can use the
+.BR File()
+function of your current Environment in order to create nodes on the fly from
+a sequence of file names with relative paths.
+
Here is a similar but more complete example that searches
a path of directories
(specified as the
@@ -9880,30 +5933,35 @@ construction variable)
for files that actually exist:
.ES
+import re
+import os
include_re = re.compile(r'^include\\s+(\\S+)$', re.M)
def my_scan(node, env, path, arg):
- contents = node.get_text_contents()
- includes = include_re.findall(contents)
- if includes == []:
+ contents = node.get_text_contents()
+ includes = include_re.findall(contents)
+ if includes == []:
return []
results = []
for inc in includes:
for dir in path:
- file = dir + os.sep + inc
+ file = str(dir) + os.sep + inc
if os.path.exists(file):
results.append(file)
break
- return results
+ return env.File(results)
scanner = Scanner(name = 'myscanner',
function = my_scan,
argument = None,
skeys = ['.x'],
- path_function = FindPathDirs('MYPATH'),
+ path_function = FindPathDirs('MYPATH')
)
scanners = Environment().Dictionary('SCANNERS')
-env = Environment(SCANNERS = scanners + [scanner])
+env = Environment(SCANNERS = scanners + [scanner],
+ MYPATH = ['incs'])
+
+env.Command('foo', 'foo.x', 'xprocess < $SOURCES > $TARGET')
.EE
The
@@ -9913,7 +5971,13 @@ function used in the previous example returns a function
that will return a list of directories
specified in the
.B $MYPATH
-construction variable.
+construction variable. It lets SCons detect the file
+.B incs/foo.inc
+, even if
+.B foo.x
+contains the line
+.B include foo.inc
+only.
If you need to customize how the search path is derived,
you would provide your own
.B path_function
@@ -9934,7 +5998,7 @@ scanner = Scanner(name = 'myscanner',
function = my_scan,
argument = None,
skeys = ['.x'],
- path_function = pf,
+ path_function = pf
)
.EE
diff --git a/doc/man/sconsign.1 b/doc/man/sconsign.1
index d7f7ef9..2cd2fca 100644
--- a/doc/man/sconsign.1
+++ b/doc/man/sconsign.1
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+.\" Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining
.\" a copy of this software and associated documentation files (the
@@ -19,7 +19,7 @@
.\" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
.\" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.\"
-.\" doc/man/sconsign.1 5134 2010/08/16 23:02:40 bdeegan
+.\" doc/man/sconsign.1 5357 2011/09/09 21:31:03 bdeegan
.\"
.\" ES - Example Start - indents and turns off line fill
.de ES
@@ -31,7 +31,7 @@
.RE
.fi
..
-.TH SCONSIGN 1 "August 2010"
+.TH SCONSIGN 1 "September 2011"
.SH NAME
sconsign \- print SCons .sconsign file information
.SH SYNOPSIS
diff --git a/doc/python10/scons.mod b/doc/python10/scons.mod
index ee5b1bb..bec5425 100644
--- a/doc/python10/scons.mod
+++ b/doc/python10/scons.mod
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
An SCons-specific DTD module, for use with SCons DocBook
documentation, that contains names, phrases, acronyms, etc. used
diff --git a/doc/scons.mod b/doc/scons.mod
index b1993d4..73ea8f3 100644
--- a/doc/scons.mod
+++ b/doc/scons.mod
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
An SCons-specific DTD module, for use with SCons DocBook
documentation, that contains names, phrases, acronyms, etc. used
@@ -100,6 +100,7 @@
<!ENTITY debug-explain "<literal>--debug=explain</literal>">
<!ENTITY debug-findlibs "<literal>--debug=findlibs</literal>">
<!ENTITY debug-includes "<literal>--debug=includes</literal>">
+<!ENTITY debug-prepare "<literal>--debug=prepare</literal>">
<!ENTITY debug-presub "<literal>--debug=presub</literal>">
<!ENTITY debug-stacktrace "<literal>--debug=stacktrace</literal>">
<!ENTITY implicit-cache "<literal>--implicit-cache</literal>">
@@ -180,6 +181,7 @@
<!ENTITY Depends "<function>Depends</function>">
<!ENTITY Dir "<function>Dir</function>">
<!ENTITY Dump "<function>Dump</function>">
+<!ENTITY Duplicate "<function>Duplicate</function>">
<!ENTITY Entry "<function>Entry</function>">
<!ENTITY EnumOption "<function>EnumOption</function>">
<!ENTITY EnumVariable "<function>EnumVariable</function>">
diff --git a/doc/user/MANIFEST b/doc/user/MANIFEST
index ef273d3..0994f2b 100644
--- a/doc/user/MANIFEST
+++ b/doc/user/MANIFEST
@@ -17,6 +17,7 @@ errors.xml
example.xml
factories.xml
file-removal.xml
+functions.xml
hierarchy.xml
install.xml
java.xml
diff --git a/doc/user/README b/doc/user/README
index 773fbc2..7ebdb93 100644
--- a/doc/user/README
+++ b/doc/user/README
@@ -1,4 +1,4 @@
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
When adding a new file, add it to main.xml and MANIFEST.
diff --git a/doc/user/actions.in b/doc/user/actions.in
index 06dcd63..6634a0d 100644
--- a/doc/user/actions.in
+++ b/doc/user/actions.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/actions.xml b/doc/user/actions.xml
index 7231a70..a3cce98 100644
--- a/doc/user/actions.xml
+++ b/doc/user/actions.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/add-method.in b/doc/user/add-method.in
index a9595a9..815e0a7 100644
--- a/doc/user/add-method.in
+++ b/doc/user/add-method.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/add-method.xml b/doc/user/add-method.xml
index 46f858d..6cb1a93 100644
--- a/doc/user/add-method.xml
+++ b/doc/user/add-method.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -113,6 +113,7 @@
rc /fores.res res.rc
cl /Fotest_stuff.obj /c test_stuff.c /nologo
link /nologo /OUT:tests\test_stuff.exe test_stuff.obj res.res
+ embedManifestExeCheck(target, source, env)
</screen>
<para>
diff --git a/doc/user/alias.in b/doc/user/alias.in
index c17d76a..1fb7e30 100644
--- a/doc/user/alias.in
+++ b/doc/user/alias.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/alias.xml b/doc/user/alias.xml
index fed201f..8888f77 100644
--- a/doc/user/alias.xml
+++ b/doc/user/alias.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/ant.in b/doc/user/ant.in
index d39207d..2cc83a3 100644
--- a/doc/user/ant.in
+++ b/doc/user/ant.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/ant.xml b/doc/user/ant.xml
index d39207d..2cc83a3 100644
--- a/doc/user/ant.xml
+++ b/doc/user/ant.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/build-install.in b/doc/user/build-install.in
index 8d1c005..aad4a44 100644
--- a/doc/user/build-install.in
+++ b/doc/user/build-install.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -121,9 +121,10 @@
<para>
- &SCons; will work with any version of Python from 2.4 or later.
+ &SCons; will work with any 2.x version of Python from 2.4 on;
+ 3.0 and later are not yet supported.
If you need to install Python and have a choice,
- we recommend using the most recent Python version available.
+ we recommend using the most recent 2.x Python version available.
Newer Pythons have significant improvements
that help speed up the performance of &SCons;.
@@ -198,7 +199,7 @@
</para>
<screen>
- # <userinput>rpm -Uvh scons-2.0.1-1.noarch.rpm</userinput>
+ # <userinput>rpm -Uvh scons-2.1.0-1.noarch.rpm</userinput>
</screen>
<para>
@@ -260,7 +261,7 @@
&SCons; provides a Windows installer
that makes installation extremely easy.
- Download the <filename>scons-2.0.1.win32.exe</filename>
+ Download the <filename>scons-2.1.0.win32.exe</filename>
file from the &SCons; download page at
<ulink url="http://www.scons.org/download.php">http://www.scons.org/download.php</ulink>.
Then all you need to do is execute the file
@@ -370,8 +371,8 @@
<para>
The first step is to download either the
- <filename>scons-2.0.1.tar.gz</filename>
- or <filename>scons-2.0.1.zip</filename>,
+ <filename>scons-2.1.0.tar.gz</filename>
+ or <filename>scons-2.1.0.zip</filename>,
which are available from the SCons download page at
<ulink url="http://www.scons.org/download.html">http://www.scons.org/download.html</ulink>.
@@ -384,7 +385,7 @@
on Linux or UNIX,
or <application>WinZip</application> on Windows.
This will create a directory called
- <filename>scons-2.0.1</filename>,
+ <filename>scons-2.1.0</filename>,
usually in your local directory.
Then change your working directory to that directory
and install &SCons; by executing the following commands:
@@ -392,7 +393,7 @@
</para>
<screen>
- # <userinput>cd scons-2.0.1</userinput>
+ # <userinput>cd scons-2.1.0</userinput>
# <userinput>python setup.py install</userinput>
</screen>
@@ -460,9 +461,9 @@
This will install the &SCons; build engine
in the
- <filename>/usr/lib/scons-2.0.1</filename>
+ <filename>/usr/lib/scons-2.1.0</filename>
or
- <filename>C:\Python25\scons-2.0.1</filename>
+ <filename>C:\Python25\scons-2.1.0</filename>
directory, for example.
</para>
@@ -519,7 +520,7 @@
relative to the specified prefix.
Adding <option>--version-lib</option> to the
above example would install the build engine in
- <filename>/opt/scons/lib/scons-2.0.1</filename>.
+ <filename>/opt/scons/lib/scons-2.1.0</filename>.
</para>
diff --git a/doc/user/build-install.xml b/doc/user/build-install.xml
index 8d1c005..aad4a44 100644
--- a/doc/user/build-install.xml
+++ b/doc/user/build-install.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -121,9 +121,10 @@
<para>
- &SCons; will work with any version of Python from 2.4 or later.
+ &SCons; will work with any 2.x version of Python from 2.4 on;
+ 3.0 and later are not yet supported.
If you need to install Python and have a choice,
- we recommend using the most recent Python version available.
+ we recommend using the most recent 2.x Python version available.
Newer Pythons have significant improvements
that help speed up the performance of &SCons;.
@@ -198,7 +199,7 @@
</para>
<screen>
- # <userinput>rpm -Uvh scons-2.0.1-1.noarch.rpm</userinput>
+ # <userinput>rpm -Uvh scons-2.1.0-1.noarch.rpm</userinput>
</screen>
<para>
@@ -260,7 +261,7 @@
&SCons; provides a Windows installer
that makes installation extremely easy.
- Download the <filename>scons-2.0.1.win32.exe</filename>
+ Download the <filename>scons-2.1.0.win32.exe</filename>
file from the &SCons; download page at
<ulink url="http://www.scons.org/download.php">http://www.scons.org/download.php</ulink>.
Then all you need to do is execute the file
@@ -370,8 +371,8 @@
<para>
The first step is to download either the
- <filename>scons-2.0.1.tar.gz</filename>
- or <filename>scons-2.0.1.zip</filename>,
+ <filename>scons-2.1.0.tar.gz</filename>
+ or <filename>scons-2.1.0.zip</filename>,
which are available from the SCons download page at
<ulink url="http://www.scons.org/download.html">http://www.scons.org/download.html</ulink>.
@@ -384,7 +385,7 @@
on Linux or UNIX,
or <application>WinZip</application> on Windows.
This will create a directory called
- <filename>scons-2.0.1</filename>,
+ <filename>scons-2.1.0</filename>,
usually in your local directory.
Then change your working directory to that directory
and install &SCons; by executing the following commands:
@@ -392,7 +393,7 @@
</para>
<screen>
- # <userinput>cd scons-2.0.1</userinput>
+ # <userinput>cd scons-2.1.0</userinput>
# <userinput>python setup.py install</userinput>
</screen>
@@ -460,9 +461,9 @@
This will install the &SCons; build engine
in the
- <filename>/usr/lib/scons-2.0.1</filename>
+ <filename>/usr/lib/scons-2.1.0</filename>
or
- <filename>C:\Python25\scons-2.0.1</filename>
+ <filename>C:\Python25\scons-2.1.0</filename>
directory, for example.
</para>
@@ -519,7 +520,7 @@
relative to the specified prefix.
Adding <option>--version-lib</option> to the
above example would install the build engine in
- <filename>/opt/scons/lib/scons-2.0.1</filename>.
+ <filename>/opt/scons/lib/scons-2.1.0</filename>.
</para>
diff --git a/doc/user/builders-built-in.in b/doc/user/builders-built-in.in
index f7da806..d16e8c3 100644
--- a/doc/user/builders-built-in.in
+++ b/doc/user/builders-built-in.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/builders-built-in.xml b/doc/user/builders-built-in.xml
index 3d47f5c..39e0533 100644
--- a/doc/user/builders-built-in.xml
+++ b/doc/user/builders-built-in.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -160,6 +160,7 @@
cl /Fogoodbye.obj /c goodbye.c /nologo
cl /Fohello.obj /c hello.c /nologo
link /nologo /OUT:hello.exe /LIBPATH:\usr\dir1 /LIBPATH:dir2 foo1.lib foo2.lib hello.obj goodbye.obj
+ embedManifestExeCheck(target, source, env)
</screen>
<para>
diff --git a/doc/user/builders-commands.in b/doc/user/builders-commands.in
index af3aec8..1082058 100644
--- a/doc/user/builders-commands.in
+++ b/doc/user/builders-commands.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -72,7 +72,7 @@
<scons_example name="ex1">
<file name="SConstruct" printme="1">
env = Environment()
- env.Command('foo.out', 'foo.in', "sed 's/x/y/' < $SOURCE > $TARGET")
+ env.Command('foo.out', 'foo.in', "sed 's/x/y/' &lt; $SOURCE > $TARGET")
</file>
<file name="foo.in">
foo.in
diff --git a/doc/user/builders-commands.xml b/doc/user/builders-commands.xml
index 7e48660..e3066c6 100644
--- a/doc/user/builders-commands.xml
+++ b/doc/user/builders-commands.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/builders-writing.in b/doc/user/builders-writing.in
index 0bf6971..addc837 100644
--- a/doc/user/builders-writing.in
+++ b/doc/user/builders-writing.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -823,7 +823,6 @@ This functionality could be invoked as in the following example:
<file name="my_command" chmod="0755">
cat
</file>
- </file>
</scons_example>
@@ -842,7 +841,6 @@ This functionality could be invoked as in the following example:
MY_EMITTER = modify2)
env1.Foo('file1')
env2.Foo('file2')
- </file>
</sconstruct>
<para>
@@ -899,8 +897,8 @@ This functionality could be invoked as in the following example:
<para>
- The <filename>site_scons</filename> directory gives you a place to
- put Python modules you can import into your &SConscript; files
+ The <filename>site_scons</filename> directories give you a place to
+ put Python modules and packages that you can import into your &SConscript; files
(<filename>site_scons</filename>),
add-on tools that can integrate into &SCons;
(<filename>site_scons/site_tools</filename>),
@@ -912,11 +910,21 @@ This functionality could be invoked as in the following example:
<para>
+ Each system type (Windows, Mac, Linux, etc.) searches a canonical
+ set of directories for site_scons; see the man page for details.
+ The top-level SConstruct's site_scons dir is always searched last,
+ and its dir is placed first in the tool path so it overrides all
+ others.
+
+ </para>
+
+ <para>
+
If you get a tool from somewhere (the &SCons; wiki or a third party,
- for instance) and you'd like to use it in your project, the
+ for instance) and you'd like to use it in your project, a
<filename>site_scons</filename> dir is the simplest place to put it.
Tools come in two flavors; either a Python function that operates on
- an &Environment; or a Python file containing two functions,
+ an &Environment; or a Python module or package containing two functions,
<function>exists()</function> and <function>generate()</function>.
</para>
@@ -931,7 +939,7 @@ This functionality could be invoked as in the following example:
</para>
<scons_example name="site1">
- <file name="site_scons/site_init.py" printme=1>
+ <file name="site_scons/site_init.py" printme="1">
def TOOL_ADD_HEADER(env):
"""A Tool to add a header from $HEADER to the source file"""
add_header = Builder(action=['echo "$HEADER" &gt; $TARGET',
@@ -975,16 +983,23 @@ This functionality could be invoked as in the following example:
-->
<para>
- Similarly, a more full-fledged tool with
+ A more full-fledged tool with
<function>exists()</function> and <function>generate()</function>
- methods can be installed in
- <filename>site_scons/site_tools/toolname.py</filename>. Since
- <filename>site_scons/site_tools</filename> is automatically added
- to the head of the tool search path, any tool found there will be
- available to all environments. Furthermore, a tool found there
- will override a built-in tool of the same name, so if you need to
- change the behavior of a built-in tool, site_scons gives you the
- hook you need.
+ methods can be installed either as a module in the file
+ <filename>site_scons/site_tools/toolname.py</filename> or as a
+ package in the
+ directory <filename>site_scons/site_tools/toolname</filename>. In
+ the case of using a package, the <function>exists()</function>
+ and <function>generate()</function> are in the
+ file <filename>site_scons/site_tools/toolname/__init__.py</filename>.
+ (In all the above case <filename>toolname</filename> is replaced
+ by the name of the tool.)
+ Since <filename>site_scons/site_tools</filename> is automatically
+ added to the head of the tool search path, any tool found there
+ will be available to all environments. Furthermore, a tool found
+ there will override a built-in tool of the same name, so if you
+ need to change the behavior of a built-in
+ tool, <filename>site_scons</filename> gives you the hook you need.
</para>
<para>
@@ -998,7 +1013,7 @@ This functionality could be invoked as in the following example:
</para>
<scons_example name="site2">
- <file name="site_scons/my_utils.py" printme=1>
+ <file name="site_scons/my_utils.py" printme="1">
from SCons.Script import * # for Execute and Mkdir
def build_id():
"""Return a build ID (stub version)"""
@@ -1047,13 +1062,15 @@ This functionality could be invoked as in the following example:
<para>
- If you have a machine-wide site dir you'd like to use instead of
- <filename>./site_scons</filename>, use the
- <literal>--site-dir</literal> option to point to your dir.
+ You can use any of the user- or machine-wide site dirs such as
+ <filename>~/.scons/site_scons</filename> instead of
+ <filename>./site_scons</filename>, or use the
+ <literal>--site-dir</literal> option to point to your own dir.
<filename>site_init.py</filename> and
<filename>site_tools</filename> will be located under that dir.
- To avoid using a <filename>site_scons</filename> dir at all, even
- if it exists, use the <literal>--no-site-dir</literal> option.
+ To avoid using a <filename>site_scons</filename> dir at all,
+ even if it exists, use the <literal>--no-site-dir</literal>
+ option.
</para>
diff --git a/doc/user/builders-writing.xml b/doc/user/builders-writing.xml
index f364e27..d9bda79 100644
--- a/doc/user/builders-writing.xml
+++ b/doc/user/builders-writing.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -703,7 +703,6 @@ This functionality could be invoked as in the following example:
import os
env1['ENV']['PATH'] = env2['ENV']['PATH'] + os.pathsep + os.getcwd()
env2['ENV']['PATH'] = env2['ENV']['PATH'] + os.pathsep + os.getcwd()
-
</programlisting>
@@ -722,7 +721,6 @@ This functionality could be invoked as in the following example:
MY_EMITTER = modify2)
env1.Foo('file1')
env2.Foo('file2')
-
</programlisting>
<para>
@@ -781,8 +779,8 @@ This functionality could be invoked as in the following example:
<para>
- The <filename>site_scons</filename> directory gives you a place to
- put Python modules you can import into your &SConscript; files
+ The <filename>site_scons</filename> directories give you a place to
+ put Python modules and packages that you can import into your &SConscript; files
(<filename>site_scons</filename>),
add-on tools that can integrate into &SCons;
(<filename>site_scons/site_tools</filename>),
@@ -794,11 +792,21 @@ This functionality could be invoked as in the following example:
<para>
+ Each system type (Windows, Mac, Linux, etc.) searches a canonical
+ set of directories for site_scons; see the man page for details.
+ The top-level SConstruct's site_scons dir is always searched last,
+ and its dir is placed first in the tool path so it overrides all
+ others.
+
+ </para>
+
+ <para>
+
If you get a tool from somewhere (the &SCons; wiki or a third party,
- for instance) and you'd like to use it in your project, the
+ for instance) and you'd like to use it in your project, a
<filename>site_scons</filename> dir is the simplest place to put it.
Tools come in two flavors; either a Python function that operates on
- an &Environment; or a Python file containing two functions,
+ an &Environment; or a Python module or package containing two functions,
<function>exists()</function> and <function>generate()</function>.
</para>
@@ -848,16 +856,23 @@ This functionality could be invoked as in the following example:
-->
<para>
- Similarly, a more full-fledged tool with
+ A more full-fledged tool with
<function>exists()</function> and <function>generate()</function>
- methods can be installed in
- <filename>site_scons/site_tools/toolname.py</filename>. Since
- <filename>site_scons/site_tools</filename> is automatically added
- to the head of the tool search path, any tool found there will be
- available to all environments. Furthermore, a tool found there
- will override a built-in tool of the same name, so if you need to
- change the behavior of a built-in tool, site_scons gives you the
- hook you need.
+ methods can be installed either as a module in the file
+ <filename>site_scons/site_tools/toolname.py</filename> or as a
+ package in the
+ directory <filename>site_scons/site_tools/toolname</filename>. In
+ the case of using a package, the <function>exists()</function>
+ and <function>generate()</function> are in the
+ file <filename>site_scons/site_tools/toolname/__init__.py</filename>.
+ (In all the above case <filename>toolname</filename> is replaced
+ by the name of the tool.)
+ Since <filename>site_scons/site_tools</filename> is automatically
+ added to the head of the tool search path, any tool found there
+ will be available to all environments. Furthermore, a tool found
+ there will override a built-in tool of the same name, so if you
+ need to change the behavior of a built-in
+ tool, <filename>site_scons</filename> gives you the hook you need.
</para>
<para>
@@ -913,13 +928,15 @@ This functionality could be invoked as in the following example:
<para>
- If you have a machine-wide site dir you'd like to use instead of
- <filename>./site_scons</filename>, use the
- <literal>--site-dir</literal> option to point to your dir.
+ You can use any of the user- or machine-wide site dirs such as
+ <filename>~/.scons/site_scons</filename> instead of
+ <filename>./site_scons</filename>, or use the
+ <literal>--site-dir</literal> option to point to your own dir.
<filename>site_init.py</filename> and
<filename>site_tools</filename> will be located under that dir.
- To avoid using a <filename>site_scons</filename> dir at all, even
- if it exists, use the <literal>--no-site-dir</literal> option.
+ To avoid using a <filename>site_scons</filename> dir at all,
+ even if it exists, use the <literal>--no-site-dir</literal>
+ option.
</para>
diff --git a/doc/user/builders.in b/doc/user/builders.in
index 9e9b647..f2bf36d 100644
--- a/doc/user/builders.in
+++ b/doc/user/builders.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/builders.xml b/doc/user/builders.xml
index 9e9b647..f2bf36d 100644
--- a/doc/user/builders.xml
+++ b/doc/user/builders.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/caching.in b/doc/user/caching.in
index e5e2742..d60f067 100644
--- a/doc/user/caching.in
+++ b/doc/user/caching.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/caching.xml b/doc/user/caching.xml
index 5a64e7d..c3dae0a 100644
--- a/doc/user/caching.xml
+++ b/doc/user/caching.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/command-line.in b/doc/user/command-line.in
index cd5ead6..52a61ac 100644
--- a/doc/user/command-line.in
+++ b/doc/user/command-line.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -221,7 +221,7 @@
</para>
- <sconstruct)
+ <sconstruct>
if not GetOption('help'):
SConscript('src/SConscript', export='env')
</sconstruct>
@@ -2195,7 +2195,7 @@
Second,
the contents of the &DEFAULT_TARGETS; list change
- in response to calls to the &Default: function,
+ in response to calls to the &Default; function,
as you can see from the following &SConstruct; file:
</para>
diff --git a/doc/user/command-line.xml b/doc/user/command-line.xml
index 8bc72bb..f06442e 100644
--- a/doc/user/command-line.xml
+++ b/doc/user/command-line.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -214,7 +214,10 @@
</para>
- <programlisting></programlisting>
+ <programlisting>
+ if not GetOption('help'):
+ SConscript('src/SConscript', export='env')
+ </programlisting>
<para>
@@ -1252,7 +1255,7 @@
<screen>
% <userinput>scons -Q COLOR=magenta foo.o</userinput>
- scons: *** Invalid value for option COLOR: magenta
+ scons: *** Invalid value for option COLOR: magenta. Valid values are: ('red', 'green', 'blue')
File "/home/my/project/SConstruct", line 5, in &lt;module&gt;
</screen>
@@ -1308,15 +1311,15 @@
<screen>
% <userinput>scons -Q COLOR=Red foo.o</userinput>
- scons: *** Invalid value for option COLOR: Red
+ scons: *** Invalid value for option COLOR: Red. Valid values are: ('red', 'green', 'blue')
File "/home/my/project/SConstruct", line 5, in &lt;module&gt;
% <userinput>scons -Q COLOR=BLUE foo.o</userinput>
- scons: *** Invalid value for option COLOR: BLUE
+ scons: *** Invalid value for option COLOR: BLUE. Valid values are: ('red', 'green', 'blue')
File "/home/my/project/SConstruct", line 5, in &lt;module&gt;
% <userinput>scons -Q COLOR=nAvY foo.o</userinput>
- scons: *** Invalid value for option COLOR: nAvY
+ scons: *** Invalid value for option COLOR: nAvY. Valid values are: ('red', 'green', 'blue')
File "/home/my/project/SConstruct", line 5, in &lt;module&gt;
</screen>
@@ -2107,7 +2110,7 @@
Second,
the contents of the &DEFAULT_TARGETS; list change
- in response to calls to the &Default;: function,
+ in response to calls to the &Default; function,
as you can see from the following &SConstruct; file:
</para>
diff --git a/doc/user/copyright.in b/doc/user/copyright.in
index 8b90dbc..19689fe 100644
--- a/doc/user/copyright.in
+++ b/doc/user/copyright.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/copyright.xml b/doc/user/copyright.xml
index 8b90dbc..19689fe 100644
--- a/doc/user/copyright.xml
+++ b/doc/user/copyright.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/depends.in b/doc/user/depends.in
index 69bb242..190670c 100644
--- a/doc/user/depends.in
+++ b/doc/user/depends.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -386,7 +386,7 @@
<para>
- So configured, &SCons will still behave like
+ So configured, &SCons; will still behave like
it does when using <literal>Decider('MD5')</literal>:
</para>
@@ -487,7 +487,7 @@
only its section of the input file.
However, since the input file may contain a lot of data,
we want to open the input file only if its timestamp has changed.
- This could done with a custom
+ This could be done with a custom
&Decider; function that might look something like this:
</para>
@@ -591,6 +591,59 @@
</para>
+ <para>
+
+ Another thing to look out for, is the fact that the three
+ attributes above may not be present at the time of the first run.
+ Without any prior build, no targets got created and no
+ <filename>.sconsign</filename> DB file exists yet.
+ So, it is recommended to always check whether the
+ <varname>prev_ni</varname> attribute in question is available.
+
+ </para>
+
+ <para>
+
+ We finally present a small example for a
+ <varname>csig</varname>-based decider function. Note how the
+ signature information for the <varname>dependency</varname> file
+ has to get initialized via <function>get_csig</function>
+ during each function call (this is mandatory!).
+
+ </para>
+
+ <sconstruct>
+ env = Environment()
+
+ def config_file_decider(dependency, target, prev_ni):
+ import os.path
+
+ # We always have to init the .csig value...
+ dep_csig = dependency.get_csig()
+ # .csig may not exist, because no target was built yet...
+ if 'csig' not in dir(prev_ni):
+ return True
+ # Target file may not exist yet
+ if not os.path.exists(str(target.abspath)):
+ return True
+ if dep_csig != prev_ni.csig:
+ # Some change on source file => update installed one
+ return True
+ return False
+
+ def update_file():
+ f = open("test.txt","a")
+ f.write("some line\n")
+ f.close()
+
+ update_file()
+
+ # Activate our own decider function
+ env.Decider(config_file_decider)
+
+ env.Install("install","test.txt")
+ </sconstruct>
+
</section>
<section>
@@ -861,7 +914,7 @@
</section>
- <section>
+ <section id="sect-implicit-dependencies">
<title>Implicit Dependencies: The &cv-CPPPATH; Construction Variable</title>
<para>
diff --git a/doc/user/depends.xml b/doc/user/depends.xml
index 430e64a..5b19220 100644
--- a/doc/user/depends.xml
+++ b/doc/user/depends.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -488,7 +488,7 @@
only its section of the input file.
However, since the input file may contain a lot of data,
we want to open the input file only if its timestamp has changed.
- This could done with a custom
+ This could be done with a custom
&Decider; function that might look something like this:
</para>
@@ -587,6 +587,59 @@
</para>
+ <para>
+
+ Another thing to look out for, is the fact that the three
+ attributes above may not be present at the time of the first run.
+ Without any prior build, no targets got created and no
+ <filename>.sconsign</filename> DB file exists yet.
+ So, it is recommended to always check whether the
+ <varname>prev_ni</varname> attribute in question is available.
+
+ </para>
+
+ <para>
+
+ We finally present a small example for a
+ <varname>csig</varname>-based decider function. Note how the
+ signature information for the <varname>dependency</varname> file
+ has to get initialized via <function>get_csig</function>
+ during each function call (this is mandatory!).
+
+ </para>
+
+ <programlisting>
+ env = Environment()
+
+ def config_file_decider(dependency, target, prev_ni):
+ import os.path
+
+ # We always have to init the .csig value...
+ dep_csig = dependency.get_csig()
+ # .csig may not exist, because no target was built yet...
+ if 'csig' not in dir(prev_ni):
+ return True
+ # Target file may not exist yet
+ if not os.path.exists(str(target.abspath)):
+ return True
+ if dep_csig != prev_ni.csig:
+ # Some change on source file =&gt; update installed one
+ return True
+ return False
+
+ def update_file():
+ f = open("test.txt","a")
+ f.write("some line\n")
+ f.close()
+
+ update_file()
+
+ # Activate our own decider function
+ env.Decider(config_file_decider)
+
+ env.Install("install","test.txt")
+ </programlisting>
+
</section>
<section>
@@ -850,7 +903,7 @@
</section>
- <section>
+ <section id="sect-implicit-dependencies">
<title>Implicit Dependencies: The &cv-CPPPATH; Construction Variable</title>
<para>
@@ -989,6 +1042,7 @@
C:\><userinput>scons -Q hello.exe</userinput>
cl /Fohello.obj /c hello.c /nologo /Iinclude /I\home\project\inc
link /nologo /OUT:hello.exe hello.obj
+ embedManifestExeCheck(target, source, env)
</screen>
</section>
diff --git a/doc/user/environments.in b/doc/user/environments.in
index 9ce5568..ecfea8a 100644
--- a/doc/user/environments.in
+++ b/doc/user/environments.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -347,7 +347,7 @@ environment, of directory names, suffixes, etc.
The <literal>external environment</literal>
is the set of variables in the user's environment
- at the time the user runs &SCons.
+ at the time the user runs &SCons;.
These variables are available within the &SConscript; files
through the Python <literal>os.environ</literal> dictionary.
See <xref linkend="sect-external-environments"></xref>, below.
@@ -406,7 +406,7 @@ environment, of directory names, suffixes, etc.
Unlike &Make;, &SCons; does not automatically
copy or import values between different environments
- (with the exception of explicit clones of &consenvs,
+ (with the exception of explicit clones of &consenvs;,
which inherit values from their parent).
This is a deliberate design choice
to make sure that builds are,
@@ -638,7 +638,7 @@ environment, of directory names, suffixes, etc.
for key in ['OBJSUFFIX', 'LIBSUFFIX', 'PROGSUFFIX']:
print "key = %s, value = %s" % (key, dict[key])
</file>
- </scons_Example>
+ </scons_example>
<para>
@@ -779,18 +779,20 @@ environment, of directory names, suffixes, etc.
If a problem occurs when expanding a construction variable,
by default it is expanded to <literal>''</literal>
(a null string), and will not cause scons to fail.
-
+ </para>
+
<scons_example name="missing1">
<file name="SConstruct" printme="1">
env = Environment()
- print "value is:", env.subst( '->$MISSING<-' )
+ print "value is:", env.subst( '->$MISSING&lt;-' )
</file>
</scons_example>
<scons_output example="missing1">
<scons_output_command>scons -Q</scons_output_command>
</scons_output>
-
+
+ <para>
This default behaviour can be changed using the &AllowSubstExceptions;
function.
When a problem occurs with a variable expansion it generates
@@ -810,7 +812,7 @@ environment, of directory names, suffixes, etc.
<file name="SConstruct" printme="1">
AllowSubstExceptions()
env = Environment()
- print "value is:", env.subst( '->$MISSING<-' )
+ print "value is:", env.subst( '->$MISSING&lt;-' )
</file>
</scons_example>
@@ -830,7 +832,7 @@ environment, of directory names, suffixes, etc.
<file name="SConstruct" printme="1">
AllowSubstExceptions(IndexError, NameError, ZeroDivisionError)
env = Environment()
- print "value is:", env.subst( '->${1 / 0}<-' )
+ print "value is:", env.subst( '->${1 / 0}&lt;-' )
</file>
</scons_example>
@@ -1093,7 +1095,7 @@ environment, of directory names, suffixes, etc.
</section>
- <section>
+ <section id="sect-clone-environments">
<title>Making Copies of &ConsEnvs;: the &Clone; Method</title>
<para>
diff --git a/doc/user/environments.xml b/doc/user/environments.xml
index 5bb1089..81f43a4 100644
--- a/doc/user/environments.xml
+++ b/doc/user/environments.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -779,7 +779,8 @@ environment, of directory names, suffixes, etc.
If a problem occurs when expanding a construction variable,
by default it is expanded to <literal>''</literal>
(a null string), and will not cause scons to fail.
-
+ </para>
+
<programlisting>
env = Environment()
print "value is:", env.subst( '-&gt;$MISSING&lt;-' )
@@ -790,7 +791,8 @@ environment, of directory names, suffixes, etc.
value is: -&gt;&lt;-
scons: `.' is up to date.
</screen>
-
+
+ <para>
This default behaviour can be changed using the &AllowSubstExceptions;
function.
When a problem occurs with a variable expansion it generates
@@ -1087,7 +1089,7 @@ environment, of directory names, suffixes, etc.
</section>
- <section>
+ <section id="sect-clone-environments">
<title>Making Copies of &ConsEnvs;: the &Clone; Method</title>
<para>
diff --git a/doc/user/errors.in b/doc/user/errors.in
index ad4c2ef..7e33118 100644
--- a/doc/user/errors.in
+++ b/doc/user/errors.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/errors.xml b/doc/user/errors.xml
index ad4c2ef..7e33118 100644
--- a/doc/user/errors.xml
+++ b/doc/user/errors.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/example.in b/doc/user/example.in
index ad4c2ef..7e33118 100644
--- a/doc/user/example.in
+++ b/doc/user/example.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/example.xml b/doc/user/example.xml
index ad4c2ef..7e33118 100644
--- a/doc/user/example.xml
+++ b/doc/user/example.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/factories.in b/doc/user/factories.in
index c0f524d..da92082 100644
--- a/doc/user/factories.in
+++ b/doc/user/factories.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -209,7 +209,7 @@
<para>
Of course, like all of these &Action; factories,
- the &Delete factory also expands
+ the &Delete; factory also expands
&cv-link-TARGET; and &cv-link-SOURCE; variables appropriately.
For example:
diff --git a/doc/user/factories.xml b/doc/user/factories.xml
index 6a92b0c..7f51c8d 100644
--- a/doc/user/factories.xml
+++ b/doc/user/factories.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/file-removal.in b/doc/user/file-removal.in
index 1b12d35..b664ba0 100644
--- a/doc/user/file-removal.in
+++ b/doc/user/file-removal.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/file-removal.xml b/doc/user/file-removal.xml
index 92c1c0d..47b081a 100644
--- a/doc/user/file-removal.xml
+++ b/doc/user/file-removal.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/functions.in b/doc/user/functions.in
new file mode 100644
index 0000000..7c96c54
--- /dev/null
+++ b/doc/user/functions.in
@@ -0,0 +1,38 @@
+<!--
+
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+-->
+
+<para>
+
+This appendix contains descriptions of all of the
+function and construction environment methods
+in this version of &SCons;
+
+</para>
+
+<variablelist>
+
+&functions-gen;
+
+</variablelist>
diff --git a/doc/user/functions.xml b/doc/user/functions.xml
new file mode 100644
index 0000000..7c96c54
--- /dev/null
+++ b/doc/user/functions.xml
@@ -0,0 +1,38 @@
+<!--
+
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+-->
+
+<para>
+
+This appendix contains descriptions of all of the
+function and construction environment methods
+in this version of &SCons;
+
+</para>
+
+<variablelist>
+
+&functions-gen;
+
+</variablelist>
diff --git a/doc/user/hierarchy.in b/doc/user/hierarchy.in
index 16d9389..950bc8a 100644
--- a/doc/user/hierarchy.in
+++ b/doc/user/hierarchy.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -478,7 +478,7 @@ make no difference to the build.
</section>
- <section>
+ <section id="sect-sharing-environments">
<title>Sharing Environments (and Other Variables) Between &SConscript; Files</title>
<para>
@@ -688,7 +688,7 @@ make no difference to the build.
Sometimes, you would like to be able to
use information from a subsidiary
- &SConscript file in some way.
+ &SConscript; file in some way.
For example,
suppose that you want to create one
library from source files
diff --git a/doc/user/hierarchy.xml b/doc/user/hierarchy.xml
index bc4073e..6691e70 100644
--- a/doc/user/hierarchy.xml
+++ b/doc/user/hierarchy.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -442,7 +442,7 @@ make no difference to the build.
</section>
- <section>
+ <section id="sect-sharing-environments">
<title>Sharing Environments (and Other Variables) Between &SConscript; Files</title>
<para>
diff --git a/doc/user/install.in b/doc/user/install.in
index 8f9498e..131fc6a 100644
--- a/doc/user/install.in
+++ b/doc/user/install.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/install.xml b/doc/user/install.xml
index f119b00..6b49ae8 100644
--- a/doc/user/install.xml
+++ b/doc/user/install.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/java.in b/doc/user/java.in
index 290cd43..bad5c34 100644
--- a/doc/user/java.in
+++ b/doc/user/java.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -390,7 +390,7 @@
You can generate C header and source files
for implementing native methods,
by using the &b-link-JavaH; Builder.
- There are several ways of using the &JavaH Builder.
+ There are several ways of using the &JavaH; Builder.
One typical invocation might look like:
</para>
@@ -636,7 +636,7 @@
As it did with the &b-link-JavaH; Builder,
&SCons; remembers the class directory
and passes it as the <option>-classpath</option> option
- to &rmic:
+ to &rmic;:
</para>
diff --git a/doc/user/java.xml b/doc/user/java.xml
index a0544f7..f277558 100644
--- a/doc/user/java.xml
+++ b/doc/user/java.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/less-simple.in b/doc/user/less-simple.in
index cccad83..d717014 100644
--- a/doc/user/less-simple.in
+++ b/doc/user/less-simple.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/less-simple.xml b/doc/user/less-simple.xml
index 24b45e6..e269490 100644
--- a/doc/user/less-simple.xml
+++ b/doc/user/less-simple.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -102,6 +102,7 @@
C:\><userinput>scons -Q</userinput>
cl /Fohello.obj /c hello.c /nologo
link /nologo /OUT:new_hello.exe hello.obj
+ embedManifestExeCheck(target, source, env)
</screen>
</section>
@@ -193,6 +194,7 @@
cl /Fofile2.obj /c file2.c /nologo
cl /Foprog.obj /c prog.c /nologo
link /nologo /OUT:program.exe prog.obj file1.obj file2.obj
+ embedManifestExeCheck(target, source, env)
</screen>
</section>
diff --git a/doc/user/libraries.in b/doc/user/libraries.in
index 5b449e7..a56f2c3 100644
--- a/doc/user/libraries.in
+++ b/doc/user/libraries.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/libraries.xml b/doc/user/libraries.xml
index 3eed3cc..6909758 100644
--- a/doc/user/libraries.xml
+++ b/doc/user/libraries.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -206,6 +206,7 @@
cl /Fof3.obj /c f3.c /nologo
link /nologo /dll /out:foo.dll /implib:foo.lib f1.obj f2.obj f3.obj
RegServerFunc(target, source, env)
+ embedManifestDllCheck(target, source, env)
</screen>
<para>
@@ -288,6 +289,7 @@
lib /nologo /OUT:foo.lib f1.obj f2.obj f3.obj
cl /Foprog.obj /c prog.c /nologo
link /nologo /OUT:prog.exe /LIBPATH:. foo.lib bar.lib prog.obj
+ embedManifestExeCheck(target, source, env)
</screen>
<para>
@@ -412,6 +414,7 @@
C:\><userinput>scons -Q</userinput>
cl /Foprog.obj /c prog.c /nologo
link /nologo /OUT:prog.exe /LIBPATH:\usr\lib /LIBPATH:\usr\local\lib m.lib prog.obj
+ embedManifestExeCheck(target, source, env)
</screen>
<!-- The link command is too wide in the PDF version.
There are some other examples of this throughout the document. -->
diff --git a/doc/user/main.in b/doc/user/main.in
index fbc28df..feb8c25 100644
--- a/doc/user/main.in
+++ b/doc/user/main.in
@@ -1,7 +1,7 @@
<?xml version="1.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
@@ -37,6 +37,9 @@
<!ENTITY % builders-mod SYSTEM "builders.mod">
%builders-mod;
+ <!ENTITY % functions-mod SYSTEM "functions.mod">
+ %functions-mod;
+
<!ENTITY % tools-mod SYSTEM "tools.mod">
%tools-mod;
@@ -61,6 +64,7 @@
<!ENTITY example SYSTEM "example.xml">
<!ENTITY factories SYSTEM "factories.xml">
<!ENTITY file-removal SYSTEM "file-removal.xml">
+ <!ENTITY functions SYSTEM "functions.xml">
<!ENTITY hierarchy SYSTEM "hierarchy.xml">
<!ENTITY java SYSTEM "java.xml">
<!ENTITY install SYSTEM "install.xml">
@@ -89,6 +93,7 @@
<!ENTITY variants SYSTEM "variants.xml">
<!ENTITY builders-gen SYSTEM "builders.gen">
+ <!ENTITY functions-gen SYSTEM "functions.gen">
<!ENTITY tools-gen SYSTEM "tools.gen">
<!ENTITY variables-gen SYSTEM "variables.gen">
@@ -177,18 +182,35 @@
&environments;
</chapter>
- <!-- These next three sections should be combined into one chapter -->
- <chapter id="chap-mergeflags">
- <title>Merging Options into the Environment: the &MergeFlags; Function</title>
- &mergeflags;
- </chapter>
- <chapter id="chap-parseflags">
- <title>Separating Compile Arguments into their Variables: the &ParseFlags; Function</title>
- &parseflags;
- </chapter>
- <chapter id="chap-parseconfig">
- <title>Finding Installed Library Information: the &ParseConfig; Function</title>
- &parseconfig;
+ <chapter id="chap-manip-options">
+ <title>Automatically Putting Command-line Options into their Construction Variables</title>
+ <!-- TODO: This intro paragraph should describe at a high-level
+ what these things do. People are likely to use the intro as a
+ (brief) overview of *what* these functions do to decide if this
+ chapter is where they should read in more detail. -->
+ <para>
+ This chapter describes the &MergeFlags;, &ParseFlags;, and &ParseConfig; methods of a &consenv;.
+ </para>
+ <section id="sect-mergeflags">
+ <title>Merging Options into the Environment: the &MergeFlags; Function</title>
+ &mergeflags;
+ </section>
+ <section id="sect-parseflags">
+ <title>Separating Compile Arguments into their Variables: the &ParseFlags; Function</title>
+ &parseflags;
+ </section>
+ <section id="sect-parseconfig">
+ <title>Finding Installed Library Information: the &ParseConfig; Function</title>
+ &parseconfig;
+ </section>
+ <!--
+ XXX parse_flags= option of Environment()
+
+ <section id="sect-env-parseflags">
+ <title>Adding Flags when Constructing Enviroment: the parse_flags Optional Argument</title>
+ &envparseflags;
+ </section>
+ -->
</chapter>
<chapter id="chap-output">
@@ -341,6 +363,11 @@
&tools;
</appendix>
+ <appendix id="app-functions">
+ <title>Functions and Environment Methods</title>
+ &functions;
+ </appendix>
+
<appendix id="app-tasks">
<title>Handling Common Tasks</title>
&tasks;
diff --git a/doc/user/main.xml b/doc/user/main.xml
index fbc28df..feb8c25 100644
--- a/doc/user/main.xml
+++ b/doc/user/main.xml
@@ -1,7 +1,7 @@
<?xml version="1.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
@@ -37,6 +37,9 @@
<!ENTITY % builders-mod SYSTEM "builders.mod">
%builders-mod;
+ <!ENTITY % functions-mod SYSTEM "functions.mod">
+ %functions-mod;
+
<!ENTITY % tools-mod SYSTEM "tools.mod">
%tools-mod;
@@ -61,6 +64,7 @@
<!ENTITY example SYSTEM "example.xml">
<!ENTITY factories SYSTEM "factories.xml">
<!ENTITY file-removal SYSTEM "file-removal.xml">
+ <!ENTITY functions SYSTEM "functions.xml">
<!ENTITY hierarchy SYSTEM "hierarchy.xml">
<!ENTITY java SYSTEM "java.xml">
<!ENTITY install SYSTEM "install.xml">
@@ -89,6 +93,7 @@
<!ENTITY variants SYSTEM "variants.xml">
<!ENTITY builders-gen SYSTEM "builders.gen">
+ <!ENTITY functions-gen SYSTEM "functions.gen">
<!ENTITY tools-gen SYSTEM "tools.gen">
<!ENTITY variables-gen SYSTEM "variables.gen">
@@ -177,18 +182,35 @@
&environments;
</chapter>
- <!-- These next three sections should be combined into one chapter -->
- <chapter id="chap-mergeflags">
- <title>Merging Options into the Environment: the &MergeFlags; Function</title>
- &mergeflags;
- </chapter>
- <chapter id="chap-parseflags">
- <title>Separating Compile Arguments into their Variables: the &ParseFlags; Function</title>
- &parseflags;
- </chapter>
- <chapter id="chap-parseconfig">
- <title>Finding Installed Library Information: the &ParseConfig; Function</title>
- &parseconfig;
+ <chapter id="chap-manip-options">
+ <title>Automatically Putting Command-line Options into their Construction Variables</title>
+ <!-- TODO: This intro paragraph should describe at a high-level
+ what these things do. People are likely to use the intro as a
+ (brief) overview of *what* these functions do to decide if this
+ chapter is where they should read in more detail. -->
+ <para>
+ This chapter describes the &MergeFlags;, &ParseFlags;, and &ParseConfig; methods of a &consenv;.
+ </para>
+ <section id="sect-mergeflags">
+ <title>Merging Options into the Environment: the &MergeFlags; Function</title>
+ &mergeflags;
+ </section>
+ <section id="sect-parseflags">
+ <title>Separating Compile Arguments into their Variables: the &ParseFlags; Function</title>
+ &parseflags;
+ </section>
+ <section id="sect-parseconfig">
+ <title>Finding Installed Library Information: the &ParseConfig; Function</title>
+ &parseconfig;
+ </section>
+ <!--
+ XXX parse_flags= option of Environment()
+
+ <section id="sect-env-parseflags">
+ <title>Adding Flags when Constructing Enviroment: the parse_flags Optional Argument</title>
+ &envparseflags;
+ </section>
+ -->
</chapter>
<chapter id="chap-output">
@@ -341,6 +363,11 @@
&tools;
</appendix>
+ <appendix id="app-functions">
+ <title>Functions and Environment Methods</title>
+ &functions;
+ </appendix>
+
<appendix id="app-tasks">
<title>Handling Common Tasks</title>
&tasks;
diff --git a/doc/user/make.in b/doc/user/make.in
index c17b047..7102557 100644
--- a/doc/user/make.in
+++ b/doc/user/make.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/make.xml b/doc/user/make.xml
index c17b047..7102557 100644
--- a/doc/user/make.xml
+++ b/doc/user/make.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/mergeflags.in b/doc/user/mergeflags.in
index 58d437c..086d042 100644
--- a/doc/user/mergeflags.in
+++ b/doc/user/mergeflags.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/mergeflags.xml b/doc/user/mergeflags.xml
index ab10e54..f0bc2b6 100644
--- a/doc/user/mergeflags.xml
+++ b/doc/user/mergeflags.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/misc.in b/doc/user/misc.in
index 87b5db4..fef1b8f 100644
--- a/doc/user/misc.in
+++ b/doc/user/misc.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -36,7 +36,7 @@
<para>
Although the &SCons; code itself will run
- on any Python version 2.4 or later,
+ on any 2.x Python version 2.4 or later,
you are perfectly free to make use of
Python syntax and modules from more modern versions
(for example, Python 2.5 or 2.6)
@@ -82,7 +82,7 @@
<para>
- And then &SCons will exit with the following error
+ And then &SCons; will exit with the following error
message when a user runs it with an unsupported
earlier version of Python:
@@ -151,7 +151,7 @@
<para>
- And then &SCons will exit with the following error
+ And then &SCons; will exit with the following error
message when a user runs it with an unsupported
earlier version of &SCons;:
@@ -274,13 +274,13 @@
</file>
<directory name="src"></directory>
<directory name="src/include"></directory>
- </file>
<file name="src/include/private.h">
exists
- <directory name="include"></directory>
</file>
+ <directory name="include"></directory>
<file name="include/dist.h">
exists
+ </file>
</scons_example>
<scons_output example="FindFile1b" os="posix">
diff --git a/doc/user/misc.xml b/doc/user/misc.xml
index f79f1cc..069f94b 100644
--- a/doc/user/misc.xml
+++ b/doc/user/misc.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -36,7 +36,7 @@
<para>
Although the &SCons; code itself will run
- on any Python version 2.4 or later,
+ on any 2.x Python version 2.4 or later,
you are perfectly free to make use of
Python syntax and modules from more modern versions
(for example, Python 2.5 or 2.6)
@@ -263,7 +263,7 @@
headers = [ 'nonesuch.h', 'config.h', 'private.h', 'dist.h']
for hdr in headers:
print '%-12s' % ('%s:' % hdr), FindFile(hdr, includes)
-</programlisting>
+ </programlisting>
<screen>
% <userinput>scons -Q</userinput>
diff --git a/doc/user/nodes.in b/doc/user/nodes.in
index c65a2ad..7799d3f 100644
--- a/doc/user/nodes.in
+++ b/doc/user/nodes.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/nodes.xml b/doc/user/nodes.xml
index 71ac7c1..fe8e167 100644
--- a/doc/user/nodes.xml
+++ b/doc/user/nodes.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -131,6 +131,7 @@
cl /Fogoodbye.obj /c goodbye.c -DGOODBYE
cl /Fohello.obj /c hello.c -DHELLO
link /nologo /OUT:hello.exe hello.obj goodbye.obj
+ embedManifestExeCheck(target, source, env)
</screen>
<para>
@@ -275,6 +276,7 @@
The program file is: hello.exe
cl /Fohello.obj /c hello.c /nologo
link /nologo /OUT:hello.exe hello.obj
+ embedManifestExeCheck(target, source, env)
</screen>
<para>
diff --git a/doc/user/output.in b/doc/user/output.in
index e456026..d2823d0 100644
--- a/doc/user/output.in
+++ b/doc/user/output.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -490,7 +490,7 @@
over how to print each evaluated node
by passing a Python function
(or other Python callable)
- to the &Progress function.
+ to the &Progress; function.
Your function will be called
for each evaluated node,
allowing you to
diff --git a/doc/user/output.xml b/doc/user/output.xml
index 297e6f8..6910b59 100644
--- a/doc/user/output.xml
+++ b/doc/user/output.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/parseconfig.in b/doc/user/parseconfig.in
index 667601f..5eb990c 100644
--- a/doc/user/parseconfig.in
+++ b/doc/user/parseconfig.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/parseconfig.xml b/doc/user/parseconfig.xml
index 534ea3d..409abfe 100644
--- a/doc/user/parseconfig.xml
+++ b/doc/user/parseconfig.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/parseflags.in b/doc/user/parseflags.in
index 2f4bea5..6e72c18 100644
--- a/doc/user/parseflags.in
+++ b/doc/user/parseflags.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/parseflags.xml b/doc/user/parseflags.xml
index fd15de7..7350831 100644
--- a/doc/user/parseflags.xml
+++ b/doc/user/parseflags.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -91,6 +91,7 @@
LIBS ['foo']
cl /Fof1.obj /c f1.c /nologo /I\opt\include
link /nologo /OUT:f1.exe /LIBPATH:\opt\lib foo.lib f1.obj
+ embedManifestExeCheck(target, source, env)
</screen>
<para>
diff --git a/doc/user/preface.in b/doc/user/preface.in
index a60beab..e82ee3b 100644
--- a/doc/user/preface.in
+++ b/doc/user/preface.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -104,7 +104,7 @@
<para>
There are a few overriding principles
- we try to live up to in designing and implementing &SCons:
+ we try to live up to in designing and implementing &SCons;:
</para>
@@ -418,7 +418,7 @@
<para>
- If you want to receive announcements about &SCons,
+ If you want to receive announcements about &SCons;,
join the low-volume &scons-announce; mailing list.
</para>
diff --git a/doc/user/preface.xml b/doc/user/preface.xml
index db2031d..e82ee3b 100644
--- a/doc/user/preface.xml
+++ b/doc/user/preface.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/python.in b/doc/user/python.in
index 18679e4..c3ea5fe 100644
--- a/doc/user/python.in
+++ b/doc/user/python.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/python.xml b/doc/user/python.xml
index 18679e4..c3ea5fe 100644
--- a/doc/user/python.xml
+++ b/doc/user/python.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/repositories.in b/doc/user/repositories.in
index 531aa8a..5ba9090 100644
--- a/doc/user/repositories.in
+++ b/doc/user/repositories.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -210,9 +210,9 @@
in the repository trees, though,
it will be unable to find the <literal>#include</literal> files.
If, for example, the &hello_c; file in
- our previous example includes the &hello.h;
+ our previous example includes the &hello_h;
in its current directory,
- and the &hello.h; only exists in the repository:
+ and the &hello_h; only exists in the repository:
</para>
diff --git a/doc/user/repositories.xml b/doc/user/repositories.xml
index 6400b23..219dbaf 100644
--- a/doc/user/repositories.xml
+++ b/doc/user/repositories.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -193,9 +193,9 @@
in the repository trees, though,
it will be unable to find the <literal>#include</literal> files.
If, for example, the &hello_c; file in
- our previous example includes the &hello;.h;
+ our previous example includes the &hello_h;
in its current directory,
- and the &hello;.h; only exists in the repository:
+ and the &hello_h; only exists in the repository:
</para>
diff --git a/doc/user/run.in b/doc/user/run.in
index 761f37c..8d47b27 100644
--- a/doc/user/run.in
+++ b/doc/user/run.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/run.xml b/doc/user/run.xml
index 761f37c..8d47b27 100644
--- a/doc/user/run.xml
+++ b/doc/user/run.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/scanners.in b/doc/user/scanners.in
index db3170a..e8bdff7 100644
--- a/doc/user/scanners.in
+++ b/doc/user/scanners.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -171,10 +171,21 @@ over the file scanning rather than being called for each input line:
def kfile_scan(node, env, path, arg):
contents = node.get_text_contents()
- return include_re.findall(contents)
+ return env.File(include_re.findall(contents))
</programlisting>
<para>
+
+ It is important to note that you
+ have to return a list of File nodes from the scanner function, simple
+ strings for the file names won't do. As in the examples we are showing here,
+ you can use the &File;
+ function of your current Environment in order to create nodes on the fly from
+ a sequence of file names with relative paths.
+
+ </para>
+
+ <para>
The scanner function must
accept the four specified arguments
@@ -283,7 +294,7 @@ over the file scanning rather than being called for each input line:
def kfile_scan(node, env, path):
contents = node.get_text_contents()
includes = include_re.findall(contents)
- return includes
+ return env.File(includes)
kscan = Scanner(function = kfile_scan,
skeys = ['.k'])
diff --git a/doc/user/scanners.xml b/doc/user/scanners.xml
index 2aba7d2..7862265 100644
--- a/doc/user/scanners.xml
+++ b/doc/user/scanners.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -171,10 +171,21 @@ over the file scanning rather than being called for each input line:
def kfile_scan(node, env, path, arg):
contents = node.get_text_contents()
- return include_re.findall(contents)
+ return env.File(include_re.findall(contents))
</programlisting>
<para>
+
+ It is important to note that you
+ have to return a list of File nodes from the scanner function, simple
+ strings for the file names won't do. As in the examples we are showing here,
+ you can use the &File;
+ function of your current Environment in order to create nodes on the fly from
+ a sequence of file names with relative paths.
+
+ </para>
+
+ <para>
The scanner function must
accept the four specified arguments
@@ -282,7 +293,7 @@ over the file scanning rather than being called for each input line:
def kfile_scan(node, env, path):
contents = node.get_text_contents()
includes = include_re.findall(contents)
- return includes
+ return env.File(includes)
kscan = Scanner(function = kfile_scan,
skeys = ['.k'])
diff --git a/doc/user/sconf.in b/doc/user/sconf.in
index 94a455e..52fe132 100644
--- a/doc/user/sconf.in
+++ b/doc/user/sconf.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 @@
figuring out what libraries or header files
are available on the local system.
This section describes how to use
- this &SCons feature.
+ this &SCons; feature.
</para>
@@ -446,7 +446,7 @@
when removing targets doesn't hurt anything,
it's usually unnecessary.
You can avoid this by using the
- &GetOption(); method to
+ &GetOption; method to
check whether the <option>-c</option> (clean)
option has been invoked on the command line:
diff --git a/doc/user/sconf.xml b/doc/user/sconf.xml
index 35f4367..460c3d1 100644
--- a/doc/user/sconf.xml
+++ b/doc/user/sconf.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -446,7 +446,7 @@
when removing targets doesn't hurt anything,
it's usually unnecessary.
You can avoid this by using the
- &GetOption;(); method to
+ &GetOption; method to
check whether the <option>-c</option> (clean)
option has been invoked on the command line:
diff --git a/doc/user/separate.in b/doc/user/separate.in
index 8c08cbe..932c285 100644
--- a/doc/user/separate.in
+++ b/doc/user/separate.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/separate.xml b/doc/user/separate.xml
index 2c6f97b..7df53e9 100644
--- a/doc/user/separate.xml
+++ b/doc/user/separate.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/sideeffect.in b/doc/user/sideeffect.in
index 3356d6c..852f99a 100644
--- a/doc/user/sideeffect.in
+++ b/doc/user/sideeffect.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/sideeffect.xml b/doc/user/sideeffect.xml
index f6055f3..35e026f 100644
--- a/doc/user/sideeffect.xml
+++ b/doc/user/sideeffect.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/simple.in b/doc/user/simple.in
index b4802f8..0d15f12 100644
--- a/doc/user/simple.in
+++ b/doc/user/simple.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -297,7 +297,7 @@
</section>
- <section>
+ <section id="sect-sconstruct-file">
<title>The &SConstruct; File</title>
<para>
@@ -353,14 +353,14 @@
</section>
- <section>
+ <section id="sect-order-independent">
<title>&SCons; Functions Are Order-Independent</title>
<para>
One important way in which the &SConstruct;
file is not exactly like a normal Python script,
- and is more like a &Makefile,
+ and is more like a &Makefile;,
is that the order in which
the &SCons; functions are called in
the &SConstruct; file
@@ -453,7 +453,7 @@
<para>
Notice also that &SCons; built the &goodbye; program first,
- even though the "reading &SConscript" output
+ even though the "reading &SConscript;" output
shows that we called <literal>Program('hello.c')</literal>
first in the &SConstruct; file.
diff --git a/doc/user/simple.xml b/doc/user/simple.xml
index 54f6b56..49b8805 100644
--- a/doc/user/simple.xml
+++ b/doc/user/simple.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -110,6 +110,7 @@
scons: Building targets ...
cl /Fohello.obj /c hello.c /nologo
link /nologo /OUT:hello.exe hello.obj
+ embedManifestExeCheck(target, source, env)
scons: done building targets.
</screen>
@@ -300,6 +301,7 @@
scons: Building targets ...
cl /Fohello.obj /c hello.c /nologo
link /nologo /OUT:hello.exe hello.obj
+ embedManifestExeCheck(target, source, env)
scons: done building targets.
C:\><userinput>scons -c</userinput>
scons: Reading SConscript files ...
@@ -320,7 +322,7 @@
</section>
- <section>
+ <section id="sect-sconstruct-file">
<title>The &SConstruct; File</title>
<para>
@@ -376,7 +378,7 @@
</section>
- <section>
+ <section id="sect-order-independent">
<title>&SCons; Functions Are Order-Independent</title>
<para>
@@ -507,6 +509,7 @@
scons: Building targets ...
cl /Fohello.obj /c hello.c /nologo
link /nologo /OUT:hello.exe hello.obj
+ embedManifestExeCheck(target, source, env)
scons: done building targets.
</screen>
@@ -536,6 +539,7 @@
C:\><userinput>scons -Q</userinput>
cl /Fohello.obj /c hello.c /nologo
link /nologo /OUT:hello.exe hello.obj
+ embedManifestExeCheck(target, source, env)
</screen>
<para>
diff --git a/doc/user/sourcecode.in b/doc/user/sourcecode.in
index 5a9637e..e4fc5be 100644
--- a/doc/user/sourcecode.in
+++ b/doc/user/sourcecode.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/sourcecode.xml b/doc/user/sourcecode.xml
index 73c2490..6642d0f 100644
--- a/doc/user/sourcecode.xml
+++ b/doc/user/sourcecode.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/tasks.in b/doc/user/tasks.in
index 8842dcd..aa6a12e 100644
--- a/doc/user/tasks.in
+++ b/doc/user/tasks.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -99,14 +99,14 @@ env.Append(CPPPATH = "#")
## Header example
env.Append(BUILDERS =
- {'Copy1' : Builder(action = 'cat < $SOURCE > $TARGET',
+ {'Copy1' : Builder(action = 'cat &lt; $SOURCE > $TARGET',
suffix='.h', src_suffix='.bar')})
env.Copy1('test.bar') # produces test.h from test.bar.
env.Program('app','main.cpp') # indirectly depends on test.bar
## Source file example
env.Append(BUILDERS =
- {'Copy2' : Builder(action = 'cat < $SOURCE > $TARGET',
+ {'Copy2' : Builder(action = 'cat &lt; $SOURCE > $TARGET',
suffix='.cpp', src_suffix='.bar2')})
foo = env.Copy2('foo.bar2') # produces foo.cpp from foo.bar2.
env.Program('app2',['main2.cpp'] + foo) # compiles main2.cpp and foo.cpp into app2.
diff --git a/doc/user/tasks.xml b/doc/user/tasks.xml
index 2b2eb0b..ada4de5 100644
--- a/doc/user/tasks.xml
+++ b/doc/user/tasks.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/tools.in b/doc/user/tools.in
index 16228e7..9dd71df 100644
--- a/doc/user/tools.in
+++ b/doc/user/tools.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/tools.xml b/doc/user/tools.xml
index 16228e7..9dd71df 100644
--- a/doc/user/tools.xml
+++ b/doc/user/tools.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/troubleshoot.in b/doc/user/troubleshoot.in
index 97df351..615d677 100644
--- a/doc/user/troubleshoot.in
+++ b/doc/user/troubleshoot.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 @@
&SCons; is no different.
This appendix contains a number of
different ways in which you can
- get some additional insight into &SCons' behavior.
+ get some additional insight into &SCons;' behavior.
</para>
@@ -410,12 +410,12 @@
<para>
- The <literaL>--tree</literal> option only prints
+ The <literal>--tree</literal> option only prints
the dependency graph for the specified targets
(or the default target(s) if none are specified on the command line).
So if you specify a target like <filename>f2.o</filename>
on the command line,
- the <literaL>--tree</literal> option will only
+ the <literal>--tree</literal> option will only
print the dependency graph for that file:
</para>
@@ -722,7 +722,7 @@
<para>
- For example, the following &SConstruct file:
+ For example, the following &SConstruct; file:
</para>
@@ -842,8 +842,47 @@
</section>
+ <section>
+
+ <title>Watch &SCons; prepare targets for building: the &debug-prepare; Option</title>
+
+ <para>
+
+ Sometimes SCons doesn't build the target you want
+ and it's difficult to figure out why. You can use
+ the <literal>--debug=prepare</literal> option
+ to see all the targets &SCons; is considering, whether
+ they are already up-to-date or not. The message is
+ printed before &SCons; decides whether to build the target.
+ </para>
+
+ </section>
+
+ <section>
+
+ <title>Why is a file disappearing? the --debug=duplicate Option</title>
+
+ <para>
+
+ When using the &Duplicate; option to create variant dirs,
+ sometimes you may find files not getting copied to where you
+ expect (or not at all), or files mysteriously disappearing. These
+ are usually because of a misconfiguration of some kind in the
+ SConstruct/SConscript, but they can be tricky to debug. The
+ --debug=duplicate option shows each time a variant file is
+ unlinked and relinked from its source (or copied, depending on
+ settings), and also shows a message for removing "stale"
+ variant-dir files that no longer have a corresponding source file.
+ It also prints a line for each target that's removed just before
+ building, since that can also be mistaken for the same thing.
+
+ </para>
+
+ </section>
+
<!--
+
<section>
<title>Where Are My Build Bottlenecks? the &profile; Option</title>
diff --git a/doc/user/troubleshoot.xml b/doc/user/troubleshoot.xml
index 468af92..1f32a35 100644
--- a/doc/user/troubleshoot.xml
+++ b/doc/user/troubleshoot.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -282,7 +282,8 @@
'.mm',
'.S',
'.spp',
- '.SPP'],
+ '.SPP',
+ '.sx'],
'DSUFFIXES': ['.d'],
'Dir': &lt;SCons.Defaults.Variable_Method_Caller object at 0x700000&gt;,
'Dirs': &lt;SCons.Defaults.Variable_Method_Caller object at 0x700000&gt;,
@@ -345,7 +346,7 @@
'CC': 'cl',
'CCCOM': &lt;SCons.Action.FunctionAction object at 0x700000&gt;,
'CCFLAGS': ['/nologo'],
- 'CCPCHFLAGS': ['${(PCH and "/Yu%s /Fp%s"%(PCHSTOP or "",File(PCH))) or ""}'],
+ 'CCPCHFLAGS': ['${(PCH and "/Yu%s \\"/Fp%s\\""%(PCHSTOP or "",File(PCH))) or ""}'],
'CCPDBFLAGS': ['${(PDB and "/Z7") or ""}'],
'CFILESUFFIX': '.c',
'CFLAGS': [],
@@ -371,9 +372,10 @@
'.mm',
'.S',
'.spp',
- '.SPP'],
+ '.SPP',
+ '.sx'],
'CXX': '$CC',
- 'CXXCOM': '$CXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CXXFLAGS $CCFLAGS $_CCCOMCOM',
+ 'CXXCOM': '${TEMPFILE("$CXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CXXFLAGS $CCFLAGS $_CCCOMCOM")}',
'CXXFILESUFFIX': '.cc',
'CXXFLAGS': ['$(', '/TP', '$)'],
'DSUFFIXES': ['.d'],
@@ -415,7 +417,7 @@
'SHCCFLAGS': ['$CCFLAGS'],
'SHCFLAGS': ['$CFLAGS'],
'SHCXX': '$CXX',
- 'SHCXXCOM': '$SHCXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM',
+ 'SHCXXCOM': '${TEMPFILE("$SHCXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM")}',
'SHCXXFLAGS': ['$CXXFLAGS'],
'SHELL': None,
'SHLIBPREFIX': '',
@@ -1120,9 +1122,9 @@
scons: internal stack trace:
File "bootstrap/src/engine/SCons/Job.py", line 199, in start
task.prepare()
- File "bootstrap/src/engine/SCons/Script/Main.py", line 167, in prepare
+ File "bootstrap/src/engine/SCons/Script/Main.py", line 168, in prepare
return SCons.Taskmaster.OutOfDateTask.prepare(self)
- File "bootstrap/src/engine/SCons/Taskmaster.py", line 187, in prepare
+ File "bootstrap/src/engine/SCons/Taskmaster.py", line 189, in prepare
executor.prepare()
File "bootstrap/src/engine/SCons/Executor.py", line 392, in prepare
raise SCons.Errors.StopError(msg % (s, self.batches[0].targets[0]))
@@ -1260,8 +1262,47 @@
</section>
+ <section>
+
+ <title>Watch &SCons; prepare targets for building: the &debug-prepare; Option</title>
+
+ <para>
+
+ Sometimes SCons doesn't build the target you want
+ and it's difficult to figure out why. You can use
+ the <literal>--debug=prepare</literal> option
+ to see all the targets &SCons; is considering, whether
+ they are already up-to-date or not. The message is
+ printed before &SCons; decides whether to build the target.
+ </para>
+
+ </section>
+
+ <section>
+
+ <title>Why is a file disappearing? the --debug=duplicate Option</title>
+
+ <para>
+
+ When using the &Duplicate; option to create variant dirs,
+ sometimes you may find files not getting copied to where you
+ expect (or not at all), or files mysteriously disappearing. These
+ are usually because of a misconfiguration of some kind in the
+ SConstruct/SConscript, but they can be tricky to debug. The
+ --debug=duplicate option shows each time a variant file is
+ unlinked and relinked from its source (or copied, depending on
+ settings), and also shows a message for removing "stale"
+ variant-dir files that no longer have a corresponding source file.
+ It also prints a line for each target that's removed just before
+ building, since that can also be mistaken for the same thing.
+
+ </para>
+
+ </section>
+
<!--
+
<section>
<title>Where Are My Build Bottlenecks? the &profile; Option</title>
diff --git a/doc/user/variables.in b/doc/user/variables.in
index bf8be1b..9b8afc1 100644
--- a/doc/user/variables.in
+++ b/doc/user/variables.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/variables.xml b/doc/user/variables.xml
index bf8be1b..9b8afc1 100644
--- a/doc/user/variables.xml
+++ b/doc/user/variables.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/variants.in b/doc/user/variants.in
index d94e3f3..5050306 100644
--- a/doc/user/variants.in
+++ b/doc/user/variants.in
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/doc/user/variants.xml b/doc/user/variants.xml
index bca84c8..e096eed 100644
--- a/doc/user/variants.xml
+++ b/doc/user/variants.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -114,6 +114,7 @@ is pretty smart about rebuilding things when you change options.
lib /nologo /OUT:build\windows\world\world.lib build\windows\world\world.obj
Install file: "build/windows/world/world.lib" as "export/windows/lib/world.lib"
link /nologo /OUT:build\windows\hello\hello.exe /LIBPATH:export\windows\lib world.lib build\windows\hello\hello.obj
+ embedManifestExeCheck(target, source, env)
Install file: "build/windows/hello/hello.exe" as "export/windows/bin/hello.exe"
</screen>
diff --git a/src/Announce.txt b/src/Announce.txt
index 5a13a66..a131ef3 100644
--- a/src/Announce.txt
+++ b/src/Announce.txt
@@ -19,7 +19,7 @@ effectively, please go to http://scons.org/lists.php#users to sign up for
the scons-users mailing list.
-RELEASE 2.0.1 - Mon, 15 Aug 2010 15:46:32 -0700
+RELEASE 2.1.0 - Mon, 09 Sep 2011 20:54:57 -0700
Please consult the RELEASE.txt file for a summary changes since the last
release and consult the CHANGES.txt file for complete a list of changes
@@ -35,14 +35,11 @@ RELEASE 2.0.1 - Mon, 15 Aug 2010 15:46:32 -0700
[1] See http://scons.tigris.org/issues/show_bug.cgi?id=2647 for details.
- Please note the following important changes scheduled for the next
- release:
-
- -- FEATURE THAT WILL CHANGE
-
Please note the following important changes since release 2.0.0:
- -- NEW FEATURE
+ -- Support for Latex bibunits package has been added along with
+ support for tex files generated by other builders.
+
Please note the following important changes since release 1.3.0:
@@ -86,7 +83,7 @@ RELEASE 2.0.1 - Mon, 15 Aug 2010 15:46:32 -0700
1.3. By default, it should now use the latest installed
Visual Studio version on your machine, and compile for 32 or
64 bits according to whether your OS is 32 or 64 bits (32/64
- bit python makes no difference).
+ bit Python makes no difference).
Two new variables control Visual Studio: MSVC_VERSION and
TARGET_ARCH. These variables ONLY take effect when passed to
@@ -218,7 +215,7 @@ RELEASE 2.0.1 - Mon, 15 Aug 2010 15:46:32 -0700
The GNU toolchain support in previous versions of SCons would
add the -fPIC flag to the $SHCXXFLAGS construction variable.
- The -fPIC flag has been now been removed from the default
+ The -fPIC flag has now been removed from the default
$SHCXXFLAGS setting. Instead, the $SHCXXCOM construction variable
(the default SCons command line for compiling shared objects
from C++ source files) has been changed to add the $SHCCFLAGS
@@ -1060,5 +1057,5 @@ With plenty of help from the SCons Development team:
Greg Spencer
Christoph Wiedemann
-Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
-src/Announce.txt 5134 2010/08/16 23:02:40 bdeegan
+Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
+src/Announce.txt 5357 2011/09/09 21:31:03 bdeegan
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 3a17fb5..04a59b2 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -5,6 +5,204 @@
Change Log
+RELEASE 2.1.0 - Mon, 09 Sep 2011 20:54:57 -0700
+
+ From Anton Lazarev:
+ - Fix Windows resource compiler scanner to accept DOS line endings.
+
+ From Matthias:
+ - Update MSVS documents to remove note indicating that only one
+ project is currently supported per solution file.
+
+ From Grzegorz Bizoń:
+ - Fix long compile lines in batch mode by using TEMPFILE
+ - Fix MSVC_BATCH=False (was treating it as true)
+
+ From Justin Gullingsrud:
+ - support -std=c++0x and related CXXFLAGS in pkgconfig (ParseFlags)
+
+ From Vincent Beffara:
+ - Support -dylib_file in pkgconfig (ParseFlags)
+
+ From Gary Oberbrunner and Sohail Somani:
+ - new construction variable WINDOWS_EMBED_MANIFEST to automatically
+ embed manifests in Windows EXEs and DLLs.
+
+ From Gary Oberbrunner:
+ - Fix Visual Studio project generation when CPPPATH contains Dir nodes
+ - Ensure Visual Studio project is regenerated when CPPPATH or CPPDEFINES change
+ - Fix unicode error when using non-ASCII filenames with Copy or Install
+ - Put RPATH in LINKCOM rather than LINKFLAGS so resetting
+ LINKFLAGS doesn't kill RPATH
+ - Fix precompiled headers on Windows when variant dir name has spaces.
+ - Adding None to an Action no longer fails (just returns original action)
+ - New --debug=prepare option to show each target as it's being
+ prepared, whether or not anything needs to be done for it.
+ - New debug option --debug=duplicate to print a line for each
+ unlink/relink (or copy) of a variant file from its source file.
+ - Improve error message for EnumVariables to show legal values.
+ - Fix Intel compiler to sort versions >9 correctly (esp. on Linux)
+ - Fix Install() when the source and target are directories and the
+ target directory exists.
+
+ From David Garcia Garzon:
+ - Fix Delete to be able to delete broken symlinks and dir
+ symlinks.
+
+ From Robert Lehr:
+ - Handle .output file generated by bison/yacc properly. Cleaning it
+ when necessary.
+
+ From Antoine Dechaume:
+ - Handle SWIG file where there is whitespace after the module name
+ properly. Previously the generated files would include
+ the whitespace.
+
+ From Dmitry R.:
+ - Handle Environment in case __semi_deepcopy is None
+
+ From Benoit Belley:
+
+ - Much improved support for Windows UNC paths (\\SERVERNAME).
+
+ From Jean-Baptiste Lab:
+
+ - Fix problems with appending CPPDEFINES that contain
+ dictionaries, and related issues with Parse/MergeFlags and
+ CPPDEFINES.
+
+ From Allen Weeks:
+
+ - Fix for an issue with implicit-cache with multiple targets
+ when dependencies are removed on disk.
+
+ From Evgeny Podjachev and Alexey Petruchick:
+
+ - Support generation of Microsoft Visual Studio 2008 (9.0)
+ and 2010 (10.0) project and solution files.
+
+ From Ken Deeter:
+
+ - Fix a problem when FS Entries which are actually Dirs have builders.
+
+ From Luca Falavigna:
+
+ - Support Fortran 03
+
+ From Gary Oberbrunner:
+
+ - Print the path to the SCons package in scons --version
+
+ From Jean-Fran�ois Colson:
+
+ - Improve Microsoft Visual Studio Solution generation, and fix
+ various errors in the generated solutions especially when using
+ MSVS_SCC_PROVIDER, and when generating multiple projects. The
+ construction variable MSVS_SCC_PROJECT_BASE_PATH, which never
+ worked properly, is removed. Users can use the new variable
+ MSVS_SCC_CONNECTION_ROOT instead if desired.
+
+ From Anatoly Techtonik:
+
+ - Use subprocess in bootstrap.py instead of os.execve to avoid
+ losing output control on Windows (http://bugs.python.org/issue9148)
+
+ - Revert patch for adding SCons to App Paths, because standard cmd
+ shell doesn't search there. This is confusing, because `scons` can
+ be executed from explorer, but fail to start from console.
+
+ - Fix broken installation with easy_install on Windows (issue #2051)
+ SCons traditionally installed in a way that allowed to run multiple
+ versions side by side. This custom logic was incompatible with
+ easy_install way of doing things.
+
+ - Use epydoc module for generating API docs in HTML if command line
+ utility is not found in PATH. Actual for Windows.
+
+ From Alexander Goomenyuk:
+
+ - Add .sx to assembly source scanner list so .sx files
+ get their header file dependencies detected.
+
+ From Arve Knudsen:
+
+ - Set module metadata when loading site_scons/site_init.py
+ so it is treated as a proper module; __doc__, __file__ and
+ __name__ now refer to the site_init.py file.
+
+ From Russel Winder:
+
+ - Users Guide updates explaining that Tools can be packages as
+ well as python modules.
+
+ From Gary Oberbrunner:
+
+ - New systemwide and per-user site_scons dirs.
+
+ From Dirk Baechle:
+
+ - XML fixes in User's Guide.
+ - Fixed the detection of 'jar' and 'rmic' during
+ the initialization of the respective Tools (#2730).
+ - Improved docs for custom Decider functions and
+ custom Scanner objects (#2711, #2713).
+ - Corrected SWIG module names for generated *.i files (#2707).
+
+ From Joe Zuntz:
+
+ - Fixed a case-sensitivity problem with Fortran modules.
+
+ From Bauke Conijn:
+
+ - Added Users Guide example for auto-generated source code
+
+ From Steven Knight:
+
+ - Fix explicit dependencies (Depends()) on Nodes that don't have
+ attached Builders.
+
+ - Fix use of the global Alias() function with command actions.
+
+ From Matt Hughes:
+
+ - Fix the ability to append to default $*FLAGS values (which are
+ implemented as CLVar instances) in a copied construction environment
+ without affecting the original construction environment's value.
+
+ From Rob Managan:
+
+ - Updated the TeX command strings to include a /D on Windows in
+ case the new directory is on a different drive letter.
+
+ - Fixed the LaTeX scanner so dependencies are found in commands that
+ are broken across lines with a comment or have embedded spaces.
+
+ - The TeX builders should now work with tex files that are generated
+ by another program. Thanks to Hans-Martin von Gaudecker for
+ isolating the cause of this bug.
+
+ - Added support for INDEXSTYLE environment variable so makeindex can
+ find style files.
+
+ - Added support for the bibunits package so we call bibtex on all
+ the bu*.aux files.
+
+ - Add support of finding path information on OSX for TeX applications
+ MacPorts and Fink paths need to be added by the user
+
+ From Russel Winder:
+
+ - Add support for DMD version 2 (the phobos2 library).
+
+ From William Deegan:
+
+ - Add initial support for VS/VC 2010 (express and non-express versions)
+ - Remove warning for not finding MS VC/VS install.
+ "scons: warning: No version of Visual Studio compiler found
+ - C/C++ compilers most likely not set correctly"
+ - Add support for Linux 3.0
+
+
RELEASE 2.0.1 - Mon, 15 Aug 2010 15:46:32 -0700
From Dirk Baechle:
@@ -24,6 +222,29 @@ RELEASE 2.0.1 - Mon, 15 Aug 2010 15:46:32 -0700
- Fix explicit dependencies (Depends()) on Nodes that don't have
attached Builders.
+ From Matt Hughes:
+
+ - Fix the ability to append to default $*FLAGS values (which are
+ implemented as CLVar instances) in a copied construction environment
+ without affecting the original construction environment's value.
+
+ From Rob Managan:
+
+ - Updated the TeX command strings to include a /D on Windows in
+ case the new directory is on a different drive letter.
+
+ - Fixed the LaTeX scanner so dependencies are found in commands that
+ are broken across lines with a comment or have embedded spaces.
+
+
+RELEASE 2.0.0.final.0 - Mon, 14 Jun 2010 22:01:37 -0700
+
+ From Dirk Baechle:
+
+ - Fix XML in documentation.
+
+ From Steven Knight:
+
- Provide forward compatibility for the 'profile' module.
- Provide forward compatibility for the 'pickle' module.
@@ -55,20 +276,6 @@ RELEASE 2.0.1 - Mon, 15 Aug 2010 15:46:32 -0700
- Handle detecting Visual C++ on Python verions with upper-case
platform architectures like 'AMD64'.
- From Matt Hughes:
-
- - Fix the ability to append to default $*FLAGS values (which are
- implemented as CLVar instances) in a copied construction environment
- without affecting the original construction environment's value.
-
- From Rob Managan:
-
- - Updated the TeX command strings to include a /D on Windows in
- case the new directory is on a different drive letter.
-
- - Fixed the LaTeX scanner so dependencies are found in commands that
- are broken across lines with a comment or have embedded spaces.
-
From W. Trevor King:
- Revisions to README.
@@ -272,7 +479,7 @@ RELEASE 1.2.0.d20100117 - Sun, 17 Jan 2010 14:26:59 -0800
- Remove LATEXSUFFIXES from environments that don't initialize Tex.
- - Add support for the glosaaries package for glossaries and acronyms
+ - Add support for the glossaries package for glossaries and acronyms
- Fix problem that pdftex, latex, and pdflatex tools by themselves did
not create the actions for bibtex, makeindex,... by creating them
@@ -472,7 +679,7 @@ RELEASE 1.1.0.d20081207 - Sun, 07 Dec 2008 19:17:23 -0800
- Issue 2401: Fix usage of comparisons with None.
- From Ludwig Hähne:
+ From Ludwig H�hne:
- Handle Java inner classes declared within a method.
@@ -601,7 +808,7 @@ RELEASE 1.1.0 - Thu, 09 Oct 2008 08:33:47 -0700
- Fix VariantDir duplication of #included files in subdirectories.
- From Ludwig Hähne:
+ From Ludwig H�hne:
- Reduce memory usage when a directory is used as a dependency of
another Node (such as an Alias) by returning a concatenation
@@ -716,7 +923,7 @@ RELEASE 1.0.0 - XXX
- Clear the Node state when turning a generic Entry into a Dir.
- From Ludwig Hähne:
+ From Ludwig H�hne:
- Fix sporadic output-order failures in test/GetBuildFailures/parallel.py.
@@ -950,7 +1157,7 @@ RELEASE 0.98.1 - Fri, 18 Apr 2008 19:11:58 -0700
- Fix the --debug=stree option so it prints its tree once, not twice.
- From Johan BoulÃ:
+ From Johan Boul�:
- Fix the ability to use LoadableModule() under MinGW.
@@ -1063,7 +1270,7 @@ RELEASE 0.98 - Sun, 30 Mar 2008 23:33:05 -0700
calls by using a File's .suffix attribute directly instead of
stringifying it.
- From Jérôme Berger:
+ From Jérôme Berger:
- Have the D language scanner search for .di files as well as .d files.
@@ -1677,7 +1884,7 @@ RELEASE 0.96.96 - Thu, 12 Apr 2007 12:36:25 -0500
RELEASE 0.96.95 - Mon, 12 Feb 2007 20:25:16 -0600
- From Anatoly:
+ From Anatoly Techtonik:
- Add the scons.org URL and a package description to the setup.py
arguments.
@@ -2164,7 +2371,7 @@ RELEASE 0.96.92 - Mon, 10 Apr 2006 21:08:22 -0400
- Fix C/C++ compiler selection on AIX to not always use the external $CC
environment variable.
- From August Hörandl:
+ From August Hörandl:
- Add a scanner for \include and \import files, with support for
searching a directory list in $TEXINPUTS (imported from the external
@@ -5330,5 +5537,5 @@ A brief overview of important functionality available in release 0.01:
- Windows installer available.
-Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
-src/CHANGES.txt 5134 2010/08/16 23:02:40 bdeegan
+Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
+src/CHANGES.txt 5357 2011/09/09 21:31:03 bdeegan
diff --git a/src/LICENSE.txt b/src/LICENSE.txt
index 77421fa..c0de36f 100644
--- a/src/LICENSE.txt
+++ b/src/LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/src/README.txt b/src/README.txt
index e08297f..1d63921 100644
--- a/src/README.txt
+++ b/src/README.txt
@@ -2,7 +2,7 @@
SCons - a software construction tool
- Version 2.0.1
+ Version 2.1.0
This is SCons, a tool for building software (and other files). SCons is
@@ -56,7 +56,7 @@ provided Python-standard setup script as follows:
By default, the above command will do the following:
- -- Install the version-numbered "scons-2.0.1" and "sconsign-2.0.1"
+ -- Install the version-numbered "scons-2.1.0" and "sconsign-2.1.0"
scripts in the default system script directory (/usr/bin or
C:\Python*\Scripts, for example). This can be disabled by
specifying the "--no-version-script" option on the command
@@ -70,17 +70,17 @@ By default, the above command will do the following:
making it the default on your system.
On UNIX or Linux systems, you can have the "scons" and "sconsign"
- scripts be hard links or symbolic links to the "scons-2.0.1" and
- "sconsign-2.0.1" scripts by specifying the "--hardlink-scons"
+ scripts be hard links or symbolic links to the "scons-2.1.0" and
+ "sconsign-2.1.0" scripts by specifying the "--hardlink-scons"
or "--symlink-scons" options on the command line.
- -- Install "scons-2.0.1.bat" and "scons.bat" wrapper scripts in the
+ -- Install "scons-2.1.0.bat" and "scons.bat" wrapper scripts in the
Python prefix directory on Windows (C:\Python*, for example).
This can be disabled by specifying the "--no-install-bat" option
on the command line.
On UNIX or Linux systems, the "--install-bat" option may be
- specified to have "scons-2.0.1.bat" and "scons.bat" files
+ specified to have "scons-2.1.0.bat" and "scons.bat" files
installed in the default system script directory, which is useful
if you want to install SCons in a shared file system directory
that can be used to execute SCons from both UNIX/Linux and
@@ -88,7 +88,7 @@ By default, the above command will do the following:
-- Install the SCons build engine (a Python module) in an
appropriate version-numbered SCons library directory
- (/usr/lib/scons-2.0.1 or C:\Python*\scons-2.0.1, for example).
+ (/usr/lib/scons-2.1.0 or C:\Python*\scons-2.1.0, for example).
See below for more options related to installing the build
engine library.
@@ -239,5 +239,5 @@ With plenty of help from the SCons Development team:
Greg Spencer
Christoph Wiedemann
-Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
-src/README.txt 5134 2010/08/16 23:02:40 bdeegan
+Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
+src/README.txt 5357 2011/09/09 21:31:03 bdeegan
diff --git a/src/RELEASE.txt b/src/RELEASE.txt
index 78a9f71..d98e096 100644
--- a/src/RELEASE.txt
+++ b/src/RELEASE.txt
@@ -1,98 +1,100 @@
- A new SCons release, 2.0.1, is now available
+ A new SCons checkpoint release, 2.1.0.final.0, is now available
on the SCons download page:
http://www.scons.org/download.php
- The primary purpose of this release is to remove support for Python
- versions prior to 2.4 and streamline the SCons code base using more
- modern python idioms.
-
- Here is a summary of the changes since 1.3:
+ Here is a summary of the changes since 2.0:
NEW FUNCTIONALITY
- - There should be no new functionality or bug fixes in this checkpoint.
-
- DEPRECATED FUNCTIONALITY
-
- - All features or usages deprecated in 1.3 should have been removed.
- Uses of formerly-deprecated features should get an error.
-
- - The BuildDir() method and the build_dir option now get warnings.
+ - SCons can now automatically embed manifests in Windows executables
+ and DLLs, by setting WINDOWS_EMBED_MANIFEST in the environment.
- - The SourceCode() function and its associated factory functions have
- started their deprecation cycle and can have a warning enabled.
+ - SCons now searches for site_scons dirs in several system-wide
+ and per-user locations, in addition to the SConstruct top dir.
+ This should enable much easier use of third-party (non-core)
+ Tools.
CHANGED/ENHANCED EXISTING FUNCTIONALITY
- - Any Command() or env.Command() calls that use the following Action
- factory functions will have their targets rebuilt when upgrading
- from any pre-2.0 release:
+ - scons --version now prints the path to the SCons package in use
- Chmod()
- Copy()
- Delete()
- Mkdir()
- Move()
- Touch()
+ - List modifications to existing features, where the previous behavior
+ wouldn't actually be considered a bug
- (The rebuild occurs because the underlying Python class that
- implements these functions has been changed to a new-style Python
- class, and that changes the Python byte code and therefore the
- build signature of the functions.)
+ - Add initial support for VS/VC 2010
FIXES
- - MSVC/MSVS/SDK support has been improved. A number of issues with
- determining the correct version and architecture have been resolved.
-
- - Fix propagation from environment of VS*COMNTOOLS to resolve issues
- initializing MSVC/MSVS/SDK issues.
-
- - Fixed a case-sensitivity problem with Fortran modules.
-
- - Fix the ability to append to default $*FLAGS values (which are
- implemented as CLVar instances) in a copied construction environment
- without affecting the original construction environment's value.
-
- - Updated the TeX command strings to include a /D on Windows in
- case the new directory is on a different drive letter.
-
- - Fixed the LaTeX scanner so dependencies are found in commands that
- are broken across lines with a comment or have embedded spaces.
+ - Windows resource compiler (RC) scanner now handles DOS line endings
+ - Visual Studio project generation now works when CPPPATH contains Dir nodes
+ - Visual Studio projects are regenerated when CPPPATH or CPPDEFINES change
+ NOTE: this will cause all MSVS projects to be regenerated with this version.
+ - Passing MSVC_BATCH=False works now (treated same as 0)
+ - Long compile lines no longer break MSVC_BATCH mode
+ - RPATH is now in LINKCOM rather than LINKFLAGS, so resetting
+ LINKFLAGS doesn't kill RPATH
+ - Precompiled headers on Windows no longer break when used with
+ variant dirs containing spaces.
+ - Delete can now delete symlinks to directories and broken symlinks
+ - CPPDEFINES containing dictionaries now work better.
+ - A problem with using implicit-cache and removing dependencies on
+ disk is corrected.
+ - A problem with FS Entries which are dirs and have builders
+ is corrected.
+ - A problem with Install() of a dir when the dest dir exists
+ is corrected.
+ - Windows subprocess output should now be more reliable.
+ - The users guide and man page have various fixes.
+ - Appending to default $*FLAGS in a copied environment
+ now works properly.
+ - LaTeX scanner is improved for broken lines or embedded spaces.
+ - Windows UNC paths (\\SERVER\SHARE\dir) now work much better.
IMPROVEMENTS
- - Support for Python versions prior to 2.4 has been removed. As of
- this writing, we believe that SCons will still work with Python 2.3,
- but this is not guaranteed.
- - Code paths that included special cases for older Python versions have
- been streamlined.
- - The code base has been converted to use more modern idioms. Although
- we don't have any direct measurements (yet), we believe that SCons
- startup time should be decreased and the overall code should run faster.
-
- PACKAGING
-
- - No changes.
+ - ParseFlags now supports -std=c++0x and related CXXFLAGS
+ - ParseFlags now supports -dylib_file from pkgconfig
+ - New debugging options to print unlink/relinking of variant files
+ (--debug=duplicate) and preparation of targets (--debug=prepare).
+ - SCons can now generate MSVS 9.0 and 10.0 Projects and Solutions.
+ - MSVS Solution generation is improved.
+ - Fortran 03 is supported (preliminary)
+ - .sx files are now treated as assembly sources.
+ - site_scons/site_init.py is now treated as a proper module
+ with __doc__, __file__ and __name__.
+ - TeX command strings now work on Windows when the new dir is
+ on a different drive letter.
+ - DMD version 2 is supported (using the phobos2 library)
+ - New --debug=prepare option shows each target as it's prepared
+ for building; can help when you don't know why a target isn't
+ being built.
DOCUMENTATION
- - The entries for SourceCode() and its associated factory functions now
- state that the functions are deprecated.
-
- - Document the AllowSubstExceptions() function in the User's Guide.
-
-
- DEVELOPMENT
-
- - Code no longer has to be compatible with Python versions back to 1.5.2.
- Although code is tested with Python 2.3 and is still believed to work,
- the official new floor is Python 2.4.
-
- Thanks to Greg Noel, Steven Knight, Dirk Baechle, William Deegan,
- W. Trevor King, Joe Zuntz, Bauke Conijn, Matt Hughes, Rob Managan,
- and Jim Randall for their contributions to this release.
+ - Added new getting started section
+
+ Thanks to
+ Dirk Baechle,
+ Vincent Beffara,
+ Grzegorz Bizoń,
+ Jean-François Colson,
+ Bauke Conijn,
+ Bill Deegan,
+ Ken Deeter,
+ Luca Falavigna,
+ Alexander Goomenyuk,
+ Justin Gullingsrud,
+ Steven Knight,
+ Arve Knudsen,
+ Jean-Baptiste Lab,
+ Rob Managan,
+ Gary Oberbrunner,
+ Evgeny Podjachev,
+ Sohail Somani,
+ Anatoly Techtonik,
+ Allen Weeks,
+ Russel Winder,
+ Joe Zuntz
+ for their contributions to this release.
-Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
-src/RELEASE.txt 5023 2010/06/14 22:05:46 scons
diff --git a/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/script/setup.py b/src/engine/SCons/Tool/f03.py
index 68c1c37..896c03b 100644
--- a/src/script/setup.py
+++ b/src/engine/SCons/Tool/f03.py
@@ -1,5 +1,15 @@
+"""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 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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,32 +31,30 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/script/setup.py 5134 2010/08/16 23:02:40 bdeegan"
+__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']
-import os
-import os.path
-import sys
+def generate(env):
+ add_all_to_env(env)
+ add_f03_to_env(env)
-(head, tail) = os.path.split(sys.argv[0])
+ fcomp = env.Detect(compilers) or 'f03'
+ env['F03'] = fcomp
+ env['SHF03'] = fcomp
-if head:
- os.chdir(head)
- sys.argv[0] = tail
+ env['FORTRAN'] = fcomp
+ env['SHFORTRAN'] = fcomp
-from distutils.core import setup
-setup(name = "scons-script",
- version = "2.0.1",
- description = "an Open Source software construction tool script",
- 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",
- scripts = ["scons"])
+def exists(env):
+ return env.Detect(compilers)
# Local Variables:
# tab-width: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:
diff --git a/src/script/README.txt b/src/script/README.txt
deleted file mode 100644
index 91e826c..0000000
--- a/src/script/README.txt
+++ /dev/null
@@ -1,169 +0,0 @@
-###
-### THIS FILE IS NO LONGER USED. THIS IS THE README FILE FOR THE
-### SEPARATE SCRIPT PACKAGE FROM THE ORIGINAL (DRAFT) PACKAGING
-### SCHEME. WE'RE SAVING THIS IN CASE WE NEED OR WANT TO RESURRECT
-### A SEPARATE SCRIPT PACKAGE IN THE FUTURE.
-###
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
-# src/script/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 SCons, a tool for building software (and
-other files). SCons is implemented in Python, and its "configuration
-files" are actually Python scripts, allowing you to use the full power
-of a real scripting language to solve build problems. You do not,
-however, need to know Python to use SCons effectively.
-
-
-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
- The SCons build engine, installed into the standard
- Python library directory.
-
- scons-script [THIS PACKAGE]
- 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:
-
- Do NOT install this package. Install the python-scons package
- instead.
-
- If you want to use the scons script AND you want to use the SCons
- build engine in other Python software:
-
- Do NOT install this package. Install both the scons and
- python-scons packages instead.
-
- 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 python-scons 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/script/scons-post-install.py b/src/script/scons-post-install.py
deleted file mode 100644
index 20cfcbe..0000000
--- a/src/script/scons-post-install.py
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/usr/bin/env python
-#
-# scons-post-install - SCons post install script for Windows
-#
-# A script for configuring "App Paths" registry key so that SCons could
-# be run from any directory the same way Python is.
-#
-
-#
-# SCons - a Software Constructor
-#
-# 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/script/scons-post-install.py 5134 2010/08/16 23:02:40 bdeegan"
-
-import os
-import sys
-import imp
-
-try:
- # Before Python 3.0, the 'winreg' module was named '_winreg'
- sys.modules['winreg'] = \
- imp.load_module('winreg', *imp.find_module('_winreg'))
-except ImportError:
- # No '_winreg' module: either 3.x or not Windows
- pass
-
-scons_bat_path = os.path.join(sys.prefix, 'Scripts', 'scons.bat')
-
-app_paths_key = r'SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\SCons.bat'
-
-def install():
- if sys.platform == 'win32':
- try:
- import winreg
- except ImportError:
- pass
- else:
- print 'Writing "App Paths" registry entry for %s' % scons_bat_path
- winreg.SetValue(
- winreg.HKEY_LOCAL_MACHINE,
- app_paths_key,
- winreg.REG_SZ,
- scons_bat_path)
- print 'Done.'
-
-
-def remove():
- if sys.platform == 'win32':
- try:
- import winreg
- except ImportError:
- pass
- else:
- # print 'Remove "App Paths" registry entry'
- winreg.DeleteKey(winreg.HKEY_LOCAL_MACHINE, app_paths_key)
-
-
-if len(sys.argv) > 1:
- if sys.argv[1] == '-install':
- install()
- elif sys.argv[1] == '-remove':
- remove()
-
-sys.exit(0)
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/src/script/scons-time.py b/src/script/scons-time.py
index 36bdeb5..ace2d85 100644
--- a/src/script/scons-time.py
+++ b/src/script/scons-time.py
@@ -9,7 +9,7 @@
#
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@
from __future__ import division
from __future__ import nested_scopes
-__revision__ = "src/script/scons-time.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/script/scons-time.py 5357 2011/09/09 21:31:03 bdeegan"
import getopt
import glob
diff --git a/src/script/scons.bat b/src/script/scons.bat
index 33ed144..1648cb3 100644
--- a/src/script/scons.bat
+++ b/src/script/scons.bat
@@ -1,11 +1,11 @@
-@REM Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
-@REM src/script/scons.bat 5134 2010/08/16 23:02:40 bdeegan
+@REM Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
+@REM src/script/scons.bat 5357 2011/09/09 21:31:03 bdeegan
@echo off
set SCONS_ERRORLEVEL=
if "%OS%" == "Windows_NT" goto WinNT
@REM for 9x/Me you better not have more than 9 args
-python -c "from os.path import join; import sys; sys.path = [ join(sys.prefix, 'Lib', 'site-packages', 'scons-2.0.1'), join(sys.prefix, 'Lib', 'site-packages', 'scons'), join(sys.prefix, 'scons-2.0.1'), join(sys.prefix, 'scons')] + sys.path; import SCons.Script; SCons.Script.main()" %1 %2 %3 %4 %5 %6 %7 %8 %9
+python -c "from os.path import join; import sys; sys.path = [ join(sys.prefix, 'Lib', 'site-packages', 'scons-2.1.0'), join(sys.prefix, 'Lib', 'site-packages', 'scons'), join(sys.prefix, 'scons-2.1.0'), join(sys.prefix, 'scons')] + sys.path; import SCons.Script; SCons.Script.main()" %1 %2 %3 %4 %5 %6 %7 %8 %9
@REM no way to set exit status of this script for 9x/Me
goto endscons
@@ -17,7 +17,10 @@ goto endscons
setlocal
@REM ensure the script will be executed with the Python it was installed for
set path=%~dp0;%~dp0..;%path%
-python -c "from os.path import join; import sys; sys.path = [ join(sys.prefix, 'Lib', 'site-packages', 'scons-2.0.1'), join(sys.prefix, 'Lib', 'site-packages', 'scons'), join(sys.prefix, 'scons-2.0.1'), join(sys.prefix, 'scons')] + sys.path; import SCons.Script; SCons.Script.main()" %*
+@REM try the script named as the .bat file in current dir, then in Scripts subdir
+set scriptname=%~dp0%~n0.py
+if not exist %scriptname% set scriptname=%~dp0Scripts\%~n0.py
+python "%scriptname%" %*
endlocal & set SCONS_ERRORLEVEL=%ERRORLEVEL%
if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto returncode
diff --git a/src/script/scons.py b/src/script/scons.py
index bf84bf0..0e5b8ec 100644
--- a/src/script/scons.py
+++ b/src/script/scons.py
@@ -2,7 +2,7 @@
#
# SCons - a Software Constructor
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -22,22 +22,20 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-__revision__ = "src/script/scons.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/script/scons.py 5357 2011/09/09 21:31:03 bdeegan"
-__version__ = "2.0.1"
+__version__ = "2.1.0"
-__build__ = "r5134"
+__build__ = "r5357[MODIFIED]"
-__buildsys__ = "cooldog"
+__buildsys__ = "ubuntu"
-__date__ = "2010/08/16 23:02:40"
+__date__ = "2011/09/09 21:31:03"
__developer__ = "bdeegan"
import os
-import os.path
import sys
##############################################################################
@@ -61,7 +59,8 @@ import sys
# If so exit with error message
try:
if sys.version_info >= (3,0,0):
- msg = "scons: *** SCons version %s does not run under Python version %s.\n"
+ msg = "scons: *** SCons version %s does not run under Python version %s.\n\
+Python 3.0 and later are not yet supported.\n"
sys.stderr.write(msg % (__version__, sys.version.split()[0]))
sys.exit(1)
except AttributeError:
@@ -89,8 +88,22 @@ libs.append(os.path.abspath(local))
scons_version = 'scons-%s' % __version__
+# preferred order of scons lookup paths
prefs = []
+try:
+ import pkg_resources
+except ImportError:
+ pass
+else:
+ # when running from an egg add the egg's directory
+ try:
+ d = pkg_resources.get_distribution('scons')
+ except pkg_resources.DistributionNotFound:
+ pass
+ else:
+ prefs.append(d.location)
+
if sys.platform == 'win32':
# sys.prefix is (likely) C:\Python*;
# check only C:\Python*.
@@ -159,19 +172,6 @@ else:
# Check /usr/libfoo/scons*.
prefs.append(libpath)
- try:
- import pkg_resources
- except ImportError:
- pass
- else:
- # when running from an egg add the egg's directory
- try:
- d = pkg_resources.get_distribution('scons')
- except pkg_resources.DistributionNotFound:
- pass
- else:
- prefs.append(d.location)
-
# Look first for 'scons-__version__' in all of our preference libs,
# then for 'scons'.
libs.extend([os.path.join(x, scons_version) for x in prefs])
diff --git a/src/script/sconsign.py b/src/script/sconsign.py
index adf3d28..4debf04 100644
--- a/src/script/sconsign.py
+++ b/src/script/sconsign.py
@@ -2,7 +2,7 @@
#
# SCons - a Software Constructor
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -23,21 +23,20 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/script/sconsign.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/script/sconsign.py 5357 2011/09/09 21:31:03 bdeegan"
-__version__ = "2.0.1"
+__version__ = "2.1.0"
-__build__ = "r5134"
+__build__ = "r5357[MODIFIED]"
-__buildsys__ = "cooldog"
+__buildsys__ = "ubuntu"
-__date__ = "2010/08/16 23:02:40"
+__date__ = "2011/09/09 21:31:03"
__developer__ = "bdeegan"
import os
import sys
-import time
##############################################################################
# BEGIN STANDARD SCons SCRIPT HEADER
@@ -75,8 +74,22 @@ libs.append(os.path.abspath(local))
scons_version = 'scons-%s' % __version__
+# preferred order of scons lookup paths
prefs = []
+try:
+ import pkg_resources
+except ImportError:
+ pass
+else:
+ # when running from an egg add the egg's directory
+ try:
+ d = pkg_resources.get_distribution('scons')
+ except pkg_resources.DistributionNotFound:
+ pass
+ else:
+ prefs.append(d.location)
+
if sys.platform == 'win32':
# sys.prefix is (likely) C:\Python*;
# check only C:\Python*.
@@ -145,19 +158,6 @@ else:
# Check /usr/libfoo/scons*.
prefs.append(libpath)
- try:
- import pkg_resources
- except ImportError:
- pass
- else:
- # when running from an egg add the egg's directory
- try:
- d = pkg_resources.get_distribution('scons')
- except pkg_resources.DistributionNotFound:
- pass
- else:
- prefs.append(d.location)
-
# Look first for 'scons-__version__' in all of our preference libs,
# then for 'scons'.
libs.extend([os.path.join(x, scons_version) for x in prefs])
@@ -172,6 +172,7 @@ sys.path = libs + sys.path
import SCons.compat # so pickle will import cPickle instead
import whichdb
+import time
import pickle
import imp
diff --git a/src/script/setup.cfg b/src/script/setup.cfg
deleted file mode 100644
index 94ede1f..0000000
--- a/src/script/setup.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-[bdist_rpm]
-group = Development/Tools
diff --git a/src/setup.cfg b/src/setup.cfg
index a234e22..f04ca1b 100644
--- a/src/setup.cfg
+++ b/src/setup.cfg
@@ -3,4 +3,3 @@ group = Development/Tools
[bdist_wininst]
title = SCons - a software construction tool
-#install-script = scons-post-install.py
diff --git a/src/setup.py b/src/setup.py
index f5dd9e6..2d04341 100644
--- a/src/setup.py
+++ b/src/setup.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -20,14 +20,25 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/setup.py 5134 2010/08/16 23:02:40 bdeegan"
+"""
+NOTE: Installed SCons is not importable like usual Python packages. It is
+ executed explicitly with command line scripts. This allows multiple
+ SCons versions to coexist within single Python installation, which
+ is critical for enterprise build cases. Explicit invokation is
+ necessary to avoid confusion over which version of SCons is active.
+
+ By default SCons is installed into versioned directory, e.g.
+ site-packages/scons-2.1.0.alpha.20101125 and much of the stuff
+ below is dedicated to make it happen on various platforms.
+"""
+
+__revision__ = "src/setup.py 5357 2011/09/09 21:31:03 bdeegan"
import os
-import os.path
import stat
import sys
-Version = "2.0.1"
+Version = "2.1.0"
man_pages = [
'scons.1',
@@ -35,12 +46,15 @@ man_pages = [
'scons-time.1',
]
+# change to setup.py directory if it was executed from other dir
(head, tail) = os.path.split(sys.argv[0])
-
if head:
os.chdir(head)
sys.argv[0] = tail
+
+# flag if setup.py is run on win32 or _for_ win32 platform,
+# (when building windows installer on linux, for example)
is_win32 = 0
if not sys.platform == 'win32':
try:
@@ -51,23 +65,14 @@ if not sys.platform == 'win32':
else:
is_win32 = 1
-try:
- import distutils
- import distutils.core
- import distutils.command.install
- import distutils.command.install_data
- import distutils.command.install_lib
- import distutils.command.install_scripts
- import distutils.command.build_scripts
-except ImportError:
- sys.stderr.write("""Could not import distutils.
-
-Building or installing SCons from this package requires that the Python
-distutils be installed. See the README or README.txt file from this
-package for instructions on where to find distutils for installation on
-your system, or on how to install SCons from a different package.
-""")
- sys.exit(1)
+
+import distutils
+import distutils.core
+import distutils.command.install
+import distutils.command.install_data
+import distutils.command.install_lib
+import distutils.command.install_scripts
+import distutils.command.build_scripts
_install = distutils.command.install.install
_install_data = distutils.command.install_data.install_data
@@ -135,7 +140,7 @@ class install(_install):
'version-lib'
]
- if hasattr(os, 'symlink'):
+ if hasattr(os, 'link'):
user_options.append(
('hardlink-scons', None,
"hard link 'scons' to the version-numbered script, don't make a separate 'scons' copy"),
@@ -269,15 +274,11 @@ class install_scripts(_install_scripts):
self.copy_file(src, dst)
self.outfiles.append(dst)
- def report(self, msg, args):
- # Wrapper around self.announce, used by older distutils versions.
- self.announce(msg % args)
-
def run(self):
- # This "skip_build/build_scripts" block is cut-and-paste from
- # distutils.
+ # --- distutils copy/paste ---
if not self.skip_build:
self.run_command('build_scripts')
+ # --- /distutils copy/paste ---
# Custom SCons installation stuff.
if Options.hardlink_scons:
@@ -305,6 +306,9 @@ class install_scripts(_install_scripts):
base = os.path.basename(src)
scons = os.path.join(self.install_dir, base)
scons_ver = scons + '-' + Version
+ if is_win32:
+ scons += '.py'
+ scons_ver += '.py'
create_version_script(src, scons_ver)
create_basename_script(src, scons, scons_ver)
@@ -320,20 +324,19 @@ class install_scripts(_install_scripts):
self.copy_scons(src, scons_bat)
self.copy_scons(src, scons_version_bat)
- # This section is cut-and-paste from distutils, modulo being
- # able
+ # --- distutils copy/paste ---
if os.name == 'posix':
- try: report = distutils.log.info
- except AttributeError: report = self.report
# Set the executable bits (owner, group, and world) on
# all the scripts we just installed.
for file in self.get_outputs():
if self.dry_run:
- report("changing mode of %s", file)
+ # log.info("changing mode of %s", file)
+ pass
else:
mode = ((os.stat(file)[stat.ST_MODE]) | 0555) & 07777
- report("changing mode of %s", file)
+ # log.info("changing mode of %s to %o", file, mode)
os.chmod(file, mode)
+ # --- /distutils copy/paste ---
class build_scripts(_build_scripts):
def finalize_options(self):
@@ -378,11 +381,6 @@ scripts = [
'script/scons.bat',
]
-#if is_win32:
-# scripts = scripts + [
-# 'script/scons-post-install.py'
-# ]
-
arguments = {
'name' : "scons",
'version' : Version,
diff --git a/src/test_aegistests.py b/src/test_aegistests.py
index 10dabcf..7273d00 100644
--- a/src/test_aegistests.py
+++ b/src/test_aegistests.py
@@ -1,6 +1,6 @@
#!/usr/bin/env 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
@@ -21,7 +21,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/test_aegistests.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/test_aegistests.py 5357 2011/09/09 21:31:03 bdeegan"
"""
Verify that we have proper Copyright notices on all the right files
diff --git a/src/test_files.py b/src/test_files.py
index c19e9e8..c628966 100644
--- a/src/test_files.py
+++ b/src/test_files.py
@@ -1,6 +1,6 @@
#!/usr/bin/env 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
@@ -22,7 +22,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/test_files.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/test_files.py 5357 2011/09/09 21:31:03 bdeegan"
"""
Verify that we have certain important files in our distribution
diff --git a/src/test_interrupts.py b/src/test_interrupts.py
index 0d019a5..7000cf6 100644
--- a/src/test_interrupts.py
+++ b/src/test_interrupts.py
@@ -1,6 +1,6 @@
#!/usr/bin/env 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
@@ -21,7 +21,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/test_interrupts.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/test_interrupts.py 5357 2011/09/09 21:31:03 bdeegan"
"""
Verify that the SCons source code contains only correct handling of
diff --git a/src/test_pychecker.py b/src/test_pychecker.py
index 2500f3f..61a50e8 100644
--- a/src/test_pychecker.py
+++ b/src/test_pychecker.py
@@ -1,6 +1,6 @@
#!/usr/bin/env 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
@@ -21,7 +21,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/test_pychecker.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/test_pychecker.py 5357 2011/09/09 21:31:03 bdeegan"
"""
Use pychecker to catch various Python coding errors.
diff --git a/src/test_setup.py b/src/test_setup.py
index 7a7b870..ecbb26a 100644
--- a/src/test_setup.py
+++ b/src/test_setup.py
@@ -1,6 +1,6 @@
#!/usr/bin/env 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
@@ -22,7 +22,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/test_setup.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/test_setup.py 5357 2011/09/09 21:31:03 bdeegan"
"""
Test how the setup.py script installs SCons.
diff --git a/src/test_strings.py b/src/test_strings.py
index e3890b3..17199b3 100644
--- a/src/test_strings.py
+++ b/src/test_strings.py
@@ -1,6 +1,6 @@
#!/usr/bin/env 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
@@ -22,7 +22,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/test_strings.py 5134 2010/08/16 23:02:40 bdeegan"
+__revision__ = "src/test_strings.py 5357 2011/09/09 21:31:03 bdeegan"
"""
Verify that we have proper strings like Copyright notices on all the
@@ -106,8 +106,8 @@ class Checker(object):
class CheckUnexpandedStrings(Checker):
expressions = [
- re.compile('Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation'),
- re.compile('src/test_strings.py 5134 2010/08/16 23:02:40 bdeegan'),
+ re.compile('Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation'),
+ re.compile('src/test_strings.py 5357 2011/09/09 21:31:03 bdeegan'),
]
def must_be_built(self):
return None
@@ -228,8 +228,10 @@ check_list = [
'src/script/setup.cfg',
'test/Fortran/.exclude_tests',
'timings/changelog.html',
+ 'timings/ElectricCloud/genscons.pl',
'timings/graph.html',
'timings/index.html',
+ 'review.py',
],
remove_patterns = [
'*.js',