From fac1d00ca5d7cd87e13476c381c63028d05ad9ae Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sun, 21 Jul 2019 07:48:54 -0600 Subject: Add VS2019 to appveyor matrix Signed-off-by: Mats Wichmann --- .appveyor.yml | 122 +++++++++++++++++++++++++++++++--------------------------- 1 file changed, 65 insertions(+), 57 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index d2c63cb..5805f5f 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,10 +1,11 @@ #version: '3.0.1.{build}' image: - # linux builds disabled for now + # linux builds done in Travis CI for now # - Ubuntu - Visual Studio 2015 - Visual Studio 2017 + - Visual Studio 2019 cache: - downloads -> appveyor.yml @@ -36,58 +37,37 @@ install: - sh: which python$PYTHON - sh: python$PYTHON --version - sh: export PYSITEDIR=$(python$PYTHON -m site --user-site) - - sh: python$PYTHON -m pip install --user -U --progress-bar off pip setuptools wheel + - sh: python$PYTHON -m pip install --user -U --progress-bar off pip setuptools wheel - sh: python$PYTHON -m pip install --user -U --progress-bar off coverage codecov - sh: STATIC_DEPS=true python$PYTHON -m pip install --user -U --progress-bar off lxml - sh: ./.travis/install.sh - sh: printenv -# build matrix will be number of images multiplied -# by each '-' below, split jobs into groups of 4 -# to avoid timeing out +# build matrix will be number of images multiplied by each '-' below, +# less any exclusions. +# split builds into sets of four jobs due to appveyor per-job time limit environment: matrix: - WINPYTHON: "Python27" PYTHON: "2.7" PYVER: 27 BUILD_JOB_NUM: 1 - COVERAGE: 1 + COVERAGE: 0 - WINPYTHON: "Python27" PYTHON: "2.7" PYVER: 27 BUILD_JOB_NUM: 2 - COVERAGE: 1 + COVERAGE: 0 - WINPYTHON: "Python27" PYTHON: "2.7" PYVER: 27 BUILD_JOB_NUM: 3 - COVERAGE: 1 + COVERAGE: 0 - WINPYTHON: "Python27" PYTHON: "2.7" PYVER: 27 BUILD_JOB_NUM: 4 - COVERAGE: 1 - - - WINPYTHON: "Python36" - PYTHON: "3.6" - PYVER: 36 - BUILD_JOB_NUM: 1 - COVERAGE: 1 - - WINPYTHON: "Python36" - PYTHON: "3.6" - PYVER: 36 - BUILD_JOB_NUM: 2 - COVERAGE: 1 - - WINPYTHON: "Python36" - PYTHON: "3.6" - PYVER: 36 - BUILD_JOB_NUM: 3 - COVERAGE: 1 - - WINPYTHON: "Python36" - PYTHON: "3.6" - PYVER: 36 - BUILD_JOB_NUM: 4 - COVERAGE: 1 + COVERAGE: 0 - WINPYTHON: "Python35" PYTHON: "3.5" @@ -110,6 +90,27 @@ environment: BUILD_JOB_NUM: 4 COVERAGE: 0 + - WINPYTHON: "Python36" + PYTHON: "3.6" + PYVER: 36 + BUILD_JOB_NUM: 1 + COVERAGE: 1 + - WINPYTHON: "Python36" + PYTHON: "3.6" + PYVER: 36 + BUILD_JOB_NUM: 2 + COVERAGE: 1 + - WINPYTHON: "Python36" + PYTHON: "3.6" + PYVER: 36 + BUILD_JOB_NUM: 3 + COVERAGE: 1 + - WINPYTHON: "Python36" + PYTHON: "3.6" + PYVER: 36 + BUILD_JOB_NUM: 4 + COVERAGE: 1 + - WINPYTHON: "Python37" PYTHON: "3.7" PYVER: 37 @@ -133,40 +134,49 @@ environment: # remove sets of build jobs based on critia below # to fine tune the number and platforms tested -matrix: - exclude: - # test python 3.5, 3.6 on Visual Studio 2015 image - - image: Visual Studio 2015 - WINPYTHON: "Python37" - - image: Visual Studio 2015 +matrix: + exclude: + # test python 3.5 on Visual Studio 2015 image + - image: Visual Studio 2015 WINPYTHON: "Python27" + - image: Visual Studio 2015 + WINPYTHON: "Python36" + - image: Visual Studio 2015 + WINPYTHON: "Python37" - # test python 2.7, 3.7 on Visual Studio 2015 image + # test python 2.7, 3.6 on Visual Studio 2017 image - image: Visual Studio 2017 WINPYTHON: "Python35" - - image: Visual Studio 2017 + - image: Visual Studio 2017 + WINPYTHON: "Python37" + + # test python 3.7 on Visual Studio 2019 image + - image: Visual Studio 2019 + WINPYTHON: "Python27" + - image: Visual Studio 2019 + WINPYTHON: "Python35" + - image: Visual Studio 2019 WINPYTHON: "Python36" # test python 3.7 on Ubuntu - - image: Ubuntu - WINPYTHON: "Python27" - - image: Ubuntu + - image: Ubuntu + WINPYTHON: "Python27" + - image: Ubuntu WINPYTHON: "Python35" - - image: Ubuntu + - image: Ubuntu WINPYTHON: "Python36" # remove some binaries we dont to be found before_build: - ps: | - if ($isWindows) - { + if ($isWindows) { dir "C:\Program Files\Git\usr\bin\x*.exe" if (Test-Path "C:\Program Files\Git\usr\bin\xsltproc.EXE" ) { Remove-Item "C:\Program Files\Git\usr\bin\xsltproc.EXE" -ErrorAction Ignore } dir "C:\Program Files\Git\usr\bin\x*.exe" } - + build: off build_script: @@ -174,18 +184,17 @@ build_script: - cmd: "C:\\%WINPYTHON%\\python.exe runtest.py -l -a > all_tests.txt" - sh: python$PYTHON runtest.py -l -a > all_tests.txt - # setup coverage by creating the coverage config file, and adding coverage + # setup coverage by creating the coverage config file, and adding coverage # to the usercustomize so that all python processes start with coverage - ps: | - if ($env:COVERAGE -eq 1){ + if ($env:COVERAGE -eq 1) { $env:COVERAGE_PROCESS_START = "$($env:APPVEYOR_BUILD_FOLDER)/.coveragerc"; $env:PYTHONNOUSERSITE = ""; New-Item -ItemType Directory -Force -Path "$($env:PYSITEDIR)"; $env:COVERAGE_FILE = "$($env:APPVEYOR_BUILD_FOLDER)/.coverage"; $usercustomizeText = "import os`r`nos.environ['COVERAGE_PROCESS_START'] = '$($env:COVERAGE_PROCESS_START)'`r`nimport coverage`r`ncoverage.process_startup()"; $usercustomizeText|Set-Content "$($env:PYSITEDIR)/usercustomize.py"; - if ($isWindows) - { + if ($isWindows) { $coveragercFile = "[run]`r`nsource = $($env:APPVEYOR_BUILD_FOLDER)/src`r`nparallel = True`r`ndisable_warnings = trace-changed`r`nomit =`r`n`t*Tests.py`r`n`tsrc\test_*`r`n`tsrc\setup.py`r`n`r`n[path]`r`nsource = $($env:APPVEYOR_BUILD_FOLDER)`r`n[report]`r`nomit =`r`n`t*Tests.py`r`n`tsrc\test_*`r`n`tsrc\setup.py`r`n`r`n" } else @@ -205,12 +214,12 @@ build_script: if ( $start -eq 0 ){ $start = 1 }; get-content all_tests.txt | select -first ($end - $start) -skip ($start - 1) | Out-File -Encoding ASCII build_tests.txt; - # exclude VS 10.0 because it hangs the testing until this is resolved: + # exclude VS 10.0 because it hangs the testing until this is resolved: # https://help.appveyor.com/discussions/problems/19283-visual-studio-2010-trial-license-has-expired - ps: | New-Item -Name exclude_list.txt -ItemType File $workaround_image = "Visual Studio 2015" - if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq $workaround_image){ + if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq $workaround_image) { Add-Content -Path 'exclude_list.txt' -Value 'test\MSVS\vs-10.0-exec.py' } @@ -223,17 +232,16 @@ build_script: # unset JAVA_TOOL_OPTIONS because newer java prints this to stderr - sh: | unset JAVA_TOOL_OPTIONS - if [ "$COVERAGE" -eq "1" ]; then - coverage run -p --rcfile="$COVERAGE_PROCESS_START" runtest.py --exclude-list exclude_list.txt -f build_tests.txt || if [[ $? == 2 ]]; then true; else false; fi; + if [ "$COVERAGE" -eq "1" ]; then + coverage run -p --rcfile="$COVERAGE_PROCESS_START" runtest.py --exclude-list exclude_list.txt -f build_tests.txt || if [[ $? == 2 ]]; then true; else false; fi; else - python$PYTHON runtest.py -j 2 --exclude-list exclude_list.txt -f build_tests.txt || if [[ $? == 2 ]]; then true; else false; fi; + python$PYTHON runtest.py -j 2 --exclude-list exclude_list.txt -f build_tests.txt || if [[ $? == 2 ]]; then true; else false; fi; fi # run converage even if there was a test failure on_finish: - ps: | - if ($env:COVERAGE -eq 1) - { + if ($env:COVERAGE -eq 1) { & coverage combine & coverage report & coverage xml -o coverage_xml.xml @@ -244,5 +252,5 @@ on_finish: - sh: if [ $COVERAGE -eq 1 ]; then codecov -X gcov --file coverage_xml.xml; fi # not using coveralls, so leaving it commented out in case we switch back #- cmd: "C:\\%WINPYTHON%\\python.exe -m pip install --user -U coveralls" - #- sh: python$PYTHON -m pip install --user -U coveralls + #- sh: python$PYTHON -m pip install --user -U coveralls #- ps: coveralls --rcfile="$($env:COVERAGE_PROCESS_START)" -- cgit v0.12 From 98f7ea66039cec1acf8c648dca9b91ec2a5fc14c Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Tue, 6 Aug 2019 09:18:35 -0600 Subject: do some debugging on tar bz2 and xz formats Don't merge this one: it has debug stuff in it, and eliminates most appveyor builds Signed-off-by: Mats Wichmann --- .appveyor.yml | 6 ++++++ test/packaging/guess-package-name.py | 23 +++++++++++++++++------ test/packaging/tar/bz2_packaging.py | 7 +++++-- test/packaging/tar/xz_packaging.py | 7 +++++-- 4 files changed, 33 insertions(+), 10 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 5805f5f..8b6dd28 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -143,12 +143,18 @@ matrix: WINPYTHON: "Python36" - image: Visual Studio 2015 WINPYTHON: "Python37" + # quick test: skip all + - image: Visual Studio 2015 + WINPYTHON: "Python35" # test python 2.7, 3.6 on Visual Studio 2017 image - image: Visual Studio 2017 WINPYTHON: "Python35" - image: Visual Studio 2017 WINPYTHON: "Python37" + # quick test: skip 2.7 as well + - image: Visual Studio 2017 + WINPYTHON: "Python27" # test python 3.7 on Visual Studio 2019 image - image: Visual Studio 2019 diff --git a/test/packaging/guess-package-name.py b/test/packaging/guess-package-name.py index 8ba4c9e..fa69595 100644 --- a/test/packaging/guess-package-name.py +++ b/test/packaging/guess-package-name.py @@ -33,6 +33,8 @@ Also overriding this default package name is tested Furthermore that targz is the default packager is tested. """ +import sys + import TestSCons python = TestSCons.python @@ -88,8 +90,13 @@ test.must_exist('src.tar.gz') # # TEST: default package name creation with overridden packager. # +# Windows 10 since at least 1803 supplies bsdtar, so tool +# detection will find it - but doesn't supply bzip2, so a +# test using it will fail. Check for bzip2 first. -test.write('SConstruct', """ +bz2 = test.where_is('bzip2') +if bz2: + test.write('SConstruct', """ env=Environment(tools=['default', 'packaging']) env.Program( 'src/main.c' ) env.Package( NAME = 'libfoo', @@ -98,15 +105,19 @@ env.Package( NAME = 'libfoo', source = [ 'src/main.c', 'SConstruct' ] ) """) -test.run(stderr=None) + test.run(stderr=None) -test.must_exist('libfoo-1.2.3.tar.bz2') + test.must_exist('libfoo-1.2.3.tar.bz2') # # TEST: default package name creation with another packager. # +# Windows 10 since at least 1803 supplies bsdtar, so tool +# detection will find it - but it doesn't support xz +# compression so test using it will fail. As a hack, just skip. -test.write('SConstruct', """ +if sys.platform != 'win32': + test.write('SConstruct', """ env=Environment(tools=['default', 'packaging']) env.Program( 'src/main.c' ) env.Package( NAME = 'libfoo', @@ -115,9 +126,9 @@ env.Package( NAME = 'libfoo', source = [ 'src/main.c', 'SConstruct' ] ) """) -test.run(stderr=None) + test.run(stderr=None) -test.must_exist('libfoo-1.2.3.tar.xz') + test.must_exist('libfoo-1.2.3.tar.xz') test.pass_test() diff --git a/test/packaging/tar/bz2_packaging.py b/test/packaging/tar/bz2_packaging.py index 875f1c9..9026eb0 100644 --- a/test/packaging/tar/bz2_packaging.py +++ b/test/packaging/tar/bz2_packaging.py @@ -40,8 +40,11 @@ if not tar: test.skip_test('tar not found, skipping test\n') bz2 = test.where_is('bzip2') -if not bz2: - test.skip_test('tar found, but helper bzip2 not found, skipping test\n') +#if not bz2: +# test.skip_test('tar found, but helper bzip2 not found, skipping test\n') + +tar = test.where_is('tar') +test.skip_test('DEBUG: found TAR at %s, BZIP2 at %s\n' % (tar, bz2)) test.subdir('src') diff --git a/test/packaging/tar/xz_packaging.py b/test/packaging/tar/xz_packaging.py index f12292e..62ca8bf 100644 --- a/test/packaging/tar/xz_packaging.py +++ b/test/packaging/tar/xz_packaging.py @@ -40,8 +40,11 @@ if not tar: test.skip_test('tar not found, skipping test\n') xz = test.where_is('xz') -if not xz: - test.skip_test('tar found, but helper xz not found, skipping test\n') +#if not xz: +# test.skip_test('tar found, but helper xz not found, skipping test\n') + +tar = test.where_is('tar') +test.skip_test('DEBUG: found TAR at %s, XZ at %s\n' % (tar, xz)) test.subdir('src') -- cgit v0.12 From 5c80940361e30b354917b26d8ba68ea1b9d13f23 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Wed, 7 Aug 2019 14:06:02 -0600 Subject: skip certain tar-pkg tests on win32 [travis skip] Signed-off-by: Mats Wichmann --- test/packaging/guess-package-name.py | 5 ++--- test/packaging/tar/bz2_packaging.py | 19 +++++++++++++------ test/packaging/tar/xz_packaging.py | 10 +++++----- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/test/packaging/guess-package-name.py b/test/packaging/guess-package-name.py index fa69595..1786c11 100644 --- a/test/packaging/guess-package-name.py +++ b/test/packaging/guess-package-name.py @@ -92,10 +92,9 @@ test.must_exist('src.tar.gz') # # Windows 10 since at least 1803 supplies bsdtar, so tool # detection will find it - but doesn't supply bzip2, so a -# test using it will fail. Check for bzip2 first. +# test using it will fail. As a hack, just skip. -bz2 = test.where_is('bzip2') -if bz2: +if sys.platform != 'win32': test.write('SConstruct', """ env=Environment(tools=['default', 'packaging']) env.Program( 'src/main.c' ) diff --git a/test/packaging/tar/bz2_packaging.py b/test/packaging/tar/bz2_packaging.py index 9026eb0..812c08e 100644 --- a/test/packaging/tar/bz2_packaging.py +++ b/test/packaging/tar/bz2_packaging.py @@ -31,6 +31,9 @@ This tests the SRC bz2 packager, which does the following: import TestSCons +import os +import sys + python = TestSCons.python test = TestSCons.TestSCons() @@ -39,12 +42,16 @@ tar = test.detect('TAR', 'tar') if not tar: test.skip_test('tar not found, skipping test\n') -bz2 = test.where_is('bzip2') -#if not bz2: -# test.skip_test('tar found, but helper bzip2 not found, skipping test\n') - -tar = test.where_is('tar') -test.skip_test('DEBUG: found TAR at %s, BZIP2 at %s\n' % (tar, bz2)) +if sys.platform == 'win32': + # windows 10 causes fresh problems by supplying a tar, not bzip2 + # but if git is installed, there's a bzip2 there, but can't be used + bz2 = test.where_is('bzip2') + if not bz2: + test.skip_test('tar found, but helper bzip2 not found, skipping test\n') + bz2 = os.path.splitdrive(bz2)[1] + tar = os.path.splitdrive(test.where_is('tar'))[1] + if tar[:8] != bz2[:8]: # catch one in \WINDOWS, one not + test.skip_test('tar found, but usable bzip2 not, skipping test\n') test.subdir('src') diff --git a/test/packaging/tar/xz_packaging.py b/test/packaging/tar/xz_packaging.py index 62ca8bf..1d80f7f 100644 --- a/test/packaging/tar/xz_packaging.py +++ b/test/packaging/tar/xz_packaging.py @@ -39,12 +39,12 @@ tar = test.detect('TAR', 'tar') if not tar: test.skip_test('tar not found, skipping test\n') +# Windows 10 now supplies tar, but doesn't support xz compression +# assume it's just okay to check for an xz command, because don't +# want to probe the command itself to see what it supports xz = test.where_is('xz') -#if not xz: -# test.skip_test('tar found, but helper xz not found, skipping test\n') - -tar = test.where_is('tar') -test.skip_test('DEBUG: found TAR at %s, XZ at %s\n' % (tar, xz)) +if not xz: + test.skip_test('tar found, but helper xz not found, skipping test\n') test.subdir('src') -- cgit v0.12 From 3f44315bbd796bbb348f26778b43f66d0cf41c2b Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Thu, 8 Aug 2019 06:46:11 -0600 Subject: put back appveyor to full build After debugging with some builds turned off for speed, put back the full matrix: * test python 3.5 on Visual Studio 2015 image * test python 2.7, 3.6 on Visual Studio 2017 image * test python 3.7 on Visual Studio 2019 image 3.6/VS2017 is the only coverage run now. Signed-off-by: Mats Wichmann --- .appveyor.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 8b6dd28..5805f5f 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -143,18 +143,12 @@ matrix: WINPYTHON: "Python36" - image: Visual Studio 2015 WINPYTHON: "Python37" - # quick test: skip all - - image: Visual Studio 2015 - WINPYTHON: "Python35" # test python 2.7, 3.6 on Visual Studio 2017 image - image: Visual Studio 2017 WINPYTHON: "Python35" - image: Visual Studio 2017 WINPYTHON: "Python37" - # quick test: skip 2.7 as well - - image: Visual Studio 2017 - WINPYTHON: "Python27" # test python 3.7 on Visual Studio 2019 image - image: Visual Studio 2019 -- cgit v0.12 From ce8f7eccdbcb626baa4a036dd8230268a5c35192 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Thu, 8 Aug 2019 11:33:19 -0400 Subject: [ci skip] Post release changes --- ReleaseConfig | 2 +- src/Announce.txt | 2 +- src/CHANGES.txt | 7 +++++++ src/RELEASE.txt | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ReleaseConfig b/ReleaseConfig index 2bddfa0..69be328 100755 --- a/ReleaseConfig +++ b/ReleaseConfig @@ -32,7 +32,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" # 'final', the patchlevel is set to the release date. This value is # mandatory and must be present in this file. #version_tuple = (2, 2, 0, 'final', 0) -version_tuple = (3, 1, 1) +version_tuple = (3, 1, 2, 'alpha', 0) # Python versions prior to unsupported_python_version cause a fatal error # when that version is used. Python versions prior to deprecate_python_version diff --git a/src/Announce.txt b/src/Announce.txt index 425aaa1..1359696 100755 --- a/src/Announce.txt +++ b/src/Announce.txt @@ -18,7 +18,7 @@ So that everyone using SCons can help each other learn how to use it more effectively, please go to http://scons.org/lists.html#users to sign up for the scons-users mailing list. -RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 +RELEASE VERSION/DATE TO BE FILLED IN LATER Please consult the RELEASE.txt file for a summary of changes since the last release and consult the CHANGES.txt file for complete a list of changes diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 953931b..3efb734 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -4,6 +4,13 @@ Change Log +RELEASE VERSION/DATE TO BE FILLED IN LATER + + From John Doe: + + - Whatever John Doe did. + + RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 From William Deegan: diff --git a/src/RELEASE.txt b/src/RELEASE.txt index a2f7918..17e698f 100755 --- a/src/RELEASE.txt +++ b/src/RELEASE.txt @@ -1,4 +1,4 @@ - A new SCons checkpoint release, 3.1.1, is now available + A new SCons checkpoint release, 3.1.2.alpha.yyyymmdd, is now available on the SCons download page: https://scons.org/pages/download.html -- cgit v0.12 From 7914dc4b0851d54df467842364b76cbe23336f09 Mon Sep 17 00:00:00 2001 From: Mathew Robinson Date: Mon, 19 Aug 2019 13:37:12 -0400 Subject: Improve threading performance by sharing NodeInfo across threads --- src/engine/SCons/Node/FSTests.py | 7 +++---- src/engine/SCons/Node/__init__.py | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py index 72eaba7..eddfdf0 100644 --- a/src/engine/SCons/Node/FSTests.py +++ b/src/engine/SCons/Node/FSTests.py @@ -2545,11 +2545,10 @@ class FileTestCase(_tempdirTestCase): def get_ninfo(self): """ mocked to ensure csig will equal the filename""" - try: - return self.ninfo - except AttributeError: - self.ninfo = FakeNodeInfo(self.name, self.timestamp) + if self.ninfo is not None: return self.ninfo + self.ninfo = FakeNodeInfo(self.name, self.timestamp) + return self.ninfo def get_csig(self): ninfo = self.get_ninfo() diff --git a/src/engine/SCons/Node/__init__.py b/src/engine/SCons/Node/__init__.py index 572465f..daf79ba 100644 --- a/src/engine/SCons/Node/__init__.py +++ b/src/engine/SCons/Node/__init__.py @@ -614,6 +614,7 @@ class Node(object, with_metaclass(NoSlotsPyPy)): self._func_rexists = 1 self._func_get_contents = 0 self._func_target_from_source = 0 + self.ninfo = None self.clear_memoized_values() @@ -1131,11 +1132,10 @@ class Node(object, with_metaclass(NoSlotsPyPy)): return ninfo def get_ninfo(self): - try: - return self.ninfo - except AttributeError: - self.ninfo = self.new_ninfo() + if self.ninfo is not None: return self.ninfo + self.ninfo = self.new_ninfo() + return self.ninfo def new_binfo(self): binfo = self.BuildInfo() -- cgit v0.12 From ba502ccd74df9f8411fdb63345a8a070b3764a49 Mon Sep 17 00:00:00 2001 From: Mathew Robinson Date: Tue, 20 Aug 2019 14:43:38 -0400 Subject: [ci skip] Update CHANGES.txt --- src/CHANGES.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 3efb734..6450da5 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -6,9 +6,11 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - From John Doe: + From Mathew Robinson: - - Whatever John Doe did. + - Improved threading performance by ensuring NodeInfo is shared + across threads. Results in ~13% improvement for parallel builds + (-j# > 1) with many shared nodes. RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 -- cgit v0.12 From 3243305c08dd93b16ae0024780a38ad51dacd5e1 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Wed, 21 Aug 2019 16:05:37 -0600 Subject: Actually say it's the MIT license [ci skip] A line "MIT License" is added to the license files, most places do it this way. For the benefit of Github, the top-level LICENSE file, which it looks at but the packaging stuff does not, is filled-in. The packaging fills in __COPYRIGHT__ from src/LICENSE.txt instead (and LICENSE-local). Add a skeletal CONTRIBUTING.md Signed-off-by: Mats Wichmann --- CONTRIBUTING.md | 13 +++++++++++++ LICENSE | 4 +++- LICENSE-local | 2 ++ src/LICENSE.txt | 2 ++ 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..2b781b2 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,13 @@ +# Contributing to SCons + +First off, thanks for taking the time to contribute! + +Here are some pointers to get started, before more information gets moved here to this page. + + * [Bugs and Feature Requests](https://scons.org/bugs.html) + * [Development](https://scons.org/dev.html) + * [SCons Developer's Guidelines](https://scons.org/guidelines.html) + +Various resources to contact are here: + + * [Contacts](https://scons.org/contact.html) diff --git a/LICENSE b/LICENSE index 7aa2a09..67e0e2f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,6 @@ -__COPYRIGHT__ +MIT License + +Copyright (c) 2001 - 2019 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/LICENSE-local b/LICENSE-local index dde3640..c3fe717 100644 --- a/LICENSE-local +++ b/LICENSE-local @@ -3,6 +3,8 @@ This copyright and license do not apply to any other software with which this software may have been included. +MIT License + __COPYRIGHT__ Permission is hereby granted, free of charge, to any person obtaining diff --git a/src/LICENSE.txt b/src/LICENSE.txt index 7aa2a09..1641aba 100644 --- a/src/LICENSE.txt +++ b/src/LICENSE.txt @@ -1,3 +1,5 @@ +MIT License + __COPYRIGHT__ Permission is hereby granted, free of charge, to any person obtaining -- cgit v0.12 From 3708316a79135e215a58e30b69b59222c123957b Mon Sep 17 00:00:00 2001 From: William Deegan Date: Fri, 23 Aug 2019 12:58:18 -0700 Subject: Changes to make test multi-platform (wasn't working on windows). --- test/TaskMaster/bug_2811/fixture_dir/SConstruct | 10 +++++++--- test/TaskMaster/bug_2811/fixture_dir/mycopy.py | 8 ++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 test/TaskMaster/bug_2811/fixture_dir/mycopy.py diff --git a/test/TaskMaster/bug_2811/fixture_dir/SConstruct b/test/TaskMaster/bug_2811/fixture_dir/SConstruct index c124902..d453368 100644 --- a/test/TaskMaster/bug_2811/fixture_dir/SConstruct +++ b/test/TaskMaster/bug_2811/fixture_dir/SConstruct @@ -10,6 +10,7 @@ This issue requires the following. Nth target's implicit lists changing when compared to SConsign's which have been loaded. 7. This forces rebuild of source file and this propagates to massive recompile """ +import sys import SCons.Tool @@ -27,12 +28,15 @@ def _dwo_emitter(target, source, env): targets = target + new_targets return (targets, source) +build_string = '$MYCOPY $SOURCE $TARGET' -bld = Builder(action='cp $SOURCE $TARGET') -env = Environment(BUILDERS={'Foo': bld}) +bld = Builder(action=build_string) + +env = Environment(BUILDERS={'Foo': bld}, MYCOPY="%s mycopy.py"%sys.executable) + +env['SHCCCOM'] = '$MYCOPY $SOURCE $TARGET && $MYCOPY $SOURCE ${TARGETS[1]}' -env['SHCCCOM'] = 'cp $SOURCE $TARGET && cp $SOURCE ${TARGETS[1]}' env['SHCCCOMSTR'] = env['SHCCCOM'] diff --git a/test/TaskMaster/bug_2811/fixture_dir/mycopy.py b/test/TaskMaster/bug_2811/fixture_dir/mycopy.py new file mode 100644 index 0000000..c1a57f5 --- /dev/null +++ b/test/TaskMaster/bug_2811/fixture_dir/mycopy.py @@ -0,0 +1,8 @@ +import sys +import shutil + +ffrom = sys.argv[1] +to = sys.argv[2] +shutil.copyfile(ffrom, to) + +sys.exit(0) -- cgit v0.12 From 96e059857c7e21787bc2b4916acca60042881fee Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sun, 4 Aug 2019 13:11:10 -0600 Subject: Update Dictionary documentation to match implementation [ci skip] Dictionary is now described as returning a dict only if called with no arguments; if called with arguments it returns a string or list of strings (matching the implmenentation). Note env.Dump() only takes zero arguments or one, it it not documented as taking the multiple keys, so there's less ambiguity with it. Some examples twiddled a little, and in a couple of cases Dictionary is not used any longer - we might as well just index into the construction environment since that works. Fixes #3156 Signed-off-by: Mats Wichmann --- doc/generated/functions.gen | 14 +++++----- doc/man/scons.xml | 59 ++++++++++++++++++++++------------------ doc/user/environments.xml | 19 ++++++++++--- src/engine/SCons/Environment.py | 43 +++++++++++++++++++++-------- src/engine/SCons/Environment.xml | 14 +++++----- 5 files changed, 94 insertions(+), 55 deletions(-) diff --git a/doc/generated/functions.gen b/doc/generated/functions.gen index 9bed358..c446a44 100644 --- a/doc/generated/functions.gen +++ b/doc/generated/functions.gen @@ -1333,11 +1333,11 @@ env.Depends(bar, installed_lib) 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. +containing construction variables in the environment. +If there are any arguments specified, +only the values of the specified construction +variables are returned as a string (if one +argument) or as a list of strings. @@ -1345,8 +1345,8 @@ Example: -dict = env.Dictionary() -cc_dict = env.Dictionary('CC', 'CCFLAGS', 'CCCOM') +cvars = env.Dictionary() +cc_values = env.Dictionary('CC', 'CCFLAGS', 'CCCOM') diff --git a/doc/man/scons.xml b/doc/man/scons.xml index 542ac9d..e610386 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -2577,8 +2577,8 @@ object_files.extend(Object('bar.c')) The path name for a Node's file may be used -by passing the Node to the Python-builtin -str() +by passing the Node to Python's builtin +str function: @@ -3119,11 +3119,12 @@ defined construction variables: method of the construction environment: -dict = env.Dictionary() -dict["CC"] = "cc" +cvars = env.Dictionary() +cvars["CC"] = "cc" -or using the [] operator: +or using the key lookup operator [] +directly on the construction environment: env["CC"] = "cc" @@ -6315,7 +6316,8 @@ might not exist argument is the construction environment for the scan. Fetch values from it using the env.Dictionary() -method. +method or using the key lookup operator +directly on the construction environment. The path @@ -6771,7 +6773,7 @@ env['BUILDERS]['PDFBuilder'] = bld Defining Your Own Scanner Object -The following example shows an extremely simple scanner (the +The following example shows adding an extremely simple scanner (the kfile_scan() function) that doesn't use a search path at all @@ -6796,8 +6798,10 @@ kscan = Scanner(name = 'kfile', function = kfile_scan, argument = None, skeys = ['.k']) -scanners = Environment().Dictionary('SCANNERS') -env = Environment(SCANNERS = scanners + [kscan]) + +scanners = DefaultEnvironment()['SCANNERS'] +scanners.append(kscan) +env = Environment(SCANNERS=scanners) env.Command('foo', 'foo.k', 'kprocess < $SOURCES > $TARGET') @@ -6814,7 +6818,8 @@ you can use the 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 +Here is a similar but more complete example that adds +a scanner which searches a path of directories (specified as the MYPATH @@ -6840,15 +6845,16 @@ def my_scan(node, env, path, arg): break return env.File(results) -scanner = Scanner(name = 'myscanner', - function = my_scan, - argument = None, - skeys = ['.x'], - path_function = FindPathDirs('MYPATH') +scanner = Scanner(name='myscanner', + function=my_scan, + argument=None, + skeys=['.x'], + path_function=FindPathDirs('MYPATH') ) -scanners = Environment().Dictionary('SCANNERS') -env = Environment(SCANNERS = scanners + [scanner], - MYPATH = ['incs']) + +scanners = DefaultEnvironment()['SCANNERS'] +scanners.append(scanner) +env = Environment(SCANNERS=scanners, MYPATH=['incs']) env.Command('foo', 'foo.x', 'xprocess < $SOURCES > $TARGET') @@ -6861,8 +6867,8 @@ that will return a list of directories specified in the $MYPATH construction variable. It lets SCons detect the file -incs/foo.inc -, even if +incs/foo.inc, +even if foo.x contains the line include foo.inc @@ -6883,17 +6889,18 @@ def pf(env, dir, target, source, arg): results.append(top_dir + os.sep + p) return results -scanner = Scanner(name = 'myscanner', - function = my_scan, - argument = None, - skeys = ['.x'], - path_function = pf +scanner = Scanner(name='myscanner', + function=my_scan, + argument=None, + skeys=['.x'], + path_function=pf ) -Creating a Hierarchical Build + +Creating a Hierarchical Build Notice that the file names specified in a subdirectory's SConscript diff --git a/doc/user/environments.xml b/doc/user/environments.xml index 65eed72..3f1f142 100644 --- a/doc/user/environments.xml +++ b/doc/user/environments.xml @@ -645,8 +645,9 @@ print("CC is: %s"%env['CC']) - A construction environment, however, - is actually an object with associated methods, etc. + A construction environment + is actually an object with associated methods and + attributes. If you want to have direct access to only the dictionary of construction variables, you can fetch this using the &Dictionary; method: @@ -656,9 +657,9 @@ print("CC is: %s"%env['CC']) env = Environment(FOO = 'foo', BAR = 'bar') -dict = env.Dictionary() +cvars = env.Dictionary() for key in ['OBJSUFFIX', 'LIBSUFFIX', 'PROGSUFFIX']: - print("key = %s, value = %s" % (key, dict[key])) + print("key = %s, value = %s" % (key, cvars[key])) @@ -698,6 +699,16 @@ for item in sorted(env.Dictionary().items()): print("construction variable = '%s', value = '%s'" % item) + + It should be noted that for the previous example, there is actually + an environment method that does the same thing more simply, + and tries to format it nicely as well: + + +env = Environment() +print(env.Dump()) + +
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 5faa2d0..2e1e742 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -1493,8 +1493,14 @@ class Base(SubstitutionEnvironment): self.copy_from_cache = copy_function + def Detect(self, progs): """Return the first available program in progs. + + :param progs: one or more command names to check for + :type progs: str or list + :returns str: first name from progs that can be found. + """ if not SCons.Util.is_List(progs): progs = [ progs ] @@ -1503,7 +1509,17 @@ class Base(SubstitutionEnvironment): if path: return prog return None + def Dictionary(self, *args): + """Return construction variables from an environment. + + :param *args: (optional) variable names to look up + :returns: if args omitted, the dictionary of all constr. vars. + If one arg, the corresponding value is returned. + If more than one arg, a list of values is returned. + :raises KeyError: if any of *args is not in the construction env. + + """ if not args: return self._dict dlist = [self._dict[x] for x in args] @@ -1511,23 +1527,28 @@ class Base(SubstitutionEnvironment): dlist = dlist[0] return dlist - def Dump(self, key = None): - """ - Using the standard Python pretty printer, return the contents of the - scons build environment as a string. - If the key passed in is anything other than None, then that will - be used as an index into the build environment dictionary and - whatever is found there will be fed into the pretty printer. Note - that this key is case sensitive. + def Dump(self, key=None): + """ Return pretty-printed string of construction variables. + + :param key: if None, format the whole dict of variables. + Else look up and format just the value for key. + """ import pprint pp = pprint.PrettyPrinter(indent=2) if key: - dict = self.Dictionary(key) + cvars = self.Dictionary(key) else: - dict = self.Dictionary() - return pp.pformat(dict) + cvars = self.Dictionary() + + # TODO: pprint doesn't do a nice job on path-style values + # if the paths contain spaces (i.e. Windows), because the + # algorithm tries to break lines on spaces, while breaking + # on the path-separator would be more "natural". Is there + # a better way to format those? + return pp.pformat(cvars) + def FindIxes(self, paths, prefix, suffix): """ diff --git a/src/engine/SCons/Environment.xml b/src/engine/SCons/Environment.xml index 46a00d2..3f12b4f 100644 --- a/src/engine/SCons/Environment.xml +++ b/src/engine/SCons/Environment.xml @@ -1325,11 +1325,11 @@ env.Depends(bar, installed_lib) 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. +containing construction variables in the environment. +If there are any arguments specified, +only the values of the specified construction +variables are returned as a string (if one +argument) or as a list of strings. @@ -1337,8 +1337,8 @@ Example: -dict = env.Dictionary() -cc_dict = env.Dictionary('CC', 'CCFLAGS', 'CCCOM') +cvars = env.Dictionary() +cc_values = env.Dictionary('CC', 'CCFLAGS', 'CCCOM') -- cgit v0.12 From 513264f3ef2d42b1b2a637b43af4f7a82ee3d385 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sun, 25 Aug 2019 08:21:18 -0600 Subject: [PR #3423] further wording tweak for Dictionary [ci skip] And replaces some written out "construction environment" and "construction variable" uses with existin entities. Signed-off-by: Mats Wichmann --- doc/generated/functions.gen | 6 +++--- doc/user/environments.xml | 20 ++++++++++---------- src/engine/SCons/Environment.xml | 6 +++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/doc/generated/functions.gen b/doc/generated/functions.gen index c446a44..f8cdba0 100644 --- a/doc/generated/functions.gen +++ b/doc/generated/functions.gen @@ -1333,10 +1333,10 @@ env.Depends(bar, installed_lib) Returns a dictionary object -containing construction variables in the environment. +containing the construction variables in the construction environment. If there are any arguments specified, -only the values of the specified construction -variables are returned as a string (if one +only the values of the specified construction variables +are returned as a string (if one argument) or as a list of strings. diff --git a/doc/user/environments.xml b/doc/user/environments.xml index 3f1f142..0b246d2 100644 --- a/doc/user/environments.xml +++ b/doc/user/environments.xml @@ -618,7 +618,7 @@ int main() { } - You can fetch individual construction variables + You can fetch individual &consvars; using the normal syntax for accessing individual named items in a Python dictionary: @@ -645,18 +645,18 @@ print("CC is: %s"%env['CC']) - A construction environment + A &consenv; is actually an object with associated methods and attributes. If you want to have direct access to only the - dictionary of construction variables, + dictionary of &consvars; you can fetch this using the &Dictionary; method: -env = Environment(FOO = 'foo', BAR = 'bar') +env = Environment(FOO='foo', BAR='bar') cvars = env.Dictionary() for key in ['OBJSUFFIX', 'LIBSUFFIX', 'PROGSUFFIX']: print("key = %s, value = %s" % (key, cvars[key])) @@ -688,7 +688,7 @@ for key in ['OBJSUFFIX', 'LIBSUFFIX', 'PROGSUFFIX']: If you want to loop and print the values of - all of the construction variables in a construction environment, + all of the &consvars; in a &consenv;, the Python code to do that in sorted order might look something like: @@ -701,8 +701,8 @@ for item in sorted(env.Dictionary().items()): It should be noted that for the previous example, there is actually - an environment method that does the same thing more simply, - and tries to format it nicely as well: + a &consenv; method that does the same thing more simply, + and tries to format the output nicely as well: env = Environment() @@ -717,10 +717,10 @@ print(env.Dump()) Another way to get information from - a construction environment + a &consenv; is to use the &subst; method on a string containing $ expansions - of construction variable names. + of &consvar; names. As a simple example, the example from the previous section that used @@ -739,7 +739,7 @@ print("CC is: %s"%env.subst('$CC')) One advantage of using &subst; to expand strings is - that construction variables + that &consvars; in the result get re-expanded until there are no expansions left in the string. So a simple fetch of a value like diff --git a/src/engine/SCons/Environment.xml b/src/engine/SCons/Environment.xml index 3f12b4f..5137bad 100644 --- a/src/engine/SCons/Environment.xml +++ b/src/engine/SCons/Environment.xml @@ -1325,10 +1325,10 @@ env.Depends(bar, installed_lib) Returns a dictionary object -containing construction variables in the environment. +containing the &consvars; in the &consenv;. If there are any arguments specified, -only the values of the specified construction -variables are returned as a string (if one +the values of the specified &consvars; +are returned as a string (if one argument) or as a list of strings. -- cgit v0.12 From b8bc2f3f21da3a720db000e94c24a3744c534e51 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Tue, 27 Aug 2019 10:51:24 -0600 Subject: Clean up D compiler pages Manpage duplicated (triplicated, actually) tons of construction variables because they were defined in each of the three possible names for the D compiler. Someone already started a DCommon.xml, this just finishes off the job of moving them there; the individual compiler-name docs now do not define any construction vars. THe ProgramAllAtOnce builder had the same problem, and got the same treatment. Note: lots of the cvars don't actually define the term. I don't use D so I'm not proposing any changes at this time, but it would be simple enough to merge in some simple wording if someone thinks it's important enough. Signed-off-by: Mats Wichmann --- doc/generated/builders.gen | 88 ++----- doc/generated/functions.gen | 2 +- doc/generated/variables.gen | 482 +++++++++----------------------------- src/engine/SCons/Tool/DCommon.xml | 368 ++++++++++++++++++++++++++--- src/engine/SCons/Tool/dmd.xml | 295 ----------------------- src/engine/SCons/Tool/gdc.xml | 295 ----------------------- src/engine/SCons/Tool/ldc.xml | 295 ----------------------- 7 files changed, 457 insertions(+), 1368 deletions(-) diff --git a/doc/generated/builders.gen b/doc/generated/builders.gen index 7c62558..54c7aaa 100644 --- a/doc/generated/builders.gen +++ b/doc/generated/builders.gen @@ -1841,72 +1841,28 @@ env.Program(target = 'foo', source = ['foo.o', 'bar.c', 'baz.f']) env.ProgramAllAtOnce() - - Builds an executable from D sources without first creating individual - objects for each file. - - - D sources can be compiled file-by-file as C and C++ source are, and - D is integrated into the scons Object and Program builders for - this model of build. D codes can though do whole source - meta-programming (some of the testing frameworks do this). For this - it is imperative that all sources are compiled and linked in a single call of - the D compiler. This builder serves that purpose. - - - env.ProgramAllAtOnce('executable', ['mod_a.d, mod_b.d', 'mod_c.d']) - - - This command will compile the modules mod_a, mod_b, and mod_c in a - single compilation process without first creating object files for - the modules. Some of the D compilers will create executable.o others - will not. - - - - Builds an executable from D sources without first creating individual - objects for each file. - - - D sources can be compiled file-by-file as C and C++ source are, and - D is integrated into the scons Object and Program builders for - this model of build. D codes can though do whole source - meta-programming (some of the testing frameworks do this). For this - it is imperative that all sources are compiled and linked in a single call of - the D compiler. This builder serves that purpose. - - - env.ProgramAllAtOnce('executable', ['mod_a.d, mod_b.d', 'mod_c.d']) - - - This command will compile the modules mod_a, mod_b, and mod_c in a - single compilation process without first creating object files for - the modules. Some of the D compilers will create executable.o others - will not. - - - - Builds an executable from D sources without first creating individual - objects for each file. - - - D sources can be compiled file-by-file as C and C++ source are, and - D is integrated into the scons Object and Program builders for - this model of build. D codes can though do whole source - meta-programming (some of the testing frameworks do this). For this - it is imperative that all sources are compiled and linked in a single call of - the D compiler. This builder serves that purpose. - - - env.ProgramAllAtOnce('executable', ['mod_a.d, mod_b.d', 'mod_c.d']) - - - This command will compile the modules mod_a, mod_b, and mod_c in a - single compilation process without first creating object files for - the modules. Some of the D compilers will create executable.o others - will not. - - + + Builds an executable from D sources without first creating individual + objects for each file. + + + D sources can be compiled file-by-file as C and C++ source are, and + D is integrated into the scons Object and Program builders for + this model of build. D codes can though do whole source + meta-programming (some of the testing frameworks do this). For this + it is imperative that all sources are compiled and linked in a single + call to the D compiler. This builder serves that purpose. + + + env.ProgramAllAtOnce('executable', ['mod_a.d, mod_b.d', 'mod_c.d']) + + + This command will compile the modules mod_a, mod_b, and mod_c in a + single compilation process without first creating object files for + the modules. Some of the D compilers will create executable.o others + will not. + + diff --git a/doc/generated/functions.gen b/doc/generated/functions.gen index f8cdba0..e55799c 100644 --- a/doc/generated/functions.gen +++ b/doc/generated/functions.gen @@ -1335,7 +1335,7 @@ env.Depends(bar, installed_lib) Returns a dictionary object containing the construction variables in the construction environment. If there are any arguments specified, -only the values of the specified construction variables +the values of the specified construction variables are returned as a string (if one argument) or as a list of strings. diff --git a/doc/generated/variables.gen b/doc/generated/variables.gen index 3f26933..7be9c63 100644 --- a/doc/generated/variables.gen +++ b/doc/generated/variables.gen @@ -874,35 +874,15 @@ depending on the specific C++ compiler being used. The D compiler to use. - - -The D compiler to use. - - - -The D compiler to use. - DCOM - The command line used to compile a D file to an object file. - Any options specified in the $DFLAGS construction variable - is included on this command line. - - - - The command line used to compile a D file to an object file. - Any options specified in the $DFLAGS construction variable - is included on this command line. - - - - The command line used to compile a D file to an object file. - Any options specified in the $DFLAGS construction variable - is included on this command line. +The command line used to compile a D file to an object file. +Any options specified in the $DFLAGS construction variable +is included on this command line. @@ -910,49 +890,25 @@ The D compiler to use. DDEBUG - List of debug tags to enable when compiling. - - - - List of debug tags to enable when compiling. - - - - List of debug tags to enable when compiling. +List of debug tags to enable when compiling. DDEBUGPREFIX - - DDEBUGPREFIX. - - - - DDEBUGPREFIX. - - - - DDEBUGPREFIX. - - + +DDEBUGPREFIX. + + DDEBUGSUFFIX - - DDEBUGSUFFIX. - - - - DDEBUGSUFFIX. - - - - DDEBUGSUFFIX. - - + +DDEBUGSUFFIX. + + DESCRIPTION @@ -980,98 +936,50 @@ section of an RPM DFILESUFFIX - - DFILESUFFIX. - - - - DFILESUFFIX. - - - - DFILESUFFIX. - - + +DFILESUFFIX. + + DFLAGPREFIX - - DFLAGPREFIX. - - - - DFLAGPREFIX. - - - - DFLAGPREFIX. - - + +DFLAGPREFIX. + + DFLAGS - General options that are passed to the D compiler. - - - - General options that are passed to the D compiler. - - - - General options that are passed to the D compiler. +General options that are passed to the D compiler. DFLAGSUFFIX - - DFLAGSUFFIX. - - - - DFLAGSUFFIX. - - - - DFLAGSUFFIX. - - + +DFLAGSUFFIX. + + DINCPREFIX - - DINCPREFIX. - - - - DINCPREFIX. - - - - DINCPREFIX. - - + +DINCPREFIX. + + DINCSUFFIX - - DLIBFLAGSUFFIX. - - - - DLIBFLAGSUFFIX. - - - - DLIBFLAGSUFFIX. - - + +DLIBFLAGSUFFIX. + + Dir @@ -1100,15 +1008,7 @@ into a list of Dir instances relative to the target being built. DLIB - Name of the lib tool to use for D codes. - - - - Name of the lib tool to use for D codes. - - - - Name of the lib tool to use for D codes. +Name of the lib tool to use for D codes. @@ -1116,127 +1016,63 @@ into a list of Dir instances relative to the target being built. DLIBCOM - The command line to use when creating libraries. - - - - The command line to use when creating libraries. - - - - The command line to use when creating libraries. +The command line to use when creating libraries. DLIBDIRPREFIX - - DLIBLINKPREFIX. - - - - DLIBLINKPREFIX. - - - - DLIBLINKPREFIX. - - + +DLIBLINKPREFIX. + + DLIBDIRSUFFIX - - DLIBLINKSUFFIX. - - - - DLIBLINKSUFFIX. - - - - DLIBLINKSUFFIX. - - + +DLIBLINKSUFFIX. + + DLIBFLAGPREFIX - - DLIBFLAGPREFIX. - - - - DLIBFLAGPREFIX. - - - - DLIBFLAGPREFIX. - - + +DLIBFLAGPREFIX. + + DLIBFLAGSUFFIX - - DLIBFLAGSUFFIX. - - - - DLIBFLAGSUFFIX. - - - - DLIBFLAGSUFFIX. - - + +DLIBFLAGSUFFIX. + + DLIBLINKPREFIX - - DLIBLINKPREFIX. - - - - DLIBLINKPREFIX. - - - - DLIBLINKPREFIX. - - + +DLIBLINKPREFIX. + + DLIBLINKSUFFIX - - DLIBLINKSUFFIX. - - - - DLIBLINKSUFFIX. - - - - DLIBLINKSUFFIX. - - + +DLIBLINKSUFFIX. + + DLINK - Name of the linker to use for linking systems including D sources. - - - - Name of the linker to use for linking systems including D sources. - - - - Name of the linker to use for linking systems including D sources. +Name of the linker to use for linking systems including D sources. @@ -1244,33 +1080,17 @@ into a list of Dir instances relative to the target being built. DLINKCOM - The command line to use when linking systems including D sources. - - - - The command line to use when linking systems including D sources. - - - - The command line to use when linking systems including D sources. +The command line to use when linking systems including D sources. DLINKFLAGPREFIX - - DLINKFLAGPREFIX. - - - - DLINKFLAGPREFIX. - - - - DLINKFLAGPREFIX. - - + +DLINKFLAGPREFIX. + + DLINKFLAGS @@ -1278,31 +1098,15 @@ into a list of Dir instances relative to the target being built. List of linker flags. - - -List of linker flags. - - - -List of linker flags. - DLINKFLAGSUFFIX - - DLINKFLAGSUFFIX. - - - - DLINKFLAGSUFFIX. - - - - DLINKFLAGSUFFIX. - - + +DLINKFLAGSUFFIX. + + DOCBOOK_DEFAULT_XSL_EPUB @@ -1507,39 +1311,31 @@ for saxon and saxon-xslt, respectively. List of paths to search for import modules. - - - List of paths to search for import modules. - - - - List of paths to search for import modules. - DRPATHPREFIX - - DRPATHPREFIX. - - + +DRPATHPREFIX. + + DRPATHSUFFIX - - DRPATHSUFFIX. - - + +DRPATHSUFFIX. + + DShLibSonameGenerator - - DShLibSonameGenerator. - - + +DShLibSonameGenerator. + + DSUFFIXES @@ -1558,50 +1354,26 @@ The default list is: DVERPREFIX - - DVERPREFIX. - - - - DVERPREFIX. - - - - DVERPREFIX. - - + +DVERPREFIX. + + DVERSIONS - List of version tags to enable when compiling. - - - - List of version tags to enable when compiling. - - - - List of version tags to enable when compiling. +List of version tags to enable when compiling. DVERSUFFIX - - DVERSUFFIX. - - - - DVERSUFFIX. - - - - DVERSUFFIX. - - + +DVERSUFFIX. + + DVIPDF @@ -6149,18 +5921,8 @@ to generate shared-library objects. SHDC - The name of the compiler to use when compiling D source - destined to be in a shared objects. - - - - The name of the compiler to use when compiling D source - destined to be in a shared objects. - - - - The name of the compiler to use when compiling D source - destined to be in a shared objects. +The name of the compiler to use when compiling D source +destined to be in a shared objects. @@ -6168,50 +5930,32 @@ to generate shared-library objects. SHDCOM - The command line to use when compiling code to be part of shared objects. - - - - The command line to use when compiling code to be part of shared objects. - - - - The command line to use when compiling code to be part of shared objects. +The command line to use when compiling code to be part of shared objects. SHDLIBVERSION - - SHDLIBVERSION. - - + +SHDLIBVERSION. + + SHDLIBVERSIONFLAGS - - SHDLIBVERSIONFLAGS. - - + +SHDLIBVERSIONFLAGS. + + SHDLINK - The linker to use when creating shared objects for code bases - include D sources. - - - - The linker to use when creating shared objects for code bases - include D sources. - - - - The linker to use when creating shared objects for code bases - include D sources. +The linker to use when creating shared objects for code bases +include D sources. @@ -6219,15 +5963,7 @@ to generate shared-library objects. SHDLINKCOM - The command line to use when generating shared objects. - - - - The command line to use when generating shared objects. - - - - The command line to use when generating shared objects. +The command line to use when generating shared objects. @@ -6235,15 +5971,7 @@ to generate shared-library objects. SHDLINKFLAGS - The list of flags to use when generating a shared object. - - - - The list of flags to use when generating a shared object. - - - - The list of flags to use when generating a shared object. +The list of flags to use when generating a shared object. diff --git a/src/engine/SCons/Tool/DCommon.xml b/src/engine/SCons/Tool/DCommon.xml index f42bea3..8c8c1b5 100644 --- a/src/engine/SCons/Tool/DCommon.xml +++ b/src/engine/SCons/Tool/DCommon.xml @@ -23,49 +23,339 @@ See its __doc__ string for a discussion of the format. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0/scons.xsd"> + + + +The D compiler to use. + + + + + + +The command line used to compile a D file to an object file. +Any options specified in the &cv-link-DFLAGS; construction variable +is included on this command line. + + + + + + +List of debug tags to enable when compiling. + + + + + + +DDEBUGPREFIX. + + + - - - - DRPATHPREFIX. - - - - - - - - DRPATHSUFFIX. - - - - - - - - - DShLibSonameGenerator. - - - - - - - - SHDLIBVERSION. - - - - - - - SHDLIBVERSIONFLAGS. - - - + + + +DDEBUGSUFFIX. + + + + + + +DFILESUFFIX. + + + + + + + +DFLAGPREFIX. + + + + + + + +General options that are passed to the D compiler. + + + + + + + +DFLAGSUFFIX. + + + + + + + +DLIBFLAGSUFFIX. + + + + + + + +DINCPREFIX. + + + + + + + +Name of the lib tool to use for D codes. + + + + + + + +The command line to use when creating libraries. + + + + + + + +DLIBLINKPREFIX. + + + + + + + +DLIBLINKSUFFIX. + + + + + + + +DLIBFLAGSUFFIX. + + + + + + + +DLIBFLAGPREFIX. + + + + + + + +DLIBLINKPREFIX. + + + + + + + +DLIBLINKSUFFIX. + + + + + + + +Name of the linker to use for linking systems including D sources. + + + + + + + +The command line to use when linking systems including D sources. + + + + + + + +List of linker flags. + + + + + + + +DLINKFLAGSUFFIX. + + + + + + + +DLINKFLAGPREFIX. + + + + + + + + List of paths to search for import modules. + + + + + + + +DRPATHPREFIX. + + + + + + + +DRPATHSUFFIX. + + + + + + + +DShLibSonameGenerator. + + + + + + + +DVERPREFIX. + + + + + + + +List of version tags to enable when compiling. + + + + + + + +DVERSUFFIX. + + + + + + + +The name of the compiler to use when compiling D source +destined to be in a shared objects. + + + + + + + +The command line to use when compiling code to be part of shared objects. + + + + + + + +SHDLIBVERSION. + + + + + + + +SHDLIBVERSIONFLAGS. + + + + + + + +The linker to use when creating shared objects for code bases +include D sources. + + + + + + + +The command line to use when generating shared objects. + + + + + + + +The list of flags to use when generating a shared object. + + + + + + + + + Builds an executable from D sources without first creating individual + objects for each file. + + + D sources can be compiled file-by-file as C and C++ source are, and + D is integrated into the &scons; Object and Program builders for + this model of build. D codes can though do whole source + meta-programming (some of the testing frameworks do this). For this + it is imperative that all sources are compiled and linked in a single + call to the D compiler. This builder serves that purpose. + + + env.ProgramAllAtOnce('executable', ['mod_a.d, mod_b.d', 'mod_c.d']) + + + This command will compile the modules mod_a, mod_b, and mod_c in a + single compilation process without first creating object files for + the modules. Some of the D compilers will create executable.o others + will not. + + + diff --git a/src/engine/SCons/Tool/dmd.xml b/src/engine/SCons/Tool/dmd.xml index 7e220dc..a3620ce 100644 --- a/src/engine/SCons/Tool/dmd.xml +++ b/src/engine/SCons/Tool/dmd.xml @@ -73,299 +73,4 @@ Sets construction variables for D language compiler DMD. - - - -The D compiler to use. - - - - - - - - The command line used to compile a D file to an object file. - Any options specified in the &cv-link-DFLAGS; construction variable - is included on this command line. - - - - - - - - List of debug tags to enable when compiling. - - - - - - - - General options that are passed to the D compiler. - - - - - - - - Name of the lib tool to use for D codes. - - - - - - - - The command line to use when creating libraries. - - - - - - - - Name of the linker to use for linking systems including D sources. - - - - - - - - The command line to use when linking systems including D sources. - - - - - - - -List of linker flags. - - - - - - - - List of paths to search for import modules. - - - - - - - - List of version tags to enable when compiling. - - - - - - - - The name of the compiler to use when compiling D source - destined to be in a shared objects. - - - - - - - - The command line to use when compiling code to be part of shared objects. - - - - - - - - The linker to use when creating shared objects for code bases - include D sources. - - - - - - - - The command line to use when generating shared objects. - - - - - - - - The list of flags to use when generating a shared object. - - - - - - - - DVERSUFFIX. - - - - - - - - DVERPREFIX. - - - - - - - - DLINKFLAGSUFFIX. - - - - - - - - DLINKFLAGPREFIX. - - - - - - - - DLIBLINKSUFFIX. - - - - - - - - DLIBLINKPREFIX. - - - - - - - - DLIBFLAGSUFFIX. - - - - - - - - DLIBFLAGPREFIX. - - - - - - - - DLIBLINKSUFFIX. - - - - - - - - DLIBLINKPREFIX. - - - - - - - - DLIBFLAGSUFFIX. - - - - - - - - - DINCPREFIX. - - - - - - - - DFLAGSUFFIX. - - - - - - - - DFLAGPREFIX. - - - - - - - - DFILESUFFIX. - - - - - - - - DDEBUGPREFIX. - - - - - - - - DDEBUGSUFFIX. - - - - - - - - Builds an executable from D sources without first creating individual - objects for each file. - - - D sources can be compiled file-by-file as C and C++ source are, and - D is integrated into the &scons; Object and Program builders for - this model of build. D codes can though do whole source - meta-programming (some of the testing frameworks do this). For this - it is imperative that all sources are compiled and linked in a single call of - the D compiler. This builder serves that purpose. - - - env.ProgramAllAtOnce('executable', ['mod_a.d, mod_b.d', 'mod_c.d']) - - - This command will compile the modules mod_a, mod_b, and mod_c in a - single compilation process without first creating object files for - the modules. Some of the D compilers will create executable.o others - will not. - - - - diff --git a/src/engine/SCons/Tool/gdc.xml b/src/engine/SCons/Tool/gdc.xml index d44489e..4c6c2f8 100644 --- a/src/engine/SCons/Tool/gdc.xml +++ b/src/engine/SCons/Tool/gdc.xml @@ -73,299 +73,4 @@ Sets construction variables for the D language compiler GDC. - - - -The D compiler to use. - - - - - - - - The command line used to compile a D file to an object file. - Any options specified in the &cv-link-DFLAGS; construction variable - is included on this command line. - - - - - - - - List of debug tags to enable when compiling. - - - - - - - - General options that are passed to the D compiler. - - - - - - - - Name of the lib tool to use for D codes. - - - - - - - - The command line to use when creating libraries. - - - - - - - - Name of the linker to use for linking systems including D sources. - - - - - - - - The command line to use when linking systems including D sources. - - - - - - - -List of linker flags. - - - - - - - - List of paths to search for import modules. - - - - - - - - List of version tags to enable when compiling. - - - - - - - - The name of the compiler to use when compiling D source - destined to be in a shared objects. - - - - - - - - The command line to use when compiling code to be part of shared objects. - - - - - - - - The linker to use when creating shared objects for code bases - include D sources. - - - - - - - - The command line to use when generating shared objects. - - - - - - - - The list of flags to use when generating a shared object. - - - - - - - - DVERSUFFIX. - - - - - - - - DVERPREFIX. - - - - - - - - DLINKFLAGSUFFIX. - - - - - - - - DLINKFLAGPREFIX. - - - - - - - - DLIBLINKSUFFIX. - - - - - - - - DLIBLINKPREFIX. - - - - - - - - DLIBFLAGSUFFIX. - - - - - - - - DLIBFLAGPREFIX. - - - - - - - - DLIBLINKSUFFIX. - - - - - - - - DLIBLINKPREFIX. - - - - - - - - DLIBFLAGSUFFIX. - - - - - - - - - DINCPREFIX. - - - - - - - - DFLAGSUFFIX. - - - - - - - - DFLAGPREFIX. - - - - - - - - DFILESUFFIX. - - - - - - - - DDEBUGPREFIX. - - - - - - - - DDEBUGSUFFIX. - - - - - - - - Builds an executable from D sources without first creating individual - objects for each file. - - - D sources can be compiled file-by-file as C and C++ source are, and - D is integrated into the &scons; Object and Program builders for - this model of build. D codes can though do whole source - meta-programming (some of the testing frameworks do this). For this - it is imperative that all sources are compiled and linked in a single call of - the D compiler. This builder serves that purpose. - - - env.ProgramAllAtOnce('executable', ['mod_a.d, mod_b.d', 'mod_c.d']) - - - This command will compile the modules mod_a, mod_b, and mod_c in a - single compilation process without first creating object files for - the modules. Some of the D compilers will create executable.o others - will not. - - - - diff --git a/src/engine/SCons/Tool/ldc.xml b/src/engine/SCons/Tool/ldc.xml index 495b8bc..6a80436 100644 --- a/src/engine/SCons/Tool/ldc.xml +++ b/src/engine/SCons/Tool/ldc.xml @@ -73,299 +73,4 @@ Sets construction variables for the D language compiler LDC2. - - - -The D compiler to use. - - - - - - - - The command line used to compile a D file to an object file. - Any options specified in the &cv-link-DFLAGS; construction variable - is included on this command line. - - - - - - - - List of debug tags to enable when compiling. - - - - - - - - General options that are passed to the D compiler. - - - - - - - - Name of the lib tool to use for D codes. - - - - - - - - The command line to use when creating libraries. - - - - - - - - Name of the linker to use for linking systems including D sources. - - - - - - - - The command line to use when linking systems including D sources. - - - - - - - -List of linker flags. - - - - - - - - List of paths to search for import modules. - - - - - - - - List of version tags to enable when compiling. - - - - - - - - The name of the compiler to use when compiling D source - destined to be in a shared objects. - - - - - - - - The command line to use when compiling code to be part of shared objects. - - - - - - - - The linker to use when creating shared objects for code bases - include D sources. - - - - - - - - The command line to use when generating shared objects. - - - - - - - - The list of flags to use when generating a shared object. - - - - - - - - DVERSUFFIX. - - - - - - - - DVERPREFIX. - - - - - - - - DLINKFLAGSUFFIX. - - - - - - - - DLINKFLAGPREFIX. - - - - - - - - DLIBLINKSUFFIX. - - - - - - - - DLIBLINKPREFIX. - - - - - - - - DLIBFLAGSUFFIX. - - - - - - - - DLIBFLAGPREFIX. - - - - - - - - DLIBLINKSUFFIX. - - - - - - - - DLIBLINKPREFIX. - - - - - - - - DLIBFLAGSUFFIX. - - - - - - - - - DINCPREFIX. - - - - - - - - DFLAGSUFFIX. - - - - - - - - DFLAGPREFIX. - - - - - - - - DFILESUFFIX. - - - - - - - - DDEBUGPREFIX. - - - - - - - - DDEBUGSUFFIX. - - - - - - - - Builds an executable from D sources without first creating individual - objects for each file. - - - D sources can be compiled file-by-file as C and C++ source are, and - D is integrated into the &scons; Object and Program builders for - this model of build. D codes can though do whole source - meta-programming (some of the testing frameworks do this). For this - it is imperative that all sources are compiled and linked in a single call of - the D compiler. This builder serves that purpose. - - - env.ProgramAllAtOnce('executable', ['mod_a.d, mod_b.d', 'mod_c.d']) - - - This command will compile the modules mod_a, mod_b, and mod_c in a - single compilation process without first creating object files for - the modules. Some of the D compilers will create executable.o others - will not. - - - - -- cgit v0.12 From 391f9077d9fc3880a3eef667e06453c4120ccb3e Mon Sep 17 00:00:00 2001 From: William Deegan Date: Wed, 28 Aug 2019 15:50:03 -0700 Subject: [ci skip] update GitHub issue templates to have separate bug and feature request per new github defaults --- .github/ISSUE_TEMPLATE.md | 13 ------------- .github/ISSUE_TEMPLATE/bug_report.md | 13 +++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 13 +++++++++++++ 3 files changed, 26 insertions(+), 13 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index eeeb6bc..0000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,13 +0,0 @@ -## Please bring your issue to the SCons users mailing list before filing an issue here -## See: https://scons.org/bugs.html - -## If the issue is confirmed to be a bug please include the following information - -* Link to SCons Users thread discussing your issue. -* Version of SCons -* Version of Python -* Which python distribution if applicable (python.org, cygwin, anaconda, macports, brew,etc) -* How you installed SCons -* What Platform are you on? (Linux/Windows and which version) -* How to reproduce your issue? Please include a small self contained reproducer. Likely a SConstruct should do for most issues. -* How you invoke scons (The command line you're using "scons --flags some_arguments") diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..eeeb6bc --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,13 @@ +## Please bring your issue to the SCons users mailing list before filing an issue here +## See: https://scons.org/bugs.html + +## If the issue is confirmed to be a bug please include the following information + +* Link to SCons Users thread discussing your issue. +* Version of SCons +* Version of Python +* Which python distribution if applicable (python.org, cygwin, anaconda, macports, brew,etc) +* How you installed SCons +* What Platform are you on? (Linux/Windows and which version) +* How to reproduce your issue? Please include a small self contained reproducer. Likely a SConstruct should do for most issues. +* How you invoke scons (The command line you're using "scons --flags some_arguments") diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..eeeb6bc --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,13 @@ +## Please bring your issue to the SCons users mailing list before filing an issue here +## See: https://scons.org/bugs.html + +## If the issue is confirmed to be a bug please include the following information + +* Link to SCons Users thread discussing your issue. +* Version of SCons +* Version of Python +* Which python distribution if applicable (python.org, cygwin, anaconda, macports, brew,etc) +* How you installed SCons +* What Platform are you on? (Linux/Windows and which version) +* How to reproduce your issue? Please include a small self contained reproducer. Likely a SConstruct should do for most issues. +* How you invoke scons (The command line you're using "scons --flags some_arguments") -- cgit v0.12 From f6190b9195cca0eecc2d66d2acd0ae3170f3b192 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Wed, 28 Aug 2019 15:53:27 -0700 Subject: Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 51 +++++++++++++++++++++++-------- .github/ISSUE_TEMPLATE/feature_request.md | 33 ++++++++++++-------- 2 files changed, 58 insertions(+), 26 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index eeeb6bc..dd84ea7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,13 +1,38 @@ -## Please bring your issue to the SCons users mailing list before filing an issue here -## See: https://scons.org/bugs.html - -## If the issue is confirmed to be a bug please include the following information - -* Link to SCons Users thread discussing your issue. -* Version of SCons -* Version of Python -* Which python distribution if applicable (python.org, cygwin, anaconda, macports, brew,etc) -* How you installed SCons -* What Platform are you on? (Linux/Windows and which version) -* How to reproduce your issue? Please include a small self contained reproducer. Likely a SConstruct should do for most issues. -* How you invoke scons (The command line you're using "scons --flags some_arguments") +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index eeeb6bc..bbcbbe7 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,13 +1,20 @@ -## Please bring your issue to the SCons users mailing list before filing an issue here -## See: https://scons.org/bugs.html - -## If the issue is confirmed to be a bug please include the following information - -* Link to SCons Users thread discussing your issue. -* Version of SCons -* Version of Python -* Which python distribution if applicable (python.org, cygwin, anaconda, macports, brew,etc) -* How you installed SCons -* What Platform are you on? (Linux/Windows and which version) -* How to reproduce your issue? Please include a small self contained reproducer. Likely a SConstruct should do for most issues. -* How you invoke scons (The command line you're using "scons --flags some_arguments") +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. -- cgit v0.12 From 346a83a8c24b11e64c2ca51c04f6b55677462c5c Mon Sep 17 00:00:00 2001 From: William Deegan Date: Wed, 28 Aug 2019 15:56:11 -0700 Subject: [ci skip] update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 51 ++++++++----------------------- .github/ISSUE_TEMPLATE/feature_request.md | 33 ++++++++------------ 2 files changed, 26 insertions(+), 58 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index dd84ea7..eeeb6bc 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,38 +1,13 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. +## Please bring your issue to the SCons users mailing list before filing an issue here +## See: https://scons.org/bugs.html + +## If the issue is confirmed to be a bug please include the following information + +* Link to SCons Users thread discussing your issue. +* Version of SCons +* Version of Python +* Which python distribution if applicable (python.org, cygwin, anaconda, macports, brew,etc) +* How you installed SCons +* What Platform are you on? (Linux/Windows and which version) +* How to reproduce your issue? Please include a small self contained reproducer. Likely a SConstruct should do for most issues. +* How you invoke scons (The command line you're using "scons --flags some_arguments") diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bbcbbe7..eeeb6bc 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,20 +1,13 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. +## Please bring your issue to the SCons users mailing list before filing an issue here +## See: https://scons.org/bugs.html + +## If the issue is confirmed to be a bug please include the following information + +* Link to SCons Users thread discussing your issue. +* Version of SCons +* Version of Python +* Which python distribution if applicable (python.org, cygwin, anaconda, macports, brew,etc) +* How you installed SCons +* What Platform are you on? (Linux/Windows and which version) +* How to reproduce your issue? Please include a small self contained reproducer. Likely a SConstruct should do for most issues. +* How you invoke scons (The command line you're using "scons --flags some_arguments") -- cgit v0.12 From 84843df640e34f83ebea25be851204f400a0d9ec Mon Sep 17 00:00:00 2001 From: William Deegan Date: Wed, 28 Aug 2019 16:00:21 -0700 Subject: Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 14 +++++++++++++- .github/ISSUE_TEMPLATE/feature_request.md | 21 +++++++++++++++++++-- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index eeeb6bc..e249a70 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,8 +1,20 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + ## Please bring your issue to the SCons users mailing list before filing an issue here ## See: https://scons.org/bugs.html -## If the issue is confirmed to be a bug please include the following information +**Describe the bug** +A clear and concise description of what the bug is. + +**Required information** * Link to SCons Users thread discussing your issue. * Version of SCons * Version of Python diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index eeeb6bc..14f8e7e 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,8 +1,20 @@ -## Please bring your issue to the SCons users mailing list before filing an issue here +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +## Please bring your feature request to the SCons users mailing list before filing an issue here ## See: https://scons.org/bugs.html -## If the issue is confirmed to be a bug please include the following information +**Describe the Feature** +A clear and concise description of what the feature request is. + +**Required information** * Link to SCons Users thread discussing your issue. * Version of SCons * Version of Python @@ -11,3 +23,8 @@ * What Platform are you on? (Linux/Windows and which version) * How to reproduce your issue? Please include a small self contained reproducer. Likely a SConstruct should do for most issues. * How you invoke scons (The command line you're using "scons --flags some_arguments") + + + +**Additional context** +Add any other context or screenshots about the feature request here. -- cgit v0.12 From 49212c0d8dc8db6657735036028948bf3ab9ede0 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Fri, 30 Aug 2019 07:59:29 -0600 Subject: Use "in" in preference to string find method In places where only the found/not found status is needed, use the membership operator (in) for checks instead - makes for easier reading and is considered faster for shorter strings. Signed-off-by: Mats Wichmann --- src/CHANGES.txt | 4 ++++ src/engine/SCons/Environment.py | 4 ++-- src/engine/SCons/Tool/msvs.py | 6 +++--- src/engine/SCons/Tool/swig.py | 2 +- src/test_setup.py | 9 ++++----- test/Configure/option--config.py | 2 +- test/Java/RMIC.py | 14 +++++++------- test/QT/installed.py | 16 ++++++++-------- test/Repository/RMIC.py | 6 +++--- test/Win32/mingw.py | 16 ++++++++-------- 10 files changed, 41 insertions(+), 38 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 6450da5..87f4e28 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -12,6 +12,10 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER across threads. Results in ~13% improvement for parallel builds (-j# > 1) with many shared nodes. + From Mats Wichmann + - Replace instances of string find method with "in" checks where + the index from find() was not used. + RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 2e1e742..08104c5 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -790,7 +790,7 @@ class SubstitutionEnvironment(object): elif arg == '-mwindows': dict['LINKFLAGS'].append(arg) elif arg[:5] == '-std=': - if arg[5:].find('++')!=-1: + if '++' in arg[5:]: key='CXXFLAGS' else: key='CFLAGS' @@ -2343,7 +2343,7 @@ class OverrideEnvironment(Base): return attr.clone(self) else: return attr - + def __setattr__(self, name, value): setattr(self.__dict__['__subject'], name, value) diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py index d27294b..7dca9e1 100644 --- a/src/engine/SCons/Tool/msvs.py +++ b/src/engine/SCons/Tool/msvs.py @@ -652,7 +652,7 @@ class _GenerateV6DSP(_DSPGenerator): for base in ("BASE ",""): self.file.write('# PROP %sUse_MFC 0\n' '# PROP %sUse_Debug_Libraries ' % (base, base)) - if kind.lower().find('debug') < 0: + if 'debug' not in kind.lower(): self.file.write('0\n') else: self.file.write('1\n') @@ -731,7 +731,7 @@ class _GenerateV6DSP(_DSPGenerator): line = dspfile.readline() # skip until marker while line: - if line.find("# End Project") > -1: + if "# End Project" in line: break line = dspfile.readline() @@ -1049,7 +1049,7 @@ class _GenerateV7DSP(_DSPGenerator, _GenerateV7User): line = dspfile.readline() # skip until marker while line: - if line.find(' -Additionally, there is a "tool" named -default -which configures the -environment with a default set of tools for the current platform. - -On posix and cygwin platforms -the GNU tools (e.g. gcc) are preferred by SCons, -on Windows the Microsoft tools (e.g. msvc) -followed by MinGW are preferred by SCons, -and in OS/2 the IBM tools (e.g. icc) are preferred by SCons. - Builder Methods diff --git a/src/engine/SCons/Tool/cc.xml b/src/engine/SCons/Tool/cc.xml index 9330436..7ce8b36 100644 --- a/src/engine/SCons/Tool/cc.xml +++ b/src/engine/SCons/Tool/cc.xml @@ -26,7 +26,7 @@ See its __doc__ string for a discussion of the format. -Sets construction variables for generic POSIX C copmilers. +Sets construction variables for generic POSIX C compilers. diff --git a/src/engine/SCons/Tool/default.xml b/src/engine/SCons/Tool/default.xml index 38eb122..fad32ec 100644 --- a/src/engine/SCons/Tool/default.xml +++ b/src/engine/SCons/Tool/default.xml @@ -26,10 +26,89 @@ See its __doc__ string for a discussion of the format. -Sets variables by calling a default list of Tool modules -for the platform on which SCons is running. +Sets constuction variables for a default list of Tool modules. +Include default +in the tools list to retain +the tools that would have been available if no +tools parameter were supplied +to an Environment +or Clone call. + + +The list of available tools from default is dependent both on +the platform and what software is installed on the platform. +Some tools will not initialize if an underlying command is +not found, and some tools are selected from a list of choices +on a first-found basis. The finished tool list can be +examined by inspecting the TOOLS &consvar; +variable in the &consenv;. + + + +On all platforms, all tools from the following list +are selected whose respective conditions are met: +filesystem, wix, lex, yacc, rpcgen, swig, +jar, javac, javah, rmic, dvipdf, dvips, gs, +tex, latex, pdflatex, pdftex, tar, zip, textfile. + + + +On Linux systems, the default tools list selects +(first-found) a C compiler from +gcc, intelc, icc, cc; +a C++ compiler from +g++, intelc, icc, cxx; +an assembler from +gas, nasm, masm; +a linker from +gnulink, ilink; +a Fortran compiler from +gfortran, g77, ifort, ifl, f95, f90, f77; +and a static archiver 'ar'. +It also selects all found from the list +m4, rpm. + + + +On Windows systems, the default tools list selects +(first-found) a C compiler from +msvc, mingw, gcc, intelc, icl, icc, cc, bcc32; +a C++ compiler from +msvc, intelc, icc, g++, cxx, bcc32; +an assembler from +masm, nasm, gas, 386asm; +a linker from +mslink, gnulink, ilink, linkloc, ilink32; +a Fortran compiler from +gfortran, g77, ifl, cvf, f95, f90, fortran; +and a static archiver from +mslib, ar, tlib; +It also selects all found from the list +msvs, midl. + + + +On MacOS systems, the default tools list selects +(first-found) a C compiler from +gcc, cc; +a C++ compiler from +g++, cxx; +an assembler 'as'; +a linker from +applelink, gnulink; +a Fortran compiler from +gfortran, f95, f90, g77; +and a static archiver 'ar'. +It also selects all found from the list +m4, rpm. + + + +Default lists for other platforms can be found by +examining the source code for &scons;. + + - diff --git a/src/engine/SCons/Tool/link.xml b/src/engine/SCons/Tool/link.xml index 2f913fe..47d78df 100644 --- a/src/engine/SCons/Tool/link.xml +++ b/src/engine/SCons/Tool/link.xml @@ -26,7 +26,9 @@ See its __doc__ string for a discussion of the format. -Sets construction variables for generic POSIX linkers. +Sets construction variables for generic POSIX linkers. This is +a "smart" linker tool which selects a compiler to complete the linking +based on the type of source file. diff --git a/src/engine/SCons/Tool/midl.xml b/src/engine/SCons/Tool/midl.xml index efd83cc..63cf527 100644 --- a/src/engine/SCons/Tool/midl.xml +++ b/src/engine/SCons/Tool/midl.xml @@ -86,7 +86,7 @@ The command line used to pass files to the Microsoft IDL compiler. The string displayed when -the Microsoft IDL copmiler is called. +the Microsoft IDL compiler is called. If this is not set, then &cv-link-MIDLCOM; (the command line) is displayed. -- cgit v0.12 From 7cb3823b55c033b6b3a6bba12c4426a8535b496d Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Tue, 13 Aug 2019 12:40:00 -0600 Subject: [PR #3245] fix sider complaint about misspelling [ci skip] Signed-off-by: Mats Wichmann --- doc/generated/tools.gen | 2 +- src/engine/SCons/Tool/default.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/generated/tools.gen b/doc/generated/tools.gen index 6ac0b75..ec0fdbe 100644 --- a/doc/generated/tools.gen +++ b/doc/generated/tools.gen @@ -139,7 +139,7 @@ Set construction variables for cygwin linker/loader. default -Sets constuction variables for a default list of Tool modules. +Sets construction variables for a default list of Tool modules. Include default in the tools list to retain the tools that would have been available if no diff --git a/src/engine/SCons/Tool/default.xml b/src/engine/SCons/Tool/default.xml index fad32ec..fc39f6f 100644 --- a/src/engine/SCons/Tool/default.xml +++ b/src/engine/SCons/Tool/default.xml @@ -26,7 +26,7 @@ See its __doc__ string for a discussion of the format. -Sets constuction variables for a default list of Tool modules. +Sets &consvars; for a default list of Tool modules. Include default in the tools list to retain the tools that would have been available if no -- cgit v0.12 From 3b4c6b9dc3bd9ee8479751ecb188010084c39977 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sun, 18 Aug 2019 08:16:20 -0600 Subject: [PR #3425] provide path to src for tool defaults [ci skip] addresses review comment Signed-off-by: Mats Wichmann --- doc/generated/tools.gen | 4 +++- src/engine/SCons/Tool/default.xml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/generated/tools.gen b/doc/generated/tools.gen index ec0fdbe..bb2b71f 100644 --- a/doc/generated/tools.gen +++ b/doc/generated/tools.gen @@ -219,7 +219,9 @@ m4, rpm. Default lists for other platforms can be found by -examining the source code for scons. +examining the scons +source code (see +SCons/Tool/__init__.py). diff --git a/src/engine/SCons/Tool/default.xml b/src/engine/SCons/Tool/default.xml index fc39f6f..84c9bd8 100644 --- a/src/engine/SCons/Tool/default.xml +++ b/src/engine/SCons/Tool/default.xml @@ -106,7 +106,9 @@ m4, rpm. Default lists for other platforms can be found by -examining the source code for &scons;. +examining the &scons; +source code (see +SCons/Tool/__init__.py). -- cgit v0.12 From bbbedc60fea8b4c0cac6905aea2737d40a3988f0 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Fri, 23 Aug 2019 07:56:49 -0600 Subject: [PR #3425] further tweak "default" tool wording [ci skip] Signed-off-by: Mats Wichmann --- doc/generated/tools.gen | 26 +++++++++++++------------- src/engine/SCons/Tool/default.xml | 26 +++++++++++++------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/doc/generated/tools.gen b/doc/generated/tools.gen index bb2b71f..f542118 100644 --- a/doc/generated/tools.gen +++ b/doc/generated/tools.gen @@ -140,22 +140,22 @@ Set construction variables for cygwin linker/loader. Sets construction variables for a default list of Tool modules. -Include default -in the tools list to retain -the tools that would have been available if no -tools parameter were supplied -to an Environment -or Clone call. +Use default +in the tools list to retain the original defaults, +since the tools parameter +is treated as a literal statement of the tools +to be made available in that construction environment, not an addition. -The list of available tools from default is dependent both on -the platform and what software is installed on the platform. +The list of tools selected by default is not static, +but is dependent both on +the platform and on the software installed on the platform. Some tools will not initialize if an underlying command is not found, and some tools are selected from a list of choices on a first-found basis. The finished tool list can be examined by inspecting the TOOLS construction variable -variable in the construction environment. +in the construction environment. @@ -168,7 +168,7 @@ tex, latex, pdflatex, pdftex, tar, zip, textfile. On Linux systems, the default tools list selects -(first-found) a C compiler from +(first-found): a C compiler from gcc, intelc, icc, cc; a C++ compiler from g++, intelc, icc, cxx; @@ -185,7 +185,7 @@ m4, rpm. On Windows systems, the default tools list selects -(first-found) a C compiler from +(first-found): a C compiler from msvc, mingw, gcc, intelc, icl, icc, cc, bcc32; a C++ compiler from msvc, intelc, icc, g++, cxx, bcc32; @@ -203,7 +203,7 @@ msvs, midl. On MacOS systems, the default tools list selects -(first-found) a C compiler from +(first-found): a C compiler from gcc, cc; a C++ compiler from g++, cxx; @@ -212,7 +212,7 @@ a linker from applelink, gnulink; a Fortran compiler from gfortran, f95, f90, g77; -and a static archiver 'ar'. +and a static archiver ar. It also selects all found from the list m4, rpm. diff --git a/src/engine/SCons/Tool/default.xml b/src/engine/SCons/Tool/default.xml index 84c9bd8..4b862fb 100644 --- a/src/engine/SCons/Tool/default.xml +++ b/src/engine/SCons/Tool/default.xml @@ -27,22 +27,22 @@ See its __doc__ string for a discussion of the format. Sets &consvars; for a default list of Tool modules. -Include default -in the tools list to retain -the tools that would have been available if no -tools parameter were supplied -to an Environment -or Clone call. +Use default +in the tools list to retain the original defaults, +since the tools parameter +is treated as a literal statement of the tools +to be made available in that &consenv;, not an addition. -The list of available tools from default is dependent both on -the platform and what software is installed on the platform. +The list of tools selected by default is not static, +but is dependent both on +the platform and on the software installed on the platform. Some tools will not initialize if an underlying command is not found, and some tools are selected from a list of choices on a first-found basis. The finished tool list can be examined by inspecting the TOOLS &consvar; -variable in the &consenv;. +in the &consenv;. @@ -55,7 +55,7 @@ tex, latex, pdflatex, pdftex, tar, zip, textfile. On Linux systems, the default tools list selects -(first-found) a C compiler from +(first-found): a C compiler from gcc, intelc, icc, cc; a C++ compiler from g++, intelc, icc, cxx; @@ -72,7 +72,7 @@ m4, rpm. On Windows systems, the default tools list selects -(first-found) a C compiler from +(first-found): a C compiler from msvc, mingw, gcc, intelc, icl, icc, cc, bcc32; a C++ compiler from msvc, intelc, icc, g++, cxx, bcc32; @@ -90,7 +90,7 @@ msvs, midl. On MacOS systems, the default tools list selects -(first-found) a C compiler from +(first-found): a C compiler from gcc, cc; a C++ compiler from g++, cxx; @@ -99,7 +99,7 @@ a linker from applelink, gnulink; a Fortran compiler from gfortran, f95, f90, g77; -and a static archiver 'ar'. +and a static archiver ar. It also selects all found from the list m4, rpm. -- cgit v0.12 From 73f79f6f9fa6e49d946e5d6e25fec931efcfd0f5 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sat, 7 Sep 2019 13:18:32 -0600 Subject: [#3425] review comment: pluralize source file Signed-off-by: Mats Wichmann --- doc/generated/tools.gen | 2 +- src/engine/SCons/Tool/link.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/generated/tools.gen b/doc/generated/tools.gen index f542118..0d30f6f 100644 --- a/doc/generated/tools.gen +++ b/doc/generated/tools.gen @@ -711,7 +711,7 @@ Sets construction variables for the Sets construction variables for generic POSIX linkers. This is a "smart" linker tool which selects a compiler to complete the linking -based on the type of source file. +based on the types of source files. Sets: &cv-link-LDMODULE;, &cv-link-LDMODULECOM;, &cv-link-LDMODULEFLAGS;, &cv-link-LDMODULENOVERSIONSYMLINKS;, &cv-link-LDMODULEPREFIX;, &cv-link-LDMODULESUFFIX;, &cv-link-LDMODULEVERSION;, &cv-link-LDMODULEVERSIONFLAGS;, &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;, &cv-link-SHLIBSUFFIX;, &cv-link-SHLINK;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-__LDMODULEVERSIONFLAGS;, &cv-link-__SHLIBVERSIONFLAGS;.Uses: &cv-link-LDMODULECOMSTR;, &cv-link-LINKCOMSTR;, &cv-link-SHLINKCOMSTR;. diff --git a/src/engine/SCons/Tool/link.xml b/src/engine/SCons/Tool/link.xml index 47d78df..75b2ed8 100644 --- a/src/engine/SCons/Tool/link.xml +++ b/src/engine/SCons/Tool/link.xml @@ -28,7 +28,7 @@ See its __doc__ string for a discussion of the format. Sets construction variables for generic POSIX linkers. This is a "smart" linker tool which selects a compiler to complete the linking -based on the type of source file. +based on the types of source files. -- cgit v0.12 From 709bbe03fc4ba1cd12d6f51c79a2bc06b7f790f3 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Thu, 29 Aug 2019 11:43:01 -0600 Subject: CmdStringHolder should not fail in Subst Pass 1: test case showing the failure. This is WIP - need to add the fix, but want a CI build to show the fail. Closes issues #3248 Signed-off-by: Mats Wichmann --- test/Subst/bug3428.py | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 test/Subst/bug3428.py diff --git a/test/Subst/bug3428.py b/test/Subst/bug3428.py new file mode 100644 index 0000000..00587e6 --- /dev/null +++ b/test/Subst/bug3428.py @@ -0,0 +1,55 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Verify that CmdStringHolder doesn't trip in Subst on doing +a string-only operation that does not work on UserString class. +Issue: https://github.com/SCons/scons/issues/3428 +""" + +import TestSCons + +test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) + + +test.write('SConstruct', """\ +env = Environment() +env.Append(LIBPATH=["path1/sub1","path1/sub2"]) +lst = env.Flatten(env.subst_list("$LIBPATH")) +for i in lst: + env.Dir(i) +""") + +test.run(status=0) + + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: -- cgit v0.12 From 581a6912938f3143b2c31dcb78ecc9928da124df Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sun, 8 Sep 2019 06:17:29 -0600 Subject: [PR #3434] apply subst fix from #3428 Signed-off-by: Mats Wichmann --- src/CHANGES.txt | 1 + src/engine/SCons/Subst.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 87f4e28..e3d057e 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -15,6 +15,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER From Mats Wichmann - Replace instances of string find method with "in" checks where the index from find() was not used. + - CmdStringHolder fix from issue #3428 RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 diff --git a/src/engine/SCons/Subst.py b/src/engine/SCons/Subst.py index 6f62198..2de64c5 100644 --- a/src/engine/SCons/Subst.py +++ b/src/engine/SCons/Subst.py @@ -409,7 +409,7 @@ def scons_subst(strSubst, env, mode=SUBST_RAW, target=None, source=None, gvars={ handles separating command lines into lists of arguments, so see that function if that's what you're looking for. """ - if isinstance(strSubst, str) and strSubst.find('$') < 0: + if (isinstance(strSubst, str) and '$' not in strSubst) or isinstance(strSubst, CmdStringHolder): return strSubst class StringSubber(object): -- cgit v0.12 From 4cad178b1b9f0cfef7fca3dbbc48c69052532b95 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sun, 8 Sep 2019 10:03:20 -0600 Subject: [fix #2444) update env.Whereis docu [ci skip] Apply the patch in the issue, and further tweak the wording. Signed-off-by: Mats Wichmann --- src/engine/SCons/Environment.xml | 53 ++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/src/engine/SCons/Environment.xml b/src/engine/SCons/Environment.xml index 5137bad..f222620 100644 --- a/src/engine/SCons/Environment.xml +++ b/src/engine/SCons/Environment.xml @@ -3650,30 +3650,51 @@ SConscript(dirs='doc', variant_dir='build/doc', duplicate=0) Searches for the specified executable program, returning the full path name to the program -if it is found, -and returning None if not. -Searches the specified -path, -the value of the calling environment's PATH -(env['ENV']['PATH']), -or the user's current external PATH -(os.environ['PATH']) -by default. +if it is found, else None. +Searches the value of the +path keyword argument, +or if None (the default) +the value of the calling environment's PATH +(env['ENV']['PATH']). +If path is None and +the env['ENV']['PATH'] key does not exist, +the user's current external PATH +(os.environ['PATH']) is used as fallback. + + On Windows systems, searches for executable -programs with any of the file extensions -listed in the specified -pathext, -the calling environment's PATHEXT -(env['ENV']['PATHEXT']) -or the user's current PATHEXT +programs with any of the file extensions listed in the +pathext keyword argument, +or if None (the default) +the calling environment's PATHEXT +(env['ENV']['PATHEXT']). +The user's current external PATHEXT (os.environ['PATHEXT']) -by default. +is used as a fallback if pathext is +None +and the key env['ENV']['PATHEXT'] +does not exist. + + Will not select any path name or names in the specified reject list, if any. + + +If you would prefer to search +the user's current external PATH +(os.environ['PATH']) +by default, +consider using the function SCons.Util.WhereIs instead. +Note that SCons.Util.WhereIs +does not expand environment variables automatically +(no implicit env.subst for its arguments). + + + -- cgit v0.12 From a04eb12f7a47992d1e352b3126479ef9a3f28eee Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sun, 1 Sep 2019 13:30:53 -0600 Subject: Builder and Variable Subst doc updates [ci skip] Work on Builder Methods and Variable Substitution man sections - some wording tweaks, do some formatting markup a little more consistently, etc. Tweak the wording for the Command builder, a description shared between manpage and userguide. Closes #3030: Environment.xml had many references to detail sections elsewhere, like "see XXX section below," which don't work well - this xml is generated into both the manpage and the user guide, and the locality of saying "below" is incorrect for the latter since those sections are only in the manpage. Essentially these are changed to say "see the manpage section XXX". Adding clickable links is of course also possible, but I recall there was some objection to cross-document links, so I didn't do that. Signed-off-by: Mats Wichmann --- doc/man/scons.xml | 362 +++++++++++++++++++++++---------------- src/engine/SCons/Environment.xml | 96 ++++++----- 2 files changed, 267 insertions(+), 191 deletions(-) diff --git a/doc/man/scons.xml b/doc/man/scons.xml index faec455..c1773c7 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -1921,7 +1921,7 @@ These warnings are enabled by default. feature not working when scons -is run with the python +is run with the Python option or from optimized Python (.pyo) modules. @@ -2048,7 +2048,7 @@ env['BAR'] = 'bar' As a convenience, construction variables may also be set or modified by the -parse_flags +parse_flags keyword argument, which applies the &f-link-env-MergeFlags; method (described below) to the argument value @@ -2228,7 +2228,7 @@ def exists(env): return True # in SConstruct: -env = Environment(tools = ['default', ('my_tool', {'arg1': 'abc'})], +env = Environment(tools=['default', ('my_tool', {'arg1': 'abc'})], toolpath=['tools']) @@ -2247,7 +2247,7 @@ With a nested tool name the dot represents a directory seperator # namespaced builder -env = Environment(ENV = os.environ, tools = ['SubDir1.SubDir2.SomeTool']) +env = Environment(ENV=os.environ, tools=['SubDir1.SubDir2.SomeTool']) env.SomeTool(targets, sources) # Search Paths @@ -2293,75 +2293,104 @@ env.SomeTool(targets, sources) Builder Methods -Build rules are specified by calling a construction -environment's builder methods. -The arguments to the builder methods are -target -(a list of targets to be built, -usually file names) +You tell scons what to build +by calling Builders, functions which know to take a +particular action when given files of a particular type +to produce a particular result type. scons +defines a number of builders, and you can also write your own. +Builders are attached to a &consenv; as methods, +and the available builder methods are listed as +key-value pairs in the +BUILDERS attribute of the &consenv;. +The available builders can be displayed like this +for debugging purposes: + + + +print("Builders:", list(env['BUILDERS'])) + + + +Builder methods always take two arguments: +target +(a target or a list of targets to be built) and -source -(a list of sources to be built, -usually file names). +source +(a source or list of sources to be used as input +when building), +although in some circumstances, +the target argument can actually be omitted (see below). +Builder methods also take a variety of +keyword arguments, described below. + Because long lists of file names can lead to a lot of quoting, scons -supplies a -Split() +supplies a &Split; global function and a same-named environment method that split a single string into a list, separated on strings of white-space characters. -(These are similar to the split() member function of Python strings -but work even if the input isn't a string.) +(These are similar to the Python string split +method, but work even if the input isn't a string.) -Like all Python arguments, -the target and source arguments to a builder method -can be specified either with or without -the "target" and "source" keywords. -When the keywords are omitted, -the target is first, -followed by the source. -The following are equivalent examples of calling the Program builder method: + +The target and source arguments to a builder method +can be specified either as positional arguments, +in which case the target comes first, or as +keyword arguments, using target= +and source=. +The following are equivalent examples of calling the +&Program; builder method: + env.Program('bar', ['bar.c', 'foo.c']) env.Program('bar', Split('bar.c foo.c')) env.Program('bar', env.Split('bar.c foo.c')) -env.Program(source = ['bar.c', 'foo.c'], target = 'bar') -env.Program(target = 'bar', Split('bar.c foo.c')) -env.Program(target = 'bar', env.Split('bar.c foo.c')) -env.Program('bar', source = 'bar.c foo.c'.split()) +env.Program(source=['bar.c', 'foo.c'], target='bar') +env.Program(target='bar', source=Split('bar.c foo.c')) +env.Program(target='bar', source=env.Split('bar.c foo.c')) +env.Program('bar', source='bar.c foo.c'.split()) -Target and source file names -that are not absolute path names -(that is, do not begin with -/ -on POSIX systems -or -\ -on Windows systems, -with or without -an optional drive letter) -are interpreted relative to the directory containing the -SConscript -file being read. -An initial -# -(hash mark) -on a path name means that the rest of the file name -is interpreted relative to -the directory containing -the top-level -SConstruct -file, -even if the -# -is followed by a directory separator character -(slash or backslash). + +Python follows the POSIX pathname convention for path +strings: if a string begins with the operating system pathname separator +(on Windows both the slash and backslash separator work, +and any leading drive specifier is ignored for +the determination) it is considered an absolute path, +otherwise it is a relative path. +If the path string contains no separator characters, +it is searched for as a file in the current directory. If it +contains separator characters, the search follows down +from the starting point, which is the top of the directory tree for +an absolute path and the current directory for a relative path. + + +scons recognizes a third way to specify +path strings: if the string begins with +the # character it is +top-relative - it works like a relative path but the +search follows down from the directory containing the top-level +SConstruct rather than +from the current directory (the # is allowed +to be followed by a pathname separator, which is ignored if +found in that position). +Top-relative paths only work in places where &scons; will +interpret the path (see some examples below). To be +used in other contexts the string will need to be converted +to a relative or absolute path first. + + + +Target and source pathnames can be absolute, relative, or +top-relative. Relative pathnames are searched considering the +directory of the SConscript +file currently being processed as the "current directory". + Examples: @@ -2403,12 +2432,12 @@ executable program or bar.exe (on Windows systems) -from the bar.c source file: +from the bar.c source file: -env.Program(target = 'bar', source = 'bar.c') -env.Program('bar', source = 'bar.c') -env.Program(source = 'bar.c') +env.Program(target='bar', source='bar.c') +env.Program('bar', source='bar.c') +env.Program(source='bar.c') env.Program('bar.c') @@ -2418,28 +2447,31 @@ keyword argument may be specified when calling a Builder. When specified, all source file strings that are not absolute paths +or top-relative paths will be interpreted relative to the specified srcdir. The following example will build the -build/prog +build/prog (or -build/prog.exe +build/prog.exe on Windows) program from the files -src/f1.c +src/f1.c and -src/f2.c: +src/f2.c: + env.Program('build/prog', ['f1.c', 'f2.c'], srcdir='src') -It is possible to override or add construction variables when calling a -builder method by passing additional keyword arguments. -These overridden or added -variables will only be in effect when building the target, so they will not -affect other parts of the build. For example, if you want to add additional -libraries for just one program: +It is possible to override (replace or add) +construction variables when calling a +builder method by passing them as keyword arguments. +These overrides +will only be in effect when building that target, and will not +affect other parts of the build. For example, if you want to specify +some libraries needed by just one program: env.Program('hello', 'hello.c', LIBS=['gl', 'glut']) @@ -2459,7 +2491,7 @@ for dependencies on the non-standard library names; see the descriptions of these variables, below, for more information.) It is also possible to use the -parse_flags +parse_flags keyword argument in an override, to merge command-line style arguments into the appropriate construction variables @@ -2504,8 +2536,7 @@ from SCons.Script import * All builder methods return a list-like object -containing Nodes that -represent the target or targets that will be built. +containing Nodes that will be built. A Node is an internal SCons object @@ -2517,9 +2548,8 @@ can be passed to other builder methods as source(s) or passed to any SCons function or method where a filename would normally be accepted. For example, if it were necessary -to add a specific - -flag when compiling one specific object file: +to add a specific preprocessor define +when compiling one specific object file: bar_obj_list = env.StaticObject('bar.c', CPPDEFINES='-DBAR') @@ -2530,14 +2560,14 @@ env.Program(source = ['foo.c', bar_obj_list, 'main.c']) makes for a more portable build by avoiding having to specify a platform-specific object suffix -when calling the Program() builder method. +when calling the &Program; builder method. -Note that Builder calls will automatically "flatten" +Note that builder calls will automatically "flatten" the source and target file lists, -so it's all right to have the bar_obj list -return by the StaticObject() call +so it's all right to have the bar_obj_list +returned by the &StaticObject; call in the middle of the source file list. -If you need to manipulate a list of lists returned by Builders +If you need to manipulate a list of lists returned by builders directly using Python, you can either build the list by hand: @@ -2549,8 +2579,7 @@ for object in objects: print(str(object)) -Or you can use the -Flatten() +Or you can use the &Flatten; function supplied by scons to create a list containing just the Nodes, which may be more convenient: @@ -2563,23 +2592,23 @@ for object in objects: print(str(object)) -Note also that because Builder calls return +Note also that because builder calls return a list-like object, not an actual Python list, you should not -use the Python -+= -operator to append Builder results to a Python list. +use the Python add +operator (+ or +=) +to append builder results to a Python list. Because the list and the object are different types, Python will not update the original list in place, but will instead create a new Node-list object containing the concatenation of the list -elements and the Builder results. +elements and the builder results. This will cause problems for any other Python variables in your SCons configuration that still hold on to a reference to the original list. -Instead, use the Python -.extend() +Instead, use the Python list +extend method to make sure the list is updated in-place. Example: @@ -2592,7 +2621,7 @@ object_files = [] # # It will not update the object_files list in place. # -# Instead, use the .extend() method: +# Instead, use the list extend method: object_files.extend(Object('bar.c')) @@ -2609,7 +2638,7 @@ print("The path to bar_obj is:", str(bar_obj_list[0])) Note again that because the Builder call returns a list, we have to access the first element in the list -(bar_obj_list[0]) +((bar_obj_list[0])) to get at the Node that actually represents the object file. @@ -2672,7 +2701,12 @@ to use just the filename portion of the targets and source. scons -provides the following builder methods: +predefined the following builder methods. +Depending on the setup of a particular +&consenv; and on the type and software +installation status of the underlying system, +not all builders may be available to that +&consenv;. @@ -4409,7 +4443,7 @@ functions return and Dir Nodes, respectively. -python objects, respectively. +Python objects, respectively. Those objects have several user-visible attributes and methods that are often useful: @@ -5426,17 +5460,15 @@ a = Action(build_it, varlist=['XXX']) The -Action() +&Action; global function can be passed the following optional keyword arguments to modify the Action object's behavior: - -chdir -The -chdir -keyword argument specifies that + +chdir +specifies that scons will execute the action after changing to the specified directory. If the @@ -5481,15 +5513,9 @@ a = Action("build < ${SOURCE.file} > ${TARGET.file}", chdir=1) - -exitstatfunc -The -Action() -global function -also takes an -exitstatfunc -keyword argument -which specifies a function + +exitstatfunc +specifies a function that is passed the exit status (or return value) from the specified action @@ -5511,11 +5537,9 @@ a = Action("build < ${SOURCE.file} > ${TARGET.file}", -batch_key -The -batch_key -keyword argument can be used -to specify that the Action can create multiple target files + +batch_key +specifies that the Action can create multiple target files by processing multiple independent source files simultaneously. (The canonical example is "batch compilation" of multiple object files @@ -5524,7 +5548,7 @@ to a single invocation of a compiler such as Microsoft's Visual C / C++ compiler.) If the batch_key -argument is any non-False, non-callable Python value, +argument evaluates True and is not a callable object, the configured Action object will cause scons to collect all targets built with the Action object @@ -5556,7 +5580,7 @@ will be used to identify different for batch building. A batch_key -function must take the following arguments: +function must accept the following arguments: @@ -5688,7 +5712,7 @@ sequences of file manipulation without relying on platform-specific external commands: -that + env = Environment(TMPBUILD = '/tmp/builddir') env.Command('foo.out', 'foo.in', @@ -5848,13 +5872,13 @@ env.Command('marker', 'input_file', Before executing a command, scons -performs construction variable interpolation on the strings that make up -the command line of builders. -Variables are introduced by a -$ +performs construction variable interpolation on the string that makes up +the command line of the builder. +Variables are introduced in such strings by a +$ prefix. -Besides construction variables, scons provides the following -variables for each command execution: +Besides regular construction variables, scons provides the following +special variables for each command execution: @@ -5923,15 +5947,19 @@ from sources that have not changed since the target was last built. -(Note that the above variables are reserved -and may not be set in a construction environment.) - -For example, given the construction variable CC='cc', targets=['foo'], and -sources=['foo.c', 'bar.c']: +Note that the above variables are reserved +and may not be set in a construction environment. + +For example, given the construction variables +CC='cc', +targets=['foo'] +and +sources=['foo.c', 'bar.c']: + action='$CC -c -o $TARGET $SOURCES' @@ -5944,7 +5972,8 @@ cc -c -o foo foo.c bar.c Variable names may be surrounded by curly braces ({}) -to separate the name from the trailing characters. +to separate the name from surrounding characters which +are not part of the name. Within the curly braces, a variable name may have a Python slice subscript appended to select one or more items from a list. @@ -6107,20 +6136,42 @@ may be a callable Python function associated with a construction variable in the environment. The function should -take four arguments: -target -- a list of target nodes, -source -- a list of source nodes, -env -- the construction environment, -for_signature -- a Boolean value that specifies +accept four arguments: + + + + target + +a list of target nodes + + + + source + +a list of source nodes + + + + env + +the construction environment + + + + for_signature + +a Boolean value that specifies whether the function is being called -for generating a build signature. +for generating a build signature. + + + + + SCons will insert whatever the called function returns -into the expanded string: +into the expanded string: + def foo(target, source, env, for_signature): @@ -6201,9 +6252,10 @@ echo Last build occurred . > $TARGET Python Code Substitution -Any python code within -${-} -pairs gets evaluated by python 'eval', with the python globals set to +Any Python code within +curly braces (and introduced by the variable prefix $) +gets evaluated by the Python eval statement, +with the Python globals set to the current environment's set of construction variables. So in the following case: @@ -6219,14 +6271,20 @@ echo FOO > foo.out echo BAR > foo.out -according to the current value of env['COND'] when the command is -executed. The evaluation occurs when the target is being -built, not when the SConscript is being read. So if env['COND'] is changed +according to the current value of env['COND'] +when the command is executed. +The evaluation takes place when the target is being +built, not when the SConscript is being read. So if +env['COND'] is changed later in the SConscript, the final value will be used. -Here's a more interesting example. Note that all of COND, FOO, and -BAR are environment variables, and their values are substituted into -the final command. FOO is a list, so its elements are interpolated +Here's a more interesting example. Note that all of +COND, +FOO, +and +BAR are construction variables, +and their values are substituted into the final command. +FOO is a list, so its elements are interpolated separated by spaces. @@ -6574,9 +6632,10 @@ do this, in part, by sharing an ability to interpret UNIX-like path names. For example, the Cygwin tools will internally translate a Cygwin path name -like /cygdrive/c/mydir +like /cygdrive/c/mydir to an equivalent Windows pathname -of C:/mydir (equivalent to C:\mydir). +of C:/mydir (equivalent to C:\mydir). + Versions of Python that are built for native Windows execution, @@ -6584,7 +6643,8 @@ such as the python.org and ActiveState versions, do not have the Cygwin path name semantics. This means that using a native Windows version of Python to build compiled programs using Cygwin tools -(such as gcc, bison, and flex) +(such as gcc, bison, +and flex) may yield unpredictable results. "Mixing and matching" in this way can be made to work, diff --git a/src/engine/SCons/Environment.xml b/src/engine/SCons/Environment.xml index f222620..a635108 100644 --- a/src/engine/SCons/Environment.xml +++ b/src/engine/SCons/Environment.xml @@ -148,9 +148,9 @@ appending to this list, although the more flexible approach is to associate scanners with a specific Builder. -See the sections "Builder Objects" -and "Scanner Objects," -below, for more information. +See the manpage sections "Builder Objects" +and "Scanner Objects" +for more information. @@ -160,7 +160,8 @@ below, for more information. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -170,7 +171,8 @@ that may not be set or used in a construction environment. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -180,7 +182,8 @@ that may not be set or used in a construction environment. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -190,7 +193,8 @@ that may not be set or used in a construction environment. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -200,7 +204,8 @@ that may not be set or used in a construction environment. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -210,7 +215,8 @@ that may not be set or used in a construction environment. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -220,7 +226,8 @@ that may not be set or used in a construction environment. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -230,7 +237,8 @@ that may not be set or used in a construction environment. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -255,8 +263,8 @@ that are part of this construction environment. Creates an Action object for the specified action. -See the section "Action Objects," -below, for a complete explanation of the arguments and behavior. +See the manpage section "Action Objects" +for a complete explanation of the arguments and behavior. @@ -359,7 +367,8 @@ has been built. The specified action(s) may be an Action object, or anything that can be converted into an Action object -(see below). +See the manpage section "Action Objects" +for a complete explanation. @@ -386,7 +395,8 @@ is built. The specified action(s) may be an Action object, or anything that can be converted into an Action object -(see below). +See the manpage section "Action Objects" +for a complete explanation. @@ -512,7 +522,7 @@ 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.) +(See also the &Prepend; method). @@ -634,8 +644,8 @@ or Creates a Builder object for the specified action. -See the section "Builder Objects," -below, for a complete explanation of the arguments and behavior. +See the manpage section "Builder Objects" +for a complete explanation of the arguments and behavior. @@ -898,11 +908,15 @@ wx_env = env.Clone(parse_flags='!wx-config --cflags --cxxflags') -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 +The &b-Command; "Builder" is actually +a function that looks like a Builder, +but takes a required third argument, which is the +action to take to construct the target +from the source, used for "one-off" builds +where a full builder is not needed. +Thus it does not follow the builder +calling rules described at the start of this section. +See instead the &f-link-Command; function description for the calling syntax and details. @@ -947,7 +961,7 @@ 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, +see the manpage section "Action Objects" for more complete information. Also note that a string specifying an external command may be preceded by an @@ -971,7 +985,7 @@ env.Command('foo.out', 'foo.in', env.Command('bar.out', 'bar.in', ["rm -f $TARGET", "$BAR_BUILD < $SOURCES > $TARGET"], - ENV = {'PATH' : '/usr/local/bin/'}) + ENV={'PATH': '/usr/local/bin/'}) def rename(env, target, source): import os @@ -979,7 +993,7 @@ def rename(env, target, source): env.Command('baz.out', 'baz.in', ["$BAZ_BUILD < $SOURCES > .tmp", - rename ]) + rename]) @@ -988,14 +1002,14 @@ Note that the 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. +identifies what type of entries they are. If necessary, you can explicitly specify that targets or source nodes should -be treated as directoriese +be treated as directories by using the &f-link-Dir; or -env.Dir() +env.Dir functions. @@ -1011,9 +1025,9 @@ env.Command(env.Dir('$DISTDIR')), None, make_distdir) -(Also note that SCons will usually +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.) +so you normally don't need to create directories by hand. @@ -1029,8 +1043,8 @@ so you normally don't need to create directories by hand.) 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. +See the manpage section "Configure Contexts" +for a complete explanation of the arguments and behavior. @@ -1375,7 +1389,8 @@ 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. +see manpage section "File and Directory Nodes" +for more information. @@ -1458,8 +1473,8 @@ Executes an Action object. The specified action may be an Action object -(see the section "Action Objects," -below, for a complete explanation of the arguments and behavior), +(see manpage section "Action Objects" +for a complete explanation of the arguments and behavior), or it may be a command-line string, list of commands, or executable Python function, @@ -1532,7 +1547,8 @@ 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. +see manpage section "File and Directory Nodes" +for more information. @@ -2190,7 +2206,7 @@ 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, +See that method's description for a table of options and construction variables. @@ -2658,8 +2674,8 @@ env.Requires('foo', 'file-that-must-be-built-before-foo') Creates a Scanner object for the specified function. -See the section "Scanner Objects," -below, for a complete explanation of the arguments and behavior. +See manpage section "Scanner Objects" +for a complete explanation of the arguments and behavior. -- cgit v0.12 From 83eb72eeadd7585a4cf69dd7f560be7995480db5 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Tue, 10 Sep 2019 08:18:38 -0600 Subject: [PR #3437] review comment - add back curly braces Signed-off-by: Mats Wichmann --- doc/man/scons.xml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/man/scons.xml b/doc/man/scons.xml index c1773c7..fea9d89 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -2308,7 +2308,7 @@ for debugging purposes: print("Builders:", list(env['BUILDERS'])) - + Builder methods always take two arguments: @@ -5971,7 +5971,8 @@ action='$CC -c -o $TARGET $SOURCES' cc -c -o foo foo.c bar.c -Variable names may be surrounded by curly braces ({}) +Variable names may be surrounded by curly braces +{ } to separate the name from surrounding characters which are not part of the name. Within the curly braces, a variable name may have @@ -6252,8 +6253,10 @@ echo Last build occurred . > $TARGET Python Code Substitution -Any Python code within -curly braces (and introduced by the variable prefix $) + +Any Python code within curly braces +{ } +and introduced by the variable prefix $ gets evaluated by the Python eval statement, with the Python globals set to the current environment's set of construction variables. -- cgit v0.12 From 2781e4e52b0910c408b0ffc7c0bc1b511a42a754 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Wed, 11 Sep 2019 10:57:57 -0600 Subject: Remove deprecated debug options These options have been deprecated since 2007. They were originally announced to be disabled in SCons 2.0.0, but that didn't happen. Left the deprecated-debug-options behavior is in, but the dictionary of such options is now empty, and there's a new dict of removed options, and presence in that dict raises an exception. The four tests that were in test/Deprecated move to a new directory test/Removed and are simplified just to make sure invocation errors scons out. (git interprets most of these as remove/add for some reason) These appear to have been already removed from docs, so no doc impact. Signed-off-by: Mats Wichmann --- src/CHANGES.txt | 1 + src/engine/SCons/Script/SConsOptions.py | 20 +++- test/Deprecated/debug-dtree.py | 120 ------------------------ test/Deprecated/debug-nomemoizer.py | 59 ------------ test/Deprecated/debug-stree.py | 139 --------------------------- test/Deprecated/debug-tree.py | 160 -------------------------------- test/Removed/debug-dtree.py | 57 ++++++++++++ test/Removed/debug-nomemoizer.py | 57 ++++++++++++ test/Removed/debug-stree.py | 57 ++++++++++++ test/Removed/debug-tree.py | 57 ++++++++++++ 10 files changed, 245 insertions(+), 482 deletions(-) delete mode 100644 test/Deprecated/debug-dtree.py delete mode 100644 test/Deprecated/debug-nomemoizer.py delete mode 100644 test/Deprecated/debug-stree.py delete mode 100644 test/Deprecated/debug-tree.py create mode 100644 test/Removed/debug-dtree.py create mode 100644 test/Removed/debug-nomemoizer.py create mode 100644 test/Removed/debug-stree.py create mode 100644 test/Removed/debug-tree.py diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 87f4e28..dd7f9bd 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -15,6 +15,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER From Mats Wichmann - Replace instances of string find method with "in" checks where the index from find() was not used. + - Turn previously deprecated debug options into failures. RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 diff --git a/src/engine/SCons/Script/SConsOptions.py b/src/engine/SCons/Script/SConsOptions.py index c45cb01..add1150 100644 --- a/src/engine/SCons/Script/SConsOptions.py +++ b/src/engine/SCons/Script/SConsOptions.py @@ -584,9 +584,15 @@ def Parser(version): help="Print build actions for files from CacheDir.") def opt_invalid(group, value, options): + """report an invalid option from a group""" errmsg = "`%s' is not a valid %s option type, try:\n" % (value, group) return errmsg + " %s" % ", ".join(options) + def opt_invalid_rm(group, value, msg): + """report an invalid option from a group: recognized but removed""" + errmsg = "`%s' is not a valid %s option type " % (value, group) + return errmsg + msg + config_options = ["auto", "force" ,"cache"] opt_config_help = "Controls Configure subsystem: %s." \ @@ -604,9 +610,11 @@ def Parser(version): help="Search up directory tree for SConstruct, " "build all Default() targets.") - deprecated_debug_options = { + deprecated_debug_options = {} + + removed_debug_options = { "dtree" : '; please use --tree=derived instead', - "nomemoizer" : ' and has no effect', + "nomemoizer" : '; there is no replacement', "stree" : '; please use --tree=all,status instead', "tree" : '; please use --tree=all instead', } @@ -618,11 +626,12 @@ def Parser(version): def opt_debug(option, opt, value__, parser, debug_options=debug_options, - deprecated_debug_options=deprecated_debug_options): + deprecated_debug_options=deprecated_debug_options, + removed_debug_options=removed_debug_options): for value in value__.split(','): if value in debug_options: parser.values.debug.append(value) - elif value in list(deprecated_debug_options.keys()): + elif value in deprecated_debug_options: parser.values.debug.append(value) try: parser.values.delayed_warnings @@ -632,6 +641,9 @@ def Parser(version): w = "The --debug=%s option is deprecated%s." % (value, msg) t = (SCons.Warnings.DeprecatedDebugOptionsWarning, w) parser.values.delayed_warnings.append(t) + elif value in removed_debug_options: + msg = removed_debug_options[value] + raise OptionValueError(opt_invalid_rm('debug', value, msg)) else: raise OptionValueError(opt_invalid('debug', value, debug_options)) diff --git a/test/Deprecated/debug-dtree.py b/test/Deprecated/debug-dtree.py deleted file mode 100644 index 1e7366f..0000000 --- a/test/Deprecated/debug-dtree.py +++ /dev/null @@ -1,120 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -""" -Test that the --debug=dtree option correctly prints just the explicit -dependencies (sources or Depends()) of a target. -""" - -import TestSCons - -test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) - -test.write('SConstruct', """ -env = Environment(OBJSUFFIX = '.ooo', PROGSUFFIX = '.xxx') -env.Program('foo', Split('foo.c bar.c')) -""") - -test.write('foo.c', r""" -#include -#include -#include "foo.h" -int main(int argc, char *argv[]) -{ - argv[argc++] = "--"; - printf("f1.c\n"); - exit (0); -} -""") - -test.write('bar.c', """ -#include "bar.h" -int local = 1; -""") - -test.write('foo.h', """ -#ifndef FOO_H -#define FOO_H -#include "bar.h" -#endif -""") - -test.write('bar.h', """ -#ifndef BAR_H -#define BAR_H -#include "foo.h" -#endif -""") - -expect = """ -scons: warning: The --debug=dtree option is deprecated; please use --tree=derived instead. -""" - -stderr = TestSCons.re_escape(expect) + TestSCons.file_expr - -dtree1 = """ -+-foo.xxx - +-foo.ooo - +-bar.ooo -""" - -test.run(arguments = "--debug=dtree foo.xxx", - stderr = stderr) -test.must_contain_all_lines(test.stdout(), [dtree1]) - -dtree2 = """ -+-. - +-bar.ooo - +-foo.ooo - +-foo.xxx - +-foo.ooo - +-bar.ooo -""" -test.run(arguments = "--debug=dtree .", - stderr = stderr) -test.must_contain_all_lines(test.stdout(), [dtree2]) - -# Make sure we print the debug stuff even if there's a build failure. -test.write('bar.h', """ -#ifndef BAR_H -#define BAR_H -#include "foo.h" -#endif -THIS SHOULD CAUSE A BUILD FAILURE -""") - -test.run(arguments = "--debug=dtree foo.xxx", - status = 2, - stderr = None) -test.must_contain_all_lines(test.stdout(), [dtree1]) - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Deprecated/debug-nomemoizer.py b/test/Deprecated/debug-nomemoizer.py deleted file mode 100644 index 6d05cb2..0000000 --- a/test/Deprecated/debug-nomemoizer.py +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -""" -Test calling the (deprecated) --debug=nomemoizer option. -""" - -import TestSCons - -test = TestSCons.TestSCons(match = TestSCons.match_re) - -test.write('SConstruct', """ -def cat(target, source, env): - with open(str(target[0]), 'wb') as ofp, open(str(source[0]), 'rb') as ifp: - ofp.write(ifp.read()) -env = Environment(BUILDERS={'Cat':Builder(action=Action(cat))}) -env.Cat('file.out', 'file.in') -""") - -test.write('file.in', "file.in\n") - -expect = """ -scons: warning: The --debug=nomemoizer option is deprecated and has no effect. -""" + TestSCons.file_expr - -test.run(arguments = "--debug=nomemoizer", stderr = expect) - -test.must_match('file.out', "file.in\n") - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Deprecated/debug-stree.py b/test/Deprecated/debug-stree.py deleted file mode 100644 index 907dedf..0000000 --- a/test/Deprecated/debug-stree.py +++ /dev/null @@ -1,139 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -""" -Test that the --debug=stree option prints a dependency tree with output -that indicates the state of various Node status flags. -""" - -import TestSCons - -test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) - -CC = test.detect('CC') -LINK = test.detect('LINK') -if LINK is None: LINK = CC - -test.write('SConstruct', """ -env = Environment(OBJSUFFIX = '.ooo', PROGSUFFIX = '.xxx') -env.Program('foo', Split('foo.c bar.c')) -""") - -test.write('foo.c', r""" -#include -#include -#include "foo.h" -int main(int argc, char *argv[]) -{ - argv[argc++] = "--"; - printf("f1.c\n"); - exit (0); -} -""") - -test.write('bar.c', """ -#include "bar.h" -int local = 1; -""") - -test.write('foo.h', """ -#ifndef FOO_H -#define FOO_H -#include "bar.h" -#endif -""") - -test.write('bar.h', """ -#ifndef BAR_H -#define BAR_H -#include "foo.h" -#endif -""") - -expect = """ -scons: warning: The --debug=stree option is deprecated; please use --tree=all,status instead. -""" - -stderr = TestSCons.re_escape(expect) + TestSCons.file_expr - -stree = """ -[E B C ]+-foo.xxx -[E B C ] +-foo.ooo -[E C ] | +-foo.c -[E C ] | +-foo.h -[E C ] | +-bar.h -[E C ] | +-%(CC)s -[E B C ] +-bar.ooo -[E C ] | +-bar.c -[E C ] | +-bar.h -[E C ] | +-foo.h -[E C ] | +-%(CC)s -[E C ] +-%(LINK)s -""" % locals() - -test.run(arguments = "--debug=stree foo.xxx", - stderr = stderr) -test.fail_test(test.stdout().count(stree) != 1) - -stree2 = """ - E = exists - R = exists in repository only - b = implicit builder - B = explicit builder - S = side effect - P = precious - A = always build - C = current - N = no clean - H = no cache - -[ B ]+-foo.xxx -[ B ] +-foo.ooo -[E C ] | +-foo.c -[E C ] | +-foo.h -[E C ] | +-bar.h -[E C ] | +-%(CC)s -[ B ] +-bar.ooo -[E C ] | +-bar.c -[E C ] | +-bar.h -[E C ] | +-foo.h -[E C ] | +-%(CC)s -[E C ] +-%(LINK)s -""" % locals() - -test.run(arguments = '-c foo.xxx') - -test.run(arguments = "--no-exec --debug=stree foo.xxx", - stderr = stderr) -test.fail_test(test.stdout().count(stree2) != 1) - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Deprecated/debug-tree.py b/test/Deprecated/debug-tree.py deleted file mode 100644 index 51ff7f2..0000000 --- a/test/Deprecated/debug-tree.py +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -""" -Test that the --debug=tree option prints a tree representation of the -complete dependencies of a target. -""" - -import TestSCons - -test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) - -CC = test.detect('CC') -LINK = test.detect('LINK') -if LINK is None: LINK = CC - -test.write('SConstruct', """ -env = Environment(OBJSUFFIX = '.ooo', PROGSUFFIX = '.xxx') -env.Program('Foo', Split('Foo.c Bar.c')) -""") - -# N.B.: We use upper-case file names (Foo* and Bar*) so that the sorting -# order with our upper-case SConstruct file is the same on case-sensitive -# (UNIX/Linux) and case-insensitive (Windows) systems. - -test.write('Foo.c', r""" -#include -#include -#include "Foo.h" -int main(int argc, char *argv[]) -{ - argv[argc++] = "--"; - printf("f1.c\n"); - exit (0); -} -""") - -test.write('Bar.c', """ -#include "Bar.h" -int local = 1; -""") - -test.write('Foo.h', """ -#ifndef FOO_H -#define FOO_H -#include "Bar.h" -#endif -""") - -test.write('Bar.h', """ -#ifndef BAR_H -#define BAR_H -#include "Foo.h" -#endif -""") - -expect = """ -scons: warning: The --debug=tree option is deprecated; please use --tree=all instead. -""" - -stderr = TestSCons.re_escape(expect) + TestSCons.file_expr - -tree1 = """ -+-Foo.xxx - +-Foo.ooo - | +-Foo.c - | +-Foo.h - | +-Bar.h - | +-%(CC)s - +-Bar.ooo - | +-Bar.c - | +-Bar.h - | +-Foo.h - | +-%(CC)s - +-%(LINK)s -""" % locals() - -test.run(arguments = "--debug=tree Foo.xxx", - stderr = stderr) -test.must_contain_all_lines(test.stdout(), tree1) - -tree2 = """ -+-. - +-Bar.c - +-Bar.h - +-Bar.ooo - | +-Bar.c - | +-Bar.h - | +-Foo.h - | +-%(CC)s - +-Foo.c - +-Foo.h - +-Foo.ooo - | +-Foo.c - | +-Foo.h - | +-Bar.h - | +-%(CC)s - +-Foo.xxx - | +-Foo.ooo - | | +-Foo.c - | | +-Foo.h - | | +-Bar.h - | | +-%(CC)s - | +-Bar.ooo - | | +-Bar.c - | | +-Bar.h - | | +-Foo.h - | | +-%(CC)s - | +-%(LINK)s - +-SConstruct -""" % locals() - -test.run(arguments = "--debug=tree .", - stderr = stderr) -test.must_contain_all_lines(test.stdout(), tree2) - -# Make sure we print the debug stuff even if there's a build failure. -test.write('Bar.h', """ -#ifndef BAR_H -#define BAR_H -#include "Foo.h" -#endif -THIS SHOULD CAUSE A BUILD FAILURE -""") - -test.run(arguments = "--debug=tree Foo.xxx", - status = 2, - stderr = None) -test.must_contain_all_lines(test.stdout(), tree1) - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/debug-dtree.py b/test/Removed/debug-dtree.py new file mode 100644 index 0000000..a016f96 --- /dev/null +++ b/test/Removed/debug-dtree.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Test that the --debug=dtree option fails with expected exception +""" + +import os + +import TestSCons + +test = TestSCons.TestSCons() + + +test.write('SConstruct', "") + +expect = r"""usage: scons [OPTION] [TARGET] ... + +SCons Error: `dtree' is not a valid debug option type ; please use --tree=derived instead +""" + +test.run(arguments='-Q --debug=dtree', status=2, stderr=expect) + +os.environ['SCONSFLAGS'] = '--debug=dtree' +test.run(arguments="-H", status=2, stderr=expect) + + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/debug-nomemoizer.py b/test/Removed/debug-nomemoizer.py new file mode 100644 index 0000000..a830a88 --- /dev/null +++ b/test/Removed/debug-nomemoizer.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Test that the --debug=nomemoizer option fails with expected exception +""" + +import os + +import TestSCons + +test = TestSCons.TestSCons() + + +test.write('SConstruct', "") + +expect=r"""usage: scons [OPTION] [TARGET] ... + +SCons Error: `nomemoizer' is not a valid debug option type ; there is no replacement +""" + +test.run(arguments='-Q --debug=nomemoizer', status=2, stderr=expect) + +os.environ['SCONSFLAGS'] = '--debug=nomemoizer' +test.run(arguments="-H", status=2, stderr=expect) + + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/debug-stree.py b/test/Removed/debug-stree.py new file mode 100644 index 0000000..60ce4f2 --- /dev/null +++ b/test/Removed/debug-stree.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Test that the --debug=stree option fails with expected exception +""" + +import os + +import TestSCons + +test = TestSCons.TestSCons() + + +test.write('SConstruct', "") + +expect = r"""usage: scons [OPTION] [TARGET] ... + +SCons Error: `stree' is not a valid debug option type ; please use --tree=all,status instead +""" + +test.run(arguments='-Q --debug=stree', status=2, stderr=expect) + +os.environ['SCONSFLAGS'] = '--debug=stree' +test.run(arguments="-H", status=2, stderr=expect) + + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/debug-tree.py b/test/Removed/debug-tree.py new file mode 100644 index 0000000..73aa4c9 --- /dev/null +++ b/test/Removed/debug-tree.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Test that the --debug=tree option fails with expected exception +""" + +import os + +import TestSCons + +test = TestSCons.TestSCons() + + +test.write('SConstruct', "") + +expect = r"""usage: scons [OPTION] [TARGET] ... + +SCons Error: `tree' is not a valid debug option type ; please use --tree=all instead +""" + +test.run(arguments='-Q --debug=tree', status=2, stderr=expect) + +os.environ['SCONSFLAGS'] = '--debug=tree' +test.run(arguments="-H", status=2, stderr=expect) + + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: -- cgit v0.12 From f3937a8b0f71fc10e05e81aaaf47824600d3be58 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Thu, 12 Sep 2019 12:06:39 -0600 Subject: [PR #3444] fix test issues with --debug removals There were several uses of deprecated debug flags that had not been moved to to test/Deprecated, and so were missed when those moved to test/Removed. Also removed options from manpage. Signed-off-by: Mats Wichmann --- doc/man/scons.xml | 40 ----------------------------------- src/CHANGES.txt | 3 ++- test/Interactive/tree.py | 17 --------------- test/Removed/debug-tree.py | 7 ++++++ test/option--tree.py | 7 ------ test/packaging/rpm/explicit-target.py | 2 +- test/packaging/rpm/multipackage.py | 4 ++-- test/packaging/rpm/package.py | 2 +- 8 files changed, 13 insertions(+), 69 deletions(-) diff --git a/doc/man/scons.xml b/doc/man/scons.xml index fea9d89..eb9f00b 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -727,17 +727,6 @@ files, as well as unlinking old targets before building them. - --debug=dtree - -A synonym for the newer - -option. -This will be deprecated in some future release -and ultimately removed. - - - - --debug=explain Print an explanation of precisely why @@ -793,13 +782,6 @@ and before and after building targets. - --debug=nomemoizer - -A deprecated option preserved for backwards compatibility. - - - - --debug=objects Prints a list of the various objects @@ -856,17 +838,6 @@ when encountering an otherwise unexplained error. - --debug=stree - -A synonym for the newer - -option. -This will be deprecated in some future release -and ultimately removed. - - - - --debug=time Prints various time profiling information: @@ -923,17 +894,6 @@ should take place in parallel.) - --debug=tree - -A synonym for the newer - -option. -This will be deprecated in some future release -and ultimately removed. - - - - --diskcheck=types Enable specific checks for diff --git a/src/CHANGES.txt b/src/CHANGES.txt index dd7f9bd..4078669 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -15,7 +15,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER From Mats Wichmann - Replace instances of string find method with "in" checks where the index from find() was not used. - - Turn previously deprecated debug options into failures. + - Turn previously deprecated debug options into failures: + --debug=tree, --debug=dtree, --debug=stree, --debug=nomemoizer. RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 diff --git a/test/Interactive/tree.py b/test/Interactive/tree.py index 61faa22..c10962a 100644 --- a/test/Interactive/tree.py +++ b/test/Interactive/tree.py @@ -69,23 +69,6 @@ test.must_match(test.workpath('foo.out'), "foo.in 2\n") -scons.send("build --debug=tree foo.out\n") - -expect_stdout = """\ -scons>>> Copy("foo.out", "foo.in") -scons>>> Touch("1") -scons>>> Copy("foo.out", "foo.in") -+-foo.out - +-foo.in -scons>>> Touch("2") -scons>>> scons: `foo.out' is up to date. -scons>>> -""" - -test.finish(scons, stdout = expect_stdout) - - - test.pass_test() # Local Variables: diff --git a/test/Removed/debug-tree.py b/test/Removed/debug-tree.py index 73aa4c9..06287de 100644 --- a/test/Removed/debug-tree.py +++ b/test/Removed/debug-tree.py @@ -26,6 +26,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" """ Test that the --debug=tree option fails with expected exception +Check command-line, SCONSFLAGS and interactive """ import os @@ -48,6 +49,12 @@ os.environ['SCONSFLAGS'] = '--debug=tree' test.run(arguments="-H", status=2, stderr=expect) +# moved test from test/Interactive/tree.py +scons = test.start(arguments = '-Q --interactive') +scons.send("build --debug=tree\n") +test.finish(scons, status=2, stderr=expect) + + test.pass_test() # Local Variables: diff --git a/test/option--tree.py b/test/option--tree.py index 0bf2c06..1b34176 100644 --- a/test/option--tree.py +++ b/test/option--tree.py @@ -45,13 +45,6 @@ SCons Error: `foofoo' is not a valid --tree option type, try: """, status=2) -test.run(arguments='--debug=tree', - stderr=""" -scons: warning: The --debug=tree option is deprecated; please use --tree=all instead. -.* -""", - status=0, match=TestSCons.match_re_dotall) - # Test that unicode characters can be printed (escaped) with the --tree option test.write('SConstruct', diff --git a/test/packaging/rpm/explicit-target.py b/test/packaging/rpm/explicit-target.py index 48b5c83..fba0237 100644 --- a/test/packaging/rpm/explicit-target.py +++ b/test/packaging/rpm/explicit-target.py @@ -67,7 +67,7 @@ env.Package( NAME = 'foo', LICENSE = 'gpl', SUMMARY = 'balalalalal', X_RPM_GROUP = 'Application/fu', - X_RPM_INSTALL = r'%(_python_)s %(scons)s --debug=tree --install-sandbox="$RPM_BUILD_ROOT" "$RPM_BUILD_ROOT"', + X_RPM_INSTALL = r'%(_python_)s %(scons)s --tree=all --install-sandbox="$RPM_BUILD_ROOT" "$RPM_BUILD_ROOT"', DESCRIPTION = 'this should be really really long', source = [ prog ], target = "my_rpm_package.rpm", diff --git a/test/packaging/rpm/multipackage.py b/test/packaging/rpm/multipackage.py index 2f106f4..4a29a40 100644 --- a/test/packaging/rpm/multipackage.py +++ b/test/packaging/rpm/multipackage.py @@ -67,7 +67,7 @@ env.Package( NAME = 'foo', LICENSE = 'gpl', SUMMARY = 'balalalalal', X_RPM_GROUP = 'Application/fu', - X_RPM_INSTALL = r'%(_python_)s %(scons)s --debug=tree --install-sandbox="$RPM_BUILD_ROOT" "$RPM_BUILD_ROOT"', + X_RPM_INSTALL = r'%(_python_)s %(scons)s --tree=all --install-sandbox="$RPM_BUILD_ROOT" "$RPM_BUILD_ROOT"', DESCRIPTION = 'this should be really really long', source = [ prog ], SOURCE_URL = 'http://foo.org/foo-1.2.3.tar.gz' @@ -80,7 +80,7 @@ env.Package( NAME = 'foo2', LICENSE = 'gpl', SUMMARY = 'balalalalal', X_RPM_GROUP = 'Application/fu', - X_RPM_INSTALL = r'%(_python_)s %(scons)s --debug=tree --install-sandbox="$RPM_BUILD_ROOT" "$RPM_BUILD_ROOT"', + X_RPM_INSTALL = r'%(_python_)s %(scons)s --tree=all --install-sandbox="$RPM_BUILD_ROOT" "$RPM_BUILD_ROOT"', DESCRIPTION = 'this should be really really long', source = [ prog ], ) diff --git a/test/packaging/rpm/package.py b/test/packaging/rpm/package.py index 23ebe05..0ef5fad 100644 --- a/test/packaging/rpm/package.py +++ b/test/packaging/rpm/package.py @@ -66,7 +66,7 @@ env.Package( NAME = 'foo', LICENSE = 'gpl', SUMMARY = 'balalalalal', X_RPM_GROUP = 'Application/fu', - X_RPM_INSTALL = r'%(_python_)s %(scons)s --debug=tree --install-sandbox="$RPM_BUILD_ROOT" "$RPM_BUILD_ROOT"', + X_RPM_INSTALL = r'%(_python_)s %(scons)s --tree=all --install-sandbox="$RPM_BUILD_ROOT" "$RPM_BUILD_ROOT"', DESCRIPTION = 'this should be really really long', source = [ prog ], SOURCE_URL = 'http://foo.org/foo-1.2.3.tar.gz' -- cgit v0.12 From fa1affd9d48c795f911f281b88291a8b8248627c Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Thu, 8 Aug 2019 09:51:04 -0600 Subject: test: Fix SyntaxWarnings on escapes in Python strings This is the remaining batch of SyntaxWarning cleanups in the test/ directory, as flagged by Python 3.8 (now tested with 3.8.0b4). Most of these are escapes in strings that are not recognized as Python-language escapes up front, due to the embedded nature of testing - tests write a string to a file which is actually Python (code or sconscript) which is later to be executed. Also changed the timestamp-fallback test to eliminate an imp module DeprecationWarning: since in all supported Python versions haslib is stdlib, drop that skip check; the md5 skip check can be a simple import now. My test runs with 3.8 show no SyntaxWarnings after this. Signed-off-by: Mats Wichmann --- test/Errors/execute-a-directory.py | 12 ++++++------ test/Errors/non-executable-file.py | 10 +++++----- test/Interactive/shell.py | 4 ++-- test/Interactive/version.py | 6 +++--- test/Java/JARFLAGS.py | 6 +++--- test/Java/JAVABOOTCLASSPATH.py | 4 ++-- test/Libs/SharedLibrary.py | 17 +++++++---------- test/Scanner/CrossLanguageNoExtension.py | 4 ++-- test/Scanner/FindPathDirs.py | 6 +++--- test/Scanner/Scanner.py | 6 +++--- test/Scanner/dictionary.py | 8 ++++---- test/Scanner/exception.py | 6 +++--- test/Scanner/generated.py | 6 +++--- test/Scanner/multi-env.py | 2 +- test/Scanner/no-Dir-node.py | 2 +- test/Scanner/source_scanner-dict.py | 10 +++++----- test/Scanner/unicode.py | 2 +- test/explain/basic.py | 6 +++--- test/explain/save-info.py | 2 +- test/import.py | 4 ++-- test/option-v.py | 4 ++-- test/runtest/xml/output.py | 8 ++++---- test/srcchange.py | 8 ++++---- test/timestamp-fallback.py | 27 ++++++++++----------------- 24 files changed, 80 insertions(+), 90 deletions(-) diff --git a/test/Errors/execute-a-directory.py b/test/Errors/execute-a-directory.py index 1d2036e..95fa7b6 100644 --- a/test/Errors/execute-a-directory.py +++ b/test/Errors/execute-a-directory.py @@ -55,34 +55,34 @@ Bad command or file name unrecognized = """\ '.+' is not recognized as an internal or external command, operable program or batch file. -scons: \*\*\* \[%s\] Error 1 +scons: \\*\\*\\* \\[%s\\] Error 1 """ unspecified = """\ The name specified is not recognized as an internal or external command, operable program or batch file. -scons: \*\*\* \[%s\] Error 1 +scons: \\*\\*\\* \\[%s\\] Error 1 """ cannot_execute = """\ (sh: )*.+: cannot execute -scons: \*\*\* \[%s\] Error %s +scons: \\*\\*\\* \\[%s\\] Error %s """ permission_denied = """\ .+: (p|P)ermission denied -scons: \*\*\* \[%s\] Error %s +scons: \\*\\*\\* \\[%s\\] Error %s """ is_a_directory = """\ .+: (i|I)s a directory -scons: \*\*\* \[%s\] Error %s +scons: \\*\\*\\* \\[%s\\] Error %s """ konnte_nicht_gefunden_werden = """\ Der Befehl ".+" ist entweder falsch geschrieben oder konnte nicht gefunden werden. -scons: \*\*\* \[%s\] Error %s +scons: \\*\\*\\* \\[%s\\] Error %s """ test.description_set("Incorrect STDERR:\n%s\n" % test.stderr()) diff --git a/test/Errors/non-executable-file.py b/test/Errors/non-executable-file.py index e1b8f4e..0e00c77 100644 --- a/test/Errors/non-executable-file.py +++ b/test/Errors/non-executable-file.py @@ -44,29 +44,29 @@ Bad command or file name unrecognized = """\ '.+' is not recognized as an internal or external command, operable program or batch file. -scons: \*\*\* \[%s\] Error 1 +scons: \\*\\*\\* \\[%s\\] Error 1 """ unspecified = """\ The name specified is not recognized as an internal or external command, operable program or batch file. -scons: \*\*\* \[%s\] Error 1 +scons: \\*\\*\\* \\[%s\\] Error 1 """ cannot_execute = """\ (sh: )*.+: cannot execute -scons: \*\*\* \[%s\] Error %s +scons: \\*\\*\\* \\[%s\\] Error %s """ permission_denied = """\ .+: (p|P)ermission denied -scons: \*\*\* \[%s\] Error %s +scons: \\*\\*\\* \\[%s\\] Error %s """ konnte_nicht_gefunden_werden = """\ Der Befehl ".+" ist entweder falsch geschrieben oder konnte nicht gefunden werden. -scons: \*\*\* \[%s\] Error %s +scons: \\*\\*\\* \\[%s\\] Error %s """ test.write('SConstruct', r""" diff --git a/test/Interactive/shell.py b/test/Interactive/shell.py index 40df86f..dd13504 100644 --- a/test/Interactive/shell.py +++ b/test/Interactive/shell.py @@ -89,8 +89,8 @@ if sys.platform == 'win32': else: no_such_error = 'scons: no_such_command: No such file or directory' -expect_stdout = """\ -scons>>> Copy\("foo.out", "foo.in"\) +expect_stdout = \ +r"""scons>>> Copy\("foo.out", "foo.in"\) Touch\("1"\) scons>>> hello from shell_command.py scons>>> ![^"]+ ".*" diff --git a/test/Interactive/version.py b/test/Interactive/version.py index d0f362a..88416ad 100644 --- a/test/Interactive/version.py +++ b/test/Interactive/version.py @@ -40,7 +40,7 @@ test.write('SConstruct', "") # Standard copyright marker is mangled so it doesn't get replaced # by the packaging build. copyright_line = """\ -(_{2}COPYRIGHT__|Copyright \\(c\\) 2001[-\d, ]+ The SCons Foundation) +(_{2}COPYRIGHT__|Copyright \\(c\\) 2001[-\\d, ]+ The SCons Foundation) """ expect1 = """\ @@ -53,8 +53,8 @@ scons>>> scons>>> """ -test.run(arguments = '-Q --interactive', - stdin = "version\nexit\n") +test.run(arguments='-Q --interactive', + stdin="version\nexit\n") # Windows may or may not print a line for the script version # depending on whether it's invoked through scons.py or scons.bat. diff --git a/test/Java/JARFLAGS.py b/test/Java/JARFLAGS.py index 39a0a6c..6983bf7 100644 --- a/test/Java/JARFLAGS.py +++ b/test/Java/JARFLAGS.py @@ -59,10 +59,10 @@ public class Example1 """) expect = test.wrap_stdout("""\ -javac -d classes -sourcepath src src.Example1\.java -jar cvf test.jar -C classes src.Example1\.class +javac -d classes -sourcepath src src.Example1\\.java +jar cvf test.jar -C classes src.Example1\\.class .* -adding: src.Example1\.class.* +adding: src.Example1\\.class.* """ % locals()) diff --git a/test/Java/JAVABOOTCLASSPATH.py b/test/Java/JAVABOOTCLASSPATH.py index 196cc54..8aaf869 100644 --- a/test/Java/JAVABOOTCLASSPATH.py +++ b/test/Java/JAVABOOTCLASSPATH.py @@ -84,8 +84,8 @@ public class Example2 bootclasspath = os.pathsep.join(['dir1', 'dir2']) expect = """\ -javac -bootclasspath %(bootclasspath)s -d class -sourcepath com com.Example1\.java -javac -bootclasspath %(bootclasspath)s -d class -sourcepath com com.Example2\.java +javac -bootclasspath %(bootclasspath)s -d class -sourcepath com com.Example1\\.java +javac -bootclasspath %(bootclasspath)s -d class -sourcepath com com.Example2\\.java """ % locals() test.run(arguments = '-Q -n .', stdout = expect, match=TestSCons.match_re) diff --git a/test/Libs/SharedLibrary.py b/test/Libs/SharedLibrary.py index cc3fa66..9e22cfa 100644 --- a/test/Libs/SharedLibrary.py +++ b/test/Libs/SharedLibrary.py @@ -223,20 +223,17 @@ if sys.platform == 'cygwin': if sys.platform == 'win32' or sys.platform.find('irix') != -1: - test.run(arguments = '-f SConstructFoo') + test.run(arguments='-f SConstructFoo') else: - test.run(arguments = '-f SConstructFoo', status=2, stderr='''\ -scons: \*\*\* \[.*\] Source file: foo\..* is static and is not compatible with shared target: .* -''', - match=TestSCons.match_re_dotall) + expect = r"scons: \*\*\* \[.*\] Source file: foo\..* is static and is not compatible with shared target: .*" + test.run(arguments='-f SConstructFoo', status=2, stderr=expect, + match=TestSCons.match_re_dotall) # Run it again to make sure that we still get the error # even though the static objects already exist. - test.run(arguments = '-f SConstructFoo', status=2, stderr='''\ -scons: \*\*\* \[.*\] Source file: foo\..* is static and is not compatible with shared target: .* -''', - match=TestSCons.match_re_dotall) + test.run(arguments='-f SConstructFoo', status=2, stderr=expect, + match=TestSCons.match_re_dotall) -test.run(arguments = '-f SConstructFoo2', +test.run(arguments='-f SConstructFoo2', stderr=TestSCons.noisy_ar, match=TestSCons.match_re_dotall) diff --git a/test/Scanner/CrossLanguageNoExtension.py b/test/Scanner/CrossLanguageNoExtension.py index 0016ca5..fa38d2f 100644 --- a/test/Scanner/CrossLanguageNoExtension.py +++ b/test/Scanner/CrossLanguageNoExtension.py @@ -34,7 +34,7 @@ test = TestSCons.TestSCons() # for nodes that do not have mappings from their scanner_key # to a scanner instance -test.write('SConstruct', """ +test.write('SConstruct', r""" import re include_re = re.compile(r'^include\s+(\S+)$', re.M) @@ -77,7 +77,7 @@ env2.Append(SCANNERS = [ k2scan2 ] ) env2.Command( 'k2', 'foo.k', Copy( '$TARGET', '$SOURCE' ) ) """) -test.write('foo.k', +test.write('foo.k', """foo.k 1 line 1 include xxx.k include yyy diff --git a/test/Scanner/FindPathDirs.py b/test/Scanner/FindPathDirs.py index 34eb779..3f5204a 100644 --- a/test/Scanner/FindPathDirs.py +++ b/test/Scanner/FindPathDirs.py @@ -71,7 +71,7 @@ test.write('SConstruct', """\ SConscript('SConscript') """) -test.write('SConscript', """\ +test.write('SConscript', r""" import os.path import re @@ -86,7 +86,7 @@ def kfile_scan(node, env, path, arg): for inc in includes: for dir in path: file = str(dir) + os.sep + inc - if os.path.exists(file): + if os.path.exists(file): results.append(file) break return results @@ -109,7 +109,7 @@ env.Command('foo', 'foo.k', r'%(_python_)s build.py "$KPATH" $SOURCES $TARGET') -test.write('foo.k', +test.write('foo.k', """foo.k 1 line 1 include xxx include yyy diff --git a/test/Scanner/Scanner.py b/test/Scanner/Scanner.py index 272f26a..7e39134 100644 --- a/test/Scanner/Scanner.py +++ b/test/Scanner/Scanner.py @@ -60,7 +60,7 @@ test.write('SConstruct', """ SConscript('SConscript') """, mode='w') -test.write('SConscript', """ +test.write('SConscript', r""" import re include_re = re.compile(r'^include\s+(\S+)\s*$', re.M) @@ -137,7 +137,7 @@ Alias('make_ork', ork) """ % locals(),mode='w') -test.write('foo.k', +test.write('foo.k', """foo.k 1 line 1 include xxx include yyy @@ -151,7 +151,7 @@ bar.in 1 line 3 include zzz """, mode='w') -test.write('junk.k2', +test.write('junk.k2', """include yyy junk.k2 1 line 2 junk.k2 1 line 3 diff --git a/test/Scanner/dictionary.py b/test/Scanner/dictionary.py index efe3cd2..f80c7e5 100644 --- a/test/Scanner/dictionary.py +++ b/test/Scanner/dictionary.py @@ -61,7 +61,7 @@ test.write('SConstruct', """ SConscript('SConscript') """) -test.write('SConscript', """ +test.write('SConscript', r""" import re include1_re = re.compile(r'^include1\s+(\S+)$', re.M) @@ -100,7 +100,7 @@ env.Command('bbb', 'bbb.k2', r'%(_python_)s build.py $SOURCES $TARGET') env.Command('ccc', 'ccc.k3', r'%(_python_)s build.py $SOURCES $TARGET') """ % locals()) -test.write('aaa.k1', +test.write('aaa.k1', """aaa.k1 1 line 2 include1 xxx @@ -109,7 +109,7 @@ include3 zzz line 6 """) -test.write('bbb.k2', +test.write('bbb.k2', """bbb.k2 1 line 2 include1 xxx @@ -118,7 +118,7 @@ include3 zzz line 6 """) -test.write('ccc.k3', +test.write('ccc.k3', """ccc.k3 1 line 2 include1 xxx diff --git a/test/Scanner/exception.py b/test/Scanner/exception.py index ec19842..90791cb 100644 --- a/test/Scanner/exception.py +++ b/test/Scanner/exception.py @@ -37,7 +37,7 @@ test.write('SConstruct', """ SConscript('SConscript') """) -test.write('SConscript', """ +test.write('SConscript', r""" import re include_re = re.compile(r'^include\s+(\S+)$', re.M) @@ -82,14 +82,14 @@ bar_in = File('bar.in') env.Cat('bar', bar_in) """) -test.write('foo.k', +test.write('foo.k', """foo.k 1 line 1 include xxx include yyy foo.k 1 line 4 """) -test.write('bar.in', +test.write('bar.in', """include yyy bar.in 1 line 2 bar.in 1 line 3 diff --git a/test/Scanner/generated.py b/test/Scanner/generated.py index 5e808e1..f0fb0cc 100644 --- a/test/Scanner/generated.py +++ b/test/Scanner/generated.py @@ -188,7 +188,7 @@ env = env.Clone() # Yes, clobber intentionally """) -test.write(['src', 'lib_geng', 'SConscript'], """\ +test.write(['src', 'lib_geng', 'SConscript'], r""" # --- Begin SConscript boilerplate --- import sys import Mylib @@ -280,7 +280,7 @@ env.Command(generated_hdrs.split(), cmd_generated) recurse_env.Command([lib_fullname] + lib_objs, lib_srcs + (generated_hdrs + " " + static_hdrs).split(), - cmd_justlib) + cmd_justlib) """) test.write(['src', 'lib_geng', 'MAKE-HEADER.py'], """\ @@ -395,7 +395,7 @@ int g_1() test.write(['src', 'lib_geng', 'libg_2.c'], """\ #include -#include +#include #include #include diff --git a/test/Scanner/multi-env.py b/test/Scanner/multi-env.py index 1cc85d0..e9c231d 100644 --- a/test/Scanner/multi-env.py +++ b/test/Scanner/multi-env.py @@ -37,7 +37,7 @@ _python_ = TestSCons._python_ test = TestSCons.TestSCons() -test.write('SConstruct', """ +test.write('SConstruct', r""" import re include_re = re.compile(r'^include\s+(\S+)$', re.M) diff --git a/test/Scanner/no-Dir-node.py b/test/Scanner/no-Dir-node.py index a230ea6..ef90934 100644 --- a/test/Scanner/no-Dir-node.py +++ b/test/Scanner/no-Dir-node.py @@ -89,7 +89,7 @@ Command('list.out', 'subdir', foo, source_scanner = DirScanner) SConscript('subdir/SConscript') """) -test.write(['subdir', 'SConscript'], """\ +test.write(['subdir', 'SConscript'], r""" import SCons.Scanner kscan = SCons.Scanner.Classic(name = 'kfile', suffixes = ['.k'], diff --git a/test/Scanner/source_scanner-dict.py b/test/Scanner/source_scanner-dict.py index f719f00..115c19e 100644 --- a/test/Scanner/source_scanner-dict.py +++ b/test/Scanner/source_scanner-dict.py @@ -65,7 +65,7 @@ test.write('SConstruct', """ SConscript('SConscript') """) -test.write('SConscript', """ +test.write('SConscript', r""" import re include1_re = re.compile(r'^include1\s+(\S+)$', re.M) @@ -101,7 +101,7 @@ env.Build('ccc', 'ccc.k3') env.Build('ddd', ['ddd.k4', 'aaa.k1', 'bbb.k2', 'ccc.k3']) """ % locals()) -test.write('aaa.k1', +test.write('aaa.k1', """aaa.k1 1 line 2 include1 xxx @@ -110,7 +110,7 @@ include3 zzz line 6 """) -test.write('bbb.k2', +test.write('bbb.k2', """bbb.k2 1 line 2 include1 xxx @@ -119,7 +119,7 @@ include3 zzz line 6 """) -test.write('ccc.k3', +test.write('ccc.k3', """ccc.k3 1 line 2 include1 xxx @@ -128,7 +128,7 @@ include3 zzz line 6 """) -test.write('ddd.k4', +test.write('ddd.k4', """ddd.k4 1 line 2 line 3 diff --git a/test/Scanner/unicode.py b/test/Scanner/unicode.py index 227c72e..0edd5b6 100644 --- a/test/Scanner/unicode.py +++ b/test/Scanner/unicode.py @@ -77,7 +77,7 @@ with open(sys.argv[2], 'w') as ofp: sys.exit(0) """) -test.write('SConstruct', """ +test.write('SConstruct', r""" import re include_re = re.compile(r'^include\s+(\S+)$', re.M) diff --git a/test/explain/basic.py b/test/explain/basic.py index 1e42d33..46ce6bc 100644 --- a/test/explain/basic.py +++ b/test/explain/basic.py @@ -51,7 +51,7 @@ inc_bbb_k = test.workpath('inc', 'bbb.k') -test.write(cat_py, r"""\ +test.write(cat_py, r""" from __future__ import print_function import sys @@ -81,7 +81,7 @@ sys.exit(0) """) -SConstruct_contents = """\ +SConstruct_contents = r""" DefaultEnvironment(tools=[]) import re @@ -130,7 +130,7 @@ AlwaysBuild(file6) env.Cat('subdir/file7', 'subdir/file7.in') env.OneCat('subdir/file8', ['subdir/file7.in', env.Value(%(test_value)s)] ) env.OneCat('subdir/file9', ['subdir/file7.in', env.Value(7)] ) -""" % valueDict ) +""" % valueDict) test_value = '"first"' WriteInitialTest( locals() ) diff --git a/test/explain/save-info.py b/test/explain/save-info.py index 383822c..24ebb88 100644 --- a/test/explain/save-info.py +++ b/test/explain/save-info.py @@ -70,7 +70,7 @@ with open(sys.argv[1], 'w') as ofp: sys.exit(0) """) -test.write(['src', 'SConstruct'], """\ +test.write(['src', 'SConstruct'], r""" DefaultEnvironment(tools=[]) import re diff --git a/test/import.py b/test/import.py index 9799850..2725705 100644 --- a/test/import.py +++ b/test/import.py @@ -114,8 +114,8 @@ scons: warning: Can't find Intel compiler top dir for version='None', abi='[^']* """ + TestSCons.file_expr # Intel no license directory warning -intel_license_warning = re.escape(""" -scons: warning: Intel license dir was not found. Tried using the INTEL_LICENSE_FILE environment variable (), the registry () and the default path (C:\Program Files\Common Files\Intel\Licenses). Using the default path as a last resort. +intel_license_warning = re.escape( +r"""scons: warning: Intel license dir was not found. Tried using the INTEL_LICENSE_FILE environment variable (), the registry () and the default path (C:\Program Files\Common Files\Intel\Licenses). Using the default path as a last resort. """) + TestSCons.file_expr intel_warnings = [ diff --git a/test/option-v.py b/test/option-v.py index 4a67df0..ed8c4e5 100644 --- a/test/option-v.py +++ b/test/option-v.py @@ -35,7 +35,7 @@ test.write('SConstruct', "") # Standard copyright marker is mangled so it doesn't get replaced # by the packaging build. copyright_line = """\ -(_{2}COPYRIGHT__|Copyright \\(c\\) 2001[-\d, ]+ The SCons Foundation) +(_{2}COPYRIGHT__|Copyright \\(c\\) 2001[-\\d, ]+ The SCons Foundation) """ # Windows may or may not print a line for the script version @@ -64,7 +64,7 @@ if not test.match_re(stdout, expect1) and not test.match_re(stdout, expect2): test.fail_test() test.pass_test() - + # Local Variables: # tab-width:4 diff --git a/test/runtest/xml/output.py b/test/runtest/xml/output.py index 88bca04..cd20dbd 100644 --- a/test/runtest/xml/output.py +++ b/test/runtest/xml/output.py @@ -65,7 +65,7 @@ expect = """\ FAILING TEST STDERR - + %(test_no_result_py)s @@ -75,7 +75,7 @@ expect = """\ NO RESULT TEST STDERR - + %(test_pass_py)s @@ -85,9 +85,9 @@ expect = """\ PASSING TEST STDERR - + - + """ % locals() diff --git a/test/srcchange.py b/test/srcchange.py index e396fb8..f1f67c1 100644 --- a/test/srcchange.py +++ b/test/srcchange.py @@ -42,13 +42,13 @@ _python_ = TestSCons._python_ test = TestSCons.TestSCons() -test.write('getrevision', """ +test.write('getrevision', r""" from __future__ import print_function -with open('revnum.in','r') as f: +with open('revnum.in', 'r') as f: print(f.read().strip(), end='') """) -test.write('SConstruct', """ +test.write('SConstruct', r""" import re def subrevision(target, source ,env): @@ -63,7 +63,7 @@ SubRevision = Action(subrevision) env=Environment() content_env=env.Clone() -content_env.Command('revision.in', [], r'%(_python_)s getrevision > $TARGET') +content_env.Command('revision.in', [], '%(_python_)s getrevision > $TARGET') content_env.AlwaysBuild('revision.in') env.Precious('main.c') env.Command('main.c', 'revision.in', SubRevision) diff --git a/test/timestamp-fallback.py b/test/timestamp-fallback.py index f4e2e4d..2dd50a2 100644 --- a/test/timestamp-fallback.py +++ b/test/timestamp-fallback.py @@ -25,11 +25,14 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" """ -Verify falling back to 'timestamp' behavior if there is no native -hashlib and no underlying md5 module available. +Verify falling back to 'timestamp' behavior if there is no md5 +module. Formerly checked for hashlib first, but that has been +standard library since 2.5; test is kept in case one of those +rare no-md5 Pythons comes into play (some entities ban the use +of md5 as unsafe, although SCons does not use it in a security context. """ -import imp +import sys import os import TestSCons @@ -37,24 +40,14 @@ import TestSCons test = TestSCons.TestSCons() try: - file, name, desc = imp.find_module('hashlib') + from hashlib import md5 except ImportError: pass else: - msg = "This version of Python has a 'hashlib' module.\n" + \ - "Skipping test of falling back to timestamps.\n" + msg = "The 'md5' algorithm is built in to hashlib in this version of Python.\n" + \ + "Cannot test falling back to timestamps.\n" test.skip_test(msg) -try: - file, name, desc = imp.find_module('md5') -except ImportError: - pass -else: - if desc[2] == imp.C_BUILTIN: - msg = "The 'md5' module is built in to this version of Python.\n" + \ - "Cannot test falling back to timestamps.\n" - test.skip_test(msg) - test.write('md5.py', r""" raise ImportError """) @@ -66,7 +59,7 @@ DefaultEnvironment(tools=[]) def build(env, target, source): with open(str(target[0]), 'wt') as ofp, open(str(source[0]), 'rt') as ifp: - opf.write(ifp.read()) + ofp.write(ifp.read()) B = Builder(action = build) env = Environment(tools = [], BUILDERS = { 'B' : B }) -- cgit v0.12 From 4db173f22b9130426b6a5064fea1b01bdc8a375d Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Mon, 16 Sep 2019 08:07:37 -0600 Subject: Experiment: print test times for appveyor [travis skip] Signed-off-by: Mats Wichmann --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 5805f5f..a18f295 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -226,7 +226,7 @@ build_script: # Windows run the tests # NOTE: running powershell from cmd on purpose because it formats the output # correctly - - cmd: powershell -Command "& { if($env:COVERAGE -eq 1) { coverage run -p --rcfile=$($env:COVERAGE_PROCESS_START) runtest.py -j 2 --exclude-list exclude_list.txt -f build_tests.txt } else { C:\\%WINPYTHON%\\python.exe runtest.py -j 2 --exclude-list exclude_list.txt -f build_tests.txt }; if($LastExitCode -eq 2 -Or $LastExitCode -eq 0) { $host.SetShouldExit(0 )} else {$host.SetShouldExit(1)}}" + - cmd: powershell -Command "& { if($env:COVERAGE -eq 1) { coverage run -p --rcfile=$($env:COVERAGE_PROCESS_START) runtest.py -j 2 -t --exclude-list exclude_list.txt -f build_tests.txt } else { C:\\%WINPYTHON%\\python.exe runtest.py -j 2 -t --exclude-list exclude_list.txt -f build_tests.txt }; if($LastExitCode -eq 2 -Or $LastExitCode -eq 0) { $host.SetShouldExit(0 )} else {$host.SetShouldExit(1)}}" # linux run the tests # unset JAVA_TOOL_OPTIONS because newer java prints this to stderr -- cgit v0.12 From 8fb4989b55af2afe3d3de328b59a90eebcef4e49 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Wed, 25 Sep 2019 12:53:51 -0600 Subject: Docs for InstallVersionedLib and --install-sandbox [ci skip] Adds --install-sandbox to manpage options and to section on Install builder. Adds mention of InstallVersionedLib to user guide. Fixes #3007 Signed-off-by: Mats Wichmann --- doc/man/scons.xml | 12 +++++++ doc/scons.mod | 1 + doc/user/install.xml | 70 ++++++++++++++++++++++++++++++++++++--- src/engine/SCons/Tool/install.xml | 16 +++++++++ 4 files changed, 95 insertions(+), 4 deletions(-) diff --git a/doc/man/scons.xml b/doc/man/scons.xml index eb9f00b..9af3f3e 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -1080,6 +1080,18 @@ This implies + + + --install-sandbox=path + + +When using the &Install; functions, prepend path +to the installation paths such that all installed files will be placed +underneath path. + + + + --interactive diff --git a/doc/scons.mod b/doc/scons.mod index 77fa39b..71e996d 100644 --- a/doc/scons.mod +++ b/doc/scons.mod @@ -212,6 +212,7 @@ Import"> Install"> InstallAs"> +InstallVersionedLib"> Link"> ListOption"> ListVariable"> diff --git a/doc/user/install.xml b/doc/user/install.xml index 8c224d4..db87521 100644 --- a/doc/user/install.xml +++ b/doc/user/install.xml @@ -2,7 +2,7 @@ %scons; - + %builders-mod; @@ -11,7 +11,7 @@ %tools-mod; %variables-mod; - + ]> - Lastly, if you have multiple files that all + If you have multiple files that all need to be installed with different file names, you can either call the &InstallAs; function multiple times, or as a shorthand, @@ -268,4 +268,66 @@ int main() { printf("Goodbye, world!\n"); }
+
+ Installing a Shared Library + + + If a shared library is created with the + &cv-link-SHLIBVERSION; variable set, + &scons; will create symbolic links as needed based on that + variable. To properly install such a library including the + symbolic links, use the &InstallVersionedLib; function. + + + + For example, on a Linux system, this instruction: + + + +foo = env.SharedLibrary(target="foo", source="foo.c", SHLIBVERSION="1.2.3") + + + + Will produce a shared library + libfoo.so.1.2.3 + and symbolic links + libfoo.so and + libfoo.so.1 + which point to + libfoo.so.1.2.3. + You can use the Node returned by the &SharedLibrary; + builder in order to install the library and its + symbolic links in one go without having to list + them individually: + + + +env.InstallVersionedLib(target="lib", source=foo) + + + + +
+ diff --git a/src/engine/SCons/Tool/install.xml b/src/engine/SCons/Tool/install.xml index 6ae3e30..74169b3 100644 --- a/src/engine/SCons/Tool/install.xml +++ b/src/engine/SCons/Tool/install.xml @@ -52,6 +52,22 @@ a builder. env.Install('/usr/local/bin', source = ['foo', 'bar']) + + +If the command line +option is given, the target directory will be prefixed +by the directory path specified. +This is useful to test installs without installing to +a "live" location in the system. + + + +See also &FindInstalledFiles;. +For more thoughts on installation, see the User Guide +(particularly the section on Command-Line Targets +and the chapters on Installing Files and on Alias Targets). + + -- cgit v0.12 From b907ebd61c3898061412207c2c314107caa3a59b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Kul=C3=ADk?= Date: Fri, 27 Sep 2019 09:47:16 +0200 Subject: Fix bytes not being decoded in suncxx.py --- src/engine/SCons/Tool/suncxx.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/SCons/Tool/suncxx.py b/src/engine/SCons/Tool/suncxx.py index 9ac8d32..090df7d 100644 --- a/src/engine/SCons/Tool/suncxx.py +++ b/src/engine/SCons/Tool/suncxx.py @@ -74,7 +74,7 @@ def get_package_info(package_name, pkginfo, pkgchk): except EnvironmentError: pass else: - pkginfo_contents = p.communicate()[0] + pkginfo_contents = p.communicate()[0].decode() version_re = re.compile(r'^ *VERSION:\s*(.*)$', re.M) version_match = version_re.search(pkginfo_contents) if version_match: @@ -88,7 +88,7 @@ def get_package_info(package_name, pkginfo, pkgchk): except EnvironmentError: pass else: - pkgchk_contents = p.communicate()[0] + pkgchk_contents = p.communicate()[0].decode() pathname_re = re.compile(r'^Pathname:\s*(.*/bin/CC)$', re.M) pathname_match = pathname_re.search(pkgchk_contents) if pathname_match: -- cgit v0.12 From 2cc64514e0b17d9f678b5bddb8ffe00789abdba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Kul=C3=ADk?= Date: Fri, 27 Sep 2019 09:58:05 +0200 Subject: Modify CHANGES.txt --- src/CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 4078669..ac9239f 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -18,6 +18,9 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Turn previously deprecated debug options into failures: --debug=tree, --debug=dtree, --debug=stree, --debug=nomemoizer. + From Jakub Kulik + - Fix subprocess result bytes not being decoded in SunOS/Solaris related tools. + RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 -- cgit v0.12 From 7193bf3b65b1f9fe47cde3772a1649af72c5cf3e Mon Sep 17 00:00:00 2001 From: Edoardo Bezzeccheri Date: Tue, 1 Oct 2019 13:47:02 +0200 Subject: Added debug option "timestamp", modify CHANGES.txt --- src/CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 4078669..3ea2249 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -18,6 +18,9 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Turn previously deprecated debug options into failures: --debug=tree, --debug=dtree, --debug=stree, --debug=nomemoizer. + From Edoardo Bezzeccheri + - Added debug option "timestamp" which outputs to stdout the absolute start and end time for each target. + RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 -- cgit v0.12 From 8173acb3d3b69144ba90d931e110ee5b8e2801d0 Mon Sep 17 00:00:00 2001 From: Edoardo Bezzeccheri Date: Tue, 1 Oct 2019 13:47:17 +0200 Subject: Added debug option "timestamp", add test --- test/option/debug-timestamp.py | 234 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 234 insertions(+) create mode 100644 test/option/debug-timestamp.py diff --git a/test/option/debug-timestamp.py b/test/option/debug-timestamp.py new file mode 100644 index 0000000..3e7c682 --- /dev/null +++ b/test/option/debug-timestamp.py @@ -0,0 +1,234 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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. +from __future__ import division, print_function + +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +import TestSCons +import re +import time + +_python_ = TestSCons._python_ + +test = TestSCons.TestSCons() + +test.write('sleep_cat.py', """\ +import sys +import time +time.sleep(int(sys.argv[1])) +with open(sys.argv[2], 'wb') as fp: + for arg in sys.argv[3:]: + with open(arg, 'rb') as infp: + fp.write(infp.read()) +sys.exit(0) +""") + +test.write('SConstruct', """ +DefaultEnvironment(tools=[]) +env = Environment(tools=[], + PYTHON = r'%(_python_)s', + SLEEP_CAT = r'sleep_cat.py', + CATCOM = '$PYTHON $SLEEP_CAT $SECONDS $TARGET $SOURCES', + SECONDS = ARGUMENTS.get('SLEEP', '0')) +f1 = env.Command('f1.out', 'f1.in', '$CATCOM') +f2 = env.Command('f2.out', 'f2.in', '$CATCOM') +f3 = env.Command('f3.out', 'f3.in', '$CATCOM') +f4 = env.Command('f4.out', 'f4.in', '$CATCOM') +env.Command('output', [f1, f2, f3, f4], '$CATCOM') +""" % locals()) + +test.write('f1.in', "f1.in\n") +test.write('f2.in', "f2.in\n") +test.write('f3.in', "f3.in\n") +test.write('f4.in', "f4.in\n") + +expected_targets = ['f1.out', 'f2.out', 'f3.out', 'f4.out', 'output', '.'] + +# Before anything else, make sure we get valid --debug=timestamp results +# when just running the help option. +test.run(arguments = "-h --debug=timestamp") + + + +def num(s, match): + return float(re.search(match, s).group(1)) + +def within_tolerance(expected, actual, tolerance): + return abs((expected-actual)/actual) <= tolerance + +def get_total_time(stdout): + return num(stdout, r'Total build time: (\d+\.\d+) seconds') + +def get_sconscript_time(stdout): + return num(stdout, r'Total SConscript file execution time: (\d+\.\d+) seconds') + +def get_scons_time(stdout): + return num(stdout, r'Total SCons execution time: (\d+\.\d+) seconds') + +def get_command_time(stdout): + return num(stdout, r'Total command execution time: (\d+\.\d+) seconds') + + +# Try to make our results a little more accurate and repeatable by +# measuring Python overhead executing a minimal file, and reading the +# scons.py script itself from disk so that it's already been cached. +test.write('pass.py', "pass\n") +test.read(test.program) + +start_time = time.time() +test.run(program=TestSCons.python, arguments=test.workpath('pass.py')) +overhead = time.time() - start_time + + + +start_time = time.time() +test.run(arguments = "-j1 --debug=timestamp . SLEEP=0") +complete_time = time.time() - start_time + + + +expected_total_time = complete_time - overhead + +def get_times_and_targets(pattern): + targets = [] + times = [] + for target,time in re.findall(pattern, test.stdout()): + targets.append(target) + times.append(float(time)) + return targets, times + +duration_targets, durations = get_times_and_targets(r'Command execution time: (.*): (\d+\.\d+) seconds') +start_targets, start_times = get_times_and_targets(r'Command execution start time: (.*): (\d+\.\d+) seconds') +stop_targets, stop_times = get_times_and_targets(r'Command execution stop time: (.*): (\d+\.\d+) seconds') + +expected_command_time = 0.0 +for t in durations: + expected_command_time += t + + +stdout = test.stdout() + +total_time = get_total_time(stdout) +sconscript_time = get_sconscript_time(stdout) +scons_time = get_scons_time(stdout) +command_time = get_command_time(stdout) + +failures = [] +warnings = [] + + +def check_targets(targets): + if targets != expected_targets: + failures.append("""\ + Scons reported the targets of timing information as %(targets)s, + but the actual targets should have been %(expected_targets)s. + """.format(targets=targets, expected_targets=expected_targets)) + +check_targets(duration_targets) +check_targets(start_targets) +check_targets(stop_targets) + +if not within_tolerance(expected_command_time, command_time, 0.01): + failures.append("""\ +SCons -j1 reported a total command execution time of %(command_time)s, +but command execution times really totalled %(expected_command_time)s, +outside of the 1%% tolerance. +""" % locals()) + +added_times = sconscript_time+scons_time+command_time +if not within_tolerance(total_time, added_times, 0.01): + failures.append("""\ +SCons -j1 reported a total build time of %(total_time)s, +but the various execution times actually totalled %(added_times)s, +outside of the 1%% tolerance. +""" % locals()) + +if not within_tolerance(total_time, expected_total_time, 0.20): + # This tolerance check seems empirically to work fine if there's + # a light load on the system, but on a heavily loaded system the + # timings get screwy and it can fail frequently. Some obvious + # attempts to work around the problem didn't, so just treat it as + # a warning for now. + warnings.append("""\ +Warning: SCons -j1 reported total build time of %(total_time)s, +but the actual measured build time was %(expected_total_time)s +(end-to-end time of %(complete_time)s less Python overhead of %(overhead)s), +outside of the 15%% tolerance. +""" % locals()) + +if failures or warnings: + print('\n'.join([test.stdout()] + failures + warnings)) +if failures: + test.fail_test(1) + +test.run(arguments = "--debug=timestamp . SLEEP=0") + +command_time = get_command_time(test.stdout()) +if command_time != 0.0: + print("Up-to-date run received non-zero command time of %s" % command_time) + test.fail_test() + + + +test.run(arguments = "-c") + +test.run(arguments = "-j4 --debug=timestamp . SLEEP=1") + + + +stdout = test.stdout() + +total_time = get_total_time(stdout) +sconscript_time = get_sconscript_time(stdout) +scons_time = get_scons_time(stdout) +command_time = get_command_time(stdout) + +failures = [] + +added_times = sconscript_time+scons_time+command_time +if not within_tolerance(total_time, added_times, 0.01): + failures.append("""\ +SCons -j4 reported a total build time of %(total_time)s, +but the various execution times actually totalled %(added_times)s, +outside of the 1%% tolerance. +""" % locals()) + +if failures: + print('\n'.join([test.stdout()] + failures)) + test.fail_test(1) + +test.run(arguments = "-j4 --debug=timestamp . SLEEP=1") + +command_time = get_command_time(test.stdout()) +if command_time != 0.0: + print("Up-to-date run received non-zero command time of %s" % command_time) + test.fail_test() + + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: \ No newline at end of file -- cgit v0.12 From 0d2a82fe128c403bf4fa4f5deec23ead8fd24a91 Mon Sep 17 00:00:00 2001 From: Edoardo Bezzeccheri Date: Tue, 1 Oct 2019 13:47:32 +0200 Subject: Added debug option "timestamp", implementation --- src/engine/SCons/Script/Main.py | 10 +++++++++- src/engine/SCons/Script/SConsOptions.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index acc8678..e5b7f94 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -75,6 +75,7 @@ print_objects = 0 print_memoizer = 0 print_stacktrace = 0 print_time = 0 +print_timestamp = 0 sconscript_time = 0 cumulative_command_time = 0 exit_status = 0 # final exit status, assume success by default @@ -209,7 +210,11 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask): finish_time = time.time() last_command_end = finish_time cumulative_command_time = cumulative_command_time+finish_time-start_time + if print_timestamp: + sys.stdout.write("Command execution start time: %s: %f seconds\n"%(str(self.node), start_time)) sys.stdout.write("Command execution time: %s: %f seconds\n"%(str(self.node), finish_time-start_time)) + if print_timestamp: + sys.stdout.write("Command execution stop time: %s: %f seconds\n"%(str(self.node), finish_time)) def do_failed(self, status=2): _BuildFailures.append(self.exception[1]) @@ -636,7 +641,7 @@ def _SConstruct_exists(dirname='', repositories=[], filelist=None): return None def _set_debug_values(options): - global print_memoizer, print_objects, print_stacktrace, print_time + global print_memoizer, print_objects, print_stacktrace, print_time, print_timestamp debug_values = options.debug @@ -674,6 +679,9 @@ def _set_debug_values(options): options.tree_printers.append(TreePrinter(status=True)) if "time" in debug_values: print_time = 1 + if "timestamp" in debug_values: + print_time = 1 + print_timestamp = 1 if "tree" in debug_values: options.tree_printers.append(TreePrinter()) if "prepare" in debug_values: diff --git a/src/engine/SCons/Script/SConsOptions.py b/src/engine/SCons/Script/SConsOptions.py index add1150..6baccc3 100644 --- a/src/engine/SCons/Script/SConsOptions.py +++ b/src/engine/SCons/Script/SConsOptions.py @@ -622,7 +622,7 @@ def Parser(version): debug_options = ["count", "duplicate", "explain", "findlibs", "includes", "memoizer", "memory", "objects", "pdb", "prepare", "presub", "stacktrace", - "time"] + "time", "timestamp"] def opt_debug(option, opt, value__, parser, debug_options=debug_options, -- cgit v0.12 From dee0266dd236dd1aa1ff1298f45c99d034d565c9 Mon Sep 17 00:00:00 2001 From: Edoardo Bezzeccheri Date: Tue, 1 Oct 2019 15:00:07 +0200 Subject: Added debug option "timestamp", documentation --- doc/man/scons.xml | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/doc/man/scons.xml b/doc/man/scons.xml index 9af3f3e..7bd0ce8 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -890,9 +890,43 @@ since multiple build commands and intervening SCons processing should take place in parallel.)
- + + + --debug=timestamp + + Prints additional time profiling information: + + + The time spent executing each individual build command + + + The total build time (time SCons ran from beginning to end) + + + The total time spent reading and executing SConscript files + + + The total time spent SCons itself spend running +(that is, not counting reading and executing SConscript files) + + + The total time spent executing all build commands + + + The elapsed wall-clock time spent executing those build commands + + + The absolute start and end wall-clock time spent executing those build commands + + + The time spent processing each file passed to the SConscript() function + + + + + --diskcheck=types -- cgit v0.12 From 24bb5363c588cca55826f4da37752a79943728a8 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Tue, 1 Oct 2019 07:18:31 -0600 Subject: Add doc for *EMITTER consvars [ci skip] Three *EMITTER construction variables had documentation of "TODO". A fourth, LDMODULEEMITTER, was not mentioned at all. Signed-off-by: Mats Wichmann --- src/engine/SCons/Tool/__init__.xml | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/src/engine/SCons/Tool/__init__.xml b/src/engine/SCons/Tool/__init__.xml index 69cc597..b6e5a43 100644 --- a/src/engine/SCons/Tool/__init__.xml +++ b/src/engine/SCons/Tool/__init__.xml @@ -468,7 +468,7 @@ as C++ files. Used to override &cv-link-SHLIBVERSION;/&cv-link-LDMODULEVERSION; when generating versioned import library for a shared library/loadable module. If undefined, the &cv-link-SHLIBVERSION;/&cv-link-LDMODULEVERSION; is used to -determine the version of versioned import library. +determine the version of versioned import library.
@@ -476,7 +476,10 @@ determine the version of versioned import library. -TODO +Contains the emitter specification for the +&b-link-StaticLibrary; builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. @@ -494,10 +497,24 @@ format as &cv-link-SHLIBVERSION;. + + + +Contains the emitter specification for the +&b-link-LoadableModule; builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. + + + + -TODO +Contains the emitter specification for the +&b-link-SharedLibrary; builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. @@ -505,7 +522,10 @@ TODO -TODO +Contains the emitter specification for the +&b-link-Program; builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. @@ -514,7 +534,7 @@ TODO When this construction variable is defined, a versioned shared library -is created by &b-link-SharedLibrary; builder. This activates the +is created by the &b-link-SharedLibrary; builder. This activates the &cv-link-_SHLIBVERSIONFLAGS; and thus modifies the &cv-link-SHLINKCOM; as required, adds the version number to the library name, and creates the symlinks that are needed. &cv-link-SHLIBVERSION; versions should exist as alpha-numeric, -- cgit v0.12 From 7488962c7f55a2029acb1aedeb5c50e9c1b8d199 Mon Sep 17 00:00:00 2001 From: Theogen Ratkin Date: Wed, 2 Oct 2019 15:18:31 -0400 Subject: Fix a syntax error in the documentation Quotation marks do not match, which is a syntax error. --- doc/user/output.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user/output.xml b/doc/user/output.xml index ca4707d..f9e1a98 100644 --- a/doc/user/output.xml +++ b/doc/user/output.xml @@ -309,7 +309,7 @@ Linking foo env = Environment() -if ARGUMENTS.get('VERBOSE') != "1': +if ARGUMENTS.get('VERBOSE') != '1': env['CCCOMSTR'] = "Compiling $TARGET" env['LINKCOMSTR'] = "Linking $TARGET" env.Program('foo.c') -- cgit v0.12 From 16a9225e26489ab611af03f022eafe6d264bfcc4 Mon Sep 17 00:00:00 2001 From: jw0k Date: Fri, 4 Oct 2019 17:14:47 +0200 Subject: fix CheckFunc detection code for MSVC --- src/engine/SCons/Conftest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/engine/SCons/Conftest.py b/src/engine/SCons/Conftest.py index 1163aa3..c24adf8 100644 --- a/src/engine/SCons/Conftest.py +++ b/src/engine/SCons/Conftest.py @@ -290,6 +290,10 @@ char %s();""" % function_name #include %(hdr)s +#if _MSC_VER && !__INTEL_COMPILER + #pragma function(%(name)s) +#endif + int main(void) { #if defined (__stub_%(name)s) || defined (__stub___%(name)s) fail fail fail -- cgit v0.12 From 68b8d043051761e72b304073aeac002abc1ad732 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sat, 5 Oct 2019 09:14:32 -0600 Subject: fix typo: missing quote in a manpage example [ci skip] Signed-off-by: Mats Wichmann --- doc/man/scons.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/scons.xml b/doc/man/scons.xml index 9af3f3e..9065f25 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -4572,7 +4572,7 @@ incl = Dir('include') f = incl.File('header.h') # Get a Node for a subdirectory within a directory -dist = Dir('project-3.2.1) +dist = Dir('project-3.2.1') src = dist.Dir('src') # Get a Node for a file in the same directory -- cgit v0.12 From 5f22daa0bd88e39071860b54678f8c516badf1f1 Mon Sep 17 00:00:00 2001 From: Jacek Kuczera Date: Sun, 6 Oct 2019 21:57:32 +0200 Subject: test whether CheckFunc properly detects memmove --- test/Configure/config-h.py | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/test/Configure/config-h.py b/test/Configure/config-h.py index a5c1998..405f259 100644 --- a/test/Configure/config-h.py +++ b/test/Configure/config-h.py @@ -46,25 +46,27 @@ env.AppendENVPath('PATH', os.environ['PATH']) conf = Configure(env, config_h = 'config.h') r1 = conf.CheckFunc('printf') r2 = conf.CheckFunc('noFunctionCall') -r3 = conf.CheckType('int') -r4 = conf.CheckType('noType') -r5 = conf.CheckCHeader('stdio.h', '<>') -r6 = conf.CheckCHeader('hopefullynoc-header.h') -r7 = conf.CheckCXXHeader('vector', '<>') -r8 = conf.CheckCXXHeader('hopefullynocxx-header.h') +r3 = conf.CheckFunc('memmove') +r4 = conf.CheckType('int') +r5 = conf.CheckType('noType') +r6 = conf.CheckCHeader('stdio.h', '<>') +r7 = conf.CheckCHeader('hopefullynoc-header.h') +r8 = conf.CheckCXXHeader('vector', '<>') +r9 = conf.CheckCXXHeader('hopefullynocxx-header.h') env = conf.Finish() conf = Configure(env, config_h = 'config.h') -r9 = conf.CheckLib('%(lib)s', 'sin') -r10 = conf.CheckLib('hopefullynolib', 'sin') -r11 = conf.CheckLibWithHeader('%(lib)s', 'math.h', 'c') -r12 = conf.CheckLibWithHeader('%(lib)s', 'hopefullynoheader2.h', 'c') -r13 = conf.CheckLibWithHeader('hopefullynolib2', 'math.h', 'c') +r10 = conf.CheckLib('%(lib)s', 'sin') +r11 = conf.CheckLib('hopefullynolib', 'sin') +r12 = conf.CheckLibWithHeader('%(lib)s', 'math.h', 'c') +r13 = conf.CheckLibWithHeader('%(lib)s', 'hopefullynoheader2.h', 'c') +r14 = conf.CheckLibWithHeader('hopefullynolib2', 'math.h', 'c') env = conf.Finish() """ % locals()) expected_read_str = """\ Checking for C function printf()... yes Checking for C function noFunctionCall()... no +Checking for C function memmove()... yes Checking for C type int... yes Checking for C type noType... no Checking for C header file stdio.h... yes @@ -96,6 +98,9 @@ expected_config_h = ("""\ /* Define to 1 if the system has the function `noFunctionCall'. */ /* #undef HAVE_NOFUNCTIONCALL */ +/* Define to 1 if the system has the function `memmove'. */ +#define HAVE_MEMMOVE 1 + /* Define to 1 if the system has the type `int'. */ #define HAVE_INT 1 -- cgit v0.12 From 671aed7eb090d1501a4097b34909db7ec336e68e Mon Sep 17 00:00:00 2001 From: Jacek Kuczera Date: Sun, 6 Oct 2019 22:11:54 +0200 Subject: describe CheckFunc fix --- src/CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 4078669..96c8643 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -18,6 +18,9 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Turn previously deprecated debug options into failures: --debug=tree, --debug=dtree, --debug=stree, --debug=nomemoizer. + From Jacek Kuczera: + - Fix CheckFunc detection code for Visual 2019. Some functions + (e.g. memmove) were incorrectly recognized as not available. RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 -- cgit v0.12 From 2a72809ab9d83d999caf6a9f7b4618dbd00920f9 Mon Sep 17 00:00:00 2001 From: Edoardo Bezzeccheri Date: Wed, 9 Oct 2019 10:37:43 +0200 Subject: Added debug option "timestamp", fix shadowing internal fnc --- test/option/debug-timestamp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/option/debug-timestamp.py b/test/option/debug-timestamp.py index 3e7c682..458974e 100644 --- a/test/option/debug-timestamp.py +++ b/test/option/debug-timestamp.py @@ -112,9 +112,9 @@ expected_total_time = complete_time - overhead def get_times_and_targets(pattern): targets = [] times = [] - for target,time in re.findall(pattern, test.stdout()): + for target, target_time in re.findall(pattern, test.stdout()): targets.append(target) - times.append(float(time)) + times.append(float(target_time)) return targets, times duration_targets, durations = get_times_and_targets(r'Command execution time: (.*): (\d+\.\d+) seconds') -- cgit v0.12 From ea6b79d2374143fd53f3e94d6026365b636c49af Mon Sep 17 00:00:00 2001 From: Edoardo Bezzeccheri Date: Wed, 9 Oct 2019 10:39:56 +0200 Subject: Added debug option "timestamp", rename test file --- test/option/debug-action-timestamps.py | 234 +++++++++++++++++++++++++++++++++ test/option/debug-timestamp.py | 234 --------------------------------- 2 files changed, 234 insertions(+), 234 deletions(-) create mode 100644 test/option/debug-action-timestamps.py delete mode 100644 test/option/debug-timestamp.py diff --git a/test/option/debug-action-timestamps.py b/test/option/debug-action-timestamps.py new file mode 100644 index 0000000..458974e --- /dev/null +++ b/test/option/debug-action-timestamps.py @@ -0,0 +1,234 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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. +from __future__ import division, print_function + +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +import TestSCons +import re +import time + +_python_ = TestSCons._python_ + +test = TestSCons.TestSCons() + +test.write('sleep_cat.py', """\ +import sys +import time +time.sleep(int(sys.argv[1])) +with open(sys.argv[2], 'wb') as fp: + for arg in sys.argv[3:]: + with open(arg, 'rb') as infp: + fp.write(infp.read()) +sys.exit(0) +""") + +test.write('SConstruct', """ +DefaultEnvironment(tools=[]) +env = Environment(tools=[], + PYTHON = r'%(_python_)s', + SLEEP_CAT = r'sleep_cat.py', + CATCOM = '$PYTHON $SLEEP_CAT $SECONDS $TARGET $SOURCES', + SECONDS = ARGUMENTS.get('SLEEP', '0')) +f1 = env.Command('f1.out', 'f1.in', '$CATCOM') +f2 = env.Command('f2.out', 'f2.in', '$CATCOM') +f3 = env.Command('f3.out', 'f3.in', '$CATCOM') +f4 = env.Command('f4.out', 'f4.in', '$CATCOM') +env.Command('output', [f1, f2, f3, f4], '$CATCOM') +""" % locals()) + +test.write('f1.in', "f1.in\n") +test.write('f2.in', "f2.in\n") +test.write('f3.in', "f3.in\n") +test.write('f4.in', "f4.in\n") + +expected_targets = ['f1.out', 'f2.out', 'f3.out', 'f4.out', 'output', '.'] + +# Before anything else, make sure we get valid --debug=timestamp results +# when just running the help option. +test.run(arguments = "-h --debug=timestamp") + + + +def num(s, match): + return float(re.search(match, s).group(1)) + +def within_tolerance(expected, actual, tolerance): + return abs((expected-actual)/actual) <= tolerance + +def get_total_time(stdout): + return num(stdout, r'Total build time: (\d+\.\d+) seconds') + +def get_sconscript_time(stdout): + return num(stdout, r'Total SConscript file execution time: (\d+\.\d+) seconds') + +def get_scons_time(stdout): + return num(stdout, r'Total SCons execution time: (\d+\.\d+) seconds') + +def get_command_time(stdout): + return num(stdout, r'Total command execution time: (\d+\.\d+) seconds') + + +# Try to make our results a little more accurate and repeatable by +# measuring Python overhead executing a minimal file, and reading the +# scons.py script itself from disk so that it's already been cached. +test.write('pass.py', "pass\n") +test.read(test.program) + +start_time = time.time() +test.run(program=TestSCons.python, arguments=test.workpath('pass.py')) +overhead = time.time() - start_time + + + +start_time = time.time() +test.run(arguments = "-j1 --debug=timestamp . SLEEP=0") +complete_time = time.time() - start_time + + + +expected_total_time = complete_time - overhead + +def get_times_and_targets(pattern): + targets = [] + times = [] + for target, target_time in re.findall(pattern, test.stdout()): + targets.append(target) + times.append(float(target_time)) + return targets, times + +duration_targets, durations = get_times_and_targets(r'Command execution time: (.*): (\d+\.\d+) seconds') +start_targets, start_times = get_times_and_targets(r'Command execution start time: (.*): (\d+\.\d+) seconds') +stop_targets, stop_times = get_times_and_targets(r'Command execution stop time: (.*): (\d+\.\d+) seconds') + +expected_command_time = 0.0 +for t in durations: + expected_command_time += t + + +stdout = test.stdout() + +total_time = get_total_time(stdout) +sconscript_time = get_sconscript_time(stdout) +scons_time = get_scons_time(stdout) +command_time = get_command_time(stdout) + +failures = [] +warnings = [] + + +def check_targets(targets): + if targets != expected_targets: + failures.append("""\ + Scons reported the targets of timing information as %(targets)s, + but the actual targets should have been %(expected_targets)s. + """.format(targets=targets, expected_targets=expected_targets)) + +check_targets(duration_targets) +check_targets(start_targets) +check_targets(stop_targets) + +if not within_tolerance(expected_command_time, command_time, 0.01): + failures.append("""\ +SCons -j1 reported a total command execution time of %(command_time)s, +but command execution times really totalled %(expected_command_time)s, +outside of the 1%% tolerance. +""" % locals()) + +added_times = sconscript_time+scons_time+command_time +if not within_tolerance(total_time, added_times, 0.01): + failures.append("""\ +SCons -j1 reported a total build time of %(total_time)s, +but the various execution times actually totalled %(added_times)s, +outside of the 1%% tolerance. +""" % locals()) + +if not within_tolerance(total_time, expected_total_time, 0.20): + # This tolerance check seems empirically to work fine if there's + # a light load on the system, but on a heavily loaded system the + # timings get screwy and it can fail frequently. Some obvious + # attempts to work around the problem didn't, so just treat it as + # a warning for now. + warnings.append("""\ +Warning: SCons -j1 reported total build time of %(total_time)s, +but the actual measured build time was %(expected_total_time)s +(end-to-end time of %(complete_time)s less Python overhead of %(overhead)s), +outside of the 15%% tolerance. +""" % locals()) + +if failures or warnings: + print('\n'.join([test.stdout()] + failures + warnings)) +if failures: + test.fail_test(1) + +test.run(arguments = "--debug=timestamp . SLEEP=0") + +command_time = get_command_time(test.stdout()) +if command_time != 0.0: + print("Up-to-date run received non-zero command time of %s" % command_time) + test.fail_test() + + + +test.run(arguments = "-c") + +test.run(arguments = "-j4 --debug=timestamp . SLEEP=1") + + + +stdout = test.stdout() + +total_time = get_total_time(stdout) +sconscript_time = get_sconscript_time(stdout) +scons_time = get_scons_time(stdout) +command_time = get_command_time(stdout) + +failures = [] + +added_times = sconscript_time+scons_time+command_time +if not within_tolerance(total_time, added_times, 0.01): + failures.append("""\ +SCons -j4 reported a total build time of %(total_time)s, +but the various execution times actually totalled %(added_times)s, +outside of the 1%% tolerance. +""" % locals()) + +if failures: + print('\n'.join([test.stdout()] + failures)) + test.fail_test(1) + +test.run(arguments = "-j4 --debug=timestamp . SLEEP=1") + +command_time = get_command_time(test.stdout()) +if command_time != 0.0: + print("Up-to-date run received non-zero command time of %s" % command_time) + test.fail_test() + + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: \ No newline at end of file diff --git a/test/option/debug-timestamp.py b/test/option/debug-timestamp.py deleted file mode 100644 index 458974e..0000000 --- a/test/option/debug-timestamp.py +++ /dev/null @@ -1,234 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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. -from __future__ import division, print_function - -__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -import TestSCons -import re -import time - -_python_ = TestSCons._python_ - -test = TestSCons.TestSCons() - -test.write('sleep_cat.py', """\ -import sys -import time -time.sleep(int(sys.argv[1])) -with open(sys.argv[2], 'wb') as fp: - for arg in sys.argv[3:]: - with open(arg, 'rb') as infp: - fp.write(infp.read()) -sys.exit(0) -""") - -test.write('SConstruct', """ -DefaultEnvironment(tools=[]) -env = Environment(tools=[], - PYTHON = r'%(_python_)s', - SLEEP_CAT = r'sleep_cat.py', - CATCOM = '$PYTHON $SLEEP_CAT $SECONDS $TARGET $SOURCES', - SECONDS = ARGUMENTS.get('SLEEP', '0')) -f1 = env.Command('f1.out', 'f1.in', '$CATCOM') -f2 = env.Command('f2.out', 'f2.in', '$CATCOM') -f3 = env.Command('f3.out', 'f3.in', '$CATCOM') -f4 = env.Command('f4.out', 'f4.in', '$CATCOM') -env.Command('output', [f1, f2, f3, f4], '$CATCOM') -""" % locals()) - -test.write('f1.in', "f1.in\n") -test.write('f2.in', "f2.in\n") -test.write('f3.in', "f3.in\n") -test.write('f4.in', "f4.in\n") - -expected_targets = ['f1.out', 'f2.out', 'f3.out', 'f4.out', 'output', '.'] - -# Before anything else, make sure we get valid --debug=timestamp results -# when just running the help option. -test.run(arguments = "-h --debug=timestamp") - - - -def num(s, match): - return float(re.search(match, s).group(1)) - -def within_tolerance(expected, actual, tolerance): - return abs((expected-actual)/actual) <= tolerance - -def get_total_time(stdout): - return num(stdout, r'Total build time: (\d+\.\d+) seconds') - -def get_sconscript_time(stdout): - return num(stdout, r'Total SConscript file execution time: (\d+\.\d+) seconds') - -def get_scons_time(stdout): - return num(stdout, r'Total SCons execution time: (\d+\.\d+) seconds') - -def get_command_time(stdout): - return num(stdout, r'Total command execution time: (\d+\.\d+) seconds') - - -# Try to make our results a little more accurate and repeatable by -# measuring Python overhead executing a minimal file, and reading the -# scons.py script itself from disk so that it's already been cached. -test.write('pass.py', "pass\n") -test.read(test.program) - -start_time = time.time() -test.run(program=TestSCons.python, arguments=test.workpath('pass.py')) -overhead = time.time() - start_time - - - -start_time = time.time() -test.run(arguments = "-j1 --debug=timestamp . SLEEP=0") -complete_time = time.time() - start_time - - - -expected_total_time = complete_time - overhead - -def get_times_and_targets(pattern): - targets = [] - times = [] - for target, target_time in re.findall(pattern, test.stdout()): - targets.append(target) - times.append(float(target_time)) - return targets, times - -duration_targets, durations = get_times_and_targets(r'Command execution time: (.*): (\d+\.\d+) seconds') -start_targets, start_times = get_times_and_targets(r'Command execution start time: (.*): (\d+\.\d+) seconds') -stop_targets, stop_times = get_times_and_targets(r'Command execution stop time: (.*): (\d+\.\d+) seconds') - -expected_command_time = 0.0 -for t in durations: - expected_command_time += t - - -stdout = test.stdout() - -total_time = get_total_time(stdout) -sconscript_time = get_sconscript_time(stdout) -scons_time = get_scons_time(stdout) -command_time = get_command_time(stdout) - -failures = [] -warnings = [] - - -def check_targets(targets): - if targets != expected_targets: - failures.append("""\ - Scons reported the targets of timing information as %(targets)s, - but the actual targets should have been %(expected_targets)s. - """.format(targets=targets, expected_targets=expected_targets)) - -check_targets(duration_targets) -check_targets(start_targets) -check_targets(stop_targets) - -if not within_tolerance(expected_command_time, command_time, 0.01): - failures.append("""\ -SCons -j1 reported a total command execution time of %(command_time)s, -but command execution times really totalled %(expected_command_time)s, -outside of the 1%% tolerance. -""" % locals()) - -added_times = sconscript_time+scons_time+command_time -if not within_tolerance(total_time, added_times, 0.01): - failures.append("""\ -SCons -j1 reported a total build time of %(total_time)s, -but the various execution times actually totalled %(added_times)s, -outside of the 1%% tolerance. -""" % locals()) - -if not within_tolerance(total_time, expected_total_time, 0.20): - # This tolerance check seems empirically to work fine if there's - # a light load on the system, but on a heavily loaded system the - # timings get screwy and it can fail frequently. Some obvious - # attempts to work around the problem didn't, so just treat it as - # a warning for now. - warnings.append("""\ -Warning: SCons -j1 reported total build time of %(total_time)s, -but the actual measured build time was %(expected_total_time)s -(end-to-end time of %(complete_time)s less Python overhead of %(overhead)s), -outside of the 15%% tolerance. -""" % locals()) - -if failures or warnings: - print('\n'.join([test.stdout()] + failures + warnings)) -if failures: - test.fail_test(1) - -test.run(arguments = "--debug=timestamp . SLEEP=0") - -command_time = get_command_time(test.stdout()) -if command_time != 0.0: - print("Up-to-date run received non-zero command time of %s" % command_time) - test.fail_test() - - - -test.run(arguments = "-c") - -test.run(arguments = "-j4 --debug=timestamp . SLEEP=1") - - - -stdout = test.stdout() - -total_time = get_total_time(stdout) -sconscript_time = get_sconscript_time(stdout) -scons_time = get_scons_time(stdout) -command_time = get_command_time(stdout) - -failures = [] - -added_times = sconscript_time+scons_time+command_time -if not within_tolerance(total_time, added_times, 0.01): - failures.append("""\ -SCons -j4 reported a total build time of %(total_time)s, -but the various execution times actually totalled %(added_times)s, -outside of the 1%% tolerance. -""" % locals()) - -if failures: - print('\n'.join([test.stdout()] + failures)) - test.fail_test(1) - -test.run(arguments = "-j4 --debug=timestamp . SLEEP=1") - -command_time = get_command_time(test.stdout()) -if command_time != 0.0: - print("Up-to-date run received non-zero command time of %s" % command_time) - test.fail_test() - - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: \ No newline at end of file -- cgit v0.12 From e00c5893fa11a155286521f11fac82a0eb9c8d15 Mon Sep 17 00:00:00 2001 From: Edoardo Bezzeccheri Date: Wed, 9 Oct 2019 10:54:24 +0200 Subject: Added debug option "timestamp", changed option "timestamp" to "action_timestamps" As per PR review --- doc/man/scons.xml | 2 +- src/CHANGES.txt | 2 +- src/engine/SCons/Script/Main.py | 12 ++++++------ src/engine/SCons/Script/SConsOptions.py | 2 +- test/option/debug-action-timestamps.py | 12 ++++++------ 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/doc/man/scons.xml b/doc/man/scons.xml index 7bd0ce8..78f71e7 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -894,7 +894,7 @@ should take place in parallel.) - --debug=timestamp + --debug=action_timestamps Prints additional time profiling information: diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 3ea2249..f1f6e53 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -19,7 +19,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER --debug=tree, --debug=dtree, --debug=stree, --debug=nomemoizer. From Edoardo Bezzeccheri - - Added debug option "timestamp" which outputs to stdout the absolute start and end time for each target. + - Added debug option "action_timestamps" which outputs to stdout the absolute start and end time for each target. RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index e5b7f94..58dbf64 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -75,7 +75,7 @@ print_objects = 0 print_memoizer = 0 print_stacktrace = 0 print_time = 0 -print_timestamp = 0 +print_action_timestamps = 0 sconscript_time = 0 cumulative_command_time = 0 exit_status = 0 # final exit status, assume success by default @@ -210,10 +210,10 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask): finish_time = time.time() last_command_end = finish_time cumulative_command_time = cumulative_command_time+finish_time-start_time - if print_timestamp: + if print_action_timestamps: sys.stdout.write("Command execution start time: %s: %f seconds\n"%(str(self.node), start_time)) sys.stdout.write("Command execution time: %s: %f seconds\n"%(str(self.node), finish_time-start_time)) - if print_timestamp: + if print_action_timestamps: sys.stdout.write("Command execution stop time: %s: %f seconds\n"%(str(self.node), finish_time)) def do_failed(self, status=2): @@ -641,7 +641,7 @@ def _SConstruct_exists(dirname='', repositories=[], filelist=None): return None def _set_debug_values(options): - global print_memoizer, print_objects, print_stacktrace, print_time, print_timestamp + global print_memoizer, print_objects, print_stacktrace, print_time, print_action_timestamps debug_values = options.debug @@ -679,9 +679,9 @@ def _set_debug_values(options): options.tree_printers.append(TreePrinter(status=True)) if "time" in debug_values: print_time = 1 - if "timestamp" in debug_values: + if "action_timestamps" in debug_values: print_time = 1 - print_timestamp = 1 + print_action_timestamps = 1 if "tree" in debug_values: options.tree_printers.append(TreePrinter()) if "prepare" in debug_values: diff --git a/src/engine/SCons/Script/SConsOptions.py b/src/engine/SCons/Script/SConsOptions.py index 6baccc3..7b5d523 100644 --- a/src/engine/SCons/Script/SConsOptions.py +++ b/src/engine/SCons/Script/SConsOptions.py @@ -622,7 +622,7 @@ def Parser(version): debug_options = ["count", "duplicate", "explain", "findlibs", "includes", "memoizer", "memory", "objects", "pdb", "prepare", "presub", "stacktrace", - "time", "timestamp"] + "time", "action_timestamps"] def opt_debug(option, opt, value__, parser, debug_options=debug_options, diff --git a/test/option/debug-action-timestamps.py b/test/option/debug-action-timestamps.py index 458974e..c021117 100644 --- a/test/option/debug-action-timestamps.py +++ b/test/option/debug-action-timestamps.py @@ -64,9 +64,9 @@ test.write('f4.in', "f4.in\n") expected_targets = ['f1.out', 'f2.out', 'f3.out', 'f4.out', 'output', '.'] -# Before anything else, make sure we get valid --debug=timestamp results +# Before anything else, make sure we get valid --debug=action_timestamps results # when just running the help option. -test.run(arguments = "-h --debug=timestamp") +test.run(arguments = "-h --debug=action_timestamps") @@ -102,7 +102,7 @@ overhead = time.time() - start_time start_time = time.time() -test.run(arguments = "-j1 --debug=timestamp . SLEEP=0") +test.run(arguments = "-j1 --debug=action_timestamps . SLEEP=0") complete_time = time.time() - start_time @@ -181,7 +181,7 @@ if failures or warnings: if failures: test.fail_test(1) -test.run(arguments = "--debug=timestamp . SLEEP=0") +test.run(arguments = "--debug=action_timestamps . SLEEP=0") command_time = get_command_time(test.stdout()) if command_time != 0.0: @@ -192,7 +192,7 @@ if command_time != 0.0: test.run(arguments = "-c") -test.run(arguments = "-j4 --debug=timestamp . SLEEP=1") +test.run(arguments = "-j4 --debug=action_timestamps . SLEEP=1") @@ -217,7 +217,7 @@ if failures: print('\n'.join([test.stdout()] + failures)) test.fail_test(1) -test.run(arguments = "-j4 --debug=timestamp . SLEEP=1") +test.run(arguments = "-j4 --debug=action_timestamps . SLEEP=1") command_time = get_command_time(test.stdout()) if command_time != 0.0: -- cgit v0.12 From e3d197bdd67088b163b66da9ffa985992c36d184 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Wed, 9 Oct 2019 18:55:41 -0600 Subject: [WIP] enable persistent caching of vcvars on win32 Setting env var SCONS_CACHE_MSVC_CONFIG enables a filesystem cache of vcvars results, making them persistent across scons runs. On test runs (notably our CI system) this helps a lot; in normal usage where you run one scons invocation at a time instead of many hundreds in a test run it will make things a little more responsive (esp on vs2019) but the impact will be much smaller. Signed-off-by: Mats Wichmann --- .appveyor.yml | 1 + src/CHANGES.txt | 4 ++ src/engine/SCons/Tool/MSCommon/common.py | 35 +++++++++++-- src/engine/SCons/Tool/MSCommon/sdk.py | 30 +++++------ src/engine/SCons/Tool/MSCommon/vc.py | 90 +++++++++++++++++++------------- src/engine/SCons/Tool/MSCommon/vs.py | 4 +- 6 files changed, 107 insertions(+), 57 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index a18f295..09cd996 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -25,6 +25,7 @@ install: - cmd: set STATIC_DEPS=true & C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off lxml # install 3rd party tools to test with - cmd: choco install --allow-empty-checksums dmd ldc swig vswhere xsltproc winflexbison + - cmd: set SCONS_CACHE_MSVC_CONFIG=true - cmd: set ### LINUX ### diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 015622e..c45e86d 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -17,6 +17,10 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER the index from find() was not used. - Turn previously deprecated debug options into failures: --debug=tree, --debug=dtree, --debug=stree, --debug=nomemoizer. + - If SCONS_CACHE_MSVC_CONFIG env var is set, scons will cache the + results of past calls to vcvarsall.bat to a file; integrates with + existing memoizing of such vars. On vs2019 saves 5+ seconds per + scons invocation, which really helps test suite runs. From Jacek Kuczera: - Fix CheckFunc detection code for Visual 2019. Some functions diff --git a/src/engine/SCons/Tool/MSCommon/common.py b/src/engine/SCons/Tool/MSCommon/common.py index c3ba8e5..0a7e0ef 100644 --- a/src/engine/SCons/Tool/MSCommon/common.py +++ b/src/engine/SCons/Tool/MSCommon/common.py @@ -28,6 +28,7 @@ from __future__ import print_function __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import copy +import json import os import subprocess import re @@ -44,12 +45,39 @@ elif LOGFILE: except ImportError: debug = lambda message: open(LOGFILE, 'a').write(message + '\n') else: - logging.basicConfig(filename=LOGFILE, level=logging.DEBUG) + logging.basicConfig( + format='%(relativeCreated)05dms:pid%(process)05d:MSCommon/%(filename)s:%(message)s', + filename=LOGFILE, + level=logging.DEBUG) debug = logging.getLogger(name=__name__).debug else: debug = lambda x: None +CONFIG_CACHE = os.environ.get('SCONS_CACHE_MSVC_CONFIG', None) +CONFIG_FILE = os.path.join(os.path.expanduser('~'), '.scons_msvc_cache') + + +def read_script_env_cache(): + """ fetch cached env vars if requested, else return empty dict """ + envcache = {} + if CONFIG_CACHE: + try: + with open(CONFIG_FILE, 'r') as f: + envcache = json.load(f) + except FileNotFoundError: + pass + return envcache + + +def write_script_env_cache(cache): + """ write out cach of env vars if requested """ + if CONFIG_CACHE: + with open(CONFIG_FILE, 'w') as f: + #TODO: clean up if it fails + json.dump(cache, f, indent=2) + + _is_win64 = None def is_win64(): @@ -207,14 +235,15 @@ def get_output(vcbat, args = None, env = None): output = stdout.decode("mbcs") return output -def parse_output(output, keep=("INCLUDE", "LIB", "LIBPATH", "PATH", 'VSCMD_ARG_app_plat')): +KEEPLIST = ("INCLUDE", "LIB", "LIBPATH", "PATH", 'VSCMD_ARG_app_plat') +def parse_output(output, keep=KEEPLIST): """ Parse output from running visual c++/studios vcvarsall.bat and running set To capture the values listed in keep """ # dkeep is a dict associating key: path_list, where key is one item from - # keep, and pat_list the associated list of paths + # keep, and path_list the associated list of paths dkeep = dict([(i, []) for i in keep]) # rdk will keep the regex to match the .bat file output line starts diff --git a/src/engine/SCons/Tool/MSCommon/sdk.py b/src/engine/SCons/Tool/MSCommon/sdk.py index ad57865..281c1e3 100644 --- a/src/engine/SCons/Tool/MSCommon/sdk.py +++ b/src/engine/SCons/Tool/MSCommon/sdk.py @@ -118,11 +118,11 @@ class SDKDefinition(object): if (host_arch != target_arch): arch_string='%s_%s'%(host_arch,target_arch) - debug("sdk.py: get_sdk_vc_script():arch_string:%s host_arch:%s target_arch:%s"%(arch_string, + debug("get_sdk_vc_script():arch_string:%s host_arch:%s target_arch:%s"%(arch_string, host_arch, target_arch)) file=self.vc_setup_scripts.get(arch_string,None) - debug("sdk.py: get_sdk_vc_script():file:%s"%file) + debug("get_sdk_vc_script():file:%s"%file) return file class WindowsSDK(SDKDefinition): @@ -286,14 +286,14 @@ InstalledSDKMap = None def get_installed_sdks(): global InstalledSDKList global InstalledSDKMap - debug('sdk.py:get_installed_sdks()') + debug('get_installed_sdks()') if InstalledSDKList is None: InstalledSDKList = [] InstalledSDKMap = {} for sdk in SupportedSDKList: - debug('MSCommon/sdk.py: trying to find SDK %s' % sdk.version) + debug('trying to find SDK %s' % sdk.version) if sdk.get_sdk_dir(): - debug('MSCommon/sdk.py:found SDK %s' % sdk.version) + debug('found SDK %s' % sdk.version) InstalledSDKList.append(sdk) InstalledSDKMap[sdk.version] = sdk return InstalledSDKList @@ -346,13 +346,13 @@ def get_default_sdk(): return InstalledSDKList[0] def mssdk_setup_env(env): - debug('sdk.py:mssdk_setup_env()') + debug('mssdk_setup_env()') if 'MSSDK_DIR' in env: sdk_dir = env['MSSDK_DIR'] if sdk_dir is None: return sdk_dir = env.subst(sdk_dir) - debug('sdk.py:mssdk_setup_env: Using MSSDK_DIR:{}'.format(sdk_dir)) + debug('mssdk_setup_env: Using MSSDK_DIR:{}'.format(sdk_dir)) elif 'MSSDK_VERSION' in env: sdk_version = env['MSSDK_VERSION'] if sdk_version is None: @@ -364,22 +364,22 @@ def mssdk_setup_env(env): msg = "SDK version %s is not installed" % sdk_version raise SCons.Errors.UserError(msg) sdk_dir = mssdk.get_sdk_dir() - debug('sdk.py:mssdk_setup_env: Using MSSDK_VERSION:%s'%sdk_dir) + debug('mssdk_setup_env: Using MSSDK_VERSION:%s'%sdk_dir) elif 'MSVS_VERSION' in env: msvs_version = env['MSVS_VERSION'] - debug('sdk.py:mssdk_setup_env:Getting MSVS_VERSION from env:%s'%msvs_version) + debug('mssdk_setup_env:Getting MSVS_VERSION from env:%s'%msvs_version) if msvs_version is None: - debug('sdk.py:mssdk_setup_env thinks msvs_version is None') + debug('mssdk_setup_env thinks msvs_version is None') return msvs_version = env.subst(msvs_version) from . import vs msvs = vs.get_vs_by_version(msvs_version) - debug('sdk.py:mssdk_setup_env:msvs is :%s'%msvs) + debug('mssdk_setup_env:msvs is :%s'%msvs) if not msvs: - debug('sdk.py:mssdk_setup_env: no VS version detected, bailingout:%s'%msvs) + debug('mssdk_setup_env: no VS version detected, bailingout:%s'%msvs) return sdk_version = msvs.sdk_version - debug('sdk.py:msvs.sdk_version is %s'%sdk_version) + debug('msvs.sdk_version is %s'%sdk_version) if not sdk_version: return mssdk = get_sdk_by_version(sdk_version) @@ -388,13 +388,13 @@ def mssdk_setup_env(env): if not mssdk: return sdk_dir = mssdk.get_sdk_dir() - debug('sdk.py:mssdk_setup_env: Using MSVS_VERSION:%s'%sdk_dir) + debug('mssdk_setup_env: Using MSVS_VERSION:%s'%sdk_dir) else: mssdk = get_default_sdk() if not mssdk: return sdk_dir = mssdk.get_sdk_dir() - debug('sdk.py:mssdk_setup_env: not using any env values. sdk_dir:%s'%sdk_dir) + debug('mssdk_setup_env: not using any env values. sdk_dir:%s'%sdk_dir) set_sdk_by_directory(env, sdk_dir) diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py index 0e4ef15..019d608 100644 --- a/src/engine/SCons/Tool/MSCommon/vc.py +++ b/src/engine/SCons/Tool/MSCommon/vc.py @@ -152,7 +152,7 @@ def get_msvc_version_numeric(msvc_version): return ''.join([x for x in msvc_version if x in string_digits + '.']) def get_host_target(env): - debug('vc.py:get_host_target()') + debug('get_host_target()') host_platform = env.get('HOST_ARCH') if not host_platform: @@ -165,7 +165,7 @@ def get_host_target(env): # Retain user requested TARGET_ARCH req_target_platform = env.get('TARGET_ARCH') - debug('vc.py:get_host_target() req_target_platform:%s'%req_target_platform) + debug('get_host_target() req_target_platform:%s'%req_target_platform) if req_target_platform: # If user requested a specific platform then only try that one. @@ -403,7 +403,7 @@ def find_batch_file(env,msvc_version,host_arch,target_arch): if pdir is None: raise NoVersionFound("No version of Visual Studio found") - debug('vc.py: find_batch_file() in {}'.format(pdir)) + debug('find_batch_file() in {}'.format(pdir)) # filter out e.g. "Exp" from the version name msvc_ver_numeric = get_msvc_version_numeric(msvc_version) @@ -423,17 +423,17 @@ def find_batch_file(env,msvc_version,host_arch,target_arch): debug("Not found: %s" % batfilename) batfilename = None - installed_sdks=get_installed_sdks() + installed_sdks = get_installed_sdks() for _sdk in installed_sdks: sdk_bat_file = _sdk.get_sdk_vc_script(host_arch,target_arch) if not sdk_bat_file: - debug("vc.py:find_batch_file() not found:%s"%_sdk) + debug("find_batch_file() not found:%s"%_sdk) else: sdk_bat_file_path = os.path.join(pdir,sdk_bat_file) if os.path.exists(sdk_bat_file_path): - debug('vc.py:find_batch_file() sdk_bat_file_path:%s'%sdk_bat_file_path) - return (batfilename,sdk_bat_file_path) - return (batfilename,None) + debug('find_batch_file() sdk_bat_file_path:%s'%sdk_bat_file_path) + return (batfilename, sdk_bat_file_path) + return (batfilename, None) __INSTALLED_VCS_RUN = None @@ -592,21 +592,37 @@ def reset_installed_vcs(): # env2 = Environment(tools='msvs') # we can greatly improve the speed of the second and subsequent Environment # (or Clone) calls by memoizing the environment variables set by vcvars*.bat. -script_env_stdout_cache = {} +# +# Updated: by 2018, vcvarsall.bat had gotten so expensive it was breaking +# CI builds because the test suite starts scons so many times and the existing +# memo logic only helped with repeated calls within the same scons run; +# with VS2019 it got even slower and an optional cache file was introduced. +# The cache now also stores only the parsed vars, not the entire output +# of running the batch file - saves a bit of time not parsing every time. + +script_env_cache = None + def script_env(script, args=None): - cache_key = (script, args) - stdout = script_env_stdout_cache.get(cache_key, None) - if stdout is None: + global script_env_cache + + if script_env_cache is None: + script_env_cache = common.read_script_env_cache() + cache_key = "{}--{}".format(script, args) + cache_data = script_env_cache.get(cache_key, None) + if cache_data is None: stdout = common.get_output(script, args) - script_env_stdout_cache[cache_key] = stdout - # Stupid batch files do not set return code: we take a look at the - # beginning of the output for an error message instead - olines = stdout.splitlines() - if olines[0].startswith("The specified configuration type is missing"): - raise BatchFileExecutionError("\n".join(olines[:2])) + # Stupid batch files do not set return code: we take a look at the + # beginning of the output for an error message instead + olines = stdout.splitlines() + if olines[0].startswith("The specified configuration type is missing"): + raise BatchFileExecutionError("\n".join(olines[:2])) - return common.parse_output(stdout) + cache_data = common.parse_output(stdout) + script_env_cache[cache_key] = cache_data + # once we updated cache, give a chance to write out if user wanted + common.write_script_env_cache(script_env_cache) + return cache_data def get_default_version(env): debug('get_default_version()') @@ -635,12 +651,12 @@ def get_default_version(env): debug('installed_vcs:%s' % installed_vcs) if not installed_vcs: #msg = 'No installed VCs' - #debug('msv %s\n' % repr(msg)) + #debug('msv %s' % 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)) + debug('msvc_setup_env: using default installed MSVC version %s' % repr(msvc_version)) return msvc_version @@ -654,12 +670,12 @@ def msvc_setup_env_once(env): msvc_setup_env(env) env["MSVC_SETUP_RUN"] = True -def msvc_find_valid_batch_script(env,version): - debug('vc.py:msvc_find_valid_batch_script()') +def msvc_find_valid_batch_script(env, version): + debug('msvc_find_valid_batch_script()') # Find the host platform, target platform, and if present the requested # target platform platforms = get_host_target(env) - debug("vc.py: msvs_find_valid_batch_script(): host_platform %s, target_platform %s req_target_platform:%s" % platforms) + debug(" msvs_find_valid_batch_script(): host_platform %s, target_platform %s req_target_platform:%s" % platforms) host_platform, target_platform, req_target_platform = platforms try_target_archs = [target_platform] @@ -683,7 +699,7 @@ def msvc_find_valid_batch_script(env,version): # Set to current arch. env['TARGET_ARCH']=tp - debug("vc.py:msvc_find_valid_batch_script() trying target_platform:%s"%tp) + debug("msvc_find_valid_batch_script() trying target_platform:%s"%tp) host_target = (host_platform, tp) if not is_host_target_supported(host_target, version): warn_msg = "host, target = %s not supported for MSVC version %s" % \ @@ -701,8 +717,8 @@ def msvc_find_valid_batch_script(env,version): # Try to locate a batch file for this host/target platform combo try: - (vc_script,sdk_script) = find_batch_file(env,version,host_platform,tp) - debug('vc.py:msvc_find_valid_batch_script() vc_script:%s sdk_script:%s'%(vc_script,sdk_script)) + (vc_script, sdk_script) = find_batch_file(env, version, host_platform, tp) + debug('msvc_find_valid_batch_script() vc_script:%s sdk_script:%s'%(vc_script,sdk_script)) except VisualCException as e: msg = str(e) debug('Caught exception while looking for batch file (%s)' % msg) @@ -714,29 +730,29 @@ def msvc_find_valid_batch_script(env,version): continue # Try to use the located batch file for this host/target platform combo - debug('vc.py:msvc_find_valid_batch_script() use_script 2 %s, args:%s\n' % (repr(vc_script), arg)) + debug('msvc_find_valid_batch_script() use_script 2 %s, args:%s' % (repr(vc_script), arg)) found = None if vc_script: try: d = script_env(vc_script, args=arg) found = vc_script except BatchFileExecutionError as e: - debug('vc.py:msvc_find_valid_batch_script() use_script 3: failed running VC script %s: %s: Error:%s'%(repr(vc_script),arg,e)) + debug('msvc_find_valid_batch_script() use_script 3: failed running VC script %s: %s: Error:%s'%(repr(vc_script),arg,e)) vc_script=None continue if not vc_script and sdk_script: - debug('vc.py:msvc_find_valid_batch_script() use_script 4: trying sdk script: %s'%(sdk_script)) + debug('msvc_find_valid_batch_script() use_script 4: trying sdk script: %s'%(sdk_script)) try: d = script_env(sdk_script) found = sdk_script except BatchFileExecutionError as e: - debug('vc.py:msvc_find_valid_batch_script() use_script 5: failed running SDK script %s: Error:%s'%(repr(sdk_script),e)) + debug('msvc_find_valid_batch_script() use_script 5: failed running SDK script %s: Error:%s'%(repr(sdk_script),e)) continue elif not vc_script and not sdk_script: - debug('vc.py:msvc_find_valid_batch_script() use_script 6: Neither VC script nor SDK script found') + debug('msvc_find_valid_batch_script() use_script 6: Neither VC script nor SDK script found') continue - debug("vc.py:msvc_find_valid_batch_script() Found a working script/target: %s/%s"%(repr(found),arg)) + debug("msvc_find_valid_batch_script() Found a working script/target: %s/%s"%(repr(found),arg)) break # We've found a working target_platform, so stop looking # If we cannot find a viable installed compiler, reset the TARGET_ARCH @@ -756,7 +772,7 @@ def msvc_setup_env(env): "compilers most likely not set correctly" SCons.Warnings.warn(SCons.Warnings.VisualCMissingWarning, warn_msg) return None - debug('msvc_setup_env: using specified MSVC version %s\n' % repr(version)) + debug('msvc_setup_env: using specified MSVC version %s' % repr(version)) # XXX: we set-up both MSVS version for backward # compatibility with the msvs tool @@ -767,11 +783,11 @@ def msvc_setup_env(env): use_script = env.get('MSVC_USE_SCRIPT', True) if SCons.Util.is_String(use_script): - debug('vc.py:msvc_setup_env() use_script 1 %s\n' % repr(use_script)) + debug('msvc_setup_env() use_script 1 %s' % repr(use_script)) d = script_env(use_script) elif use_script: d = msvc_find_valid_batch_script(env,version) - debug('vc.py:msvc_setup_env() use_script 2 %s\n' % d) + debug('msvc_setup_env() use_script 2 %s' % d) if not d: return d else: @@ -782,7 +798,7 @@ def msvc_setup_env(env): return None for k, v in d.items(): - debug('vc.py:msvc_setup_env() env:%s -> %s'%(k,v)) + debug('msvc_setup_env() env:%s -> %s'%(k,v)) env.PrependENVPath(k, v, delete_existing=True) # final check to issue a warning if the compiler is not present diff --git a/src/engine/SCons/Tool/MSCommon/vs.py b/src/engine/SCons/Tool/MSCommon/vs.py index dfca48d..bac35d8 100644 --- a/src/engine/SCons/Tool/MSCommon/vs.py +++ b/src/engine/SCons/Tool/MSCommon/vs.py @@ -465,14 +465,14 @@ def get_vs_by_version(msvs): global InstalledVSMap global SupportedVSMap - debug('vs.py:get_vs_by_version()') + debug('get_vs_by_version()') if msvs not in SupportedVSMap: msg = "Visual Studio version %s is not supported" % repr(msvs) raise SCons.Errors.UserError(msg) get_installed_visual_studios() vs = InstalledVSMap.get(msvs) debug('InstalledVSMap:%s'%InstalledVSMap) - debug('vs.py:get_vs_by_version: found vs:%s'%vs) + debug('get_vs_by_version: found vs:%s'%vs) # Some check like this would let us provide a useful error message # if they try to set a Visual Studio version that's not installed. # However, we also want to be able to run tests (like the unit -- cgit v0.12 From f2a1d6936c961e8d6f059b74b667dd62be211be1 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Thu, 10 Oct 2019 08:04:57 -0600 Subject: [PR 3462] env-var-cache: fix exception to be 2.7 compatible msvc env-var cache-read function use 'except IOError' since 'FileNotFoundError' did not exist on Py2.7/win32. try to handle error if caceh write fails. add SCONS_CACHE_MSVC_CONFIG to manpage. SCONS_CACHE_MSVC_CONFIG can take a pathname to specify the cache file to use, or it can use the default. slightly simplified logging setup - logging is stdlib since py2.3, no need for try block on import. Signed-off-by: Mats Wichmann --- doc/man/scons.xml | 50 +++++++++++++++++++++++--------- src/CHANGES.txt | 9 +++--- src/engine/SCons/Tool/MSCommon/common.py | 45 +++++++++++++++------------- 3 files changed, 67 insertions(+), 37 deletions(-) diff --git a/doc/man/scons.xml b/doc/man/scons.xml index 9065f25..c406b76 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -7189,22 +7189,45 @@ env.Program('MyApp', ['Foo.cpp', 'Bar.cpp']) ENVIRONMENT + +In general, &scons; is not controlled by environment +variables set shell used to invoke it, leaving it +up to the SConscript file author to import those if desired. +However the following variables are imported by +&scons; itself if set: + + - SCONS_LIB_DIR - -Specifies the directory that contains the SCons Python module directory -(e.g. /home/aroach/scons-src-0.01/src/engine). - - + SCONS_LIB_DIR + +Specifies the directory that contains the &scons; +Python module directory (for example, +/home/aroach/scons-src-0.01/src/engine). + + - SCONSFLAGS - -A string of options that will be used by scons in addition to those passed -on the command line. + SCONSFLAGS + +A string of options that will be used by &scons; +in addition to those passed on the command line. + + - + + SCONS_CACHE_MSVC_CONFIG + +If set, save the shell environment variables generated +in setting up the Microsoft Visual C++ compiler (and/or Build Tools), +to give these settings (expensive to generate) persistence +between runs of &scons;. +If set to a True-like value (1, +true or +True) will cache to a file named +.scons_msvc_cache in the user's home directory. +If set to a pathname, will use that pathname for the cache. + @@ -7220,8 +7243,9 @@ source code. AUTHORS -Originally: Steven Knight <knight@baldmt.com> and Anthony Roach <aroach@electriceyeball.com> -Since 2010: The SCons Development Team <scons-dev@scons.org> +Originally: Steven Knight knight@baldmt.com +and Anthony Roach aroach@electriceyeball.com. +Since 2010: The SCons Development Team scons-dev@scons.org. diff --git a/src/CHANGES.txt b/src/CHANGES.txt index c45e86d..61f31b2 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -17,10 +17,11 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER the index from find() was not used. - Turn previously deprecated debug options into failures: --debug=tree, --debug=dtree, --debug=stree, --debug=nomemoizer. - - If SCONS_CACHE_MSVC_CONFIG env var is set, scons will cache the - results of past calls to vcvarsall.bat to a file; integrates with - existing memoizing of such vars. On vs2019 saves 5+ seconds per - scons invocation, which really helps test suite runs. + - If SCONS_CACHE_MSVC_CONFIG shell environment variable is set, + scons will cache the results of past calls to vcvarsall.bat to + a file; integrates with existing memoizing of such vars. + On vs2019 saves 5+ seconds per scons invocation, which really + helps test suite runs. From Jacek Kuczera: - Fix CheckFunc detection code for Visual 2019. Some functions diff --git a/src/engine/SCons/Tool/MSCommon/common.py b/src/engine/SCons/Tool/MSCommon/common.py index 0a7e0ef..d4997eb 100644 --- a/src/engine/SCons/Tool/MSCommon/common.py +++ b/src/engine/SCons/Tool/MSCommon/common.py @@ -35,47 +35,52 @@ import re import SCons.Util +# internal-use so undocumented: +# set to '-' to print to console, else set to filename to log to LOGFILE = os.environ.get('SCONS_MSCOMMON_DEBUG') if LOGFILE == '-': def debug(message): print(message) elif LOGFILE: - try: - import logging - except ImportError: - debug = lambda message: open(LOGFILE, 'a').write(message + '\n') - else: - logging.basicConfig( - format='%(relativeCreated)05dms:pid%(process)05d:MSCommon/%(filename)s:%(message)s', - filename=LOGFILE, - level=logging.DEBUG) - debug = logging.getLogger(name=__name__).debug + import logging + logging.basicConfig( + format='%(relativeCreated)05dms:pid%(process)05d:MSCommon/%(filename)s:%(message)s', + filename=LOGFILE, + level=logging.DEBUG) + debug = logging.getLogger(name=__name__).debug else: debug = lambda x: None -CONFIG_CACHE = os.environ.get('SCONS_CACHE_MSVC_CONFIG', None) -CONFIG_FILE = os.path.join(os.path.expanduser('~'), '.scons_msvc_cache') - +CONFIG_CACHE = os.environ.get('SCONS_CACHE_MSVC_CONFIG') +if CONFIG_CACHE in ('1', 'true', 'True'): + CONFIG_CACHE = os.path.join(os.path.expanduser('~'), '.scons_msvc_cache') def read_script_env_cache(): - """ fetch cached env vars if requested, else return empty dict """ + """ fetch cached msvc env vars if requested, else return empty dict """ envcache = {} if CONFIG_CACHE: try: - with open(CONFIG_FILE, 'r') as f: + with open(CONFIG_CACHE, 'r') as f: envcache = json.load(f) - except FileNotFoundError: + #TODO can use more specific FileNotFoundError when py2 dropped + except IOError: pass return envcache def write_script_env_cache(cache): - """ write out cach of env vars if requested """ + """ write out cache of msvc env vars if requested """ if CONFIG_CACHE: - with open(CONFIG_FILE, 'w') as f: - #TODO: clean up if it fails - json.dump(cache, f, indent=2) + try: + with open(CONFIG_CACHE, 'w') as f: + json.dump(cache, f, indent=2) + except TypeError: + # data can't serialize to json, don't leave partial file + os.remove(CONFIG_CACHE) + except IOError: + # can't write the file, just skip + pass _is_win64 = None -- cgit v0.12 From f39f01c44bfb52fbb09ee57e8d678e03086b9a83 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Thu, 10 Oct 2019 09:52:23 -0600 Subject: [PR 3462] quote appveyor setting of cache val Python 2.7 suffered some problems in subprocess. Signed-off-by: Mats Wichmann --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 09cd996..ea6ad36 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -25,7 +25,7 @@ install: - cmd: set STATIC_DEPS=true & C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off lxml # install 3rd party tools to test with - cmd: choco install --allow-empty-checksums dmd ldc swig vswhere xsltproc winflexbison - - cmd: set SCONS_CACHE_MSVC_CONFIG=true + - cmd: set SCONS_CACHE_MSVC_CONFIG="true" - cmd: set ### LINUX ### -- cgit v0.12 From 98e5afec3e9727d7ab462aca3fa4681ca3b5b016 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Thu, 10 Oct 2019 19:40:46 -0600 Subject: [PR 3462] python two handle the json reading the cache from the json file got us unicode when running python2, and this broke certain tests when calling subprocess.Popen: TypeError, because all the environment wasn't strings, some was unicode. Signed-off-by: Mats Wichmann --- .appveyor.yml | 2 +- doc/man/scons.xml | 23 +++++++++++++++++------ src/engine/SCons/Tool/MSCommon/common.py | 14 +++++++++++++- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index ea6ad36..09cd996 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -25,7 +25,7 @@ install: - cmd: set STATIC_DEPS=true & C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off lxml # install 3rd party tools to test with - cmd: choco install --allow-empty-checksums dmd ldc swig vswhere xsltproc winflexbison - - cmd: set SCONS_CACHE_MSVC_CONFIG="true" + - cmd: set SCONS_CACHE_MSVC_CONFIG=true - cmd: set ### LINUX ### diff --git a/doc/man/scons.xml b/doc/man/scons.xml index c406b76..e210e76 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -7191,7 +7191,7 @@ env.Program('MyApp', ['Foo.cpp', 'Bar.cpp']) ENVIRONMENT In general, &scons; is not controlled by environment -variables set shell used to invoke it, leaving it +variables set in the shell used to invoke it, leaving it up to the SConscript file author to import those if desired. However the following variables are imported by &scons; itself if set: @@ -7220,13 +7220,24 @@ in addition to those passed on the command line. If set, save the shell environment variables generated in setting up the Microsoft Visual C++ compiler (and/or Build Tools), -to give these settings (expensive to generate) persistence -between runs of &scons;. -If set to a True-like value (1, -true or -True) will cache to a file named +to give these settings, which are expensive to generate, persistence +across &scons; invocations. +If set to a True-like value ("1", +"true" or +"True") will cache to a file named .scons_msvc_cache in the user's home directory. If set to a pathname, will use that pathname for the cache. + +Note: this behavior is not enabled by default because it +might be somewhat fragile: while each major tool version +(e.g. Visual Studio 2018 vs 2019) will get separate +entries, if toolset updates cause a change +to settings within a given release series, &scons; will not +detect this and will fetch old settings. +In case of problems, just remove the cache file. +Use of this option is primarily intended to aid performance +for tightly controlled Continuous Integration setups. + diff --git a/src/engine/SCons/Tool/MSCommon/common.py b/src/engine/SCons/Tool/MSCommon/common.py index d4997eb..eaf57f9 100644 --- a/src/engine/SCons/Tool/MSCommon/common.py +++ b/src/engine/SCons/Tool/MSCommon/common.py @@ -32,6 +32,8 @@ import json import os import subprocess import re +import subprocess +import sys import SCons.Util @@ -56,13 +58,23 @@ CONFIG_CACHE = os.environ.get('SCONS_CACHE_MSVC_CONFIG') if CONFIG_CACHE in ('1', 'true', 'True'): CONFIG_CACHE = os.path.join(os.path.expanduser('~'), '.scons_msvc_cache') +# !@$#@$? Python2 +if sys.version_info[0] == 2: + def str_hook(obj): + return {k.encode('utf-8') if isinstance(k, unicode) else k : + v.encode('utf-8') if isinstance(v, unicode) else v + for k,v in obj} + def read_script_env_cache(): """ fetch cached msvc env vars if requested, else return empty dict """ envcache = {} if CONFIG_CACHE: try: with open(CONFIG_CACHE, 'r') as f: - envcache = json.load(f) + if sys.version_info[0] == 2: + envcache = json.load(f, object_pairs_hook=str_hook) + else: + envcache = json.load(f) #TODO can use more specific FileNotFoundError when py2 dropped except IOError: pass -- cgit v0.12 From 722228995b223b4507ebb686b48f94b9f7a8380c Mon Sep 17 00:00:00 2001 From: Edoardo Bezzeccheri Date: Fri, 11 Oct 2019 16:53:33 +0200 Subject: Added debug option "timestamp", completely overhauled test Started from scratch, removing copy of debug-time.py test. --- test/option/debug-action-timestamps.py | 263 +++++++++------------------------ 1 file changed, 67 insertions(+), 196 deletions(-) diff --git a/test/option/debug-action-timestamps.py b/test/option/debug-action-timestamps.py index c021117..11a4bf5 100644 --- a/test/option/debug-action-timestamps.py +++ b/test/option/debug-action-timestamps.py @@ -26,209 +26,80 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons import re -import time _python_ = TestSCons._python_ -test = TestSCons.TestSCons() - -test.write('sleep_cat.py', """\ -import sys -import time -time.sleep(int(sys.argv[1])) -with open(sys.argv[2], 'wb') as fp: - for arg in sys.argv[3:]: - with open(arg, 'rb') as infp: - fp.write(infp.read()) -sys.exit(0) -""") - -test.write('SConstruct', """ +def setup_fixtures(): + test.file_fixture('../fixture/test_main.c', 'main.c') + test.write('SConstruct', """ DefaultEnvironment(tools=[]) -env = Environment(tools=[], - PYTHON = r'%(_python_)s', - SLEEP_CAT = r'sleep_cat.py', - CATCOM = '$PYTHON $SLEEP_CAT $SECONDS $TARGET $SOURCES', - SECONDS = ARGUMENTS.get('SLEEP', '0')) -f1 = env.Command('f1.out', 'f1.in', '$CATCOM') -f2 = env.Command('f2.out', 'f2.in', '$CATCOM') -f3 = env.Command('f3.out', 'f3.in', '$CATCOM') -f4 = env.Command('f4.out', 'f4.in', '$CATCOM') -env.Command('output', [f1, f2, f3, f4], '$CATCOM') -""" % locals()) - -test.write('f1.in', "f1.in\n") -test.write('f2.in', "f2.in\n") -test.write('f3.in', "f3.in\n") -test.write('f4.in', "f4.in\n") - -expected_targets = ['f1.out', 'f2.out', 'f3.out', 'f4.out', 'output', '.'] - -# Before anything else, make sure we get valid --debug=action_timestamps results -# when just running the help option. -test.run(arguments = "-h --debug=action_timestamps") - - - -def num(s, match): - return float(re.search(match, s).group(1)) - -def within_tolerance(expected, actual, tolerance): - return abs((expected-actual)/actual) <= tolerance - -def get_total_time(stdout): - return num(stdout, r'Total build time: (\d+\.\d+) seconds') - -def get_sconscript_time(stdout): - return num(stdout, r'Total SConscript file execution time: (\d+\.\d+) seconds') - -def get_scons_time(stdout): - return num(stdout, r'Total SCons execution time: (\d+\.\d+) seconds') - -def get_command_time(stdout): - return num(stdout, r'Total command execution time: (\d+\.\d+) seconds') - - -# Try to make our results a little more accurate and repeatable by -# measuring Python overhead executing a minimal file, and reading the -# scons.py script itself from disk so that it's already been cached. -test.write('pass.py', "pass\n") -test.read(test.program) - -start_time = time.time() -test.run(program=TestSCons.python, arguments=test.workpath('pass.py')) -overhead = time.time() - start_time - - - -start_time = time.time() -test.run(arguments = "-j1 --debug=action_timestamps . SLEEP=0") -complete_time = time.time() - start_time - - - -expected_total_time = complete_time - overhead - -def get_times_and_targets(pattern): - targets = [] - times = [] - for target, target_time in re.findall(pattern, test.stdout()): - targets.append(target) - times.append(float(target_time)) - return targets, times - -duration_targets, durations = get_times_and_targets(r'Command execution time: (.*): (\d+\.\d+) seconds') -start_targets, start_times = get_times_and_targets(r'Command execution start time: (.*): (\d+\.\d+) seconds') -stop_targets, stop_times = get_times_and_targets(r'Command execution stop time: (.*): (\d+\.\d+) seconds') - -expected_command_time = 0.0 -for t in durations: - expected_command_time += t - - -stdout = test.stdout() - -total_time = get_total_time(stdout) -sconscript_time = get_sconscript_time(stdout) -scons_time = get_scons_time(stdout) -command_time = get_command_time(stdout) - -failures = [] -warnings = [] - - -def check_targets(targets): - if targets != expected_targets: - failures.append("""\ - Scons reported the targets of timing information as %(targets)s, - but the actual targets should have been %(expected_targets)s. - """.format(targets=targets, expected_targets=expected_targets)) - -check_targets(duration_targets) -check_targets(start_targets) -check_targets(stop_targets) - -if not within_tolerance(expected_command_time, command_time, 0.01): - failures.append("""\ -SCons -j1 reported a total command execution time of %(command_time)s, -but command execution times really totalled %(expected_command_time)s, -outside of the 1%% tolerance. -""" % locals()) - -added_times = sconscript_time+scons_time+command_time -if not within_tolerance(total_time, added_times, 0.01): - failures.append("""\ -SCons -j1 reported a total build time of %(total_time)s, -but the various execution times actually totalled %(added_times)s, -outside of the 1%% tolerance. -""" % locals()) - -if not within_tolerance(total_time, expected_total_time, 0.20): - # This tolerance check seems empirically to work fine if there's - # a light load on the system, but on a heavily loaded system the - # timings get screwy and it can fail frequently. Some obvious - # attempts to work around the problem didn't, so just treat it as - # a warning for now. - warnings.append("""\ -Warning: SCons -j1 reported total build time of %(total_time)s, -but the actual measured build time was %(expected_total_time)s -(end-to-end time of %(complete_time)s less Python overhead of %(overhead)s), -outside of the 15%% tolerance. -""" % locals()) - -if failures or warnings: - print('\n'.join([test.stdout()] + failures + warnings)) -if failures: - test.fail_test(1) - -test.run(arguments = "--debug=action_timestamps . SLEEP=0") - -command_time = get_command_time(test.stdout()) -if command_time != 0.0: - print("Up-to-date run received non-zero command time of %s" % command_time) - test.fail_test() - - - -test.run(arguments = "-c") - -test.run(arguments = "-j4 --debug=action_timestamps . SLEEP=1") - - - -stdout = test.stdout() - -total_time = get_total_time(stdout) -sconscript_time = get_sconscript_time(stdout) -scons_time = get_scons_time(stdout) -command_time = get_command_time(stdout) - -failures = [] - -added_times = sconscript_time+scons_time+command_time -if not within_tolerance(total_time, added_times, 0.01): - failures.append("""\ -SCons -j4 reported a total build time of %(total_time)s, -but the various execution times actually totalled %(added_times)s, -outside of the 1%% tolerance. -""" % locals()) +env = Environment() +env.Program('main.exe', ['main.c']) +""") -if failures: - print('\n'.join([test.stdout()] + failures)) - test.fail_test(1) +def test_help_function(): + # Before anything else, make sure we get valid --debug=action_timestamps results + # when just running the help option. + test.run(arguments = "-h --debug=action_timestamps") + +def build(): + # Execute build + test.run(arguments='--debug=action_timestamps') + build_output = test.stdout() + return build_output + +def get_matches_from_output(build_output): + return [re.findall(pattern, build_output) for pattern in debug_time_patterns] + +def test_presence_of_debug_time_strings(build_output): + # Check presence of duration and timestamps + if None in get_matches_from_output(build_output): + print("One or more of the time debug strings were not found in the build output") + test.fail_test(1) + +def test_equal_number_of_debug_time_strings(build_output): + matches = get_matches_from_output(build_output) + num_of_matches = [len(match) for match in matches] + + # Check that the number of matches for each pattern is the same + if num_of_matches.count(num_of_matches[0]) != len(num_of_matches): + print("Debug time strings differs in quantity") + test.fail_test(2) + +def test_correctness_of_timestamps(build_output): + # Check if difference between timestamps is equal to duration + matches = get_matches_from_output(build_output) + + def match_to_float(m): + return float(m[1][1]) + + execution_time = match_to_float(matches[0]) + start_time = match_to_float(matches[1]) + stop_time = match_to_float(matches[2]) + delta_time = stop_time - start_time + + def within_tolerance(expected, actual, tolerance): + return abs((expected-actual)/actual) <= tolerance + + if not within_tolerance(execution_time, delta_time, 0.001): + print("Difference of timestamps differ from action duration") + print("Execution time = {}. Start time = {}. Stop time = {}. Delta time = {}".format(execution_time, start_time, stop_time, delta_time)) + test.fail_test(3) + +debug_time_patterns = [ + r'Command execution time: (.*): (\d+\.\d+) seconds', + r'Command execution start time: (.*): (\d+\.\d+) seconds', + r'Command execution stop time: (.*): (\d+\.\d+) seconds' +] -test.run(arguments = "-j4 --debug=action_timestamps . SLEEP=1") +test = TestSCons.TestSCons() +setup_fixtures() -command_time = get_command_time(test.stdout()) -if command_time != 0.0: - print("Up-to-date run received non-zero command time of %s" % command_time) - test.fail_test() +test_help_function() +build_output = build() +test_presence_of_debug_time_strings(build_output) +test_equal_number_of_debug_time_strings(build_output) +test_correctness_of_timestamps(build_output) test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: \ No newline at end of file -- cgit v0.12 From 883886b594fbf92d3b21adf49dc78aed13349209 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Fri, 11 Oct 2019 12:05:07 -0400 Subject: Move SConstruct from test to file fixture --- test/fixture/SConstruct_test_main.py | 3 +++ test/option/debug-action-timestamps.py | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 test/fixture/SConstruct_test_main.py diff --git a/test/fixture/SConstruct_test_main.py b/test/fixture/SConstruct_test_main.py new file mode 100644 index 0000000..8d2d2b0 --- /dev/null +++ b/test/fixture/SConstruct_test_main.py @@ -0,0 +1,3 @@ +DefaultEnvironment(tools=[]) +env = Environment() +env.Program('main.exe', ['main.c']) diff --git a/test/option/debug-action-timestamps.py b/test/option/debug-action-timestamps.py index 11a4bf5..0277516 100644 --- a/test/option/debug-action-timestamps.py +++ b/test/option/debug-action-timestamps.py @@ -31,11 +31,7 @@ _python_ = TestSCons._python_ def setup_fixtures(): test.file_fixture('../fixture/test_main.c', 'main.c') - test.write('SConstruct', """ -DefaultEnvironment(tools=[]) -env = Environment() -env.Program('main.exe', ['main.c']) -""") + test.file_fixture('../fixture/SConstruct_test_main.py', 'SConstruct') def test_help_function(): # Before anything else, make sure we get valid --debug=action_timestamps results -- cgit v0.12 From c135fd6842219561918366ec3b34d092eed0092e Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Fri, 11 Oct 2019 12:52:05 -0600 Subject: [PR 3462] convert json cache better way for py2 there was still a path through without fully converted data, where env['ENV'] could contain unicode, so convert the cache hit instead. This is a little slower but only for Py2 which is going away anyway. added the vs2019 exec test (vs-14.2-exec) which is just a copy of 14.0, 14.1 with the required version changed - this had never been added. Signed-off-by: Mats Wichmann --- src/engine/SCons/Tool/MSCommon/common.py | 14 +--- src/engine/SCons/Tool/MSCommon/vc.py | 23 +++++-- test/MSVS/vs-14.2-exec.py | 114 +++++++++++++++++++++++++++++++ 3 files changed, 133 insertions(+), 18 deletions(-) create mode 100644 test/MSVS/vs-14.2-exec.py diff --git a/src/engine/SCons/Tool/MSCommon/common.py b/src/engine/SCons/Tool/MSCommon/common.py index eaf57f9..ad371e9 100644 --- a/src/engine/SCons/Tool/MSCommon/common.py +++ b/src/engine/SCons/Tool/MSCommon/common.py @@ -30,7 +30,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import copy import json import os -import subprocess import re import subprocess import sys @@ -58,23 +57,13 @@ CONFIG_CACHE = os.environ.get('SCONS_CACHE_MSVC_CONFIG') if CONFIG_CACHE in ('1', 'true', 'True'): CONFIG_CACHE = os.path.join(os.path.expanduser('~'), '.scons_msvc_cache') -# !@$#@$? Python2 -if sys.version_info[0] == 2: - def str_hook(obj): - return {k.encode('utf-8') if isinstance(k, unicode) else k : - v.encode('utf-8') if isinstance(v, unicode) else v - for k,v in obj} - def read_script_env_cache(): """ fetch cached msvc env vars if requested, else return empty dict """ envcache = {} if CONFIG_CACHE: try: with open(CONFIG_CACHE, 'r') as f: - if sys.version_info[0] == 2: - envcache = json.load(f, object_pairs_hook=str_hook) - else: - envcache = json.load(f) + envcache = json.load(f) #TODO can use more specific FileNotFoundError when py2 dropped except IOError: pass @@ -244,7 +233,6 @@ def get_output(vcbat, args = None, env = None): if stderr: # TODO: find something better to do with stderr; # this at least prevents errors from getting swallowed. - import sys sys.stderr.write(stderr) if popen.wait() != 0: raise IOError(stderr.decode("mbcs")) diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py index 019d608..d321f43 100644 --- a/src/engine/SCons/Tool/MSCommon/vc.py +++ b/src/engine/SCons/Tool/MSCommon/vc.py @@ -40,7 +40,10 @@ import SCons.Util import subprocess import os import platform +import sys from string import digits as string_digits +if sys.version_info[0] == 2: + import collections import SCons.Warnings from SCons.Tool import find_program_path @@ -157,11 +160,6 @@ def get_host_target(env): host_platform = env.get('HOST_ARCH') if not host_platform: host_platform = platform.machine() - # TODO(2.5): the native Python platform.machine() function returns - # '' on all Python versions before 2.6, after which it also uses - # PROCESSOR_ARCHITECTURE. - if not host_platform: - host_platform = os.environ.get('PROCESSOR_ARCHITECTURE', '') # Retain user requested TARGET_ARCH req_target_platform = env.get('TARGET_ARCH') @@ -622,6 +620,21 @@ def script_env(script, args=None): script_env_cache[cache_key] = cache_data # once we updated cache, give a chance to write out if user wanted common.write_script_env_cache(script_env_cache) + else: + # if we "hit" data from the json file, we have a Py2 problem: + # keys & values will be unicode. don't detect, just convert. + if sys.version_info[0] == 2: + def convert(data): + if isinstance(data, basestring): + return str(data) + elif isinstance(data, collections.Mapping): + return dict(map(convert, data.iteritems())) + elif isinstance(data, collections.Iterable): + return type(data)(map(convert, data)) + else: + return data + + cache_data = convert(cache_data) return cache_data def get_default_version(env): diff --git a/test/MSVS/vs-14.2-exec.py b/test/MSVS/vs-14.2-exec.py new file mode 100644 index 0000000..1894031 --- /dev/null +++ b/test/MSVS/vs-14.2-exec.py @@ -0,0 +1,114 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Test that we can actually build a simple program using our generated +Visual Studio 14.0 project (.vcxproj) and solution (.sln) files +using Visual Studio 14.2 +""" + +import os +import sys + +import TestSConsMSVS + +test = TestSConsMSVS.TestSConsMSVS() + +if sys.platform != 'win32': + msg = "Skipping Visual Studio test on non-Windows platform '%s'\n" % sys.platform + test.skip_test(msg) + +msvs_version = '14.2' + +if not msvs_version in test.msvs_versions(): + msg = "Visual Studio %s not installed; skipping test.\n" % msvs_version + test.skip_test(msg) + + + +# Let SCons figure out the Visual Studio environment variables for us and +# print out a statement that we can exec to suck them into our external +# environment so we can execute devenv and really try to build something. + +test.run(arguments = '-n -q -Q -f -', stdin = """\ +env = Environment(tools = ['msvc'], MSVS_VERSION='%(msvs_version)s') +if env.WhereIs('cl'): + print("os.environ.update(%%s)" %% repr(env['ENV'])) +""" % locals()) + +if(test.stdout() == ""): + msg = "Visual Studio %s missing cl.exe; skipping test.\n" % msvs_version + test.skip_test(msg) + +exec(test.stdout()) + + + +test.subdir('sub dir') + +test.write(['sub dir', 'SConstruct'], """\ +env=Environment(MSVS_VERSION = '%(msvs_version)s') + +env.MSVSProject(target = 'foo.vcxproj', + srcs = ['foo.c'], + buildtarget = 'foo.exe', + variant = 'Release', + DebugSettings = {'LocalDebuggerCommandArguments':'echo "" > output.txt'}) +env.Program('foo.c') +""" % locals()) + +test.write(['sub dir', 'foo.c'], r""" +int +main(int argc, char *argv) +{ + printf("foo.c\n"); + exit (0); +} +""") + +test.run(chdir='sub dir', arguments='.') + +test.vcproj_sys_path(test.workpath('sub dir', 'foo.vcxproj')) + +import SCons.Platform.win32 +system_dll_path = os.path.join( SCons.Platform.win32.get_system_root(), 'System32' ) +os.environ['PATH'] = os.environ['PATH'] + os.pathsep + system_dll_path + +test.run(chdir='sub dir', + program=[test.get_msvs_executable(msvs_version)], + arguments=['foo.sln', '/build', 'Release']) + +test.run(program=test.workpath('sub dir', 'foo'), stdout="foo.c\n") +test.validate_msvs_file(test.workpath('sub dir', 'foo.vcxproj.user')) + + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: -- cgit v0.12 From 17e907f1bdb5ee2b26ec3ff5c9a4361c48213062 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sat, 12 Oct 2019 11:51:46 -0600 Subject: [PR 3462] update doc/comments for msvc-env-cache Signed-off-by: Mats Wichmann --- doc/man/scons.xml | 34 +++++++++++++++++++------------- src/engine/SCons/Tool/MSCommon/common.py | 4 +++- src/engine/SCons/Tool/MSCommon/vc.py | 19 +++++++++++------- 3 files changed, 35 insertions(+), 22 deletions(-) diff --git a/doc/man/scons.xml b/doc/man/scons.xml index e210e76..1b8ee43 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -7218,26 +7218,32 @@ in addition to those passed on the command line. SCONS_CACHE_MSVC_CONFIG -If set, save the shell environment variables generated -in setting up the Microsoft Visual C++ compiler (and/or Build Tools), -to give these settings, which are expensive to generate, persistence +(Windows only). If set, save the shell environment variables +generated when setting up the Microsoft Visual C++ compiler +(and/or Build Tools) to a file to give these settings, +which are expensive to generate, persistence across &scons; invocations. -If set to a True-like value ("1", +Use of this option is primarily intended to aid performance +in tightly controlled Continuous Integration setups. + +If set to a True-like value ("1", "true" or "True") will cache to a file named .scons_msvc_cache in the user's home directory. If set to a pathname, will use that pathname for the cache. - -Note: this behavior is not enabled by default because it -might be somewhat fragile: while each major tool version -(e.g. Visual Studio 2018 vs 2019) will get separate -entries, if toolset updates cause a change + +Note: use this cache with caution as it +might be somewhat fragile: while each major toolset version +(e.g. Visual Studio 2017 vs 2019) and architecture pair will get separate +cache entries, if toolset updates cause a change to settings within a given release series, &scons; will not -detect this and will fetch old settings. -In case of problems, just remove the cache file. -Use of this option is primarily intended to aid performance -for tightly controlled Continuous Integration setups. - +detect the change and will reuse old settings. +Remove the cache file in case of problems with this. +&scons; will ignore failures reading or writing the file +and will silently revert to non-cached behavior in such cases. + +Since &scons; 3.1. + diff --git a/src/engine/SCons/Tool/MSCommon/common.py b/src/engine/SCons/Tool/MSCommon/common.py index ad371e9..bbccf61 100644 --- a/src/engine/SCons/Tool/MSCommon/common.py +++ b/src/engine/SCons/Tool/MSCommon/common.py @@ -36,7 +36,7 @@ import sys import SCons.Util -# internal-use so undocumented: +# SCONS_MSCOMMON_DEBUG is internal-use so undocumented: # set to '-' to print to console, else set to filename to log to LOGFILE = os.environ.get('SCONS_MSCOMMON_DEBUG') if LOGFILE == '-': @@ -53,6 +53,7 @@ else: debug = lambda x: None +# SCONS_CACHE_MSVC_CONFIG is public, and is documented. CONFIG_CACHE = os.environ.get('SCONS_CACHE_MSVC_CONFIG') if CONFIG_CACHE in ('1', 'true', 'True'): CONFIG_CACHE = os.path.join(os.path.expanduser('~'), '.scons_msvc_cache') @@ -66,6 +67,7 @@ def read_script_env_cache(): envcache = json.load(f) #TODO can use more specific FileNotFoundError when py2 dropped except IOError: + # don't fail if no cache file, just proceed without it pass return envcache diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py index d321f43..4f6048d 100644 --- a/src/engine/SCons/Tool/MSCommon/vc.py +++ b/src/engine/SCons/Tool/MSCommon/vc.py @@ -591,12 +591,15 @@ def reset_installed_vcs(): # we can greatly improve the speed of the second and subsequent Environment # (or Clone) calls by memoizing the environment variables set by vcvars*.bat. # -# Updated: by 2018, vcvarsall.bat had gotten so expensive it was breaking -# CI builds because the test suite starts scons so many times and the existing -# memo logic only helped with repeated calls within the same scons run; -# with VS2019 it got even slower and an optional cache file was introduced. -# The cache now also stores only the parsed vars, not the entire output -# of running the batch file - saves a bit of time not parsing every time. +# Updated: by 2018, vcvarsall.bat had gotten so expensive (vs2017 era) +# it was breaking CI builds because the test suite starts scons so many +# times and the existing memo logic only helped with repeated calls +# within the same scons run. Windows builds on the CI system were split +# into chunks to get around single-build time limits. +# With VS2019 it got even slower and an optional persistent cache file +# was introduced. The cache now also stores only the parsed vars, +# not the entire output of running the batch file - saves a bit +# of time not parsing every time. script_env_cache = None @@ -621,7 +624,8 @@ def script_env(script, args=None): # once we updated cache, give a chance to write out if user wanted common.write_script_env_cache(script_env_cache) else: - # if we "hit" data from the json file, we have a Py2 problem: + #TODO: Python 2 cleanup + # If we "hit" data from the json file, we have a Py2 problem: # keys & values will be unicode. don't detect, just convert. if sys.version_info[0] == 2: def convert(data): @@ -635,6 +639,7 @@ def script_env(script, args=None): return data cache_data = convert(cache_data) + return cache_data def get_default_version(env): -- cgit v0.12 From 8ec5aba156f070c89609ed8c99e7b3cc4973efa2 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sat, 12 Oct 2019 15:28:09 -0700 Subject: Changed wording on MSVC caching to indicate it's currently experimental feature [CI Skip] --- src/CHANGES.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 7ce224e..df8fb0d 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -18,10 +18,11 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - CmdStringHolder fix from issue #3428 - Turn previously deprecated debug options into failures: --debug=tree, --debug=dtree, --debug=stree, --debug=nomemoizer. - - If SCONS_CACHE_MSVC_CONFIG shell environment variable is set, - scons will cache the results of past calls to vcvarsall.bat to + - Experimental New Feature: Enable caching MSVC configuration + If SCONS_CACHE_MSVC_CONFIG shell environment variable is set, + SCons will cache the results of past calls to vcvarsall.bat to a file; integrates with existing memoizing of such vars. - On vs2019 saves 5+ seconds per scons invocation, which really + On vs2019 saves 5+ seconds per SCons invocation, which really helps test suite runs. From Jacek Kuczera: -- cgit v0.12 From 9c4e6c7a303047e4b26e58af749508f7e254ae89 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sun, 20 Oct 2019 10:13:32 -0600 Subject: Remove deprecated {Source,Target}Signatures These two have been deprecated since 2010 (about SCons 2.0), commit 935e6985. Methods are removed, setoption for setting them removed, doc is removed, tests are migrated to test/Removed/*/Old with a sconstest.skip file so they don't run, and two new tests are added to confirm that using the functions and setoptions generate exceptions. Signed-off-by: Mats Wichmann --- doc/man/scons.xml | 21 -- doc/scons.mod | 3 - doc/user/depends.xml | 178 --------------- src/CHANGES.txt | 1 + src/engine/SCons/Environment.py | 59 +---- src/engine/SCons/Environment.xml | 252 --------------------- src/engine/SCons/EnvironmentTests.py | 91 -------- src/engine/SCons/Script/__init__.py | 2 - src/engine/SCons/Warnings.py | 6 - test/Deprecated/CacheDir/timestamp-content.py | 68 ------ test/Deprecated/CacheDir/timestamp-timestamp.py | 68 ------ test/Deprecated/SourceSignatures/basic.py | 131 ----------- test/Deprecated/SourceSignatures/env.py | 109 --------- test/Deprecated/SourceSignatures/implicit-cache.py | 105 --------- test/Deprecated/SourceSignatures/no-csigs.py | 81 ------- test/Deprecated/SourceSignatures/overrides.py | 68 ------ test/Deprecated/SourceSignatures/switch-rebuild.py | 96 -------- test/Deprecated/TargetSignatures/build-content.py | 142 ------------ test/Deprecated/TargetSignatures/content.py | 95 -------- test/Deprecated/TargetSignatures/overrides.py | 64 ------ test/Removed/CacheDir/Old/sconstest.skip | 0 test/Removed/CacheDir/Old/timestamp-content.py | 68 ++++++ test/Removed/CacheDir/Old/timestamp-timestamp.py | 68 ++++++ test/Removed/CacheDir/README.md | 4 + test/Removed/SourceSignatures/Old/basic.py | 131 +++++++++++ test/Removed/SourceSignatures/Old/env.py | 109 +++++++++ .../Removed/SourceSignatures/Old/implicit-cache.py | 105 +++++++++ test/Removed/SourceSignatures/Old/no-csigs.py | 81 +++++++ test/Removed/SourceSignatures/Old/overrides.py | 68 ++++++ test/Removed/SourceSignatures/Old/sconstest.skip | 0 .../Removed/SourceSignatures/Old/switch-rebuild.py | 96 ++++++++ test/Removed/SourceSignatures/README.md | 6 + test/Removed/SourceSignatures/SConstruct.method | 1 + test/Removed/SourceSignatures/SConstruct.setopt | 1 + test/Removed/SourceSignatures/SourceSignatures.py | 52 +++++ test/Removed/TargetSignatures/Old/build-content.py | 142 ++++++++++++ test/Removed/TargetSignatures/Old/content.py | 95 ++++++++ test/Removed/TargetSignatures/Old/overrides.py | 64 ++++++ test/Removed/TargetSignatures/Old/sconstest.skip | 0 test/Removed/TargetSignatures/README.md | 6 + test/Removed/TargetSignatures/SConstruct.method | 1 + test/Removed/TargetSignatures/SConstruct.setopt | 1 + test/Removed/TargetSignatures/TargetSignatures.py | 52 +++++ test/implicit-cache/basic.py | 7 +- test/sconsign/script/Signatures.py | 3 - test/srcchange.py | 5 +- test/subdivide.py | 5 +- 47 files changed, 1165 insertions(+), 1646 deletions(-) delete mode 100644 test/Deprecated/CacheDir/timestamp-content.py delete mode 100644 test/Deprecated/CacheDir/timestamp-timestamp.py delete mode 100644 test/Deprecated/SourceSignatures/basic.py delete mode 100644 test/Deprecated/SourceSignatures/env.py delete mode 100644 test/Deprecated/SourceSignatures/implicit-cache.py delete mode 100644 test/Deprecated/SourceSignatures/no-csigs.py delete mode 100644 test/Deprecated/SourceSignatures/overrides.py delete mode 100644 test/Deprecated/SourceSignatures/switch-rebuild.py delete mode 100644 test/Deprecated/TargetSignatures/build-content.py delete mode 100644 test/Deprecated/TargetSignatures/content.py delete mode 100644 test/Deprecated/TargetSignatures/overrides.py create mode 100644 test/Removed/CacheDir/Old/sconstest.skip create mode 100644 test/Removed/CacheDir/Old/timestamp-content.py create mode 100644 test/Removed/CacheDir/Old/timestamp-timestamp.py create mode 100644 test/Removed/CacheDir/README.md create mode 100644 test/Removed/SourceSignatures/Old/basic.py create mode 100644 test/Removed/SourceSignatures/Old/env.py create mode 100644 test/Removed/SourceSignatures/Old/implicit-cache.py create mode 100644 test/Removed/SourceSignatures/Old/no-csigs.py create mode 100644 test/Removed/SourceSignatures/Old/overrides.py create mode 100644 test/Removed/SourceSignatures/Old/sconstest.skip create mode 100644 test/Removed/SourceSignatures/Old/switch-rebuild.py create mode 100644 test/Removed/SourceSignatures/README.md create mode 100644 test/Removed/SourceSignatures/SConstruct.method create mode 100644 test/Removed/SourceSignatures/SConstruct.setopt create mode 100644 test/Removed/SourceSignatures/SourceSignatures.py create mode 100644 test/Removed/TargetSignatures/Old/build-content.py create mode 100644 test/Removed/TargetSignatures/Old/content.py create mode 100644 test/Removed/TargetSignatures/Old/overrides.py create mode 100644 test/Removed/TargetSignatures/Old/sconstest.skip create mode 100644 test/Removed/TargetSignatures/README.md create mode 100644 test/Removed/TargetSignatures/SConstruct.method create mode 100644 test/Removed/TargetSignatures/SConstruct.setopt create mode 100644 test/Removed/TargetSignatures/TargetSignatures.py diff --git a/doc/man/scons.xml b/doc/man/scons.xml index 95278e6..a9e0dd7 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -1827,27 +1827,6 @@ method. - - --warn=deprecated-source-signatures, --warn=no-deprecated-source-signatures - -Enables or disables warnings about use of the deprecated -SourceSignatures() -function or -env.SourceSignatures() -method. - - - - - --warn=deprecated-target-signatures, --warn=no-deprecated-target-signatures - -Enables or disables warnings about use of the deprecated -TargetSignatures() -function or -env.TargetSignatures() -method. - - diff --git a/doc/scons.mod b/doc/scons.mod index 71e996d..3e843a0 100644 --- a/doc/scons.mod +++ b/doc/scons.mod @@ -260,11 +260,8 @@ SetDefault"> SetOption"> SideEffect"> -SourceSignature"> -SourceSignatures"> Split"> Tag"> -TargetSignatures"> Task"> Touch"> UnknownOptions"> diff --git a/doc/user/depends.xml b/doc/user/depends.xml index 7947900..5a78eb5 100644 --- a/doc/user/depends.xml +++ b/doc/user/depends.xml @@ -765,184 +765,6 @@ int main() { printf("Hello, world!\n"); } -
- The &SourceSignatures; Function - - - - The &SourceSignatures; function is fairly straightforward, - and supports two different argument values - to configure whether source file changes should be decided - using MD5 signatures: - - - - -Program('hello.c') -SourceSignatures('MD5') - - - - - Or using time stamps: - - - - -Program('hello.c') -SourceSignatures('timestamp') - - - - - These are roughly equivalent to specifying - Decider('MD5') - or - Decider('timestamp-match'), - respectively, - although it only affects how SCons makes - decisions about dependencies on - source files--that is, - files that are not built from any other files. - - - -
- -
- The &TargetSignatures; Function - - - - The &TargetSignatures; function - specifies how &SCons; decides - when a target file has changed - when it is used as a - dependency of (input to) another target--that is, - the &TargetSignatures; function configures - how the signatures of "intermediate" target files - are used when deciding if a "downstream" target file - must be rebuilt. - - This easily-overlooked distinction between - how &SCons; decides if the target itself must be rebuilt - and how the target is then used to decide if a different - target must be rebuilt is one of the confusing - things that has led to the &TargetSignatures; - and &SourceSignatures; functions being - replaced by the simpler &Decider; function. - - - - - - - The &TargetSignatures; function supports the same - 'MD5' and 'timestamp' - argument values that are supported by the &SourceSignatures;, - with the same meanings, but applied to target files. - That is, in the example: - - - - -Program('hello.c') -TargetSignatures('MD5') - - - - - The MD5 checksum of the &hello_o; target file - will be used to decide if it has changed since the last - time the "downstream" &hello; target file was built. - And in the example: - - - - -Program('hello.c') -TargetSignatures('timestamp') - - - - - The modification time of the &hello_o; target file - will be used to decide if it has changed since the last - time the "downstream" &hello; target file was built. - - - - - - The &TargetSignatures; function supports - two additional argument values: - 'source' and 'build'. - The 'source' argument - specifies that decisions involving - whether target files have changed - since a previous build - should use the same behavior - for the decisions configured for source files - (using the &SourceSignatures; function). - So in the example: - - - - -Program('hello.c') -TargetSignatures('source') -SourceSignatures('timestamp') - - - - - All files, both targets and sources, - will use modification times - when deciding if an input file - has changed since the last - time a target was built. - - - - - - Lastly, the 'build' argument - specifies that &SCons; should examine - the build status of a target file - and always rebuild a "downstream" target - if the target file was itself rebuilt, - without re-examining the contents or timestamp - of the newly-built target file. - If the target file was not rebuilt during - this &scons; invocation, - then the target file will be examined - the same way as configured by - the &SourceSignature; call - to decide if it has changed. - - - - - - This mimics the behavior of - build signatures - in earlier versions of &SCons;. - A &buildsignature; re-combined - signatures of all the input files - that went into making the target file, - so that the target file itself - did not need to have its contents read - to compute an MD5 signature. - This can improve performance for some configurations, - but is generally not as effective as using - Decider('MD5-timestamp'). - - - -
- - -
Implicit Dependencies: The &cv-CPPPATH; Construction Variable diff --git a/src/CHANGES.txt b/src/CHANGES.txt index df8fb0d..af448d5 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -24,6 +24,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER a file; integrates with existing memoizing of such vars. On vs2019 saves 5+ seconds per SCons invocation, which really helps test suite runs. + - Remove deprecated SourceSignatures, TargetSignatures From Jacek Kuczera: - Fix CheckFunc detection code for Visual 2019. Some functions diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 08104c5..0e1102e 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -46,7 +46,7 @@ import SCons.Builder import SCons.Debug from SCons.Debug import logInstanceCreation import SCons.Defaults -import SCons.Errors +from SCons.Errors import UserError, BuildError import SCons.Memoize import SCons.Node import SCons.Node.Alias @@ -75,11 +75,6 @@ CalculatorArgs = {} semi_deepcopy = SCons.Util.semi_deepcopy semi_deepcopy_dict = SCons.Util.semi_deepcopy_dict -# Pull UserError into the global name space for the benefit of -# Environment().SourceSignatures(), which has some import statements -# which seem to mess up its ability to reference SCons directly. -UserError = SCons.Errors.UserError - def alias_builder(env, target, source): pass @@ -154,7 +149,7 @@ def _set_BUILDERS(env, key, value): env._dict[key] = bd for k, v in value.items(): if not SCons.Builder.is_a_Builder(v): - raise SCons.Errors.UserError('%s is not a Builder.' % repr(v)) + raise UserError('%s is not a Builder.' % repr(v)) bd.update(value) def _del_SCANNERS(env, key): @@ -431,7 +426,7 @@ class SubstitutionEnvironment(object): # efficient than calling another function or a method. if key not in self._dict \ and not _is_valid_var.match(key): - raise SCons.Errors.UserError("Illegal construction variable `%s'" % key) + raise UserError("Illegal construction variable `%s'" % key) self._dict[key] = value def get(self, key, default=None): @@ -1621,7 +1616,7 @@ class Base(SubstitutionEnvironment): for td in tdlist: targets.extend(td[0]) if len(targets) > 1: - raise SCons.Errors.UserError( + raise UserError( "More than one dependency target found in `%s': %s" % (filename, targets)) for target, depends in tdlist: @@ -2060,7 +2055,7 @@ class Base(SubstitutionEnvironment): """ action = self.Action(action, *args, **kw) result = action([], [], self) - if isinstance(result, SCons.Errors.BuildError): + if isinstance(result, BuildError): errstr = result.errstr if result.filename: errstr = result.filename + ': ' + errstr @@ -2180,7 +2175,7 @@ class Base(SubstitutionEnvironment): for side_effect in side_effects: if side_effect.multiple_side_effect_has_builder(): - raise SCons.Errors.UserError("Multiple ways to build the same target were specified for: %s" % str(side_effect)) + raise UserError("Multiple ways to build the same target were specified for: %s" % str(side_effect)) side_effect.add_source(targets) side_effect.side_effect = 1 self.Precious(side_effect) @@ -2198,24 +2193,6 @@ class Base(SubstitutionEnvironment): entry.set_src_builder(builder) return entries - def SourceSignatures(self, type): - global _warn_source_signatures_deprecated - if _warn_source_signatures_deprecated: - msg = "The env.SourceSignatures() method is deprecated;\n" + \ - "\tconvert your build to use the env.Decider() method instead." - SCons.Warnings.warn(SCons.Warnings.DeprecatedSourceSignaturesWarning, msg) - _warn_source_signatures_deprecated = False - type = self.subst(type) - self.src_sig_type = type - if type == 'MD5': - if not SCons.Util.md5: - raise UserError("MD5 signatures are not available in this version of Python.") - self.decide_source = self._changed_content - elif type == 'timestamp': - self.decide_source = self._changed_timestamp_match - else: - raise UserError("Unknown source signature type '%s'" % type) - def Split(self, arg): """This function converts a string or list into a list of strings or Nodes. This makes things easier for users by allowing files to @@ -2237,28 +2214,6 @@ class Base(SubstitutionEnvironment): else: return [self.subst(arg)] - def TargetSignatures(self, type): - global _warn_target_signatures_deprecated - if _warn_target_signatures_deprecated: - msg = "The env.TargetSignatures() method is deprecated;\n" + \ - "\tconvert your build to use the env.Decider() method instead." - SCons.Warnings.warn(SCons.Warnings.DeprecatedTargetSignaturesWarning, msg) - _warn_target_signatures_deprecated = False - type = self.subst(type) - self.tgt_sig_type = type - if type in ('MD5', 'content'): - if not SCons.Util.md5: - raise UserError("MD5 signatures are not available in this version of Python.") - self.decide_target = self._changed_content - elif type == 'timestamp': - self.decide_target = self._changed_timestamp_match - elif type == 'build': - self.decide_target = self._changed_build - elif type == 'source': - self.decide_target = self._changed_source - else: - raise UserError("Unknown target signature type '%s'"%type) - def Value(self, value, built_value=None): """ """ @@ -2355,7 +2310,7 @@ class OverrideEnvironment(Base): return self.__dict__['__subject'].__getitem__(key) def __setitem__(self, key, value): if not is_valid_construction_var(key): - raise SCons.Errors.UserError("Illegal construction variable `%s'" % key) + raise UserError("Illegal construction variable `%s'" % key) self.__dict__['overrides'][key] = value def __delitem__(self, key): try: diff --git a/src/engine/SCons/Environment.xml b/src/engine/SCons/Environment.xml index a635108..829bf12 100644 --- a/src/engine/SCons/Environment.xml +++ b/src/engine/SCons/Environment.xml @@ -2987,105 +2987,6 @@ env.SourceCode('no_source.c', None)
- - -(type) - - - -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 -MD5 -or -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. - - - -MD5 -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. - - - -timestamp -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 -older -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. - - - -MD5 -signatures take longer to compute, -but are more accurate than -timestamp -signatures. -The default value is -MD5. - - - -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). - - - - (arg) @@ -3229,159 +3130,6 @@ source_nodes = env.subst('$EXPAND_TO_NODELIST', - - -(type) - - - -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 -is -built from any other files) -has changed since the last time it -was used to build some other target file. -Legal values are -"build"; -"content" -(or its synonym -"MD5"); -"timestamp"; -or -"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. - - - -"content" -(or its synonym -"MD5") -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. - - - -"timestamp" -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 -older -than the last time it was used to rebuild the target file.) - - - -"source" -means -&scons; -decides that a target file has changed -as specified by the corresponding -&f-SourceSignatures; -setting -("MD5" -or -"timestamp"). -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. - - - -"build" -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. - - - -"build" -signatures are fastest because -"content" -(or -"MD5") -signatures take longer to compute, -but are more accurate than -"timestamp" -signatures, -and can prevent unnecessary "downstream" rebuilds -when a target file is rebuilt to the exact same contents -as the previous build. -The -"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 -"source". - - - -Because the default setting is -"source", -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. - - - - (string, [toolpath, **kw]) diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index 70e1a37..f016f22 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -3284,44 +3284,6 @@ def generate(env): s = e.src_builder() assert s is None, s - def test_SourceSignatures(self): - """Test the SourceSignatures() method""" - import SCons.Errors - - env = self.TestEnvironment(M = 'MD5', T = 'timestamp') - - exc_caught = None - try: - env.SourceSignatures('invalid_type') - except SCons.Errors.UserError: - exc_caught = 1 - assert exc_caught, "did not catch expected UserError" - - env.SourceSignatures('MD5') - assert env.src_sig_type == 'MD5', env.src_sig_type - - env.SourceSignatures('$M') - assert env.src_sig_type == 'MD5', env.src_sig_type - - env.SourceSignatures('timestamp') - assert env.src_sig_type == 'timestamp', env.src_sig_type - - env.SourceSignatures('$T') - assert env.src_sig_type == 'timestamp', env.src_sig_type - - try: - import SCons.Util - save_md5 = SCons.Util.md5 - SCons.Util.md5 = None - try: - env.SourceSignatures('MD5') - except SCons.Errors.UserError: - pass - else: - self.fail('Did not catch expected UserError') - finally: - SCons.Util.md5 = save_md5 - def test_Split(self): """Test the Split() method""" env = self.TestEnvironment(FOO = 'fff', BAR = 'bbb') @@ -3338,56 +3300,6 @@ def generate(env): s = env.Split("$FOO$BAR") assert s == ["fffbbb"], s - def test_TargetSignatures(self): - """Test the TargetSignatures() method""" - import SCons.Errors - - env = self.TestEnvironment(B='build', C='content') - - exc_caught = None - try: - env.TargetSignatures('invalid_type') - except SCons.Errors.UserError: - exc_caught = 1 - assert exc_caught, "did not catch expected UserError" - assert not hasattr(env, '_build_signature') - - env.TargetSignatures('build') - assert env.tgt_sig_type == 'build', env.tgt_sig_type - - env.TargetSignatures('$B') - assert env.tgt_sig_type == 'build', env.tgt_sig_type - - env.TargetSignatures('content') - assert env.tgt_sig_type == 'content', env.tgt_sig_type - - env.TargetSignatures('$C') - assert env.tgt_sig_type == 'content', env.tgt_sig_type - - env.TargetSignatures('MD5') - assert env.tgt_sig_type == 'MD5', env.tgt_sig_type - - env.TargetSignatures('timestamp') - assert env.tgt_sig_type == 'timestamp', env.tgt_sig_type - - try: - import SCons.Util - save_md5 = SCons.Util.md5 - SCons.Util.md5 = None - try: - env.TargetSignatures('MD5') - except SCons.Errors.UserError: - pass - else: - self.fail('Did not catch expected UserError') - try: - env.TargetSignatures('content') - except SCons.Errors.UserError: - pass - else: - self.fail('Did not catch expected UserError') - finally: - SCons.Util.md5 = save_md5 def test_Value(self): """Test creating a Value() object @@ -3408,7 +3320,6 @@ def generate(env): assert v3.value == 'c', v3.value - def test_Environment_global_variable(self): """Test setting Environment variable to an Environment.Base subclass""" class MyEnv(SCons.Environment.Base): @@ -3750,8 +3661,6 @@ class OverrideEnvironmentTestCase(unittest.TestCase,TestEnvironmentFixture): # Environment() # FindFile() # Scanner() - # SourceSignatures() - # TargetSignatures() # It's unlikely Clone() will ever be called this way, so let the # other methods test that handling overridden values works. diff --git a/src/engine/SCons/Script/__init__.py b/src/engine/SCons/Script/__init__.py index 007eb0d..24af73e 100644 --- a/src/engine/SCons/Script/__init__.py +++ b/src/engine/SCons/Script/__init__.py @@ -346,10 +346,8 @@ GlobalDefaultEnvironmentFunctions = [ 'SConsignFile', 'SideEffect', 'SourceCode', - 'SourceSignatures', 'Split', 'Tag', - 'TargetSignatures', 'Value', 'VariantDir', ] diff --git a/src/engine/SCons/Warnings.py b/src/engine/SCons/Warnings.py index a5b257b..718b3d5 100644 --- a/src/engine/SCons/Warnings.py +++ b/src/engine/SCons/Warnings.py @@ -132,12 +132,6 @@ class DeprecatedCopyWarning(MandatoryDeprecatedWarning): class DeprecatedOptionsWarning(MandatoryDeprecatedWarning): pass -class DeprecatedSourceSignaturesWarning(MandatoryDeprecatedWarning): - pass - -class DeprecatedTargetSignaturesWarning(MandatoryDeprecatedWarning): - pass - class DeprecatedDebugOptionsWarning(MandatoryDeprecatedWarning): pass diff --git a/test/Deprecated/CacheDir/timestamp-content.py b/test/Deprecated/CacheDir/timestamp-content.py deleted file mode 100644 index 860d0f3..0000000 --- a/test/Deprecated/CacheDir/timestamp-content.py +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -""" -Verify that CacheDir() works when using SourceSignatures('timestamp') -and TargetSignatures 'content'. -""" - -import TestSCons - -test = TestSCons.TestSCons() - -test.write('SConstruct', """ -SetOption('warn', 'no-deprecated') -SourceSignatures('timestamp') -TargetSignatures('content') -CacheDir('cache') -Command('file.out', 'file.in', Copy('$TARGET', '$SOURCE')) -""") - -test.write('file.in', "file.in\n") - -test.run(arguments = '.') - -test.must_match('file.out', "file.in\n") - -test.up_to_date(options = '--cache-show --debug=explain', arguments = '.') - -test.sleep() - -test.touch('file.in') - -test.not_up_to_date(options = '--cache-show --debug=explain', arguments = '.') - -test.up_to_date(options = '--cache-show --debug=explain', arguments = '.') - -test.up_to_date(options = '--cache-show --debug=explain', arguments = '.') - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Deprecated/CacheDir/timestamp-timestamp.py b/test/Deprecated/CacheDir/timestamp-timestamp.py deleted file mode 100644 index eec70b5..0000000 --- a/test/Deprecated/CacheDir/timestamp-timestamp.py +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -""" -Verify that CacheDir() works when using both SourceSignatures() -and TargetSignatures values of 'timestamp'. -""" - -import TestSCons - -test = TestSCons.TestSCons() - -test.write(['SConstruct'], """\ -SetOption('warn', 'no-deprecated') -SourceSignatures('timestamp') -TargetSignatures('timestamp') -CacheDir('cache') -Command('file.out', 'file.in', Copy('$TARGET', '$SOURCE')) -""") - -test.write('file.in', "file.in\n") - -test.run(arguments = '--cache-show --debug=explain .') - -test.must_match('file.out', "file.in\n") - -test.up_to_date(options = '--cache-show --debug=explain', arguments = '.') - -test.sleep() - -test.touch('file.in') - -test.not_up_to_date(options = '--cache-show --debug=explain', arguments = '.') - -test.up_to_date(options = '--cache-show --debug=explain', arguments = '.') - -test.up_to_date(options = '--cache-show --debug=explain', arguments = '.') - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Deprecated/SourceSignatures/basic.py b/test/Deprecated/SourceSignatures/basic.py deleted file mode 100644 index 7951dbd..0000000 --- a/test/Deprecated/SourceSignatures/basic.py +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -import os -import re - -import TestSCons - -test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) - - -base_sconstruct_contents = """\ -SetOption('warn', 'deprecated-source-signatures') -def build(env, target, source): - with open(str(target[0]), 'wt') as ofp, open(str(source[0]), 'rt') as ifp: - ofp.write(ifp.read()) -B = Builder(action = build) -env = Environment(BUILDERS = { 'B' : B }) -env.B(target = 'f1.out', source = 'f1.in') -env.B(target = 'f2.out', source = 'f2.in') -env.B(target = 'f3.out', source = 'f3.in') -env.B(target = 'f4.out', source = 'f4.in') -""" - -def write_SConstruct(test, sigtype): - contents = base_sconstruct_contents - if sigtype: - contents = contents + ("\nSourceSignatures('%s')\n" % sigtype) - test.write('SConstruct', contents) - - -expect = TestSCons.re_escape(""" -scons: warning: The env.SourceSignatures() method is deprecated; -\tconvert your build to use the env.Decider() method instead. -""") + TestSCons.file_expr - -write_SConstruct(test, 'timestamp') - -test.write('f1.in', "f1.in\n") -test.write('f2.in', "f2.in\n") -test.write('f3.in', "f3.in\n") -test.write('f4.in', "f4.in\n") - -test.run(arguments = 'f1.out f3.out', stderr = expect) - -test.run(arguments = 'f1.out f2.out f3.out f4.out', - stdout = re.escape(test.wrap_stdout("""\ -scons: `f1.out' is up to date. -build(["f2.out"], ["f2.in"]) -scons: `f3.out' is up to date. -build(["f4.out"], ["f4.in"]) -""")), - stderr = expect) - - -os.utime(test.workpath('f1.in'), - (os.path.getatime(test.workpath('f1.in')), - os.path.getmtime(test.workpath('f1.in'))+10)) -os.utime(test.workpath('f3.in'), - (os.path.getatime(test.workpath('f3.in')), - os.path.getmtime(test.workpath('f3.in'))+10)) - -test.run(arguments = 'f1.out f2.out f3.out f4.out', - stdout = re.escape(test.wrap_stdout("""\ -build(["f1.out"], ["f1.in"]) -scons: `f2.out' is up to date. -build(["f3.out"], ["f3.in"]) -scons: `f4.out' is up to date. -""")), - stderr = expect) - - -# Switching to content signatures from timestamps should rebuild, -# because we didn't record the content signatures last time. - -write_SConstruct(test, 'MD5') - -test.not_up_to_date(arguments = 'f1.out f2.out f3.out f4.out', stderr = expect) - - -test.sleep() - -test.write('f1.in', "f1.in\n") -test.write('f2.in', "f2.in\n") -test.write('f3.in', "f3.in\n") -test.write('f4.in', "f4.in\n") - -test.up_to_date(arguments = 'f1.out f2.out f3.out f4.out', stderr = None) - - -test.touch('f1.in', os.path.getmtime(test.workpath('f1.in'))+10) -test.touch('f3.in', os.path.getmtime(test.workpath('f3.in'))+10) - -test.up_to_date(arguments = 'f1.out f2.out f3.out f4.out', stderr = None) - - -write_SConstruct(test, None) - -test.up_to_date(arguments = 'f1.out f2.out f3.out f4.out', stderr = None) - - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Deprecated/SourceSignatures/env.py b/test/Deprecated/SourceSignatures/env.py deleted file mode 100644 index c63b176..0000000 --- a/test/Deprecated/SourceSignatures/env.py +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -""" -Test that use of env.SourceSignatures() correctly overrides the -default behavior. -""" - -import os -import re - -import TestSCons - -test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) - -base_sconstruct_contents = """\ -SetOption('warn', 'deprecated-source-signatures') -def build(env, target, source): - with open(str(target[0]), 'wt') as ofp, open(str(source[0]), 'rt') as ifp: - ofp.write(ifp.read()) -B = Builder(action = build) -env = Environment(BUILDERS = { 'B' : B }) -env2 = env.Clone() -env2.SourceSignatures('%s') -env.B(target = 'f1.out', source = 'f1.in') -env.B(target = 'f2.out', source = 'f2.in') -env2.B(target = 'f3.out', source = 'f3.in') -env2.B(target = 'f4.out', source = 'f4.in') - -SourceSignatures('%s') -""" - -def write_SConstruct(test, env_sigtype, default_sigtype): - contents = base_sconstruct_contents % (env_sigtype, default_sigtype) - test.write('SConstruct', contents) - - -expect = TestSCons.re_escape(""" -scons: warning: The env.SourceSignatures() method is deprecated; -\tconvert your build to use the env.Decider() method instead. -""") + TestSCons.file_expr - - -write_SConstruct(test, 'MD5', 'timestamp') - -test.write('f1.in', "f1.in\n") -test.write('f2.in', "f2.in\n") -test.write('f3.in', "f3.in\n") -test.write('f4.in', "f4.in\n") - -test.run(arguments = 'f1.out f3.out', stderr = expect) - -test.run(arguments = 'f1.out f2.out f3.out f4.out', - stdout = re.escape(test.wrap_stdout("""\ -scons: `f1.out' is up to date. -build(["f2.out"], ["f2.in"]) -scons: `f3.out' is up to date. -build(["f4.out"], ["f4.in"]) -""")), - stderr = expect) - - -test.sleep() - -test.touch('f1.in') -test.touch('f3.in') - -test.run(arguments = 'f1.out f2.out f3.out f4.out', - stdout = re.escape(test.wrap_stdout("""\ -build(["f1.out"], ["f1.in"]) -scons: `f2.out' is up to date. -scons: `f3.out' is up to date. -scons: `f4.out' is up to date. -""")), - stderr = expect) - -test.up_to_date(arguments = 'f1.out f2.out f3.out f4.out', stderr = None) - - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Deprecated/SourceSignatures/implicit-cache.py b/test/Deprecated/SourceSignatures/implicit-cache.py deleted file mode 100644 index a4bdc78..0000000 --- a/test/Deprecated/SourceSignatures/implicit-cache.py +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -""" -Test the simultaneous use of implicit_cache and -SourceSignatures('timestamp') -""" - -import re - -import TestSCons - -test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) - -test.write('SConstruct', """\ -SetOption('warn', 'deprecated-source-signatures') -SetOption('implicit_cache', 1) -SourceSignatures('timestamp') - -def build(env, target, source): - with open(str(target[0]), 'wt') as ofp, open(str(source[0]), 'rt') as ifp: - ofp.write(ifp.read()) -B = Builder(action = build) -env = Environment(BUILDERS = { 'B' : B }) -env.B(target = 'both.out', source = 'both.in') -""") - - -expect = TestSCons.re_escape(""" -scons: warning: The env.SourceSignatures() method is deprecated; -\tconvert your build to use the env.Decider() method instead. -""") + TestSCons.file_expr - - -both_out_both_in = re.escape(test.wrap_stdout('build(["both.out"], ["both.in"])\n')) - -test.write('both.in', "both.in 1\n") - -test.run(arguments = 'both.out', - stdout = both_out_both_in, - stderr = expect) - - -test.sleep(2) - -test.write('both.in', "both.in 2\n") - -test.run(arguments = 'both.out', - stdout = both_out_both_in, - stderr = expect) - - -test.sleep(2) - -test.write('both.in', "both.in 3\n") - -test.run(arguments = 'both.out', - stdout = both_out_both_in, - stderr = expect) - - -test.sleep(2) - -test.write('both.in', "both.in 4\n") - -test.run(arguments = 'both.out', - stdout = both_out_both_in, - stderr = expect) - - -test.sleep(2) - -test.up_to_date(arguments = 'both.out', stderr = None) - - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Deprecated/SourceSignatures/no-csigs.py b/test/Deprecated/SourceSignatures/no-csigs.py deleted file mode 100644 index c4f2a78..0000000 --- a/test/Deprecated/SourceSignatures/no-csigs.py +++ /dev/null @@ -1,81 +0,0 @@ - -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -import os - -import TestSCons -import TestSConsign - -test = TestSConsign.TestSConsign(match = TestSConsign.match_re) - - -test.write('SConstruct', """\ -SetOption('warn', 'deprecated-source-signatures') -def build(env, target, source): - with open(str(target[0]), 'wt') as ofp, open(str(source[0]), 'rt') as ifp: - ofp.write(ifp.read()) -B = Builder(action = build) -env = Environment(BUILDERS = { 'B' : B }) -env.B(target = 'f1.out', source = 'f1.in') -env.B(target = 'f2.out', source = 'f2.in') -SourceSignatures('timestamp') -""") - -test.write('f1.in', "f1.in\n") -test.write('f2.in', "f2.in\n") - -expect = TestSCons.re_escape(""" -scons: warning: The env.SourceSignatures() method is deprecated; -\tconvert your build to use the env.Decider() method instead. -""") + TestSCons.file_expr - -test.run(arguments = '.', stderr = expect) - - -expect = r"""=== .: -SConstruct: None \d+ \d+ -f1.in: None \d+ \d+ -f1.out: \S+ \d+ \d+ - f1.in: None \d+ \d+ - \S+ \[build\(target, source, env\)\] -f2.in: None \d+ \d+ -f2.out: \S+ \d+ \d+ - f2.in: None \d+ \d+ - \S+ \[build\(target, source, env\)\] -""" - -test.run_sconsign(arguments = test.workpath('.sconsign'), - stdout = expect) - - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Deprecated/SourceSignatures/overrides.py b/test/Deprecated/SourceSignatures/overrides.py deleted file mode 100644 index 4303c0e..0000000 --- a/test/Deprecated/SourceSignatures/overrides.py +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -""" -Make sure that SourceSignatures() works when overrides are used on a -Builder call. (Previous implementations used methods that would stay -bound to the underlying construction environment, which in this case -meant ignoring the 'timestamp' setting and still using the underlying -content signature.) -""" - -import TestSCons - -test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) - -expect = TestSCons.re_escape(""" -scons: warning: The env.SourceSignatures() method is deprecated; -\tconvert your build to use the env.Decider() method instead. -""") + TestSCons.file_expr - -test.write('SConstruct', """\ -SetOption('warn', 'deprecated-source-signatures') -DefaultEnvironment().SourceSignatures('MD5') -env = Environment() -env.SourceSignatures('timestamp') -env.Command('foo.out', 'foo.in', Copy('$TARGET', '$SOURCE'), FOO=1) -""") - -test.write('foo.in', "foo.in 1\n") - -test.run(arguments = 'foo.out', stderr = expect) - -test.sleep() - -test.write('foo.in', "foo.in 1\n") - -test.not_up_to_date(arguments = 'foo.out', stderr = expect) - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Deprecated/SourceSignatures/switch-rebuild.py b/test/Deprecated/SourceSignatures/switch-rebuild.py deleted file mode 100644 index b9cc3d5..0000000 --- a/test/Deprecated/SourceSignatures/switch-rebuild.py +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -""" -Test that switching SourceSignature() types no longer causes rebuilds. -""" - -import re - -import TestSCons - -test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) - -expect = TestSCons.re_escape(""" -scons: warning: The env.SourceSignatures() method is deprecated; -\tconvert your build to use the env.Decider() method instead. -""") + TestSCons.file_expr - - -base_sconstruct_contents = """\ -SetOption('warn', 'deprecated-source-signatures') -SourceSignatures('%s') - -def build(env, target, source): - with open(str(target[0]), 'wt') as ofp, open(str(source[0]), 'rt') as ifp: - ofp.write(ifp.read()) -B = Builder(action = build) -env = Environment(BUILDERS = { 'B' : B }) -env.B(target = 'switch.out', source = 'switch.in') -""" - -def write_SConstruct(test, sig_type): - contents = base_sconstruct_contents % sig_type - test.write('SConstruct', contents) - - -write_SConstruct(test, 'MD5') - -test.write('switch.in', "switch.in\n") - -switch_out_switch_in = re.escape(test.wrap_stdout('build(["switch.out"], ["switch.in"])\n')) - -test.run(arguments = 'switch.out', - stdout = switch_out_switch_in, - stderr = expect) - -test.up_to_date(arguments = 'switch.out', stderr = None) - - -write_SConstruct(test, 'timestamp') - -test.up_to_date(arguments = 'switch.out', stderr = None) - - -write_SConstruct(test, 'MD5') - -test.not_up_to_date(arguments = 'switch.out', stderr = None) - - -test.write('switch.in', "switch.in 2\n") - -test.run(arguments = 'switch.out', - stdout = switch_out_switch_in, - stderr = expect) - - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Deprecated/TargetSignatures/build-content.py b/test/Deprecated/TargetSignatures/build-content.py deleted file mode 100644 index efdaaee..0000000 --- a/test/Deprecated/TargetSignatures/build-content.py +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -""" -Verify basic interaction of the historic TargetSignatures('build') -and TargetSignatures('content') settings, overriding one with -the other in specific construction environments. -""" - -import re - -import TestSCons - -test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) - -expect = TestSCons.re_escape(""" -scons: warning: The env.TargetSignatures() method is deprecated; -\tconvert your build to use the env.Decider() method instead. -""") + TestSCons.file_expr - - -sconstruct_contents = """\ -SetOption('warn', 'deprecated-target-signatures') -env = Environment() - -def copy1(env, source, target): - with open(str(target[0]), 'wb') as fo, open(str(source[0]), 'rb') as fi: - fo.write(fi.read()) - -def copy2(env, source, target): - %s - return copy1(env, source, target) - -env['BUILDERS']['Copy1'] = Builder(action=copy1) -env['BUILDERS']['Copy2'] = Builder(action=copy2) - -env.Copy2('foo.mid', 'foo.in') -env.Copy1('foo.out', 'foo.mid') - -env2 = env.Clone() -env2.TargetSignatures('%s') -env2.Copy2('bar.mid', 'bar.in') -env2.Copy1('bar.out', 'bar.mid') - -TargetSignatures('%s') -""" - -def write_SConstruct(test, *args): - contents = sconstruct_contents % args - test.write('SConstruct', contents) - - - -write_SConstruct(test, '', 'build', 'content') - -test.write('foo.in', 'foo.in') -test.write('bar.in', 'bar.in') - -test.run(arguments="bar.out foo.out", - stdout=re.escape(test.wrap_stdout("""\ -copy2(["bar.mid"], ["bar.in"]) -copy1(["bar.out"], ["bar.mid"]) -copy2(["foo.mid"], ["foo.in"]) -copy1(["foo.out"], ["foo.mid"]) -""")), - stderr = expect) - -test.up_to_date(arguments='bar.out foo.out', stderr=None) - - - -# Change the code in the the copy2() function, which should change -# its content and trigger a rebuild of the targets built with it. - -write_SConstruct(test, 'x = 2 # added this line', 'build', 'content') - -test.run(arguments="bar.out foo.out", - stdout=re.escape(test.wrap_stdout("""\ -copy2(["bar.mid"], ["bar.in"]) -copy1(["bar.out"], ["bar.mid"]) -copy2(["foo.mid"], ["foo.in"]) -scons: `foo.out' is up to date. -""")), - stderr = expect) - - - -# Swapping content and build signatures no longer causes a rebuild -# because we record the right underlying information regardless. - -write_SConstruct(test, 'x = 2 # added this line', 'content', 'build') - -test.up_to_date(arguments="bar.out foo.out", stderr=None) - - - -# Change the code in the the copy2() function back again, which should -# trigger another rebuild of the targets built with it. - -write_SConstruct(test, '', 'content', 'build') - -test.run(arguments='bar.out foo.out', - stdout=re.escape(test.wrap_stdout("""\ -copy2(["bar.mid"], ["bar.in"]) -scons: `bar.out' is up to date. -copy2(["foo.mid"], ["foo.in"]) -copy1(["foo.out"], ["foo.mid"]) -""")), - stderr = expect) - - - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Deprecated/TargetSignatures/content.py b/test/Deprecated/TargetSignatures/content.py deleted file mode 100644 index aca63f3..0000000 --- a/test/Deprecated/TargetSignatures/content.py +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -""" -Verify use of the TargetSignatures('content') setting to override -SourceSignatures('timestamp') settings. -""" - -import TestSCons - -test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) - -expect = TestSCons.re_escape(""" -scons: warning: The env.SourceSignatures() method is deprecated; -\tconvert your build to use the env.Decider() method instead. -""") + TestSCons.file_expr + TestSCons.re_escape(""" -scons: warning: The env.TargetSignatures() method is deprecated; -\tconvert your build to use the env.Decider() method instead. -""") + TestSCons.file_expr - - -test.write('SConstruct', """\ -SetOption('warn', 'deprecated-source-signatures') -SetOption('warn', 'deprecated-target-signatures') -env = Environment() - -def copy(env, source, target): - with open(str(target[0]), 'wb') as ofp: - for s in source: - with open(str(s), 'rb') as ifp: - ofp.write(ifp.read()) - -copyAction = Action(copy, "Copying $TARGET") - -SourceSignatures('timestamp') - -env['BUILDERS']['Copy'] = Builder(action=copyAction) - -env.Copy('foo.out', 'foo.in') - -env2 = env.Clone() -env2.TargetSignatures('content') -env2.Copy('bar.out', 'bar.in') -AlwaysBuild('bar.out') - -env.Copy('final', ['foo.out', 'bar.out', 'extra.in']) -env.Ignore('final', 'extra.in') -""") - -test.write('foo.in', "foo.in\n") -test.write('bar.in', "bar.in\n") -test.write('extra.in', "extra.in 1\n") - -test.run(stderr = expect) - -test.must_match('final', "foo.in\nbar.in\nextra.in 1\n") - -test.sleep() -test.write('extra.in', "extra.in 2\n") - -test.run(stderr = expect) - -test.must_match('final', "foo.in\nbar.in\nextra.in 1\n") - - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Deprecated/TargetSignatures/overrides.py b/test/Deprecated/TargetSignatures/overrides.py deleted file mode 100644 index 54a66d4..0000000 --- a/test/Deprecated/TargetSignatures/overrides.py +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -""" -Make sure that TargetSignatures() works when overrides are used on a -Builder call. Previous implementations used methods that would stay -bound to the underlying construction environment and cause weird -behavior like infinite recursion. -""" - -import TestSCons - -test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) - -test.write('SConstruct', """\ -SetOption('warn', 'deprecated-target-signatures') -env = Environment() -env.TargetSignatures('content') -env.Command('foo.out', 'foo.mid', Copy('$TARGET', '$SOURCE'), FOO=1) -env.Command('foo.mid', 'foo.in', Copy('$TARGET', '$SOURCE'), FOO=2) -""") - -test.write('foo.in', "foo.in\n") - -expect = TestSCons.re_escape(""" -scons: warning: The env.TargetSignatures() method is deprecated; -\tconvert your build to use the env.Decider() method instead. -""") + TestSCons.file_expr - -test.run(arguments = '.', stderr = expect) - -test.must_match('foo.mid', "foo.in\n") -test.must_match('foo.out', "foo.in\n") - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/CacheDir/Old/sconstest.skip b/test/Removed/CacheDir/Old/sconstest.skip new file mode 100644 index 0000000..e69de29 diff --git a/test/Removed/CacheDir/Old/timestamp-content.py b/test/Removed/CacheDir/Old/timestamp-content.py new file mode 100644 index 0000000..860d0f3 --- /dev/null +++ b/test/Removed/CacheDir/Old/timestamp-content.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Verify that CacheDir() works when using SourceSignatures('timestamp') +and TargetSignatures 'content'. +""" + +import TestSCons + +test = TestSCons.TestSCons() + +test.write('SConstruct', """ +SetOption('warn', 'no-deprecated') +SourceSignatures('timestamp') +TargetSignatures('content') +CacheDir('cache') +Command('file.out', 'file.in', Copy('$TARGET', '$SOURCE')) +""") + +test.write('file.in', "file.in\n") + +test.run(arguments = '.') + +test.must_match('file.out', "file.in\n") + +test.up_to_date(options = '--cache-show --debug=explain', arguments = '.') + +test.sleep() + +test.touch('file.in') + +test.not_up_to_date(options = '--cache-show --debug=explain', arguments = '.') + +test.up_to_date(options = '--cache-show --debug=explain', arguments = '.') + +test.up_to_date(options = '--cache-show --debug=explain', arguments = '.') + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/CacheDir/Old/timestamp-timestamp.py b/test/Removed/CacheDir/Old/timestamp-timestamp.py new file mode 100644 index 0000000..eec70b5 --- /dev/null +++ b/test/Removed/CacheDir/Old/timestamp-timestamp.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Verify that CacheDir() works when using both SourceSignatures() +and TargetSignatures values of 'timestamp'. +""" + +import TestSCons + +test = TestSCons.TestSCons() + +test.write(['SConstruct'], """\ +SetOption('warn', 'no-deprecated') +SourceSignatures('timestamp') +TargetSignatures('timestamp') +CacheDir('cache') +Command('file.out', 'file.in', Copy('$TARGET', '$SOURCE')) +""") + +test.write('file.in', "file.in\n") + +test.run(arguments = '--cache-show --debug=explain .') + +test.must_match('file.out', "file.in\n") + +test.up_to_date(options = '--cache-show --debug=explain', arguments = '.') + +test.sleep() + +test.touch('file.in') + +test.not_up_to_date(options = '--cache-show --debug=explain', arguments = '.') + +test.up_to_date(options = '--cache-show --debug=explain', arguments = '.') + +test.up_to_date(options = '--cache-show --debug=explain', arguments = '.') + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/CacheDir/README.md b/test/Removed/CacheDir/README.md new file mode 100644 index 0000000..c5b75bf --- /dev/null +++ b/test/Removed/CacheDir/README.md @@ -0,0 +1,4 @@ +CacheDir/Old contains old tests of CacheDir which used the now removed +SourceSignatures and TargetSignatures methods, preserved here for +reference; the presence of an scontest.skip file means they are never +executed. diff --git a/test/Removed/SourceSignatures/Old/basic.py b/test/Removed/SourceSignatures/Old/basic.py new file mode 100644 index 0000000..7951dbd --- /dev/null +++ b/test/Removed/SourceSignatures/Old/basic.py @@ -0,0 +1,131 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +import os +import re + +import TestSCons + +test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) + + +base_sconstruct_contents = """\ +SetOption('warn', 'deprecated-source-signatures') +def build(env, target, source): + with open(str(target[0]), 'wt') as ofp, open(str(source[0]), 'rt') as ifp: + ofp.write(ifp.read()) +B = Builder(action = build) +env = Environment(BUILDERS = { 'B' : B }) +env.B(target = 'f1.out', source = 'f1.in') +env.B(target = 'f2.out', source = 'f2.in') +env.B(target = 'f3.out', source = 'f3.in') +env.B(target = 'f4.out', source = 'f4.in') +""" + +def write_SConstruct(test, sigtype): + contents = base_sconstruct_contents + if sigtype: + contents = contents + ("\nSourceSignatures('%s')\n" % sigtype) + test.write('SConstruct', contents) + + +expect = TestSCons.re_escape(""" +scons: warning: The env.SourceSignatures() method is deprecated; +\tconvert your build to use the env.Decider() method instead. +""") + TestSCons.file_expr + +write_SConstruct(test, 'timestamp') + +test.write('f1.in', "f1.in\n") +test.write('f2.in', "f2.in\n") +test.write('f3.in', "f3.in\n") +test.write('f4.in', "f4.in\n") + +test.run(arguments = 'f1.out f3.out', stderr = expect) + +test.run(arguments = 'f1.out f2.out f3.out f4.out', + stdout = re.escape(test.wrap_stdout("""\ +scons: `f1.out' is up to date. +build(["f2.out"], ["f2.in"]) +scons: `f3.out' is up to date. +build(["f4.out"], ["f4.in"]) +""")), + stderr = expect) + + +os.utime(test.workpath('f1.in'), + (os.path.getatime(test.workpath('f1.in')), + os.path.getmtime(test.workpath('f1.in'))+10)) +os.utime(test.workpath('f3.in'), + (os.path.getatime(test.workpath('f3.in')), + os.path.getmtime(test.workpath('f3.in'))+10)) + +test.run(arguments = 'f1.out f2.out f3.out f4.out', + stdout = re.escape(test.wrap_stdout("""\ +build(["f1.out"], ["f1.in"]) +scons: `f2.out' is up to date. +build(["f3.out"], ["f3.in"]) +scons: `f4.out' is up to date. +""")), + stderr = expect) + + +# Switching to content signatures from timestamps should rebuild, +# because we didn't record the content signatures last time. + +write_SConstruct(test, 'MD5') + +test.not_up_to_date(arguments = 'f1.out f2.out f3.out f4.out', stderr = expect) + + +test.sleep() + +test.write('f1.in', "f1.in\n") +test.write('f2.in', "f2.in\n") +test.write('f3.in', "f3.in\n") +test.write('f4.in', "f4.in\n") + +test.up_to_date(arguments = 'f1.out f2.out f3.out f4.out', stderr = None) + + +test.touch('f1.in', os.path.getmtime(test.workpath('f1.in'))+10) +test.touch('f3.in', os.path.getmtime(test.workpath('f3.in'))+10) + +test.up_to_date(arguments = 'f1.out f2.out f3.out f4.out', stderr = None) + + +write_SConstruct(test, None) + +test.up_to_date(arguments = 'f1.out f2.out f3.out f4.out', stderr = None) + + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/SourceSignatures/Old/env.py b/test/Removed/SourceSignatures/Old/env.py new file mode 100644 index 0000000..c63b176 --- /dev/null +++ b/test/Removed/SourceSignatures/Old/env.py @@ -0,0 +1,109 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Test that use of env.SourceSignatures() correctly overrides the +default behavior. +""" + +import os +import re + +import TestSCons + +test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) + +base_sconstruct_contents = """\ +SetOption('warn', 'deprecated-source-signatures') +def build(env, target, source): + with open(str(target[0]), 'wt') as ofp, open(str(source[0]), 'rt') as ifp: + ofp.write(ifp.read()) +B = Builder(action = build) +env = Environment(BUILDERS = { 'B' : B }) +env2 = env.Clone() +env2.SourceSignatures('%s') +env.B(target = 'f1.out', source = 'f1.in') +env.B(target = 'f2.out', source = 'f2.in') +env2.B(target = 'f3.out', source = 'f3.in') +env2.B(target = 'f4.out', source = 'f4.in') + +SourceSignatures('%s') +""" + +def write_SConstruct(test, env_sigtype, default_sigtype): + contents = base_sconstruct_contents % (env_sigtype, default_sigtype) + test.write('SConstruct', contents) + + +expect = TestSCons.re_escape(""" +scons: warning: The env.SourceSignatures() method is deprecated; +\tconvert your build to use the env.Decider() method instead. +""") + TestSCons.file_expr + + +write_SConstruct(test, 'MD5', 'timestamp') + +test.write('f1.in', "f1.in\n") +test.write('f2.in', "f2.in\n") +test.write('f3.in', "f3.in\n") +test.write('f4.in', "f4.in\n") + +test.run(arguments = 'f1.out f3.out', stderr = expect) + +test.run(arguments = 'f1.out f2.out f3.out f4.out', + stdout = re.escape(test.wrap_stdout("""\ +scons: `f1.out' is up to date. +build(["f2.out"], ["f2.in"]) +scons: `f3.out' is up to date. +build(["f4.out"], ["f4.in"]) +""")), + stderr = expect) + + +test.sleep() + +test.touch('f1.in') +test.touch('f3.in') + +test.run(arguments = 'f1.out f2.out f3.out f4.out', + stdout = re.escape(test.wrap_stdout("""\ +build(["f1.out"], ["f1.in"]) +scons: `f2.out' is up to date. +scons: `f3.out' is up to date. +scons: `f4.out' is up to date. +""")), + stderr = expect) + +test.up_to_date(arguments = 'f1.out f2.out f3.out f4.out', stderr = None) + + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/SourceSignatures/Old/implicit-cache.py b/test/Removed/SourceSignatures/Old/implicit-cache.py new file mode 100644 index 0000000..a4bdc78 --- /dev/null +++ b/test/Removed/SourceSignatures/Old/implicit-cache.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Test the simultaneous use of implicit_cache and +SourceSignatures('timestamp') +""" + +import re + +import TestSCons + +test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) + +test.write('SConstruct', """\ +SetOption('warn', 'deprecated-source-signatures') +SetOption('implicit_cache', 1) +SourceSignatures('timestamp') + +def build(env, target, source): + with open(str(target[0]), 'wt') as ofp, open(str(source[0]), 'rt') as ifp: + ofp.write(ifp.read()) +B = Builder(action = build) +env = Environment(BUILDERS = { 'B' : B }) +env.B(target = 'both.out', source = 'both.in') +""") + + +expect = TestSCons.re_escape(""" +scons: warning: The env.SourceSignatures() method is deprecated; +\tconvert your build to use the env.Decider() method instead. +""") + TestSCons.file_expr + + +both_out_both_in = re.escape(test.wrap_stdout('build(["both.out"], ["both.in"])\n')) + +test.write('both.in', "both.in 1\n") + +test.run(arguments = 'both.out', + stdout = both_out_both_in, + stderr = expect) + + +test.sleep(2) + +test.write('both.in', "both.in 2\n") + +test.run(arguments = 'both.out', + stdout = both_out_both_in, + stderr = expect) + + +test.sleep(2) + +test.write('both.in', "both.in 3\n") + +test.run(arguments = 'both.out', + stdout = both_out_both_in, + stderr = expect) + + +test.sleep(2) + +test.write('both.in', "both.in 4\n") + +test.run(arguments = 'both.out', + stdout = both_out_both_in, + stderr = expect) + + +test.sleep(2) + +test.up_to_date(arguments = 'both.out', stderr = None) + + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/SourceSignatures/Old/no-csigs.py b/test/Removed/SourceSignatures/Old/no-csigs.py new file mode 100644 index 0000000..c4f2a78 --- /dev/null +++ b/test/Removed/SourceSignatures/Old/no-csigs.py @@ -0,0 +1,81 @@ + +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +import os + +import TestSCons +import TestSConsign + +test = TestSConsign.TestSConsign(match = TestSConsign.match_re) + + +test.write('SConstruct', """\ +SetOption('warn', 'deprecated-source-signatures') +def build(env, target, source): + with open(str(target[0]), 'wt') as ofp, open(str(source[0]), 'rt') as ifp: + ofp.write(ifp.read()) +B = Builder(action = build) +env = Environment(BUILDERS = { 'B' : B }) +env.B(target = 'f1.out', source = 'f1.in') +env.B(target = 'f2.out', source = 'f2.in') +SourceSignatures('timestamp') +""") + +test.write('f1.in', "f1.in\n") +test.write('f2.in', "f2.in\n") + +expect = TestSCons.re_escape(""" +scons: warning: The env.SourceSignatures() method is deprecated; +\tconvert your build to use the env.Decider() method instead. +""") + TestSCons.file_expr + +test.run(arguments = '.', stderr = expect) + + +expect = r"""=== .: +SConstruct: None \d+ \d+ +f1.in: None \d+ \d+ +f1.out: \S+ \d+ \d+ + f1.in: None \d+ \d+ + \S+ \[build\(target, source, env\)\] +f2.in: None \d+ \d+ +f2.out: \S+ \d+ \d+ + f2.in: None \d+ \d+ + \S+ \[build\(target, source, env\)\] +""" + +test.run_sconsign(arguments = test.workpath('.sconsign'), + stdout = expect) + + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/SourceSignatures/Old/overrides.py b/test/Removed/SourceSignatures/Old/overrides.py new file mode 100644 index 0000000..4303c0e --- /dev/null +++ b/test/Removed/SourceSignatures/Old/overrides.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Make sure that SourceSignatures() works when overrides are used on a +Builder call. (Previous implementations used methods that would stay +bound to the underlying construction environment, which in this case +meant ignoring the 'timestamp' setting and still using the underlying +content signature.) +""" + +import TestSCons + +test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) + +expect = TestSCons.re_escape(""" +scons: warning: The env.SourceSignatures() method is deprecated; +\tconvert your build to use the env.Decider() method instead. +""") + TestSCons.file_expr + +test.write('SConstruct', """\ +SetOption('warn', 'deprecated-source-signatures') +DefaultEnvironment().SourceSignatures('MD5') +env = Environment() +env.SourceSignatures('timestamp') +env.Command('foo.out', 'foo.in', Copy('$TARGET', '$SOURCE'), FOO=1) +""") + +test.write('foo.in', "foo.in 1\n") + +test.run(arguments = 'foo.out', stderr = expect) + +test.sleep() + +test.write('foo.in', "foo.in 1\n") + +test.not_up_to_date(arguments = 'foo.out', stderr = expect) + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/SourceSignatures/Old/sconstest.skip b/test/Removed/SourceSignatures/Old/sconstest.skip new file mode 100644 index 0000000..e69de29 diff --git a/test/Removed/SourceSignatures/Old/switch-rebuild.py b/test/Removed/SourceSignatures/Old/switch-rebuild.py new file mode 100644 index 0000000..b9cc3d5 --- /dev/null +++ b/test/Removed/SourceSignatures/Old/switch-rebuild.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Test that switching SourceSignature() types no longer causes rebuilds. +""" + +import re + +import TestSCons + +test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) + +expect = TestSCons.re_escape(""" +scons: warning: The env.SourceSignatures() method is deprecated; +\tconvert your build to use the env.Decider() method instead. +""") + TestSCons.file_expr + + +base_sconstruct_contents = """\ +SetOption('warn', 'deprecated-source-signatures') +SourceSignatures('%s') + +def build(env, target, source): + with open(str(target[0]), 'wt') as ofp, open(str(source[0]), 'rt') as ifp: + ofp.write(ifp.read()) +B = Builder(action = build) +env = Environment(BUILDERS = { 'B' : B }) +env.B(target = 'switch.out', source = 'switch.in') +""" + +def write_SConstruct(test, sig_type): + contents = base_sconstruct_contents % sig_type + test.write('SConstruct', contents) + + +write_SConstruct(test, 'MD5') + +test.write('switch.in', "switch.in\n") + +switch_out_switch_in = re.escape(test.wrap_stdout('build(["switch.out"], ["switch.in"])\n')) + +test.run(arguments = 'switch.out', + stdout = switch_out_switch_in, + stderr = expect) + +test.up_to_date(arguments = 'switch.out', stderr = None) + + +write_SConstruct(test, 'timestamp') + +test.up_to_date(arguments = 'switch.out', stderr = None) + + +write_SConstruct(test, 'MD5') + +test.not_up_to_date(arguments = 'switch.out', stderr = None) + + +test.write('switch.in', "switch.in 2\n") + +test.run(arguments = 'switch.out', + stdout = switch_out_switch_in, + stderr = expect) + + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/SourceSignatures/README.md b/test/Removed/SourceSignatures/README.md new file mode 100644 index 0000000..05d8d05 --- /dev/null +++ b/test/Removed/SourceSignatures/README.md @@ -0,0 +1,6 @@ +SourceSignatures.py is the "new" test, only makes sure scons actually +fails in the presence of the method or setoption call. + +The Old directory is the former tests from the deprecated state, +preserved here for reference; the presence of an scontest.skip file +means they are never executed. diff --git a/test/Removed/SourceSignatures/SConstruct.method b/test/Removed/SourceSignatures/SConstruct.method new file mode 100644 index 0000000..e68d6bf --- /dev/null +++ b/test/Removed/SourceSignatures/SConstruct.method @@ -0,0 +1 @@ +SourceSignatures('MD5') diff --git a/test/Removed/SourceSignatures/SConstruct.setopt b/test/Removed/SourceSignatures/SConstruct.setopt new file mode 100644 index 0000000..6e1161f --- /dev/null +++ b/test/Removed/SourceSignatures/SConstruct.setopt @@ -0,0 +1 @@ +SetOption('warn', 'deprecated-source-signatures') diff --git a/test/Removed/SourceSignatures/SourceSignatures.py b/test/Removed/SourceSignatures/SourceSignatures.py new file mode 100644 index 0000000..fcc5e43 --- /dev/null +++ b/test/Removed/SourceSignatures/SourceSignatures.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Test that SourceSignatures and its associated warning flag +are definitely gone. +""" + +import TestSCons + +test = TestSCons.TestSCons(match=TestSCons.match_re_dotall) + +test.file_fixture('SConstruct.method', 'SConstruct') +test.run(arguments='-Q -s', status=2, stdout=None, + stderr="""\ +NameError: name 'SourceSignatures' is not defined: + File ".+SConstruct", line 1: + SourceSignatures('MD5') +""") + +test.file_fixture('SConstruct.setopt', 'SConstruct') +test.run(arguments='-Q -s', status=0, stdout=None, + stderr="""\ +No warning type: 'deprecated-source-signatures' +No warning type: 'deprecated-source-signatures' +""") + +test.pass_test() + diff --git a/test/Removed/TargetSignatures/Old/build-content.py b/test/Removed/TargetSignatures/Old/build-content.py new file mode 100644 index 0000000..efdaaee --- /dev/null +++ b/test/Removed/TargetSignatures/Old/build-content.py @@ -0,0 +1,142 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Verify basic interaction of the historic TargetSignatures('build') +and TargetSignatures('content') settings, overriding one with +the other in specific construction environments. +""" + +import re + +import TestSCons + +test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) + +expect = TestSCons.re_escape(""" +scons: warning: The env.TargetSignatures() method is deprecated; +\tconvert your build to use the env.Decider() method instead. +""") + TestSCons.file_expr + + +sconstruct_contents = """\ +SetOption('warn', 'deprecated-target-signatures') +env = Environment() + +def copy1(env, source, target): + with open(str(target[0]), 'wb') as fo, open(str(source[0]), 'rb') as fi: + fo.write(fi.read()) + +def copy2(env, source, target): + %s + return copy1(env, source, target) + +env['BUILDERS']['Copy1'] = Builder(action=copy1) +env['BUILDERS']['Copy2'] = Builder(action=copy2) + +env.Copy2('foo.mid', 'foo.in') +env.Copy1('foo.out', 'foo.mid') + +env2 = env.Clone() +env2.TargetSignatures('%s') +env2.Copy2('bar.mid', 'bar.in') +env2.Copy1('bar.out', 'bar.mid') + +TargetSignatures('%s') +""" + +def write_SConstruct(test, *args): + contents = sconstruct_contents % args + test.write('SConstruct', contents) + + + +write_SConstruct(test, '', 'build', 'content') + +test.write('foo.in', 'foo.in') +test.write('bar.in', 'bar.in') + +test.run(arguments="bar.out foo.out", + stdout=re.escape(test.wrap_stdout("""\ +copy2(["bar.mid"], ["bar.in"]) +copy1(["bar.out"], ["bar.mid"]) +copy2(["foo.mid"], ["foo.in"]) +copy1(["foo.out"], ["foo.mid"]) +""")), + stderr = expect) + +test.up_to_date(arguments='bar.out foo.out', stderr=None) + + + +# Change the code in the the copy2() function, which should change +# its content and trigger a rebuild of the targets built with it. + +write_SConstruct(test, 'x = 2 # added this line', 'build', 'content') + +test.run(arguments="bar.out foo.out", + stdout=re.escape(test.wrap_stdout("""\ +copy2(["bar.mid"], ["bar.in"]) +copy1(["bar.out"], ["bar.mid"]) +copy2(["foo.mid"], ["foo.in"]) +scons: `foo.out' is up to date. +""")), + stderr = expect) + + + +# Swapping content and build signatures no longer causes a rebuild +# because we record the right underlying information regardless. + +write_SConstruct(test, 'x = 2 # added this line', 'content', 'build') + +test.up_to_date(arguments="bar.out foo.out", stderr=None) + + + +# Change the code in the the copy2() function back again, which should +# trigger another rebuild of the targets built with it. + +write_SConstruct(test, '', 'content', 'build') + +test.run(arguments='bar.out foo.out', + stdout=re.escape(test.wrap_stdout("""\ +copy2(["bar.mid"], ["bar.in"]) +scons: `bar.out' is up to date. +copy2(["foo.mid"], ["foo.in"]) +copy1(["foo.out"], ["foo.mid"]) +""")), + stderr = expect) + + + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/TargetSignatures/Old/content.py b/test/Removed/TargetSignatures/Old/content.py new file mode 100644 index 0000000..aca63f3 --- /dev/null +++ b/test/Removed/TargetSignatures/Old/content.py @@ -0,0 +1,95 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Verify use of the TargetSignatures('content') setting to override +SourceSignatures('timestamp') settings. +""" + +import TestSCons + +test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) + +expect = TestSCons.re_escape(""" +scons: warning: The env.SourceSignatures() method is deprecated; +\tconvert your build to use the env.Decider() method instead. +""") + TestSCons.file_expr + TestSCons.re_escape(""" +scons: warning: The env.TargetSignatures() method is deprecated; +\tconvert your build to use the env.Decider() method instead. +""") + TestSCons.file_expr + + +test.write('SConstruct', """\ +SetOption('warn', 'deprecated-source-signatures') +SetOption('warn', 'deprecated-target-signatures') +env = Environment() + +def copy(env, source, target): + with open(str(target[0]), 'wb') as ofp: + for s in source: + with open(str(s), 'rb') as ifp: + ofp.write(ifp.read()) + +copyAction = Action(copy, "Copying $TARGET") + +SourceSignatures('timestamp') + +env['BUILDERS']['Copy'] = Builder(action=copyAction) + +env.Copy('foo.out', 'foo.in') + +env2 = env.Clone() +env2.TargetSignatures('content') +env2.Copy('bar.out', 'bar.in') +AlwaysBuild('bar.out') + +env.Copy('final', ['foo.out', 'bar.out', 'extra.in']) +env.Ignore('final', 'extra.in') +""") + +test.write('foo.in', "foo.in\n") +test.write('bar.in', "bar.in\n") +test.write('extra.in', "extra.in 1\n") + +test.run(stderr = expect) + +test.must_match('final', "foo.in\nbar.in\nextra.in 1\n") + +test.sleep() +test.write('extra.in', "extra.in 2\n") + +test.run(stderr = expect) + +test.must_match('final', "foo.in\nbar.in\nextra.in 1\n") + + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/TargetSignatures/Old/overrides.py b/test/Removed/TargetSignatures/Old/overrides.py new file mode 100644 index 0000000..54a66d4 --- /dev/null +++ b/test/Removed/TargetSignatures/Old/overrides.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Make sure that TargetSignatures() works when overrides are used on a +Builder call. Previous implementations used methods that would stay +bound to the underlying construction environment and cause weird +behavior like infinite recursion. +""" + +import TestSCons + +test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) + +test.write('SConstruct', """\ +SetOption('warn', 'deprecated-target-signatures') +env = Environment() +env.TargetSignatures('content') +env.Command('foo.out', 'foo.mid', Copy('$TARGET', '$SOURCE'), FOO=1) +env.Command('foo.mid', 'foo.in', Copy('$TARGET', '$SOURCE'), FOO=2) +""") + +test.write('foo.in', "foo.in\n") + +expect = TestSCons.re_escape(""" +scons: warning: The env.TargetSignatures() method is deprecated; +\tconvert your build to use the env.Decider() method instead. +""") + TestSCons.file_expr + +test.run(arguments = '.', stderr = expect) + +test.must_match('foo.mid', "foo.in\n") +test.must_match('foo.out', "foo.in\n") + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/TargetSignatures/Old/sconstest.skip b/test/Removed/TargetSignatures/Old/sconstest.skip new file mode 100644 index 0000000..e69de29 diff --git a/test/Removed/TargetSignatures/README.md b/test/Removed/TargetSignatures/README.md new file mode 100644 index 0000000..00a8b6b --- /dev/null +++ b/test/Removed/TargetSignatures/README.md @@ -0,0 +1,6 @@ +TargetSignatures.py is the "new" test, only makes sure scons actually +fails in the presence of the method or setoption call. + +The Old directory is the former tests from the deprecated state, +preserved here for reference; the presence of an scontest.skip file +means they are never executed. diff --git a/test/Removed/TargetSignatures/SConstruct.method b/test/Removed/TargetSignatures/SConstruct.method new file mode 100644 index 0000000..5e974b6 --- /dev/null +++ b/test/Removed/TargetSignatures/SConstruct.method @@ -0,0 +1 @@ +TargetSignatures('MD5') diff --git a/test/Removed/TargetSignatures/SConstruct.setopt b/test/Removed/TargetSignatures/SConstruct.setopt new file mode 100644 index 0000000..c887ce4 --- /dev/null +++ b/test/Removed/TargetSignatures/SConstruct.setopt @@ -0,0 +1 @@ +SetOption('warn', 'deprecated-target-signatures') diff --git a/test/Removed/TargetSignatures/TargetSignatures.py b/test/Removed/TargetSignatures/TargetSignatures.py new file mode 100644 index 0000000..0b3a37b --- /dev/null +++ b/test/Removed/TargetSignatures/TargetSignatures.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Test that TargetSignatures and its associated warning flag +are definitely gone. +""" + +import TestSCons + +test = TestSCons.TestSCons(match=TestSCons.match_re_dotall) + +test.file_fixture('SConstruct.method', 'SConstruct') +test.run(arguments='-Q -s', status=2, stdout=None, + stderr="""\ +NameError: name 'TargetSignatures' is not defined: + File ".+SConstruct", line 1: + TargetSignatures('MD5') +""") + +test.file_fixture('SConstruct.setopt', 'SConstruct') +test.run(arguments="-Q -s", status=0, stdout=None, + stderr="""\ +No warning type: 'deprecated-target-signatures' +No warning type: 'deprecated-target-signatures' +""") + +test.pass_test() + diff --git a/test/implicit-cache/basic.py b/test/implicit-cache/basic.py index c03a320..7eece88 100644 --- a/test/implicit-cache/basic.py +++ b/test/implicit-cache/basic.py @@ -27,11 +27,8 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" """ Verify basic interactions of the --implicit-cache-* options. -This test used to set TargetSignatures('build') because we were -relying on the old behavior of non-essential changes in .h files -propagate to cause a rebuilt executable. We now just rely on -the default Decider('content') behavior and only check for the -rebuild of the object file itself when necessary. +We rely on the default Decider('content') behavior and only +check for the rebuild of the object file itself when necessary. """ import os.path diff --git a/test/sconsign/script/Signatures.py b/test/sconsign/script/Signatures.py index 24ffaf7..34737d5 100644 --- a/test/sconsign/script/Signatures.py +++ b/test/sconsign/script/Signatures.py @@ -28,9 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" Verify that the sconsign script works when using a .sconsign file in each subdirectory (SConsignFile(None)) written with the non-default value of Decider('timestamp-newer'). - -This used to test the non-default combination of -SourceSignatures('timestamp') with TargetSignatures('content'). """ import TestSCons diff --git a/test/srcchange.py b/test/srcchange.py index f1f67c1..c2356b6 100644 --- a/test/srcchange.py +++ b/test/srcchange.py @@ -29,9 +29,8 @@ Test changing the C source files based on an always-executed revision extraction and substitution. This makes sure we evaluate the content of intermediate files as -expected. We used to configure this explicitly using -TargetSignatures('content') but we now rely on the default behavior -being the equivalent of Decider('content'). +expected. This relies on the default behavior being the equivalent +of Decider('content'). """ import os.path diff --git a/test/subdivide.py b/test/subdivide.py index a4a128e..9461d4b 100644 --- a/test/subdivide.py +++ b/test/subdivide.py @@ -29,9 +29,8 @@ Verify that rebuilds do not occur when SConsignFile(None) is used to put a .sconsign file in each directory and we subdvide the dependency tree with subsidiary *SConstruct* files in various subdirectories. -This depends on using content signatures for evaluation of intermediate -Nodes. We used to configure this explicitly using -TargetSignatures('content'), but we now rely on the default behavior +This depends on using content signatures for evaluation of +intermediate Nodes. This relies on the default behavior being the equivalent of Decider('content'). """ -- cgit v0.12 From 9c900844191f129d899dd48cc2fa96f9539d4ff6 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Mon, 21 Oct 2019 13:42:39 -0600 Subject: [PR 3464] rework new tests so they match stderr The re.DOTALL match function somehow wasn't matching the SConstruct error path, so build it up from known information instead. Signed-off-by: Mats Wichmann --- test/Removed/SourceSignatures/SourceSignatures.py | 15 ++++++++++----- test/Removed/TargetSignatures/TargetSignatures.py | 15 ++++++++++----- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/test/Removed/SourceSignatures/SourceSignatures.py b/test/Removed/SourceSignatures/SourceSignatures.py index fcc5e43..014c163 100644 --- a/test/Removed/SourceSignatures/SourceSignatures.py +++ b/test/Removed/SourceSignatures/SourceSignatures.py @@ -31,15 +31,15 @@ are definitely gone. import TestSCons -test = TestSCons.TestSCons(match=TestSCons.match_re_dotall) +test = TestSCons.TestSCons() test.file_fixture('SConstruct.method', 'SConstruct') -test.run(arguments='-Q -s', status=2, stdout=None, - stderr="""\ +expect = """\ NameError: name 'SourceSignatures' is not defined: - File ".+SConstruct", line 1: + File "{}", line 1: SourceSignatures('MD5') -""") +""".format(test.workpath('SConstruct')) +test.run(arguments='-Q -s', status=2, stdout=None, stderr=expect) test.file_fixture('SConstruct.setopt', 'SConstruct') test.run(arguments='-Q -s', status=0, stdout=None, @@ -50,3 +50,8 @@ No warning type: 'deprecated-source-signatures' test.pass_test() +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/TargetSignatures/TargetSignatures.py b/test/Removed/TargetSignatures/TargetSignatures.py index 0b3a37b..889f992 100644 --- a/test/Removed/TargetSignatures/TargetSignatures.py +++ b/test/Removed/TargetSignatures/TargetSignatures.py @@ -31,15 +31,15 @@ are definitely gone. import TestSCons -test = TestSCons.TestSCons(match=TestSCons.match_re_dotall) +test = TestSCons.TestSCons() test.file_fixture('SConstruct.method', 'SConstruct') -test.run(arguments='-Q -s', status=2, stdout=None, - stderr="""\ +expect = """\ NameError: name 'TargetSignatures' is not defined: - File ".+SConstruct", line 1: + File "{}", line 1: TargetSignatures('MD5') -""") +""".format(test.workpath('SConstruct')) +test.run(arguments='-Q -s', status=2, stdout=None, stderr=expect) test.file_fixture('SConstruct.setopt', 'SConstruct') test.run(arguments="-Q -s", status=0, stdout=None, @@ -50,3 +50,8 @@ No warning type: 'deprecated-target-signatures' test.pass_test() +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: -- cgit v0.12 From 88387d1ebd5e7ee4c18f32a331ff5ad9d419dd9d Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Mon, 21 Oct 2019 14:01:34 -0600 Subject: [PR 3464] quiet sider complaints unused imports in a pair of tests that were moved and thus "touched". Signed-off-by: Mats Wichmann --- test/Removed/SourceSignatures/Old/env.py | 1 - test/Removed/SourceSignatures/Old/no-csigs.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/test/Removed/SourceSignatures/Old/env.py b/test/Removed/SourceSignatures/Old/env.py index c63b176..bf86d4d 100644 --- a/test/Removed/SourceSignatures/Old/env.py +++ b/test/Removed/SourceSignatures/Old/env.py @@ -29,7 +29,6 @@ Test that use of env.SourceSignatures() correctly overrides the default behavior. """ -import os import re import TestSCons diff --git a/test/Removed/SourceSignatures/Old/no-csigs.py b/test/Removed/SourceSignatures/Old/no-csigs.py index c4f2a78..60c0460 100644 --- a/test/Removed/SourceSignatures/Old/no-csigs.py +++ b/test/Removed/SourceSignatures/Old/no-csigs.py @@ -25,8 +25,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" -import os - import TestSCons import TestSConsign -- cgit v0.12 From 69eb89f5055875a0af1b8329144eb61c04481105 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Mon, 16 Sep 2019 07:58:26 -0600 Subject: Remove deprecated Builder keywords overrides= and scanner= have been deprecated for over a decade. Signed-off-by: Mats Wichmann --- doc/man/scons.xml | 3 ++- src/CHANGES.txt | 2 ++ src/engine/SCons/Builder.py | 15 ++++++--------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/man/scons.xml b/doc/man/scons.xml index a9e0dd7..ae54e2e 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -4960,7 +4960,8 @@ the same target file(s). The default is 0, which means the builder can not be called multiple times for the same target file(s). Calling a builder multiple times for the same target simply adds additional source files to the target; it is not allowed to change the environment associated -with the target, specify addition environment overrides, or associate a different +with the target, specify additional environment overrides, +or associate a different builder with the target.
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index af448d5..af05d35 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -25,6 +25,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER On vs2019 saves 5+ seconds per SCons invocation, which really helps test suite runs. - Remove deprecated SourceSignatures, TargetSignatures + - Remove deprecated Builder keywords: overrides and scanner From Jacek Kuczera: - Fix CheckFunc detection code for Visual 2019. Some functions @@ -36,6 +37,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER From Edoardo Bezzeccheri - Added debug option "action_timestamps" which outputs to stdout the absolute start and end time for each target. + RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 From William Deegan: diff --git a/src/engine/SCons/Builder.py b/src/engine/SCons/Builder.py index 4352d7a..e3fb396 100644 --- a/src/engine/SCons/Builder.py +++ b/src/engine/SCons/Builder.py @@ -396,16 +396,13 @@ class BuilderBase(object): self.env = env self.single_source = single_source if 'overrides' in overrides: - SCons.Warnings.warn(SCons.Warnings.DeprecatedBuilderKeywordsWarning, - "The \"overrides\" keyword to Builder() creation has been deprecated;\n" +\ - "\tspecify the items as keyword arguments to the Builder() call instead.") - overrides.update(overrides['overrides']) - del overrides['overrides'] + msg = "The \"overrides\" keyword to Builder() creation has been removed;\n" +\ + "\tspecify the items as keyword arguments to the Builder() call instead." + raise TypeError(msg) if 'scanner' in overrides: - SCons.Warnings.warn(SCons.Warnings.DeprecatedBuilderKeywordsWarning, - "The \"scanner\" keyword to Builder() creation has been deprecated;\n" - "\tuse: source_scanner or target_scanner as appropriate.") - del overrides['scanner'] + msg = "The \"scanner\" keyword to Builder() creation has been removed;\n" +\ + "\tuse: source_scanner or target_scanner as appropriate." + raise TypeError(msg) self.overrides = overrides self.set_suffix(suffix) -- cgit v0.12 From 2e2ba90baa24a9919000edbf688c306e2c428fb6 Mon Sep 17 00:00:00 2001 From: Jakub Kulik Date: Fri, 1 Nov 2019 08:32:23 +0100 Subject: Fix incorrect testing assumptions for Solaris --- src/engine/SCons/ActionTests.py | 4 ---- src/engine/SCons/Tool/MSCommon/vc.py | 9 ++++++++- test/Clang/clang_shared_library.py | 2 +- test/Clang/clangxx_shared_library.py | 3 +++ test/Errors/execute-a-directory.py | 6 +----- test/Errors/non-executable-file.py | 6 +----- test/LINK/VersionedLib.py | 12 ++++++------ test/SWIG/recursive-includes-cpp.py | 2 ++ testing/framework/TestCommon.py | 4 ++-- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/engine/SCons/ActionTests.py b/src/engine/SCons/ActionTests.py index 3054368..3303750 100644 --- a/src/engine/SCons/ActionTests.py +++ b/src/engine/SCons/ActionTests.py @@ -1208,10 +1208,6 @@ class CommandActionTestCase(unittest.TestCase): # Newer cygwin seems to return 126 for following expect_nonexecutable_file = 126 expect_nonexecutable_dir = 127 - elif sys.platform.find('sunos') != -1: - expect_nonexistent = 1 - expect_nonexecutable_file = 1 - expect_nonexecutable_dir = 1 else: expect_nonexistent = 127 expect_nonexecutable_file = 126 diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py index 4f6048d..86bdbe0 100644 --- a/src/engine/SCons/Tool/MSCommon/vc.py +++ b/src/engine/SCons/Tool/MSCommon/vc.py @@ -161,11 +161,18 @@ def get_host_target(env): if not host_platform: host_platform = platform.machine() + # Solaris returns i86pc for both 32 and 64 bit architectures + if host_platform == "i86pc": + if platform.architecture()[0] == "64bit": + host_platform = "amd64" + else: + host_platform = "x86" + # Retain user requested TARGET_ARCH req_target_platform = env.get('TARGET_ARCH') debug('get_host_target() req_target_platform:%s'%req_target_platform) - if req_target_platform: + if req_target_platform: # If user requested a specific platform then only try that one. target_platform = req_target_platform else: diff --git a/test/Clang/clang_shared_library.py b/test/Clang/clang_shared_library.py index 9af3770..83fa4dd 100644 --- a/test/Clang/clang_shared_library.py +++ b/test/Clang/clang_shared_library.py @@ -35,7 +35,7 @@ if not test.where_is('clang'): base = Base() platform = base['PLATFORM'] -if platform == 'posix': +if platform in ['posix', 'sunos']: filename_options = ['foo.os'] libraryname = 'libfoo.so' elif platform == 'darwin': diff --git a/test/Clang/clangxx_shared_library.py b/test/Clang/clangxx_shared_library.py index 6240299..a16be6b 100644 --- a/test/Clang/clangxx_shared_library.py +++ b/test/Clang/clangxx_shared_library.py @@ -44,6 +44,9 @@ elif platform == 'darwin': elif platform == 'win32': filename_options = ['foo.obj','foo.os'] libraryname = 'foo.dll' +elif platform == 'sunos': + filename_options = ['foo.pic.o'] + libraryname = 'libfoo.so' else: test.fail_test() diff --git a/test/Errors/execute-a-directory.py b/test/Errors/execute-a-directory.py index 95fa7b6..8b6d13b 100644 --- a/test/Errors/execute-a-directory.py +++ b/test/Errors/execute-a-directory.py @@ -65,7 +65,7 @@ scons: \\*\\*\\* \\[%s\\] Error 1 """ cannot_execute = """\ -(sh: )*.+: cannot execute +(sh: )*.+: cannot execute( \\[Is a directory\\])? scons: \\*\\*\\* \\[%s\\] Error %s """ @@ -93,10 +93,6 @@ if os.name == 'nt': konnte_nicht_gefunden_werden % ('f3', 1), unspecified % 'f3' ] -elif sys.platform.find('sunos') != -1: - errs = [ - cannot_execute % ('f3', 1), - ] else: errs = [ cannot_execute % ('f3', 126), diff --git a/test/Errors/non-executable-file.py b/test/Errors/non-executable-file.py index 0e00c77..64c75c6 100644 --- a/test/Errors/non-executable-file.py +++ b/test/Errors/non-executable-file.py @@ -54,7 +54,7 @@ scons: \\*\\*\\* \\[%s\\] Error 1 """ cannot_execute = """\ -(sh: )*.+: cannot execute +(sh: )*.+: cannot execute( \\[Permission denied\\])? scons: \\*\\*\\* \\[%s\\] Error %s """ @@ -88,10 +88,6 @@ if os.name == 'nt': konnte_nicht_gefunden_werden % ('f1', 1), unspecified % 'f1' ] -elif sys.platform.find('sunos') != -1: - errs = [ - cannot_execute % ('f1', 1), - ] else: errs = [ cannot_execute % ('f1', 126), diff --git a/test/LINK/VersionedLib.py b/test/LINK/VersionedLib.py index 468e3e5..64f9b90 100644 --- a/test/LINK/VersionedLib.py +++ b/test/LINK/VersionedLib.py @@ -138,37 +138,37 @@ elif 'sunlink' in tool_list: test_plan = [ { 'libversion' : '2', - 'files' : [ 'libtest.so', 'libtest.so.2', 'so_test.os' ], + 'files' : [ 'libtest.so', 'libtest.so.2', 'test.pic.o' ], 'instfiles' : [ 'libtest.so', 'libtest.so.2' ], 'symlinks' : [ ('libtest.so', 'libtest.so.2') ], }, { 'libversion' : '2.5', - 'files' : [ 'libtest.so', 'libtest.so.2', 'libtest.so.2.5', 'so_test.os' ], + 'files' : [ 'libtest.so', 'libtest.so.2', 'libtest.so.2.5', 'test.pic.o' ], 'instfiles' : [ 'libtest.so', 'libtest.so.2', 'libtest.so.2.5' ], 'symlinks' : [ ('libtest.so', 'libtest.so.2.5'), ('libtest.so.2', 'libtest.so.2.5') ], }, { 'libversion' : '2.5.4', - 'files' : [ 'libtest.so', 'libtest.so.2', 'libtest.so.2.5.4', 'so_test.os' ], + 'files' : [ 'libtest.so', 'libtest.so.2', 'libtest.so.2.5.4', 'test.pic.o' ], 'instfiles' : [ 'libtest.so', 'libtest.so.2', 'libtest.so.2.5.4' ], 'symlinks' : [ ('libtest.so', 'libtest.so.2.5.4'), ('libtest.so.2', 'libtest.so.2.5.4') ], }, { 'libversion' : '2.5.4.7.8', - 'files' : [ 'libtest.so', 'libtest.so.2', 'libtest.so.2.5.4.7.8', 'so_test.os' ], + 'files' : [ 'libtest.so', 'libtest.so.2', 'libtest.so.2.5.4.7.8', 'test.pic.o' ], 'instfiles' : [ 'libtest.so', 'libtest.so.2', 'libtest.so.2.5.4.7.8' ], 'symlinks' : [ ('libtest.so', 'libtest.so.2.5.4.7.8'), ('libtest.so.2', 'libtest.so.2.5.4.7.8') ], }, { 'libversion' : 'aabf114f', - 'files' : [ 'libtest.so', 'libtest.so.aabf114f', 'so_test.os' ], + 'files' : [ 'libtest.so', 'libtest.so.aabf114f', 'test.pic.o' ], 'instfiles' : [ 'libtest.so', 'libtest.so.aabf114f' ], 'symlinks' : [ ('libtest.so', 'libtest.so.aabf114f') ], }, { 'libversion' : '2.dfffa11', - 'files' : [ 'libtest.so', 'libtest.so.2', 'libtest.so.2.dfffa11', 'so_test.os' ], + 'files' : [ 'libtest.so', 'libtest.so.2', 'libtest.so.2.dfffa11', 'test.pic.o' ], 'instfiles' : [ 'libtest.so', 'libtest.so.2', 'libtest.so.2.dfffa11' ], 'symlinks' : [ ('libtest.so', 'libtest.so.2.dfffa11'), ('libtest.so.2', 'libtest.so.2.dfffa11') ], }, diff --git a/test/SWIG/recursive-includes-cpp.py b/test/SWIG/recursive-includes-cpp.py index 3999cc3..dcd9d05 100644 --- a/test/SWIG/recursive-includes-cpp.py +++ b/test/SWIG/recursive-includes-cpp.py @@ -115,6 +115,8 @@ env.SharedLibrary( if sys.platform == 'win32': object_suffix = ".obj" +elif sys.platform == 'sunos5': + object_suffix = ".pic.o" else: object_suffix = ".os" diff --git a/testing/framework/TestCommon.py b/testing/framework/TestCommon.py index ca4a147..8e6cc8e 100644 --- a/testing/framework/TestCommon.py +++ b/testing/framework/TestCommon.py @@ -165,8 +165,8 @@ elif sys.platform.find('darwin') != -1: elif sys.platform.find('sunos') != -1: exe_suffix = '' obj_suffix = '.o' - shobj_suffix = '.o' - shobj_prefix = 'so_' + shobj_suffix = '.pic.o' + shobj_prefix = '' lib_prefix = 'lib' lib_suffix = '.a' dll_prefix = 'lib' -- cgit v0.12 From 0951e5d691487033bae283d98c45ccbcf3ae822d Mon Sep 17 00:00:00 2001 From: maiphi Date: Fri, 1 Nov 2019 14:11:10 +0100 Subject: Tex builder: avoid error when reading non-utf-8 log files Python 3 throws a UnicodeDecodeError when reading a non-utf-8 file in text mode with default (utf-8) encoding. This happens when T1 fontenc is used in Latex and a warning in the log file contains e.g. umlauts. Invalid characters are now replaced. --- src/engine/SCons/Tool/tex.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/SCons/Tool/tex.py b/src/engine/SCons/Tool/tex.py index 64b9d3b..5cf7bca 100644 --- a/src/engine/SCons/Tool/tex.py +++ b/src/engine/SCons/Tool/tex.py @@ -297,8 +297,8 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None logfilename = targetbase + '.log' logContent = '' if os.path.isfile(logfilename): - with open(logfilename, "r") as f: - logContent = f.read() + with open(logfilename, "rb") as f: + logContent = f.read().decode(errors='replace') # Read the fls file to find all .aux files -- cgit v0.12 From 6f35570377e7e7b5003dd6f069b65e95f9ae6efb Mon Sep 17 00:00:00 2001 From: maiphi Date: Fri, 1 Nov 2019 14:22:31 +0100 Subject: Add test case with Latin-1 encoded Latex log file. Required fix in the test framework. In order to make the test work, it was necessary to handle the encoding issue also in the test framework. Otherwise, though the Latex builder can handle the case, the test framework chokes on it. --- test/TEX/LATEX.py | 16 ++++++++++++++++ testing/framework/TestCmd.py | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/test/TEX/LATEX.py b/test/TEX/LATEX.py index 553313e..592bbb7 100644 --- a/test/TEX/LATEX.py +++ b/test/TEX/LATEX.py @@ -193,6 +193,22 @@ This is the include file. mod %s test.must_not_exist('latexi.ilg') + test.write('SConstruct', """ +env = Environment() +env.PostScript('latin1log.tex') +""") + + test.write('latin1log.tex', r""" +\documentclass[12pt,a4paper]{article} +\usepackage[T1]{fontenc} +\begin{document} +\"oxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +\end{document} +""") + + test.run(arguments = 'latin1log.dvi', stderr = None) + test.must_exist('latin1log.dvi') + test.pass_test() # Local Variables: diff --git a/testing/framework/TestCmd.py b/testing/framework/TestCmd.py index 81e03f3..9218f60 100644 --- a/testing/framework/TestCmd.py +++ b/testing/framework/TestCmd.py @@ -1528,7 +1528,7 @@ class TestCmd(object): # TODO: Run full tests on both platforms and see if this fixes failures # It seems that py3.6 still sets text mode if you set encoding. elif sys.version_info[0] == 3: # TODO and sys.version_info[1] < 6: - stream = stream.decode('utf-8') + stream = stream.decode('utf-8', errors='replace') stream = stream.replace('\r\n', '\n') elif sys.version_info[0] == 2: stream = stream.replace('\r\n', '\n') -- cgit v0.12 From 0a41c542db4a29bb2d84f68d853d6f7709476a86 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 1 Nov 2019 15:36:57 +0200 Subject: Parse GCC -imacros option https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html --- src/engine/SCons/Environment.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 0e1102e..66912de 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -707,6 +707,9 @@ class SubstitutionEnvironment(object): elif append_next_arg_to == '-include': t = ('-include', self.fs.File(arg)) dict['CCFLAGS'].append(t) + elif append_next_arg_to == '-imacros': + t = ('-imacros', self.fs.File(arg)) + dict['CCFLAGS'].append(t) elif append_next_arg_to == '-isysroot': t = ('-isysroot', arg) dict['CCFLAGS'].append(t) @@ -793,7 +796,7 @@ class SubstitutionEnvironment(object): elif arg[0] == '+': dict['CCFLAGS'].append(arg) dict['LINKFLAGS'].append(arg) - elif arg in ['-include', '-isysroot', '-isystem', '-iquote', '-idirafter', '-arch']: + elif arg in ['-include', '-imacros', '-isysroot', '-isystem', '-iquote', '-idirafter', '-arch']: append_next_arg_to = arg else: dict['CCFLAGS'].append(arg) -- cgit v0.12 From 477ffd82d67ebd4820d33be760c1594fd82c09f0 Mon Sep 17 00:00:00 2001 From: maiphi Date: Fri, 1 Nov 2019 14:40:56 +0100 Subject: Added note about Latex Latin-1/UTF-8 issue to CHANGES.log --- src/CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index af448d5..c6312b7 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -6,6 +6,10 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER + From Philipp Maierhöfer: + - Avoid crash with UnicodeDecodeError on Python 3 when a Latex log file in + non-UTF-8 encoding (e.g. containing umlauts in Latin-1 encoding) is read. + From Mathew Robinson: - Improved threading performance by ensuring NodeInfo is shared -- cgit v0.12 From 8906411a79dfd9d5eaeb354f0feeebcc25cfc296 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 1 Nov 2019 15:43:41 +0200 Subject: Parse GCC "-imacros" option in ParseFlags --- src/CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index af448d5..d768247 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -35,6 +35,9 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER From Edoardo Bezzeccheri - Added debug option "action_timestamps" which outputs to stdout the absolute start and end time for each target. + + From Ivan Kravets + - Parse GCC "-imacros" option in ParseFlags RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 -- cgit v0.12 From 44be58d63189400b1105300c1508243777b45c2e Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 1 Nov 2019 18:20:56 +0200 Subject: Parse "-imacros" option in ParseFlags --- src/CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index d768247..ddc777c 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -37,7 +37,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Added debug option "action_timestamps" which outputs to stdout the absolute start and end time for each target. From Ivan Kravets - - Parse GCC "-imacros" option in ParseFlags + - Parse "-imacros" option in ParseFlags RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 -- cgit v0.12 From 30f8d95881195eb977825f4210d48fc571f9d37c Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 6 Nov 2019 12:49:48 +0200 Subject: Added support for "-imacros" to ParseFlags --- doc/generated/functions.gen | 11 +++---- src/CHANGES.txt | 6 ++-- src/engine/SCons/Environment.py | 56 ++++++++++++++++++------------------ src/engine/SCons/Environment.xml | 1 + src/engine/SCons/EnvironmentTests.py | 2 ++ 5 files changed, 40 insertions(+), 36 deletions(-) diff --git a/doc/generated/functions.gen b/doc/generated/functions.gen index e55799c..f3f2a0c 100644 --- a/doc/generated/functions.gen +++ b/doc/generated/functions.gen @@ -2505,16 +2505,16 @@ This specifies help text to be printed if the argument is given to scons. -If +If Help -is called multiple times, the text is appended together in the order that +is called multiple times, the text is appended together in the order that Help -is called. With append set to False, any +is called. With append set to False, any Help -text generated with +text generated with AddOption is clobbered. If append is True, the AddOption help is prepended to the help -string, thus preserving the +string, thus preserving the message. @@ -2955,6 +2955,7 @@ and added to the following construction variables: -fmerge-all-constants CCFLAGS, LINKFLAGS -fopenmp CCFLAGS, LINKFLAGS -include CCFLAGS +-imacros CCFLAGS -isysroot CCFLAGS, LINKFLAGS -isystem CCFLAGS -iquote CCFLAGS diff --git a/src/CHANGES.txt b/src/CHANGES.txt index ddc777c..092c2c8 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -32,12 +32,12 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER From Jakub Kulik - Fix subprocess result bytes not being decoded in SunOS/Solaris related tools. - + From Edoardo Bezzeccheri - Added debug option "action_timestamps" which outputs to stdout the absolute start and end time for each target. - + From Ivan Kravets - - Parse "-imacros" option in ParseFlags + - Added support for "-imacros" to ParseFlags RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 66912de..1296f54 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -702,34 +702,34 @@ class SubstitutionEnvironment(object): append_next_arg_to = None # for multi-word args for arg in params: if append_next_arg_to: - if append_next_arg_to == 'CPPDEFINES': - append_define(arg) - elif append_next_arg_to == '-include': - t = ('-include', self.fs.File(arg)) - dict['CCFLAGS'].append(t) - elif append_next_arg_to == '-imacros': - t = ('-imacros', self.fs.File(arg)) - dict['CCFLAGS'].append(t) - elif append_next_arg_to == '-isysroot': - t = ('-isysroot', arg) - dict['CCFLAGS'].append(t) - dict['LINKFLAGS'].append(t) - elif append_next_arg_to == '-isystem': - t = ('-isystem', arg) - dict['CCFLAGS'].append(t) - elif append_next_arg_to == '-iquote': - t = ('-iquote', arg) - dict['CCFLAGS'].append(t) - elif append_next_arg_to == '-idirafter': - t = ('-idirafter', arg) - dict['CCFLAGS'].append(t) - elif append_next_arg_to == '-arch': - t = ('-arch', arg) - dict['CCFLAGS'].append(t) - dict['LINKFLAGS'].append(t) - else: - dict[append_next_arg_to].append(arg) - append_next_arg_to = None + if append_next_arg_to == 'CPPDEFINES': + append_define(arg) + elif append_next_arg_to == '-include': + t = ('-include', self.fs.File(arg)) + dict['CCFLAGS'].append(t) + elif append_next_arg_to == '-imacros': + t = ('-imacros', self.fs.File(arg)) + dict['CCFLAGS'].append(t) + elif append_next_arg_to == '-isysroot': + t = ('-isysroot', arg) + dict['CCFLAGS'].append(t) + dict['LINKFLAGS'].append(t) + elif append_next_arg_to == '-isystem': + t = ('-isystem', arg) + dict['CCFLAGS'].append(t) + elif append_next_arg_to == '-iquote': + t = ('-iquote', arg) + dict['CCFLAGS'].append(t) + elif append_next_arg_to == '-idirafter': + t = ('-idirafter', arg) + dict['CCFLAGS'].append(t) + elif append_next_arg_to == '-arch': + t = ('-arch', arg) + dict['CCFLAGS'].append(t) + dict['LINKFLAGS'].append(t) + else: + dict[append_next_arg_to].append(arg) + append_next_arg_to = None elif not arg[0] in ['-', '+']: dict['LIBS'].append(self.fs.File(arg)) elif arg == '-dylib_file': diff --git a/src/engine/SCons/Environment.xml b/src/engine/SCons/Environment.xml index 829bf12..516505c 100644 --- a/src/engine/SCons/Environment.xml +++ b/src/engine/SCons/Environment.xml @@ -2324,6 +2324,7 @@ and added to the following construction variables: -fmerge-all-constants CCFLAGS, LINKFLAGS -fopenmp CCFLAGS, LINKFLAGS -include CCFLAGS +-imacros CCFLAGS -isysroot CCFLAGS, LINKFLAGS -isystem CCFLAGS -iquote CCFLAGS diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index f016f22..0957361 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -804,6 +804,7 @@ sys.exit(0) "-iquote /usr/include/foo1 " + \ "-isystem /usr/include/foo2 " + \ "-idirafter /usr/include/foo3 " + \ + "-imacros /usr/include/foo4 " + \ "+DD64 " + \ "-DFOO -DBAR=value -D BAZ " @@ -818,6 +819,7 @@ sys.exit(0) ('-iquote', '/usr/include/foo1'), ('-isystem', '/usr/include/foo2'), ('-idirafter', '/usr/include/foo3'), + ('-imacros', env.fs.File('/usr/include/foo4')), '+DD64'], repr(d['CCFLAGS']) assert d['CXXFLAGS'] == ['-std=c++0x'], repr(d['CXXFLAGS']) assert d['CPPDEFINES'] == ['FOO', ['BAR', 'value'], 'BAZ'], d['CPPDEFINES'] -- cgit v0.12 From e2e147378027376f42043f798e47d93353237fec Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Wed, 6 Nov 2019 08:37:49 -0700 Subject: [3.9] change tests not to expect bare scriptname Python 3.9 changes to give an absolute path in sys.argv[0]. Some tests expected to see just a simple path ('myyacc.py'); these now either do a test.must_contain instead of must_match, or change to do "if 'mypass.py' in sys.argv[0]' instead of the former "if sys.argv[0] == 'mypass.py'". Signed-off-by: Mats Wichmann --- test/GetBuildFailures/option-k.py | 4 ++-- test/GetBuildFailures/parallel.py | 4 ++-- test/GetBuildFailures/serial.py | 4 ++-- test/Rpcgen/RPCGEN.py | 8 ++++---- test/Rpcgen/RPCGENCLIENTFLAGS.py | 8 ++++---- test/Rpcgen/RPCGENFLAGS.py | 8 ++++---- test/Rpcgen/RPCGENHEADERFLAGS.py | 8 ++++---- test/Rpcgen/RPCGENSERVICEFLAGS.py | 8 ++++---- test/Rpcgen/RPCGENXDRFLAGS.py | 8 ++++---- test/YACC/YACCHFILESUFFIX.py | 4 ++-- test/YACC/YACCHXXFILESUFFIX.py | 2 +- test/YACC/YACCVCGFILESUFFIX.py | 2 +- 12 files changed, 34 insertions(+), 34 deletions(-) diff --git a/test/GetBuildFailures/option-k.py b/test/GetBuildFailures/option-k.py index 92a9db8..039ad50 100644 --- a/test/GetBuildFailures/option-k.py +++ b/test/GetBuildFailures/option-k.py @@ -45,11 +45,11 @@ test = TestSCons.TestSCons() contents = r"""\ import sys -if sys.argv[0] == 'mypass.py': +if 'mypass.py' in sys.argv[0]: with open(sys.argv[3], 'wb') as ofp, open(sys.argv[4], 'rb') as ifp: ofp.write(ifp.read()) exit_value = 0 -elif sys.argv[0] == 'myfail.py': +elif 'myfail.py' in sys.argv[0]: exit_value = 1 sys.exit(exit_value) """ diff --git a/test/GetBuildFailures/parallel.py b/test/GetBuildFailures/parallel.py index 5387e4a..63125ad 100644 --- a/test/GetBuildFailures/parallel.py +++ b/test/GetBuildFailures/parallel.py @@ -59,11 +59,11 @@ write_marker = sys.argv[2] + '.marker' if wait_marker != '-.marker': while not os.path.exists(wait_marker): time.sleep(1) -if sys.argv[0] == 'mypass.py': +if 'mypass.py' in sys.argv[0]: with open(sys.argv[3], 'wb') as ofp, open(sys.argv[4], 'rb') as ifp: ofp.write(ifp.read()) exit_value = 0 -elif sys.argv[0] == 'myfail.py': +elif 'myfail.py' in sys.argv[0]: exit_value = 1 if write_marker != '-.marker': os.mkdir(write_marker) diff --git a/test/GetBuildFailures/serial.py b/test/GetBuildFailures/serial.py index 7557dd5..4aecc12 100644 --- a/test/GetBuildFailures/serial.py +++ b/test/GetBuildFailures/serial.py @@ -48,11 +48,11 @@ test = TestSCons.TestSCons() contents = r"""\ import sys -if sys.argv[0] == 'mypass.py': +if 'mypass.py' in sys.argv[0]: with open(sys.argv[3], 'wb') as ofp, open(sys.argv[4], 'rb') as ifp: ofp.write(ifp.read()) exit_value = 0 -elif sys.argv[0] == 'myfail.py': +elif 'myfail.py' in sys.argv[0]: exit_value = 1 sys.exit(exit_value) """ diff --git a/test/Rpcgen/RPCGEN.py b/test/Rpcgen/RPCGEN.py index eaa4e16..86cdd71 100644 --- a/test/Rpcgen/RPCGEN.py +++ b/test/Rpcgen/RPCGEN.py @@ -69,10 +69,10 @@ expect_h = output % ('-h', test.workpath('rpcif.h')) expect_svc = output % ('-m', test.workpath('rpcif_svc.c')) expect_xdr = output % ('-c', test.workpath('rpcif_xdr.c')) -test.must_match('rpcif_clnt.c', expect_clnt, mode='r') -test.must_match('rpcif.h', expect_h, mode='r') -test.must_match('rpcif_svc.c', expect_svc, mode='r') -test.must_match('rpcif_xdr.c', expect_xdr, mode='r') +test.must_contain('rpcif_clnt.c', expect_clnt, mode='r') +test.must_contain('rpcif.h', expect_h, mode='r') +test.must_contain('rpcif_svc.c', expect_svc, mode='r') +test.must_contain('rpcif_xdr.c', expect_xdr, mode='r') diff --git a/test/Rpcgen/RPCGENCLIENTFLAGS.py b/test/Rpcgen/RPCGENCLIENTFLAGS.py index a298ebd..1143227 100644 --- a/test/Rpcgen/RPCGENCLIENTFLAGS.py +++ b/test/Rpcgen/RPCGENCLIENTFLAGS.py @@ -72,10 +72,10 @@ expect_h = output % ('-h', test.workpath('rpcif.h')) expect_svc = output % ('-m', test.workpath('rpcif_svc.c')) expect_xdr = output % ('-c', test.workpath('rpcif_xdr.c')) -test.must_match('rpcif_clnt.c', expect_clnt, mode='r') -test.must_match('rpcif.h', expect_h, mode='r') -test.must_match('rpcif_svc.c', expect_svc, mode='r') -test.must_match('rpcif_xdr.c', expect_xdr, mode='r') +test.must_contain('rpcif_clnt.c', expect_clnt, mode='r') +test.must_contain('rpcif.h', expect_h, mode='r') +test.must_contain('rpcif_svc.c', expect_svc, mode='r') +test.must_contain('rpcif_xdr.c', expect_xdr, mode='r') diff --git a/test/Rpcgen/RPCGENFLAGS.py b/test/Rpcgen/RPCGENFLAGS.py index c254ed0..3673a23 100644 --- a/test/Rpcgen/RPCGENFLAGS.py +++ b/test/Rpcgen/RPCGENFLAGS.py @@ -71,10 +71,10 @@ expect_h = output % ('-h', test.workpath('rpcif.h')) expect_svc = output % ('-m', test.workpath('rpcif_svc.c')) expect_xdr = output % ('-c', test.workpath('rpcif_xdr.c')) -test.must_match('rpcif_clnt.c', expect_clnt, mode='r') -test.must_match('rpcif.h', expect_h, mode='r') -test.must_match('rpcif_svc.c', expect_svc, mode='r') -test.must_match('rpcif_xdr.c', expect_xdr, mode='r') +test.must_contain('rpcif_clnt.c', expect_clnt, mode='r') +test.must_contain('rpcif.h', expect_h, mode='r') +test.must_contain('rpcif_svc.c', expect_svc, mode='r') +test.must_contain('rpcif_xdr.c', expect_xdr, mode='r') diff --git a/test/Rpcgen/RPCGENHEADERFLAGS.py b/test/Rpcgen/RPCGENHEADERFLAGS.py index 8e40ad7..6223ba3 100644 --- a/test/Rpcgen/RPCGENHEADERFLAGS.py +++ b/test/Rpcgen/RPCGENHEADERFLAGS.py @@ -72,10 +72,10 @@ expect_h = output_h % ('-h', test.workpath('rpcif.h')) expect_svc = output % ('-m', test.workpath('rpcif_svc.c')) expect_xdr = output % ('-c', test.workpath('rpcif_xdr.c')) -test.must_match('rpcif_clnt.c', expect_clnt, mode='r') -test.must_match('rpcif.h', expect_h, mode='r') -test.must_match('rpcif_svc.c', expect_svc, mode='r') -test.must_match('rpcif_xdr.c', expect_xdr, mode='r') +test.must_contain('rpcif_clnt.c', expect_clnt, mode='r') +test.must_contain('rpcif.h', expect_h, mode='r') +test.must_contain('rpcif_svc.c', expect_svc, mode='r') +test.must_contain('rpcif_xdr.c', expect_xdr, mode='r') diff --git a/test/Rpcgen/RPCGENSERVICEFLAGS.py b/test/Rpcgen/RPCGENSERVICEFLAGS.py index 2edc77c..7cdf430 100644 --- a/test/Rpcgen/RPCGENSERVICEFLAGS.py +++ b/test/Rpcgen/RPCGENSERVICEFLAGS.py @@ -72,10 +72,10 @@ expect_h = output % ('-h', test.workpath('rpcif.h')) expect_svc = output_svc % ('-m', test.workpath('rpcif_svc.c')) expect_xdr = output % ('-c', test.workpath('rpcif_xdr.c')) -test.must_match('rpcif_clnt.c', expect_clnt, mode='r') -test.must_match('rpcif.h', expect_h, mode='r') -test.must_match('rpcif_svc.c', expect_svc, mode='r') -test.must_match('rpcif_xdr.c', expect_xdr, mode='r') +test.must_contain('rpcif_clnt.c', expect_clnt, mode='r') +test.must_contain('rpcif.h', expect_h, mode='r') +test.must_contain('rpcif_svc.c', expect_svc, mode='r') +test.must_contain('rpcif_xdr.c', expect_xdr, mode='r') diff --git a/test/Rpcgen/RPCGENXDRFLAGS.py b/test/Rpcgen/RPCGENXDRFLAGS.py index 2d1ca96..2f6d8d9 100644 --- a/test/Rpcgen/RPCGENXDRFLAGS.py +++ b/test/Rpcgen/RPCGENXDRFLAGS.py @@ -72,10 +72,10 @@ expect_h = output % ('-h', test.workpath('rpcif.h')) expect_svc = output % ('-m', test.workpath('rpcif_svc.c')) expect_xdr = output_xdr % ('-c', test.workpath('rpcif_xdr.c')) -test.must_match('rpcif_clnt.c', expect_clnt, mode='r') -test.must_match('rpcif.h', expect_h, mode='r') -test.must_match('rpcif_svc.c', expect_svc, mode='r') -test.must_match('rpcif_xdr.c', expect_xdr, mode='r') +test.must_contain('rpcif_clnt.c', expect_clnt, mode='r') +test.must_contain('rpcif.h', expect_h, mode='r') +test.must_contain('rpcif_svc.c', expect_svc, mode='r') +test.must_contain('rpcif_xdr.c', expect_xdr, mode='r') diff --git a/test/YACC/YACCHFILESUFFIX.py b/test/YACC/YACCHFILESUFFIX.py index 6c34db1..da3416c 100644 --- a/test/YACC/YACCHFILESUFFIX.py +++ b/test/YACC/YACCHFILESUFFIX.py @@ -71,9 +71,9 @@ test.write('bbb.yacc', "bbb.yacc\n/*yacc*/\n") test.run(arguments = '.') test.must_match('aaa.c', "aaa.y\n") -test.must_match('aaa.hsuffix', "myyacc.py -d -o aaa.c aaa.y\n") +test.must_contain('aaa.hsuffix', "myyacc.py -d -o aaa.c aaa.y\n") test.must_match('bbb.c', "bbb.yacc\n") -test.must_match('bbb.hsuffix', "myyacc.py -d -o bbb.c bbb.yacc\n") +test.must_contain('bbb.hsuffix', "myyacc.py -d -o bbb.c bbb.yacc\n") test.up_to_date(arguments = '.') diff --git a/test/YACC/YACCHXXFILESUFFIX.py b/test/YACC/YACCHXXFILESUFFIX.py index 63a5358..3ee70ee 100644 --- a/test/YACC/YACCHXXFILESUFFIX.py +++ b/test/YACC/YACCHXXFILESUFFIX.py @@ -69,7 +69,7 @@ test.write('aaa.yy', "aaa.yy\n/*yacc*/\n") test.run(arguments = '.') test.must_match('aaa.cc', "aaa.yy\n") -test.must_match('aaa.hxxsuffix', "myyacc.py -d -o aaa.cc aaa.yy\n") +test.must_contain('aaa.hxxsuffix', "myyacc.py -d -o aaa.cc aaa.yy\n") test.up_to_date(arguments = '.') diff --git a/test/YACC/YACCVCGFILESUFFIX.py b/test/YACC/YACCVCGFILESUFFIX.py index aee3265..32c3440 100644 --- a/test/YACC/YACCVCGFILESUFFIX.py +++ b/test/YACC/YACCVCGFILESUFFIX.py @@ -78,7 +78,7 @@ test.must_not_exist('aaa.vcgsuffix') test.must_match('bbb.cc', "bbb.yy\n") test.must_not_exist('bbb.vcg') -test.must_match('bbb.vcgsuffix', "myyacc.py -g -o bbb.cc bbb.yy\n") +test.must_contain('bbb.vcgsuffix', "myyacc.py -g -o bbb.cc bbb.yy\n") test.up_to_date(arguments = '.') -- cgit v0.12 From 10d57a7c5cb108a4fa707560c0e72ccfd3793b76 Mon Sep 17 00:00:00 2001 From: maiphi Date: Thu, 7 Nov 2019 21:22:01 +0100 Subject: Latin-1 log test case: compile to DVI, not PostScript; add comment --- test/TEX/LATEX.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/TEX/LATEX.py b/test/TEX/LATEX.py index 592bbb7..dabe8b1 100644 --- a/test/TEX/LATEX.py +++ b/test/TEX/LATEX.py @@ -28,6 +28,8 @@ r""" Validate that we can set the LATEX string to our own utility, that the produced .dvi, .aux and .log files get removed by the -c option, and that we can use this to wrap calls to the real latex utility. +Check that a log file with a warning encoded in non-UTF-8 (here: Latin-1) +is read without throwing an error. """ import TestSCons @@ -195,9 +197,11 @@ This is the include file. mod %s test.write('SConstruct', """ env = Environment() -env.PostScript('latin1log.tex') +env.DVI('latin1log.tex') """) + # This will trigger an overfull hbox warning in the log file, + # containing the umlaut "o in Latin-1 ("T1 fontenc") encoding. test.write('latin1log.tex', r""" \documentclass[12pt,a4paper]{article} \usepackage[T1]{fontenc} -- cgit v0.12 From b41aedfbe1c00b1fef9072c987803d3af7efac9a Mon Sep 17 00:00:00 2001 From: maiphi Date: Thu, 7 Nov 2019 21:23:03 +0100 Subject: Changelog: add details about fix of Latex log encoding issue --- src/CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index c6312b7..5d2bd1a 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -8,7 +8,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER From Philipp Maierhöfer: - Avoid crash with UnicodeDecodeError on Python 3 when a Latex log file in - non-UTF-8 encoding (e.g. containing umlauts in Latin-1 encoding) is read. + non-UTF-8 encoding (e.g. containing umlauts in Latin-1 encoding when + the fontenc package is included with \usepackage[T1]{fontenc}) is read. From Mathew Robinson: -- cgit v0.12 From eb73aacd6c0beeb77a9e07c17dfbaef7fb54c42a Mon Sep 17 00:00:00 2001 From: William Deegan Date: Fri, 8 Nov 2019 11:36:15 -0500 Subject: [skip ci] make scons_dev_master.py have proper shebang and also set executable --- bin/scons_dev_master.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 bin/scons_dev_master.py diff --git a/bin/scons_dev_master.py b/bin/scons_dev_master.py old mode 100644 new mode 100755 index 4b1160f..cdbd68e --- a/bin/scons_dev_master.py +++ b/bin/scons_dev_master.py @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/python # # A script for turning a generic Ubuntu system into a master for -- cgit v0.12 From d9eb207f308fe902dfce03b019bdacfde4edbaf5 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sat, 9 Nov 2019 20:36:05 -0500 Subject: Create FUNDING.yml --- .github/FUNDING.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..9daae32 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,5 @@ +# These are supported funding model platforms + +github: bdbaddog +patreon: bdbaddog + -- cgit v0.12 From 406d528b20ce0f70186af066b80e14ebf25cafc3 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sat, 9 Nov 2019 20:45:18 -0500 Subject: [ci skip] indicating to github linguist which files to ignore when detecting the main programming language for this repo --- .gitattributes | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4b5f3dc --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +doc/* linguist-documentation +src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1 linguist-vendored +*.xml linguist-documentation +*.gen linguist-documentation + -- cgit v0.12 From ad0bbd693fde6157323ab461a5e637f237fb59e1 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sat, 9 Nov 2019 20:47:46 -0500 Subject: [ci skip] updates --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 4b5f3dc..089d31b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,6 @@ doc/* linguist-documentation src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1 linguist-vendored *.xml linguist-documentation +*.xsl linguist-documentation *.gen linguist-documentation -- cgit v0.12 From 83d5fe4d674aefd8bdd8b2eebd966173fef4911b Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Wed, 13 Nov 2019 07:42:02 -0700 Subject: Document that AddOpt has limitations [ci skip] Manpage describes that using spaces between AddOption'd option and its argument is undefined. Use Guide goes into more detail, including workarounds. :: these are not a solution, but do at least reduce the surprise factor. (multiple github issues) Fix tag mismatch in depends.xml introduced by a previous deletion. Signed-off-by: Mats Wichmann --- doc/user/command-line.xml | 34 ++++++++++++++++++++++++++++++++++ doc/user/depends.xml | 1 + src/engine/SCons/Script/Main.xml | 15 +++++++++++++++ 3 files changed, 50 insertions(+) diff --git a/doc/user/command-line.xml b/doc/user/command-line.xml index d129d2e..8b8949a 100644 --- a/doc/user/command-line.xml +++ b/doc/user/command-line.xml @@ -608,6 +608,7 @@ foo.in of the optparse.OptionParser. + Once you have added a custom command-line option with the &AddOption; function, the value of the option (if any) is immediately available @@ -678,6 +679,39 @@ foo.in scons -Q -n --prefix=/tmp/install + + + Long options and option-arguments separated by a space, rather than + by =, are ambiguous. + While --input=ARG + has a clear meaning, for --input ARG it is not + possible to tell without instructions whether + ARG is an argument belonging to the + input option or a positional argument + (that is, an argument that does not start with a single or double dash). + In scons, positional arguments are treated as either + command-line build options or command-line targets + (see the immediately following sections for details), + which are made available for use in the &SConscript;. + This means they have to be collected before &SConscript; processing + takes place. Since &AddOption; calls, which provide + the necessary processing instructions, happen in the &SConscript;, + scons cannot resolve the ambiguity in time + for options added this way, and unexpected things will happen. + As a result, this usage style should be avoided when invoking + scons. For single-argument + options, use the --input=ARG style on the + command line. For multiple-argument options + (nargs greater than one), + set nargs to one in + &AddOption; and combine the option-arguments into one word + with a separator, and parse the result in your own code. + See the built-in --debug option, which + allows specifying multiple arguments as a single comma-separated + word, for an example of such usage. + + + diff --git a/doc/user/depends.xml b/doc/user/depends.xml index 5a78eb5..cd5094a 100644 --- a/doc/user/depends.xml +++ b/doc/user/depends.xml @@ -764,6 +764,7 @@ int main() { printf("Hello, world!\n"); } encounter them in older &SConscript; files. +
Implicit Dependencies: The &cv-CPPPATH; Construction Variable diff --git a/src/engine/SCons/Script/Main.xml b/src/engine/SCons/Script/Main.xml index e95afbc..13ad336 100644 --- a/src/engine/SCons/Script/Main.xml +++ b/src/engine/SCons/Script/Main.xml @@ -133,6 +133,21 @@ AddOption('--prefix', help='installation prefix') env = Environment(PREFIX = GetOption('prefix')) + + + +While &AddOption; behaves like +optparse.add_option, +the behavior of options added by &AddOption; +which take arguments is underfined in +scons if a space +(rather than = sign) is used as +the separator on the command line when +the option is invoked. +Such usage should be avoided. + + + -- cgit v0.12 From 0be4c7daa8d983be0faa53907f52aee9217f3704 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Fri, 15 Nov 2019 12:30:45 -0700 Subject: [PR 3475] add repeated-args suggestion for AddOpt [ci skip] Signed-off-by: Mats Wichmann --- doc/user/command-line.xml | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/doc/user/command-line.xml b/doc/user/command-line.xml index 8b8949a..f8f6a66 100644 --- a/doc/user/command-line.xml +++ b/doc/user/command-line.xml @@ -2,7 +2,7 @@ %scons; - + %builders-mod; @@ -89,7 +89,7 @@ all of the command-line variable settings, the ability to apply command-line variable settings to construction environments, - and functions for configuring + and functions for configuring specific types of variables (Boolean values, path names, etc.) with automatic validation of the user's specified values. @@ -681,36 +681,43 @@ foo.in - Long options and option-arguments separated by a space, rather than + Long options and option-arguments separated by space, rather than by =, are ambiguous. While --input=ARG has a clear meaning, for --input ARG it is not possible to tell without instructions whether ARG is an argument belonging to the - input option or a positional argument - (that is, an argument that does not start with a single or double dash). - In scons, positional arguments are treated as either + input option or a positional argument. + scons treats positional arguments as either command-line build options or command-line targets (see the immediately following sections for details), which are made available for use in the &SConscript;. - This means they have to be collected before &SConscript; processing + Thus, they must be collected before &SConscript; processing takes place. Since &AddOption; calls, which provide - the necessary processing instructions, happen in the &SConscript;, - scons cannot resolve the ambiguity in time - for options added this way, and unexpected things will happen. + the processing instructions to resolve the ambiguity, + happen in the &SConscript;, + scons does not know in time + for options added this way, and unexpected things will happen, + such as option-arguments assigned as targets and/or exceptions + due to missing option-arguments. + + As a result, this usage style should be avoided when invoking scons. For single-argument - options, use the --input=ARG style on the - command line. For multiple-argument options + options, use the --input=ARG form on the + command line. For multiple-argument options (nargs greater than one), set nargs to one in - &AddOption; and combine the option-arguments into one word - with a separator, and parse the result in your own code. - See the built-in --debug option, which + &AddOption; calls and either: combine the option-arguments into one word + with a separator, and parse the result in your own code + (see the built-in --debug option, which allows specifying multiple arguments as a single comma-separated - word, for an example of such usage. + word, for an example of such usage); or allow the option to + be specified multiple times by setting + action='append'. Both methods can be + supported at the same time. - +
@@ -1166,12 +1173,12 @@ vars = Variables('custom.py', ARGUMENTS) - + where values in the option file &custom_py; get overwritten by the ones specified on the command line. - +
-- cgit v0.12 From 24b5dfae51cbb67b9274899ff42a5f9f8edd87f2 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Fri, 15 Nov 2019 13:10:56 -0700 Subject: [PR 3475] fix another xml tag error that was lurking [ci skip] docs validate again after this Signed-off-by: Mats Wichmann --- doc/man/scons.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/man/scons.xml b/doc/man/scons.xml index ae54e2e..7ee3453 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -2278,10 +2278,10 @@ env.SomeTool(targets, sources) Builder Methods -You tell scons what to build +You tell scons what to build by calling Builders, functions which know to take a particular action when given files of a particular type -to produce a particular result type. scons +to produce a particular result type. scons defines a number of builders, and you can also write your own. Builders are attached to a &consenv; as methods, and the available builder methods are listed as -- cgit v0.12 From 8822795f5e37be2e0cd694523217693fac680d55 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Fri, 15 Nov 2019 14:20:14 -0700 Subject: [PR 3475] review edit: space -> whitespace [ci skip] Signed-off-by: Mats Wichmann --- doc/user/command-line.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/user/command-line.xml b/doc/user/command-line.xml index f8f6a66..62d0558 100644 --- a/doc/user/command-line.xml +++ b/doc/user/command-line.xml @@ -681,8 +681,8 @@ foo.in - Long options and option-arguments separated by space, rather than - by =, are ambiguous. + Long options and option-arguments separated by whitespace, + rather than by =, are ambiguous. While --input=ARG has a clear meaning, for --input ARG it is not possible to tell without instructions whether -- cgit v0.12 From e4b0d2da4679582c1108ceef67d88e6415ce029b Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Sat, 16 Nov 2019 21:34:43 +1100 Subject: Fix simple typo: whos -> whose --- src/engine/SCons/Tool/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index c8fb389..f255b21 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -99,7 +99,7 @@ for suffix in LaTeXSuffixes: SourceFileScanner.add_scanner(suffix, LaTeXScanner) SourceFileScanner.add_scanner(suffix, PDFLaTeXScanner) -# Tool aliases are needed for those tools whos module names also +# Tool aliases are needed for those tools whose module names also # occur in the python standard library. This causes module shadowing and # can break using python library functions under python3 TOOL_ALIASES = { -- cgit v0.12 From c3f7bb42338d5008ff908c2f4ee85c07de9fffcb Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sat, 16 Nov 2019 07:22:14 -0700 Subject: [PR 3475] update docs/generated [ci skip] There's debated about whether the generated should be checked in at all; without an answer to that, they've fallen far enough out of sync that it becomes harder to use "git diff" as a spot-check that nothing strange is happening due to any given doc change. This should resync them to current. Signed-off-by: Mats Wichmann --- doc/generated/builders.gen | 30 +++- doc/generated/functions.gen | 376 +++++++++------------------------------ doc/generated/functions.mod | 8 - doc/generated/variables.gen | 120 ++++++++----- doc/generated/variables.mod | 2 + src/engine/SCons/Script/Main.xml | 4 +- 6 files changed, 183 insertions(+), 357 deletions(-) diff --git a/doc/generated/builders.gen b/doc/generated/builders.gen index 54c7aaa..59d2dca 100644 --- a/doc/generated/builders.gen +++ b/doc/generated/builders.gen @@ -48,11 +48,15 @@ env.CFile(target = 'bar', source = 'bar.y') -The 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 Command function description +The Command "Builder" is actually +a function that looks like a Builder, +but takes a required third argument, which is the +action to take to construct the target +from the source, used for "one-off" builds +where a full builder is not needed. +Thus it does not follow the builder +calling rules described at the start of this section. +See instead the Command function description for the calling syntax and details. @@ -465,6 +469,22 @@ a builder. env.Install('/usr/local/bin', source = ['foo', 'bar']) + + +If the command line +option is given, the target directory will be prefixed +by the directory path specified. +This is useful to test installs without installing to +a "live" location in the system. + + + +See also FindInstalledFiles. +For more thoughts on installation, see the User Guide +(particularly the section on Command-Line Targets +and the chapters on Installing Files and on Alias Targets). + + diff --git a/doc/generated/functions.gen b/doc/generated/functions.gen index e55799c..60e733f 100644 --- a/doc/generated/functions.gen +++ b/doc/generated/functions.gen @@ -25,8 +25,8 @@ Creates an Action object for the specified action. -See the section "Action Objects," -below, for a complete explanation of the arguments and behavior. +See the manpage section "Action Objects" +for a complete explanation of the arguments and behavior. @@ -221,6 +221,21 @@ AddOption('--prefix', help='installation prefix') env = Environment(PREFIX = GetOption('prefix')) + + + +While AddOption behaves like +optparse.add_option, +the behavior of options added by AddOption +which take arguments is underfined in +scons if whitespace +(rather than = sign) is used as +the separator on the command line when +the option is invoked. +Such usage should be avoided. + + + @@ -241,7 +256,8 @@ has been built. The specified action(s) may be an Action object, or anything that can be converted into an Action object -(see below). +See the manpage section "Action Objects" +for a complete explanation. @@ -270,7 +286,8 @@ is built. The specified action(s) may be an Action object, or anything that can be converted into an Action object -(see below). +See the manpage section "Action Objects" +for a complete explanation. @@ -444,7 +461,7 @@ 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.) +(See also the Prepend method). @@ -568,8 +585,8 @@ or Creates a Builder object for the specified action. -See the section "Builder Objects," -below, for a complete explanation of the arguments and behavior. +See the manpage section "Builder Objects" +for a complete explanation of the arguments and behavior. @@ -873,7 +890,7 @@ 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, +see the manpage section "Action Objects" for more complete information. Also note that a string specifying an external command may be preceded by an @@ -897,7 +914,7 @@ env.Command('foo.out', 'foo.in', env.Command('bar.out', 'bar.in', ["rm -f $TARGET", "$BAR_BUILD < $SOURCES > $TARGET"], - ENV = {'PATH' : '/usr/local/bin/'}) + ENV={'PATH': '/usr/local/bin/'}) def rename(env, target, source): import os @@ -905,7 +922,7 @@ def rename(env, target, source): env.Command('baz.out', 'baz.in', ["$BAZ_BUILD < $SOURCES > .tmp", - rename ]) + rename]) @@ -914,14 +931,14 @@ Note that the 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. +identifies what type of entries they are. If necessary, you can explicitly specify that targets or source nodes should -be treated as directoriese +be treated as directories by using the Dir or -env.Dir() +env.Dir functions. @@ -937,9 +954,9 @@ env.Command(env.Dir('$DISTDIR')), None, make_distdir) -(Also note that SCons will usually +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.) +so you normally don't need to create directories by hand. @@ -954,8 +971,8 @@ so you normally don't need to create directories by hand.) 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. +See the manpage section "Configure Contexts" +for a complete explanation of the arguments and behavior. @@ -1385,7 +1402,8 @@ 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. +see manpage section "File and Directory Nodes" +for more information. @@ -1528,8 +1546,8 @@ Executes an Action object. The specified action may be an Action object -(see the section "Action Objects," -below, for a complete explanation of the arguments and behavior), +(see manpage section "Action Objects" +for a complete explanation of the arguments and behavior), or it may be a command-line string, list of commands, or executable Python function, @@ -1686,7 +1704,8 @@ 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. +see manpage section "File and Directory Nodes" +for more information. @@ -2836,7 +2855,7 @@ and the construction variables they affect are as specified for the env.ParseFlags method (which this method calls). -See that method's description, below, +See that method's description for a table of options and construction variables. @@ -3539,8 +3558,8 @@ Return('val1 val2') Creates a Scanner object for the specified function. -See the section "Scanner Objects," -below, for a complete explanation of the arguments and behavior. +See manpage section "Scanner Objects" +for a complete explanation of the arguments and behavior. @@ -4229,107 +4248,6 @@ env.SourceCode('no_source.c', None) - - - SourceSignatures(type) - - - env.SourceSignatures(type) - - - -Note: Although it is not yet officially deprecated, -use of this function is discouraged. -See the -Decider -function for a more flexible and straightforward way -to configure SCons' decision-making. - - - -The -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 -MD5 -or -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. - - - -MD5 -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. - - - -timestamp -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 -older -than the last time it was used to rebuild the target file.) - - - -There is no different between the two behaviors -for Python -Value -node objects. - - - -MD5 -signatures take longer to compute, -but are more accurate than -timestamp -signatures. -The default value is -MD5. - - - -Note that the default -TargetSignatures -setting (see below) -is to use this -SourceSignatures -setting for any target files that are used -to build other target files. -Consequently, changing the value of -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 -env.SourceSignatures -is used). - - - Split(arg) @@ -4501,161 +4419,6 @@ Tag( 'file2.txt', DOC ) - - - TargetSignatures(type) - - - env.TargetSignatures(type) - - - -Note: Although it is not yet officially deprecated, -use of this function is discouraged. -See the -Decider -function for a more flexible and straightforward way -to configure SCons' decision-making. - - - -The -TargetSignatures -function tells -scons -how to decide if a target file -(a file that -is -built from any other files) -has changed since the last time it -was used to build some other target file. -Legal values are -"build"; -"content" -(or its synonym -"MD5"); -"timestamp"; -or -"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. - - - -"content" -(or its synonym -"MD5") -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. - - - -"timestamp" -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 -older -than the last time it was used to rebuild the target file.) - - - -"source" -means -scons -decides that a target file has changed -as specified by the corresponding -SourceSignatures -setting -("MD5" -or -"timestamp"). -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. - - - -"build" -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 -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. - - - -"build" -signatures are fastest because -"content" -(or -"MD5") -signatures take longer to compute, -but are more accurate than -"timestamp" -signatures, -and can prevent unnecessary "downstream" rebuilds -when a target file is rebuilt to the exact same contents -as the previous build. -The -"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 -"source". - - - -Because the default setting is -"source", -using -SourceSignatures -is generally preferable to -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 -TargetSignatures -provides specific control for how built target files -affect their "downstream" dependencies. - - - Tool(string, [toolpath, **kw]) @@ -4949,30 +4712,51 @@ SConscript(dirs='doc', variant_dir='build/doc', duplicate=0) Searches for the specified executable program, returning the full path name to the program -if it is found, -and returning None if not. -Searches the specified -path, -the value of the calling environment's PATH -(env['ENV']['PATH']), -or the user's current external PATH -(os.environ['PATH']) -by default. +if it is found, else None. +Searches the value of the +path keyword argument, +or if None (the default) +the value of the calling environment's PATH +(env['ENV']['PATH']). +If path is None and +the env['ENV']['PATH'] key does not exist, +the user's current external PATH +(os.environ['PATH']) is used as fallback. + + On Windows systems, searches for executable -programs with any of the file extensions -listed in the specified -pathext, -the calling environment's PATHEXT -(env['ENV']['PATHEXT']) -or the user's current PATHEXT +programs with any of the file extensions listed in the +pathext keyword argument, +or if None (the default) +the calling environment's PATHEXT +(env['ENV']['PATHEXT']). +The user's current external PATHEXT (os.environ['PATHEXT']) -by default. +is used as a fallback if pathext is +None +and the key env['ENV']['PATHEXT'] +does not exist. + + Will not select any path name or names in the specified reject list, if any. + + +If you would prefer to search +the user's current external PATH +(os.environ['PATH']) +by default, +consider using the function SCons.Util.WhereIs instead. +Note that SCons.Util.WhereIs +does not expand environment variables automatically +(no implicit env.subst for its arguments). + + + diff --git a/doc/generated/functions.mod b/doc/generated/functions.mod index e460aaf..91710a3 100644 --- a/doc/generated/functions.mod +++ b/doc/generated/functions.mod @@ -82,11 +82,9 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. SetOption"> SideEffect"> SourceCode"> -SourceSignatures"> Split"> subst"> Tag"> -TargetSignatures"> Tool"> Value"> VariantDir"> @@ -166,11 +164,9 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. env.SetOption"> env.SideEffect"> env.SourceCode"> -env.SourceSignatures"> env.Split"> env.subst"> env.Tag"> -env.TargetSignatures"> env.Tool"> env.Value"> env.VariantDir"> @@ -260,11 +256,9 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. SetOption"> SideEffect"> SourceCode"> -SourceSignatures"> Split"> subst"> Tag"> -TargetSignatures"> Tool"> Value"> VariantDir"> @@ -344,11 +338,9 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. env.SetOption"> env.SideEffect"> env.SourceCode"> -env.SourceSignatures"> env.Split"> env.subst"> env.Tag"> -env.TargetSignatures"> env.Tool"> env.Value"> env.VariantDir"> diff --git a/doc/generated/variables.gen b/doc/generated/variables.gen index 8f09512..cf54aab 100644 --- a/doc/generated/variables.gen +++ b/doc/generated/variables.gen @@ -488,7 +488,8 @@ after the SCons template for the file has been written. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -498,7 +499,8 @@ that may not be set or used in a construction environment. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -2804,15 +2806,6 @@ is -dNOPAUSE -dBATCH -sDEVICE=pdfwrite HOST_ARCH - The name of the host hardware architecture used to create the Environment. - If a platform is specified when creating the Environment, then - that Platform's logic will handle setting this value. - This value is immutable, and should not be changed by the user after - the Environment is initialized. - Currently only set for Win32. - - - Sets the host architecture for Visual Studio compiler. If not set, default to the detected host architecture: note that this may depend on the python you are using. @@ -2828,7 +2821,16 @@ Valid values are the same as for This is currently only used on Windows, but in the future it will be used on other OSes as well. - + + + The name of the host hardware architecture used to create the Environment. + If a platform is specified when creating the Environment, then + that Platform's logic will handle setting this value. + This value is immutable, and should not be changed by the user after + the Environment is initialized. + Currently only set for Win32. + + HOST_OS @@ -2900,7 +2902,7 @@ to '.dll'. Used to override $SHLIBVERSION/$LDMODULEVERSION when generating versioned import library for a shared library/loadable module. If undefined, the $SHLIBVERSION/$LDMODULEVERSION is used to -determine the version of versioned import library. +determine the version of versioned import library. @@ -3070,7 +3072,7 @@ The command line used to call the Java archive tool. The string displayed when the Java archive tool is called -If this is not set, then $JARCOM (the command line) is displayed. +If this is not set, then $JARCOM (the command line) is displayed. @@ -3080,7 +3082,7 @@ env = Environment(JARCOMSTR = "JARchiving $SOURCES into $TARGET") The string displayed when the Java archive tool is called -If this is not set, then $JARCOM (the command line) is displayed. +If this is not set, then $JARCOM (the command line) is displayed. @@ -3446,6 +3448,17 @@ If this is not set, then + LDMODULEEMITTER + + +Contains the emitter specification for the +LoadableModule builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. + + + LDMODULEFLAGS @@ -3618,7 +3631,10 @@ when the $_LIBDIRFLAGS va LIBEMITTER -TODO +Contains the emitter specification for the +StaticLibrary builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. @@ -5108,7 +5124,10 @@ for example. PROGEMITTER -TODO +Contains the emitter specification for the +Program builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. @@ -5803,9 +5822,9 @@ appending to this list, although the more flexible approach is to associate scanners with a specific Builder. -See the sections "Builder Objects" -and "Scanner Objects," -below, for more information. +See the manpage sections "Builder Objects" +and "Scanner Objects" +for more information. @@ -6465,7 +6484,10 @@ If this is not set, then -TODO +Contains the emitter specification for the +SharedLibrary builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. @@ -6509,7 +6531,7 @@ The suffix used for shared library file names. When this construction variable is defined, a versioned shared library -is created by SharedLibrary builder. This activates the +is created by the SharedLibrary builder. This activates the $_SHLIBVERSIONFLAGS and thus modifies the $SHLINKCOM as required, adds the version number to the library name, and creates the symlinks that are needed. $SHLIBVERSION versions should exist as alpha-numeric, @@ -6518,6 +6540,16 @@ Example + + SHLIBVERSIONFLAGS + + +Extra flags added to $SHLINKCOM when building versioned +SharedLibrary. These flags are only used when $SHLIBVERSION is +set. + + + _SHLIBVERSIONFLAGS @@ -6531,16 +6563,6 @@ and some extra dynamically generated options (such as - - SHLIBVERSIONFLAGS - - -Extra flags added to $SHLINKCOM when building versioned -SharedLibrary. These flags are only used when $SHLIBVERSION is -set. - - - SHLINK @@ -6629,7 +6651,8 @@ The variable is used, for example, by A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -6652,7 +6675,8 @@ field in the controlling information for Ipkg and RPM packages. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -6996,7 +7020,8 @@ General options passed to the tar archiver. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -7004,13 +7029,6 @@ that may not be set or used in a construction environment. TARGET_ARCH - The name of the target hardware architecture for the compiled objects - created by this Environment. - This defaults to the value of HOST_ARCH, and the user can override it. - Currently only set for Win32. - - - Sets the target architecture for Visual Studio compiler (i.e. the arch of the binaries generated by the compiler). If not set, default to $HOST_ARCH, or, if that is unset, to the architecture of the @@ -7041,7 +7059,14 @@ and ia64 (Itanium). For example, if you want to compile 64-bit binaries, you would set TARGET_ARCH='x86_64' in your SCons environment. - + + + The name of the target hardware architecture for the compiled objects + created by this Environment. + This defaults to the value of HOST_ARCH, and the user can override it. + Currently only set for Win32. + + TARGET_OS @@ -7060,7 +7085,8 @@ For example, if you want to compile 64-bit binaries, you would set A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -7193,7 +7219,8 @@ that are part of this construction environment. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). @@ -7203,7 +7230,8 @@ that may not be set or used in a construction environment. A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). diff --git a/doc/generated/variables.mod b/doc/generated/variables.mod index 372a15f..1a5bc97 100644 --- a/doc/generated/variables.mod +++ b/doc/generated/variables.mod @@ -251,6 +251,7 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $LDMODULE"> $LDMODULECOM"> $LDMODULECOMSTR"> +$LDMODULEEMITTER"> $LDMODULEFLAGS"> $LDMODULENOVERSIONSYMLINKS"> $LDMODULEPREFIX"> @@ -891,6 +892,7 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $LDMODULE"> $LDMODULECOM"> $LDMODULECOMSTR"> +$LDMODULEEMITTER"> $LDMODULEFLAGS"> $LDMODULENOVERSIONSYMLINKS"> $LDMODULEPREFIX"> diff --git a/src/engine/SCons/Script/Main.xml b/src/engine/SCons/Script/Main.xml index 13ad336..514c1ae 100644 --- a/src/engine/SCons/Script/Main.xml +++ b/src/engine/SCons/Script/Main.xml @@ -138,9 +138,9 @@ env = Environment(PREFIX = GetOption('prefix')) While &AddOption; behaves like optparse.add_option, -the behavior of options added by &AddOption; +the behavior of options added by &AddOption; which take arguments is underfined in -scons if a space +scons if whitespace (rather than = sign) is used as the separator on the command line when the option is invoked. -- cgit v0.12 From d2e7ec3dcc8d0c2c401eefc9c36d91a19c9bbb2b Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Sun, 17 Nov 2019 17:28:46 +1100 Subject: Update CHANGES.txt --- src/CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 617b3d0..be0c6b8 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -42,6 +42,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER From Edoardo Bezzeccheri - Added debug option "action_timestamps" which outputs to stdout the absolute start and end time for each target. + From Tim Gates + - Resolved a typo in engine.SCons.Tool RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 -- cgit v0.12 From edaee69677e2a07b2d515e821acb4d58cc5c8196 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Thu, 21 Nov 2019 08:58:05 -0700 Subject: [PR 3475] further wording tweaks on AddOption [ci skip] Reword some parts. Add note to manpage that AddOption does not support matching "abbreviations" for long option names. Add note to manpage and user guide that you can't SetOption on options added via AddOption. (as noted in issue #2105) Signed-off-by: Mats Wichmann --- doc/user/command-line.xml | 30 ++++++++++++++++++------------ src/engine/SCons/Script/Main.xml | 26 ++++++++++++++++++++------ 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/doc/user/command-line.xml b/doc/user/command-line.xml index 62d0558..d8f9fff 100644 --- a/doc/user/command-line.xml +++ b/doc/user/command-line.xml @@ -599,25 +599,30 @@ foo.in &SCons; also allows you to define your own command-line options with the &AddOption; function. The &AddOption; function takes the same arguments - as the optparse.add_option function - from the standard Python library. + as the add_option method + from the standard Python library module optparse. The &AddOption; function is, in fact, implemented using a subclass - of the optparse.OptionParser. + of optparse.OptionParser. + + Once you have added a custom command-line option with the &AddOption; function, the value of the option (if any) is immediately available using the standard &GetOption; function. + + &SetOption; is not currently supported for + options added with &AddOption;. @@ -681,21 +686,22 @@ foo.in - Long options and option-arguments separated by whitespace, - rather than by =, are ambiguous. + Option-arguments separated from long options by whitespace, + rather than by an =, cannot be correctly + resolved by scons. While --input=ARG - has a clear meaning, for --input ARG it is not - possible to tell without instructions whether + is clearly opt followed by arg, for --input ARG + it is not possible to tell without instructions whether ARG is an argument belonging to the input option or a positional argument. scons treats positional arguments as either command-line build options or command-line targets - (see the immediately following sections for details), - which are made available for use in the &SConscript;. + which are made available for use in an &SConscript; + (see the immediately following sections for details). Thus, they must be collected before &SConscript; processing takes place. Since &AddOption; calls, which provide - the processing instructions to resolve the ambiguity, - happen in the &SConscript;, + the processing instructions to resolve any ambiguity, + happen in an &SConscript;, scons does not know in time for options added this way, and unexpected things will happen, such as option-arguments assigned as targets and/or exceptions diff --git a/src/engine/SCons/Script/Main.xml b/src/engine/SCons/Script/Main.xml index 514c1ae..f518422 100644 --- a/src/engine/SCons/Script/Main.xml +++ b/src/engine/SCons/Script/Main.xml @@ -33,11 +33,11 @@ See its __doc__ string for a discussion of the format. This function adds a new command-line option to be recognized. The specified arguments -are the same as supported by the standard Python -optparse.add_option() -method (with a few additional capabilities noted below); +are the same as supported by the add_option +method in the standard Python library module optparse, +with a few additional capabilities noted below; see the documentation for -optparse +optparse for a thorough discussion of its option-processing capabities. @@ -78,12 +78,22 @@ the option will have a default value of +Unlike regular optparse, option names +added via AddOption must be matched +exactly, the automatic matching of abbreviations on the +command line for long options is not supported. +To allow specific abbreviations, +include them in the &f-AddOption; call. + + + Once a new command-line option has been added with &f-AddOption;, the option value may be accessed using &f-GetOption; or env.GetOption(). + +&f-SetOption; is not currently supported for +options added with &f-AddOption;. @@ -137,11 +150,12 @@ env = Environment(PREFIX = GetOption('prefix')) While &AddOption; behaves like -optparse.add_option, +add_option, +from the optparse module, the behavior of options added by &AddOption; which take arguments is underfined in scons if whitespace -(rather than = sign) is used as +(rather than an = sign) is used as the separator on the command line when the option is invoked. Such usage should be avoided. -- cgit v0.12 From 7c34a7d12cccd0448670323297ee12e4575ef749 Mon Sep 17 00:00:00 2001 From: Rob Boehne Date: Tue, 26 Nov 2019 11:48:17 -0600 Subject: Fix a problem under Solaris when using Python 3, while maintaining support for Python 2.7. subproces.Popen() produces bytes without the encoding argument in 3, which is not recognized by 2.7, and doesn't need to be decoded. --- src/engine/SCons/Tool/suncxx.py | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/src/engine/SCons/Tool/suncxx.py b/src/engine/SCons/Tool/suncxx.py index 090df7d..d38c2cf 100644 --- a/src/engine/SCons/Tool/suncxx.py +++ b/src/engine/SCons/Tool/suncxx.py @@ -39,12 +39,14 @@ import os import re import subprocess +from SCons.Util import PY3 import SCons.Tool.cxx cplusplus = SCons.Tool.cxx -#cplusplus = __import__('c++', globals(), locals(), []) +# cplusplus = __import__('c++', globals(), locals(), []) package_info = {} + def get_package_info(package_name, pkginfo, pkgchk): try: return package_info[package_name] @@ -52,7 +54,7 @@ def get_package_info(package_name, pkginfo, pkgchk): version = None pathname = None try: - from subprocess import DEVNULL # py3k + from subprocess import DEVNULL # py3k except ImportError: DEVNULL = open(os.devnull, 'wb') @@ -68,13 +70,18 @@ def get_package_info(package_name, pkginfo, pkgchk): pathname = os.path.dirname(sadm_match.group(1)) try: + popen_args = {'stdout': subprocess.PIPE, + 'stderr': DEVNULL} + if PY3: + popen_args['encoding'] = 'utf-8' p = subprocess.Popen([pkginfo, '-l', package_name], - stdout=subprocess.PIPE, - stderr=DEVNULL) + **popen_args) except EnvironmentError: pass else: - pkginfo_contents = p.communicate()[0].decode() + pkginfo_contents = p.communicate()[0] + if not PY3: + pkginfo_contents.decode() version_re = re.compile(r'^ *VERSION:\s*(.*)$', re.M) version_match = version_re.search(pkginfo_contents) if version_match: @@ -82,13 +89,18 @@ def get_package_info(package_name, pkginfo, pkgchk): if pathname is None: try: + popen_args = {'stdout': subprocess.PIPE, + 'stderr': DEVNULL} + if PY3: + popen_args['encoding'] = 'utf-8' p = subprocess.Popen([pkgchk, '-l', package_name], - stdout=subprocess.PIPE, - stderr=DEVNULL) + **popen_args) except EnvironmentError: pass else: - pkgchk_contents = p.communicate()[0].decode() + pkgchk_contents = p.communicate()[0] + if not PY3: + pkgchk_contents.decode() pathname_re = re.compile(r'^Pathname:\s*(.*/bin/CC)$', re.M) pathname_match = pathname_re.search(pkgchk_contents) if pathname_match: @@ -97,7 +109,8 @@ def get_package_info(package_name, pkginfo, pkgchk): package_info[package_name] = (pathname, version) return package_info[package_name] -# use the package installer tool lslpp to figure out where cppc and what + +# use the package installer tool "pkg" to figure out where cppc and what # version of it is installed def get_cppc(env): cxx = env.subst('$CXX') @@ -119,6 +132,7 @@ def get_cppc(env): return (cppcPath, 'CC', 'CC', cppcVersion) + def generate(env): """Add Builders and construction variables for SunPRO C++.""" path, cxx, shcxx, version = get_cppc(env) @@ -131,10 +145,11 @@ def generate(env): env['CXX'] = cxx env['SHCXX'] = shcxx env['CXXVERSION'] = version - env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS -KPIC') - env['SHOBJPREFIX'] = 'so_' - env['SHOBJSUFFIX'] = '.o' - + env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS -KPIC') + env['SHOBJPREFIX'] = 'so_' + env['SHOBJSUFFIX'] = '.o' + + def exists(env): path, cxx, shcxx, version = get_cppc(env) if path and cxx: -- cgit v0.12 From 5bf4eabac323a728788120f5c3752a9643e6c35c Mon Sep 17 00:00:00 2001 From: Rob Boehne Date: Tue, 26 Nov 2019 14:57:19 -0600 Subject: try a different approach that should work on python 3.5. --- src/engine/SCons/Tool/suncxx.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/SCons/Tool/suncxx.py b/src/engine/SCons/Tool/suncxx.py index d38c2cf..c155484 100644 --- a/src/engine/SCons/Tool/suncxx.py +++ b/src/engine/SCons/Tool/suncxx.py @@ -73,7 +73,7 @@ def get_package_info(package_name, pkginfo, pkgchk): popen_args = {'stdout': subprocess.PIPE, 'stderr': DEVNULL} if PY3: - popen_args['encoding'] = 'utf-8' + popen_args['universal_newlines'] = True p = subprocess.Popen([pkginfo, '-l', package_name], **popen_args) except EnvironmentError: @@ -92,7 +92,7 @@ def get_package_info(package_name, pkginfo, pkgchk): popen_args = {'stdout': subprocess.PIPE, 'stderr': DEVNULL} if PY3: - popen_args['encoding'] = 'utf-8' + popen_args['universal_newlines'] = True p = subprocess.Popen([pkgchk, '-l', package_name], **popen_args) except EnvironmentError: -- cgit v0.12 From 83303e4e9f655d0f3af5e7c369f84ec57daa756b Mon Sep 17 00:00:00 2001 From: William Deegan Date: Wed, 27 Nov 2019 12:02:41 -0800 Subject: [ci skip] Add to CHANGES.txt for PR #3481 --- src/CHANGES.txt | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index db0a5f2..e24555d 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -6,13 +6,32 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER + From Edoardo Bezzeccheri + - Added debug option "action_timestamps" which outputs to stdout the absolute start and end time for each target. + + From Rob Boehne + - Fix suncxx tool (Oracle Studio compiler) when using Python 3. Previously would throw an exception. + Resolved by properly handling tool version string output as unicode. + + From Tim Gates + - Resolved a typo in engine.SCons.Tool + + From Ivan Kravets + - Added support for "-imacros" to ParseFlags + + From Jacek Kuczera: + - Fix CheckFunc detection code for Visual 2019. Some functions + (e.g. memmove) were incorrectly recognized as not available. + + From Jakub Kulik + - Fix subprocess result bytes not being decoded in SunOS/Solaris related tools. + From Philipp Maierhöfer: - Avoid crash with UnicodeDecodeError on Python 3 when a Latex log file in non-UTF-8 encoding (e.g. containing umlauts in Latin-1 encoding when the fontenc package is included with \usepackage[T1]{fontenc}) is read. From Mathew Robinson: - - Improved threading performance by ensuring NodeInfo is shared across threads. Results in ~13% improvement for parallel builds (-j# > 1) with many shared nodes. @@ -32,21 +51,6 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Remove deprecated SourceSignatures, TargetSignatures - Remove deprecated Builder keywords: overrides and scanner - From Jacek Kuczera: - - Fix CheckFunc detection code for Visual 2019. Some functions - (e.g. memmove) were incorrectly recognized as not available. - - From Jakub Kulik - - Fix subprocess result bytes not being decoded in SunOS/Solaris related tools. - - From Edoardo Bezzeccheri - - Added debug option "action_timestamps" which outputs to stdout the absolute start and end time for each target. - - From Ivan Kravets - - Added support for "-imacros" to ParseFlags - - From Tim Gates - - Resolved a typo in engine.SCons.Tool RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 -- cgit v0.12 From 3363b244c7682a32a2a642d92e26d150c288abb5 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sun, 10 Nov 2019 11:01:41 -0700 Subject: Typo in testing document [ci skip] lack of a consistent indent confused ReST readers: System Message: WARNING/2 (/home/mats/github/scons/testing/framework/test-framework.rst, line 32) Block quote ends without a blank line; unexpected unindent. Signed-off-by: Mats Wichmann --- testing/framework/test-framework.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/framework/test-framework.rst b/testing/framework/test-framework.rst index cb6b8e1..24240ac 100644 --- a/testing/framework/test-framework.rst +++ b/testing/framework/test-framework.rst @@ -29,7 +29,7 @@ There are three types of SCons tests: ``src/engine/`` subdirectory and are the same base name as the module to be tests, with ``Tests`` appended before the ``.py``. For example, the unit tests for the ``Builder.py`` module are in the - ``BuilderTests.py`` script. Unit tests tend to be based on assertions. + ``BuilderTests.py`` script. Unit tests tend to be based on assertions. *External Tests* For the support of external Tools (in the form of packages, preferably), -- cgit v0.12 From b4f7dace38719ebb9a0f00c44a69f00d3caa5cfe Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sat, 30 Nov 2019 07:30:17 -0700 Subject: fix more Python escape complaints Write as raw strings: Two are docstrings that contain a backslash; the third is an odd expression parenthesized for no good reason and containing backslashes. Signed-off-by: Mats Wichmann --- src/engine/SCons/Tool/intelc.py | 4 ++-- src/engine/SCons/Tool/packaging/msi.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/SCons/Tool/intelc.py b/src/engine/SCons/Tool/intelc.py index 1f3fcea..7550c34 100644 --- a/src/engine/SCons/Tool/intelc.py +++ b/src/engine/SCons/Tool/intelc.py @@ -387,7 +387,7 @@ def get_intel_compiler_top(version, abi): def generate(env, version=None, abi=None, topdir=None, verbose=0): - """Add Builders and construction variables for Intel C/C++ compiler + r"""Add Builders and construction variables for Intel C/C++ compiler to an Environment. args: version: (string) compiler version to use, like "80" @@ -551,7 +551,7 @@ def generate(env, version=None, abi=None, topdir=None, verbose=0): # Look for license file dir # in system environment, registry, and default location. envlicdir = os.environ.get("INTEL_LICENSE_FILE", '') - K = ('SOFTWARE\Intel\Licenses') + K = r'SOFTWARE\Intel\Licenses' try: k = SCons.Util.RegOpenKeyEx(SCons.Util.HKEY_LOCAL_MACHINE, K) reglicdir = SCons.Util.RegQueryValueEx(k, "w_cpp")[0] diff --git a/src/engine/SCons/Tool/packaging/msi.py b/src/engine/SCons/Tool/packaging/msi.py index 0ef18ec..34e4f0f 100644 --- a/src/engine/SCons/Tool/packaging/msi.py +++ b/src/engine/SCons/Tool/packaging/msi.py @@ -224,7 +224,7 @@ def build_wxsfile(target, source, env): # setup function # def create_default_directory_layout(root, NAME, VERSION, VENDOR, filename_set): - """ Create the wix default target directory layout and return the innermost + r""" Create the wix default target directory layout and return the innermost directory. We assume that the XML tree delivered in the root argument already contains -- cgit v0.12 From 3e039f1b101f7d52b333e1c5d7f75d3984ff0551 Mon Sep 17 00:00:00 2001 From: Jason Kenny Date: Wed, 4 Dec 2019 15:30:42 -0600 Subject: Allow Command to take more builder options add to change log add documentation update test --- src/CHANGES.txt | 3 +++ src/engine/SCons/Environment.py | 13 +++++++++++++ src/engine/SCons/Environment.xml | 22 +++++++++++++++------ test/Command.py | 42 +++++++++++++++++++++++++++++++++++++++- 4 files changed, 73 insertions(+), 7 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 617b3d0..b42dd0a 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -5,6 +5,9 @@ Change Log RELEASE VERSION/DATE TO BE FILLED IN LATER + From Jason Kenny + - Update Command() function to accept target_scanner, source_factory, and target_factory arguments. + This make Command act more like a one-off builder. From Philipp Maierhöfer: - Avoid crash with UnicodeDecodeError on Python 3 when a Latex log file in diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 0e1102e..17d3250 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -1984,9 +1984,22 @@ class Base(SubstitutionEnvironment): 'target_factory' : self.fs.Entry, 'source_factory' : self.fs.Entry, } + # source scanner try: bkw['source_scanner'] = kw['source_scanner'] except KeyError: pass else: del kw['source_scanner'] + #target scanner + try: bkw['target_scanner'] = kw['target_scanner'] + except KeyError: pass + else: del kw['target_scanner'] + #source factory + try: bkw['source_factory'] = kw['source_factory'] + except KeyError: pass + else: del kw['source_factory'] + #target factory + try: bkw['target_factory'] = kw['target_factory'] + except KeyError: pass + else: del kw['target_factory'] bld = SCons.Builder.Builder(**bkw) return bld(self, target, source, **kw) diff --git a/src/engine/SCons/Environment.xml b/src/engine/SCons/Environment.xml index 829bf12..a32d43d 100644 --- a/src/engine/SCons/Environment.xml +++ b/src/engine/SCons/Environment.xml @@ -937,19 +937,29 @@ for a single special-case build. -As a special case, the -source_scanner -keyword argument can +&b-Command; builder accepts +source_scanner, +target_scanner, +source_factory, and +target_factory +keyword arguments. The *_scanner args can be used to specify a Scanner object -that will be used to scan the sources. -(The global +that will be used to apply a custom +scanner for a source or target. +For example, the global 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.) +already specified in other Builder of function calls. +The *_factory args take a factory function that the +Command will use to turn any sources or targets +specified as strings into SCons Nodes. +See the sections "Builder Objects" +below, for more information about how these +args work in a Builder. diff --git a/test/Command.py b/test/Command.py index 09a8daa..380c171 100644 --- a/test/Command.py +++ b/test/Command.py @@ -44,6 +44,7 @@ test.write(['expand_chdir_sub', 'subbuild.py'], build_py) test.write('SConstruct', """ import os +import sys def buildIt(env, target, source): with open(str(target[0]), 'w') as f, open(str(source[0]), 'r') as infp: @@ -62,6 +63,19 @@ def sub(env, target, source): t.write(s.read()) return 0 +def source_scanner(node, env, path, builder): + print("Source scanner node=", node, "builder =", builder,file=sys.stderr) + return [] + + +def target_scanner(node, env, path, builder): + print("Target scanner node=", node, "builder =", builder,file=sys.stderr) + return [] + +def factory(node,*lst,**kw): + print("factory called on:",node,file=sys.stderr) + return env.File(node) + env = Environment(COPY_THROUGH_TEMP = r'%(_python_)s build.py .tmp $SOURCE' + '\\n' + r'%(_python_)s build.py $TARGET .tmp', EXPAND = '$COPY_THROUGH_TEMP') env.Command(target = 'f1.out', source = 'f1.in', @@ -82,6 +96,19 @@ env.Command(target = 'f7.out', source = 'f7.in', action = r'%(_python_)s build.py $TARGET $SOURCE') Command(target = 'f8.out', source = 'f8.in', action = r'%(_python_)s build.py $TARGET $SOURCE') +env.Command(target = 'f7s.out', source = 'f7.in', + action = r'%(_python_)s build.py $TARGET $SOURCE', + target_scanner=Scanner(lambda node, env, path: target_scanner(node, env, path, "w-env")), + source_scanner=Scanner(lambda node, env, path: source_scanner(node, env, path, "w-env"))) +Command(target = 'f8s.out', source = 'f8.in', + action = r'%(_python_)s build.py $TARGET $SOURCE', + target_scanner=Scanner(lambda node, env, path: target_scanner(node, env, path, "wo-env")), + source_scanner=Scanner(lambda node, env, path: source_scanner(node, env, path, "wo-env"))) +Command(target = 'f8f.out', source = 'f8.in', + action = r'%(_python_)s build.py $TARGET $SOURCE', + target_factory=factory, + source_factory=factory + ) env.Command(target = 'f9.out', source = 'f9.in', action = r'$EXPAND') env.Command(target = '${F10}.out', source = '${F10}.in', @@ -108,7 +135,18 @@ test.write('f9.in', "f9.in\n") test.write('f10.in', "f10.in\n") test.write(['expand_chdir_sub', 'f11.in'], "expand_chdir_sub/f11.in\n") -test.run(arguments = '.') +test_str = r'''factory called on: f8.in +factory called on: f8f.out +Source scanner node= f7.in builder = w-env +Target scanner node= f7s.out builder = w-env +Source scanner node= f8.in builder = wo-env +Target scanner node= f8s.out builder = wo-env +''' + +out = test.run(arguments = '.', + stderr = test_str, + match=TestSCons.match_re_dotall) + test.must_match('f1.out', "f1.in\n", mode='r') test.must_match('f2.out', "f2.in\n", mode='r') @@ -118,6 +156,8 @@ test.must_match('f5.out', "XYZZY is set\nf5.in\n", mode='r') test.must_match('f6.out', "f6.in\n", mode='r') test.must_match('f7.out', "f7.in\n", mode='r') test.must_match('f8.out', "f8.in\n", mode='r') +test.must_match('f7s.out', "f7.in\n", mode='r') +test.must_match('f8s.out', "f8.in\n", mode='r') test.must_match('f9.out', "f9.in\n", mode='r') test.must_match('f10.out', "f10.in\n", mode='r') test.must_match(['expand_chdir_sub', 'f11.out'], "expand_chdir_sub/f11.in\n", mode='r') -- cgit v0.12 From d4eaa1986cfffdb11eee0aa5240fa44bef370fb1 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Tue, 25 Jun 2019 10:56:43 -0600 Subject: Improve building of docs using Py3 [ci skip] * context managers on file r/w + use shutil.copy where it makes sense. * lxml wants (demands?) that xml files be processed as bytes * for the phase where we gen the entity files, read as text anyway * Need to solve a problem where the generated xml is putting the \n in literally, not evaluating it. * Fix some examples broken for py3 * Fix more octal constant instances * Cleanups suggested by PyCharm: staticmethods, two blanks before class definition, others. This addresses issues called out in #3300, but is not a complete solution because the actual doc build step still fails with the epydoc failures (which aren't directly because of Py3; epydoc build doesn't work any better on my system with Py3, even with the forked version with patches). Signed-off-by: Mats Wichmann --- bin/SConsDoc.py | 211 ++++++++++++++++----------- bin/SConsExamples.py | 76 +++++----- bin/docs-update-generated.py | 17 ++- bin/scons-proc.py | 14 +- doc/generated/examples/factories_Chmod_1.xml | 2 +- doc/generated/functions.gen | 10 +- doc/man/scons.xml | 4 +- doc/user/README | 2 +- doc/user/builders-writing.xml | 12 +- doc/user/environments.xml | 2 +- doc/user/factories.xml | 10 +- doc/user/file-removal.xml | 2 +- doc/user/mergeflags.xml | 8 +- doc/user/parseconfig.xml | 4 +- doc/user/parseflags.xml | 12 +- doc/user/sideeffect.xml | 2 +- doc/user/troubleshoot.xml | 4 +- src/engine/SCons/Action.xml | 2 +- src/engine/SCons/Defaults.xml | 2 +- src/engine/SCons/Environment.xml | 8 +- src/engine/SCons/Platform/__init__.xml | 2 +- src/engine/SCons/Platform/posix.xml | 2 +- src/engine/SCons/Platform/sunos.xml | 2 +- src/engine/SCons/Platform/win32.xml | 2 +- src/engine/SCons/Scanner/__init__.xml | 2 +- src/engine/SCons/Script/Main.xml | 2 +- src/engine/SCons/Script/SConscript.xml | 2 +- src/engine/SCons/Subst.xml | 2 +- src/engine/SCons/Tool/386asm.xml | 2 +- src/engine/SCons/Tool/DCommon.xml | 2 +- src/engine/SCons/Tool/__init__.xml | 2 +- src/engine/SCons/Tool/aixc++.xml | 2 +- src/engine/SCons/Tool/aixcc.xml | 2 +- src/engine/SCons/Tool/aixf77.xml | 2 +- src/engine/SCons/Tool/aixlink.xml | 2 +- src/engine/SCons/Tool/applelink.xml | 2 +- src/engine/SCons/Tool/ar.xml | 2 +- src/engine/SCons/Tool/as.xml | 2 +- src/engine/SCons/Tool/bcc32.xml | 2 +- src/engine/SCons/Tool/c++.xml | 2 +- src/engine/SCons/Tool/cc.xml | 2 +- src/engine/SCons/Tool/clang.xml | 2 +- src/engine/SCons/Tool/clangxx.xml | 2 +- src/engine/SCons/Tool/cvf.xml | 2 +- src/engine/SCons/Tool/cyglink.xml | 2 +- src/engine/SCons/Tool/default.xml | 2 +- src/engine/SCons/Tool/dmd.xml | 2 +- src/engine/SCons/Tool/docbook/__init__.xml | 2 +- src/engine/SCons/Tool/dvi.xml | 2 +- src/engine/SCons/Tool/dvipdf.xml | 2 +- src/engine/SCons/Tool/dvips.xml | 2 +- src/engine/SCons/Tool/f03.xml | 2 +- src/engine/SCons/Tool/f08.xml | 2 +- src/engine/SCons/Tool/f77.xml | 2 +- src/engine/SCons/Tool/f90.xml | 2 +- src/engine/SCons/Tool/f95.xml | 2 +- src/engine/SCons/Tool/fortran.xml | 2 +- src/engine/SCons/Tool/g++.xml | 2 +- src/engine/SCons/Tool/g77.xml | 2 +- src/engine/SCons/Tool/gas.xml | 2 +- src/engine/SCons/Tool/gcc.xml | 2 +- src/engine/SCons/Tool/gdc.xml | 2 +- src/engine/SCons/Tool/gettext.xml | 2 +- src/engine/SCons/Tool/gfortran.xml | 2 +- src/engine/SCons/Tool/gnulink.xml | 2 +- src/engine/SCons/Tool/gs.xml | 2 +- src/engine/SCons/Tool/hpc++.xml | 2 +- src/engine/SCons/Tool/hpcc.xml | 2 +- src/engine/SCons/Tool/hplink.xml | 2 +- src/engine/SCons/Tool/icc.xml | 2 +- src/engine/SCons/Tool/icl.xml | 2 +- src/engine/SCons/Tool/ifl.xml | 2 +- src/engine/SCons/Tool/ifort.xml | 2 +- src/engine/SCons/Tool/ilink.xml | 2 +- src/engine/SCons/Tool/ilink32.xml | 2 +- src/engine/SCons/Tool/install.xml | 2 +- src/engine/SCons/Tool/intelc.xml | 2 +- src/engine/SCons/Tool/jar.xml | 2 +- src/engine/SCons/Tool/javac.xml | 2 +- src/engine/SCons/Tool/javah.xml | 2 +- src/engine/SCons/Tool/latex.xml | 2 +- src/engine/SCons/Tool/ldc.xml | 2 +- src/engine/SCons/Tool/lex.xml | 2 +- src/engine/SCons/Tool/link.xml | 2 +- src/engine/SCons/Tool/linkloc.xml | 2 +- src/engine/SCons/Tool/m4.xml | 2 +- src/engine/SCons/Tool/masm.xml | 2 +- src/engine/SCons/Tool/midl.xml | 2 +- src/engine/SCons/Tool/mingw.xml | 2 +- src/engine/SCons/Tool/msgfmt.xml | 2 +- src/engine/SCons/Tool/msginit.xml | 2 +- src/engine/SCons/Tool/msgmerge.xml | 2 +- src/engine/SCons/Tool/mslib.xml | 2 +- src/engine/SCons/Tool/mslink.xml | 2 +- src/engine/SCons/Tool/mssdk.xml | 2 +- src/engine/SCons/Tool/msvc.xml | 2 +- src/engine/SCons/Tool/msvs.xml | 2 +- src/engine/SCons/Tool/mwcc.xml | 2 +- src/engine/SCons/Tool/mwld.xml | 2 +- src/engine/SCons/Tool/nasm.xml | 2 +- src/engine/SCons/Tool/packaging.xml | 2 +- src/engine/SCons/Tool/packaging/__init__.xml | 6 +- src/engine/SCons/Tool/pdf.xml | 2 +- src/engine/SCons/Tool/pdflatex.xml | 2 +- src/engine/SCons/Tool/pdftex.xml | 2 +- src/engine/SCons/Tool/qt.xml | 2 +- src/engine/SCons/Tool/rmic.xml | 2 +- src/engine/SCons/Tool/rpcgen.xml | 2 +- src/engine/SCons/Tool/sgiar.xml | 2 +- src/engine/SCons/Tool/sgic++.xml | 2 +- src/engine/SCons/Tool/sgicc.xml | 2 +- src/engine/SCons/Tool/sgilink.xml | 2 +- src/engine/SCons/Tool/sunar.xml | 2 +- src/engine/SCons/Tool/sunc++.xml | 2 +- src/engine/SCons/Tool/suncc.xml | 2 +- src/engine/SCons/Tool/sunf77.xml | 2 +- src/engine/SCons/Tool/sunf90.xml | 2 +- src/engine/SCons/Tool/sunf95.xml | 2 +- src/engine/SCons/Tool/sunlink.xml | 2 +- src/engine/SCons/Tool/swig.xml | 2 +- src/engine/SCons/Tool/tar.xml | 2 +- src/engine/SCons/Tool/tex.xml | 2 +- src/engine/SCons/Tool/textfile.xml | 2 +- src/engine/SCons/Tool/tlib.xml | 2 +- src/engine/SCons/Tool/xgettext.xml | 2 +- src/engine/SCons/Tool/yacc.xml | 2 +- src/engine/SCons/Tool/zip.xml | 2 +- test/Fortran/FORTRANFILESUFFIXES2.py | 2 +- test/MSVC/query_vcbat.py | 2 +- test/packaging/rpm/tagging.py | 4 +- test/sconsign/script/Signatures.py | 2 +- test/sconsign/script/no-SConsignFile.py | 2 +- test/subdivide.py | 2 +- 133 files changed, 348 insertions(+), 288 deletions(-) diff --git a/bin/SConsDoc.py b/bin/SConsDoc.py index 5fd5f00..d200f8b 100644 --- a/bin/SConsDoc.py +++ b/bin/SConsDoc.py @@ -26,7 +26,8 @@ # from __future__ import print_function -__doc__ = """ + +__doc__ = r""" This module parses home-brew XML files that document various things in SCons. Right now, it handles Builders, functions, construction variables, and Tools, but we expect it to get extended in the future. @@ -117,16 +118,18 @@ import re import sys import copy +PY2 = sys.version_info[0] == 2 + # Do we have libxml2/libxslt/lxml? has_libxml2 = True try: import libxml2 import libxslt -except: +except ImportError: has_libxml2 = False try: import lxml - except: + except ImportError: raise ImportError("Failed to import either libxml2/libxslt or lxml") has_etree = False @@ -155,13 +158,16 @@ if not has_etree: except ImportError: raise ImportError("Failed to import ElementTree from any known place") -re_entity = re.compile(r"\&([^;]+);") +# patterns to help trim XML passed in as strings +re_entity = re.compile(r"&([^;]+);") re_entity_header = re.compile(r"") # Namespace for the SCons Docbook XSD -dbxsd="http://www.scons.org/dbxsd/v1.0" +dbxsd = "http://www.scons.org/dbxsd/v1.0" +# Namsespace pattern to help identify an scons-xml file read as bytes +dbxsdpat = b'xmlns="%s"' % dbxsd.encode('utf-8') # Namespace map identifier for the SCons Docbook XSD -dbxid="dbx" +dbxid = "dbx" # Namespace for schema instances xsi = "http://www.w3.org/2001/XMLSchema-instance" @@ -170,19 +176,22 @@ copyright_comment = """ __COPYRIGHT__ This file is processed by the bin/SConsDoc.py module. -See its __doc__ string for a discussion of the format. +See its docstring for a discussion of the format. """ def isSConsXml(fpath): - """ Check whether the given file is a SCons XML file, i.e. it - contains the default target namespace definition. + """ Check whether the given file is an SCons XML file. + + It is SCons XML if it contains the default target namespace definition + described by dbxsdpat + """ try: - with open(fpath,'r') as f: + with open(fpath, 'rb') as f: content = f.read() - if content.find('xmlns="%s"' % dbxsd) >= 0: + if content.find(dbxsdpat) >= 0: return True - except: + except Exception: pass return False @@ -195,10 +204,11 @@ def remove_entities(content): return content -default_xsd = os.path.join('doc','xsd','scons.xsd') +default_xsd = os.path.join('doc', 'xsd', 'scons.xsd') ARG = "dbscons" + class Libxml2ValidityHandler: def __init__(self): @@ -224,10 +234,11 @@ class DoctypeEntity: def getEntityString(self): txt = """ %(perc)s%(name)s; -""" % {'perc' : perc, 'name' : self.name, 'uri' : self.uri} +""" % {'perc': perc, 'name': self.name, 'uri': self.uri} return txt + class DoctypeDeclaration: def __init__(self, name_=None): self.name = name_ @@ -253,14 +264,16 @@ class DoctypeDeclaration: return content if not has_libxml2: - class TreeFactory: + class TreeFactory(object): def __init__(self): pass - def newNode(self, tag): + @staticmethod + def newNode(tag): return etree.Element(tag) - def newEtreeNode(self, tag, init_ns=False): + @staticmethod + def newEtreeNode(tag, init_ns=False): if init_ns: NSMAP = {None: dbxsd, 'xsi' : xsi} @@ -268,47 +281,60 @@ if not has_libxml2: return etree.Element(tag) - def copyNode(self, node): + @staticmethod + def copyNode(node): return copy.deepcopy(node) - def appendNode(self, parent, child): + @staticmethod + def appendNode(parent, child): parent.append(child) - def hasAttribute(self, node, att): + @staticmethod + def hasAttribute(node, att): return att in node.attrib - def getAttribute(self, node, att): + @staticmethod + def getAttribute(node, att): return node.attrib[att] - def setAttribute(self, node, att, value): + @staticmethod + def setAttribute(node, att, value): node.attrib[att] = value - def getText(self, root): + @staticmethod + def getText(root): return root.text - def setText(self, root, txt): + @staticmethod + def setText(root, txt): root.text = txt - def writeGenTree(self, root, fp): + @staticmethod + def writeGenTree(root, fp): dt = DoctypeDeclaration() - fp.write(etree.tostring(root, xml_declaration=True, - encoding="UTF-8", pretty_print=True, + encfun = unicode if PY2 else str + fp.write(etree.tostring(root, encoding=encfun, + pretty_print=True, doctype=dt.createDoctype())) - def writeTree(self, root, fpath): - with open(fpath, 'w') as fp: - fp.write(etree.tostring(root, xml_declaration=True, - encoding="UTF-8", pretty_print=True)) + @staticmethod + def writeTree(root, fpath): + encfun = unicode if PY2 else None + with open(fpath, 'wb') as fp: + fp.write(etree.tostring(root, encoding=encfun, + pretty_print=True)) - def prettyPrintFile(self, fpath): - with open(fpath,'r') as fin: + @staticmethod + def prettyPrintFile(fpath): + with open(fpath,'rb') as fin: tree = etree.parse(fin) pretty_content = etree.tostring(tree, pretty_print=True) - with open(fpath,'w') as fout: + with open(fpath,'wb') as fout: fout.write(pretty_content) - def decorateWithHeader(self, root): + @staticmethod + def decorateWithHeader(root): root.attrib["{"+xsi+"}schemaLocation"] = "%s %s/scons.xsd" % (dbxsd, dbxsd) return root @@ -316,12 +342,12 @@ if not has_libxml2: """ Return a XML file tree with the correct namespaces set, the element root as top entry and the given header comment. """ - NSMAP = {None: dbxsd, - 'xsi' : xsi} + NSMAP = {None: dbxsd, 'xsi' : xsi} t = etree.Element(root, nsmap=NSMAP) return self.decorateWithHeader(t) - def validateXml(self, fpath, xmlschema_context): + @staticmethod + def validateXml(fpath, xmlschema_context): # Use lxml xmlschema = etree.XMLSchema(xmlschema_context) try: @@ -339,19 +365,22 @@ if not has_libxml2: return False return True - def findAll(self, root, tag, ns=None, xp_ctxt=None, nsmap=None): + @staticmethod + def findAll(root, tag, ns=None, xp_ctxt=None, nsmap=None): expression = ".//{%s}%s" % (nsmap[ns], tag) if not ns or not nsmap: expression = ".//%s" % tag return root.findall(expression) - def findAllChildrenOf(self, root, tag, ns=None, xp_ctxt=None, nsmap=None): + @staticmethod + def findAllChildrenOf(root, tag, ns=None, xp_ctxt=None, nsmap=None): expression = "./{%s}%s/*" % (nsmap[ns], tag) if not ns or not nsmap: expression = "./%s/*" % tag return root.findall(expression) - def convertElementTree(self, root): + @staticmethod + def convertElementTree(root): """ Convert the given tree of etree.Element entries to a list of tree nodes for the current XML toolkit. @@ -359,53 +388,63 @@ if not has_libxml2: return [root] else: - class TreeFactory: + class TreeFactory(object): def __init__(self): pass - def newNode(self, tag): + @staticmethod + def newNode(tag): return libxml2.newNode(tag) - def newEtreeNode(self, tag, init_ns=False): + @staticmethod + def newEtreeNode(tag, init_ns=False): return etree.Element(tag) - def copyNode(self, node): + @staticmethod + def copyNode(node): return node.copyNode(1) - def appendNode(self, parent, child): + @staticmethod + def appendNode(parent, child): if hasattr(parent, 'addChild'): parent.addChild(child) else: parent.append(child) - def hasAttribute(self, node, att): + @staticmethod + def hasAttribute(node, att): if hasattr(node, 'hasProp'): return node.hasProp(att) return att in node.attrib - def getAttribute(self, node, att): + @staticmethod + def getAttribute(node, att): if hasattr(node, 'prop'): return node.prop(att) return node.attrib[att] - def setAttribute(self, node, att, value): + @staticmethod + def setAttribute(node, att, value): if hasattr(node, 'setProp'): node.setProp(att, value) else: node.attrib[att] = value - def getText(self, root): + @staticmethod + def getText(root): if hasattr(root, 'getContent'): return root.getContent() return root.text - def setText(self, root, txt): + @staticmethod + def setText(root, txt): if hasattr(root, 'setContent'): root.setContent(txt) else: root.text = txt - def writeGenTree(self, root, fp): + @staticmethod + def writeGenTree(root, fp): doc = libxml2.newDoc('1.0') dtd = doc.newDtd("sconsdoc", None, None) doc.addChild(dtd) @@ -420,23 +459,26 @@ else: fp.write(content) doc.freeDoc() - def writeTree(self, root, fpath): - with open(fpath, 'w') as fp: + @staticmethod + def writeTree(root, fpath): + with open(fpath, 'wb') as fp: doc = libxml2.newDoc('1.0') doc.setRootElement(root) fp.write(doc.serialize("UTF-8", 1)) doc.freeDoc() - def prettyPrintFile(self, fpath): + @staticmethod + def prettyPrintFile(fpath): # Read file and resolve entities doc = libxml2.readFile(fpath, None, libxml2d.XML_PARSE_NOENT) - with open(fpath, 'w') as fp: + with open(fpath, 'wb') as fp: # Prettyprint fp.write(doc.serialize("UTF-8", 1)) # Cleanup doc.freeDoc() - def decorateWithHeader(self, root): + @staticmethod + def decorateWithHeader(root): # Register the namespaces ns = root.newNs(dbxsd, None) xi = root.newNs(xsi, 'xsi') @@ -453,7 +495,8 @@ else: t = libxml2.newNode(root) return self.decorateWithHeader(t) - def validateXml(self, fpath, xmlschema_context): + @staticmethod + def validateXml(fpath, xmlschema_context): retval = True # Create validation context @@ -479,7 +522,8 @@ else: return retval - def findAll(self, root, tag, ns=None, xpath_context=None, nsmap=None): + @staticmethod + def findAll(root, tag, ns=None, xpath_context=None, nsmap=None): if hasattr(root, 'xpathEval') and xpath_context: # Use the xpath context xpath_context.setContextNode(root) @@ -493,7 +537,8 @@ else: expression = ".//%s" % tag return root.findall(expression) - def findAllChildrenOf(self, root, tag, ns=None, xpath_context=None, nsmap=None): + @staticmethod + def findAllChildrenOf(root, tag, ns=None, xpath_context=None, nsmap=None): if hasattr(root, 'xpathEval') and xpath_context: # Use the xpath context xpath_context.setContextNode(root) @@ -562,20 +607,18 @@ else: tf = TreeFactory() -class SConsDocTree: +class SConsDocTree(object): def __init__(self): - self.nsmap = {'dbx' : dbxsd} + self.nsmap = {'dbx': dbxsd} self.doc = None self.root = None self.xpath_context = None def parseContent(self, content, include_entities=True): - """ Parses the given content as XML file. This method - is used when we generate the basic lists of entities - for the builders, tools and functions. - So we usually don't bother about namespaces and resolving - entities here...this is handled in parseXmlFile below - (step 2 of the overall process). + """ Parses the given text content as XML + + This is the setup portion, called from parseContent in + an SConsDocHandler instance - see the notes there. """ if not include_entities: content = remove_entities(content) @@ -583,7 +626,6 @@ class SConsDocTree: self.root = etree.fromstring(content) def parseXmlFile(self, fpath): - nsmap = {'dbx' : dbxsd} if not has_libxml2: # Create domtree from file domtree = etree.parse(fpath) @@ -604,7 +646,7 @@ class SConsDocTree: if self.xpath_context is not None: self.xpath_context.xpathFreeContext() -perc="%" +perc = "%" def validate_all_xml(dpaths, xsdfile=default_xsd): xmlschema_context = None @@ -620,7 +662,7 @@ def validate_all_xml(dpaths, xsdfile=default_xsd): fpaths = [] for dp in dpaths: if dp.endswith('.xml') and isSConsXml(dp): - path='.' + path = '.' fpaths.append(dp) else: for path, dirs, files in os.walk(dp): @@ -633,8 +675,8 @@ def validate_all_xml(dpaths, xsdfile=default_xsd): fails = [] for idx, fp in enumerate(fpaths): fpath = os.path.join(path, fp) - print("%.2f%s (%d/%d) %s" % (float(idx+1)*100.0/float(len(fpaths)), - perc, idx+1, len(fpaths),fp)) + print("%.2f%s (%d/%d) %s" % (float(idx + 1) * 100.0 /float(len(fpaths)), + perc, idx + 1, len(fpaths), fp)) if not tf.validateXml(fp, xmlschema_context): fails.append(fp) @@ -649,6 +691,7 @@ def validate_all_xml(dpaths, xsdfile=default_xsd): return True + class Item(object): def __init__(self, name): self.name = name @@ -668,21 +711,25 @@ class Item(object): def __lt__(self, other): return self.sort_name < other.sort_name + class Builder(Item): pass + class Function(Item): - def __init__(self, name): - super(Function, self).__init__(name) + pass + class Tool(Item): def __init__(self, name): Item.__init__(self, name) self.entity = self.name.replace('+', 'X') + class ConstructionVariable(Item): pass + class Arguments(object): def __init__(self, signature, body=None): if not body: @@ -692,7 +739,7 @@ class Arguments(object): def __str__(self): s = ''.join(self.body).strip() result = [] - for m in re.findall('([a-zA-Z/_]+|[^a-zA-Z/_]+)', s): + for m in re.findall(r'([a-zA-Z/_]+|[^a-zA-Z/_]+)', s): if ' ' in m: m = '"%s"' % m result.append(m) @@ -700,6 +747,7 @@ class Arguments(object): def append(self, data): self.body.append(data) + class SConsDocHandler(object): def __init__(self): self.builders = {} @@ -794,7 +842,7 @@ class SConsDocHandler(object): self.parseDomtree(t.root, t.xpath_context, t.nsmap) # lifted from Ka-Ping Yee's way cool pydoc module. -if sys.version_info[0] == 2: +if PY2: def importfile(path): """Import a Python source file or compiled file given its path.""" import imp @@ -817,11 +865,10 @@ if sys.version_info[0] == 2: else: # PY3 version, from newer pydoc def importfile(path): """Import a Python source file or compiled file given its path.""" - import importlib - from pydoc import ErrorDuringImport - magic = importlib.util.MAGIC_NUMBER + from importlib import MAGIC_NUMBER + import pydoc with open(path, 'rb') as ifp: - is_bytecode = magic == ifp.read(len(magic)) + is_bytecode = MAGIC_NUMBER == ifp.read(len(MAGIC_NUMBER)) filename = os.path.basename(path) name, ext = os.path.splitext(filename) if is_bytecode: @@ -832,7 +879,7 @@ else: # PY3 version, from newer pydoc spec = importlib.util.spec_from_file_location(name, path, loader=loader) try: return importlib._bootstrap._load(spec) - except: + except ImportError: raise ErrorDuringImport(path, sys.exc_info()) # Local Variables: diff --git a/bin/SConsExamples.py b/bin/SConsExamples.py index 501169e..8a264e4 100644 --- a/bin/SConsExamples.py +++ b/bin/SConsExamples.py @@ -92,6 +92,7 @@ import os import re import sys import time +import shutil import SConsDoc from SConsDoc import tf as stf @@ -287,9 +288,8 @@ def ensureExampleOutputsExist(dpath): fpath = os.path.join(generated_examples, key + '_' + r.name.replace("/", "_")) # Write file - f = open(fpath, 'w') - f.write("%s\n" % content) - f.close() + with open(fpath, 'w') as f: + f.write("%s\n" % content) perc = "%" @@ -324,9 +324,8 @@ def createAllExampleOutputs(dpath): fpath = os.path.join(generated_examples, key + '_' + r.name.replace("/", "_")) # Write file - f = open(fpath, 'w') - f.write("%s\n" % content) - f.close() + with open(fpath, 'w') as f: + f.write("%s\n" % content) idx += 1 def collectSConsExampleNames(fpath): @@ -458,6 +457,7 @@ import re import SCons.Action import SCons.Defaults import SCons.Node.FS +import shutil platform = '%(osname)s' @@ -540,30 +540,28 @@ def Null(target, source, env): 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() + shutil.copy(src, target) def CCCom(target, source, env): - target = str(target[0]) - fp = open(target, "wb") - def process(source_file, fp=fp): - for line in open(source_file, "rb").readlines(): - m = re.match(r'#include\s[<"]([^<"]+)[>"]', line) - if m: - include = m.group(1) - for d in [str(env.Dir('$CPPPATH')), '.']: - f = os.path.join(d, include) - if os.path.exists(f): - process(f) - break - elif line[:11] != "STRIP CCCOM": - fp.write(line) - for src in map(str, source): - process(src) - fp.write('debug = ' + ARGUMENTS.get('debug', '0') + '\\n') - fp.close() + def process(source_file, ofp): + with open(source_file, "r") as ifp: + for line in ifp.readlines(): + m = re.match(r'#include\s[<"]([^<"]+)[>"]', line) + if m: + include = m.group(1) + for d in [str(env.Dir('$CPPPATH')), '.']: + f = os.path.join(d, include) + if os.path.exists(f): + process(f, ofp) + break + elif line[:11] != "STRIP CCCOM": + ofp.write(line) + + with open(str(target[0]), "w") as fp: + for src in map(str, source): + process(src, fp) + fp.write('debug = ' + ARGUMENTS.get('debug', '0') + '\\n') public_class_re = re.compile('^public class (\S+)', re.MULTILINE) @@ -577,20 +575,23 @@ def JavaCCom(target, source, env): for t in tlist: not_copied[t] = 1 for src in map(str, source): - contents = open(src, "rb").read() + with open(src, "r") as f: + contents = f.read() classes = public_class_re.findall(contents) for c in classes: for t in [x for x in tlist if x.find(c) != -1]: - open(t, "wb").write(contents) + with open(t, "w") as f: + f.write(contents) del not_copied[t] for t in not_copied.keys(): - open(t, "wb").write("\\n") + with open(t, "w") as f: + f.write("\\n") def JavaHCom(target, source, env): tlist = map(str, target) slist = map(str, source) for t, s in zip(tlist, slist): - open(t, "wb").write(open(s, "rb").read()) + shutil.copy(s, t) def JarCom(target, source, env): target = str(target[0]) @@ -599,10 +600,8 @@ def JarCom(target, source, env): for dirpath, dirnames, filenames in os.walk(src): class_files.extend([ os.path.join(dirpath, f) for f in filenames if f.endswith('.class') ]) - f = open(target, "wb") for cf in class_files: - f.write(open(cf, "rb").read()) - f.close() + shutil.copy(cf, target) # XXX Adding COLOR, COLORS and PACKAGE to the 'cc' varlist(s) by hand # here is bogus. It's for the benefit of doc/user/command-line.in, which @@ -721,7 +720,8 @@ def command_touch(args, command, test, values): if not os.path.isabs(file): file = os.path.join(test.workpath('WORK'), file) if not os.path.exists(file): - open(file, 'wb') + with open(file, 'w'): + pass os.utime(file, times) return [] @@ -735,8 +735,8 @@ def command_edit(args, c, test, values): for file in args: if not os.path.isabs(file): file = os.path.join(test.workpath('WORK'), file) - contents = open(file, 'rb').read() - open(file, 'wb').write(contents + add_string) + with open(file, 'a') as f: + f.write(add_string) return [] def command_ls(args, c, test, values): @@ -825,7 +825,7 @@ def create_scons_output(e): t.write(path, content) if hasattr(f, 'chmod'): if len(f.chmod): - os.chmod(path, int(f.chmod, 0)) + os.chmod(path, int(f.chmod, base=8)) # Regular expressions for making the doc output consistent, # regardless of reported addresses or Python version. diff --git a/bin/docs-update-generated.py b/bin/docs-update-generated.py index c164baf..307f843 100644 --- a/bin/docs-update-generated.py +++ b/bin/docs-update-generated.py @@ -10,6 +10,8 @@ from __future__ import print_function import os import sys +import subprocess + import SConsDoc # Directory where all generated files are stored @@ -17,8 +19,8 @@ gen_folder = os.path.join('doc','generated') def argpair(key): """ Return the argument pair *.gen,*.mod for the given key. """ - arg = '%s,%s' % (os.path.join(gen_folder,'%s.gen' % key), - os.path.join(gen_folder,'%s.mod' % key)) + arg = '%s,%s' % (os.path.join(gen_folder, '%s.gen' % key), + os.path.join(gen_folder, '%s.mod' % key)) return arg @@ -43,10 +45,13 @@ def generate_all(): print("Couldn't create destination folder %s! Exiting..." % gen_folder) return # Call scons-proc.py - os.system('%s %s -b %s -f %s -t %s -v %s %s' % - (sys.executable, os.path.join('bin','scons-proc.py'), - argpair('builders'), argpair('functions'), - argpair('tools'), argpair('variables'), ' '.join(flist))) + rv = subprocess.call([sys.executable, + os.path.join('bin','scons-proc.py'), + '-b', argpair('builders'), + '-f', argpair('functions'), + '-t', argpair('tools'), + '-v', argpair('variables')] + flist, + shell=False) if __name__ == "__main__": diff --git a/bin/scons-proc.py b/bin/scons-proc.py index e09c853..d8b37df 100644 --- a/bin/scons-proc.py +++ b/bin/scons-proc.py @@ -32,8 +32,8 @@ Options: -t file(s) dump tool information to the specified file(s) -v file(s) dump variable information to the specified file(s) - Regard that each -[btv] argument is a pair of - comma-separated .gen,.mod file names. + The "files" argument following a -[bftv] argument is expected to + be a comma-separated pair of names like: foo.gen,foo.mod """ @@ -70,7 +70,9 @@ def parse_docs(args, include_entities=True): sys.stderr.write("error in %s\n" % f) raise else: - content = open(f).read() + # mode we read (text/bytes) has to match handling in SConsDoc + with open(f, 'r') as fp: + content = fp.read() if content: try: h.parseContent(content, include_entities) @@ -166,6 +168,7 @@ class SCons_XML(object): # Write file f = self.fopen(filename) stf.writeGenTree(root, f) + f.close() def write_mod(self, filename): try: @@ -212,6 +215,7 @@ class SCons_XML(object): v.tag, v.entityfunc(), v.tag)) f.write('\n') f.write(Warning) + f.close() class Proxy(object): def __init__(self, subject): @@ -348,7 +352,7 @@ processor_class = SCons_XML # Step 1: Creating entity files for builders, functions,... print("Generating entity files...") -h = parse_docs(args, False) +h = parse_docs(args, include_entities=False) write_output_files(h, buildersfiles, functionsfiles, toolsfiles, variablesfiles, SCons_XML.write_mod) @@ -362,7 +366,7 @@ else: # Step 3: Creating actual documentation snippets, using the # fully resolved and updated entities from the *.mod files. print("Updating documentation for builders, tools and functions...") -h = parse_docs(args, True) +h = parse_docs(args, include_entities=True) write_output_files(h, buildersfiles, functionsfiles, toolsfiles, variablesfiles, SCons_XML.write) print("Done") diff --git a/doc/generated/examples/factories_Chmod_1.xml b/doc/generated/examples/factories_Chmod_1.xml index a324ed4..59bba55 100644 --- a/doc/generated/examples/factories_Chmod_1.xml +++ b/doc/generated/examples/factories_Chmod_1.xml @@ -1,5 +1,5 @@ % scons -Q Copy("file.out", "file.in") -Chmod("file.out", 0755) +Chmod("file.out", 0o755) diff --git a/doc/generated/functions.gen b/doc/generated/functions.gen index f3f2a0c..d24eac3 100644 --- a/doc/generated/functions.gen +++ b/doc/generated/functions.gen @@ -1408,7 +1408,7 @@ This SConstruct: env=Environment() -print env.Dump('CCCOM') +print(env.Dump('CCCOM')) @@ -1425,7 +1425,7 @@ While this SConstruct: env=Environment() -print env.Dump() +print(env.Dump()) @@ -4463,7 +4463,7 @@ Example: -print env.subst("The C compiler is: $CC") +print(env.subst("The C compiler is: $CC")) def compile(target, source, env): sourceDir = env.subst("${SOURCE.srcdir}", @@ -4493,9 +4493,9 @@ Examples: -# makes sure the built library will be installed with 0644 file +# makes sure the built library will be installed with 0o644 file # access mode -Tag( Library( 'lib.c' ), UNIX_ATTR="0644" ) +Tag( Library( 'lib.c' ), UNIX_ATTR="0o644" ) # marks file2.txt to be a documentation file Tag( 'file2.txt', DOC ) diff --git a/doc/man/scons.xml b/doc/man/scons.xml index ae54e2e..5aea45a 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -5721,11 +5721,11 @@ which can be octal or string, similar to the bash command. Examples: -Execute(Chmod('file', 0755)) +Execute(Chmod('file', 0o755)) env.Command('foo.out', 'foo.in', [Copy('$TARGET', '$SOURCE'), - Chmod('$TARGET', 0755)]) + Chmod('$TARGET', 0o755)]) Execute(Chmod('file', "ugo+w")) diff --git a/doc/user/README b/doc/user/README index 2d05359..f94632d 100644 --- a/doc/user/README +++ b/doc/user/README @@ -12,7 +12,7 @@ Writing examples: here's a simple template. env = Environment() - print env.Dump("CC") + print(env.Dump("CC")) diff --git a/doc/user/builders-writing.xml b/doc/user/builders-writing.xml index e20e99b..a906df8 100644 --- a/doc/user/builders-writing.xml +++ b/doc/user/builders-writing.xml @@ -196,7 +196,7 @@ env.Foo('file.foo', 'file.input') file.input - + cat @@ -309,7 +309,7 @@ file.input hello.c - + cat @@ -389,7 +389,7 @@ file1.input file2.input - + cat @@ -682,7 +682,7 @@ env.Foo('file') file.input - + cat @@ -766,7 +766,7 @@ file.input new_source - + cat @@ -840,7 +840,7 @@ modify1.input modify2.input - + cat diff --git a/doc/user/environments.xml b/doc/user/environments.xml index 0b246d2..43503a6 100644 --- a/doc/user/environments.xml +++ b/doc/user/environments.xml @@ -1652,7 +1652,7 @@ env['ENV']['PATH'] = '/usr/local/bin:/bin:/usr/bin' env = Environment() env.Command('foo', [], '__ROOT__/usr/bin/printenv.py') - + #!/usr/bin/env python import os import sys diff --git a/doc/user/factories.xml b/doc/user/factories.xml index c8480db..b68dfd9 100644 --- a/doc/user/factories.xml +++ b/doc/user/factories.xml @@ -161,7 +161,7 @@ env['ENV']['PATH'] = env['ENV']['PATH'] + os.pathsep + os.getcwd() SConscript('S') file.in - + touch $* @@ -231,7 +231,7 @@ env['ENV']['PATH'] = env['ENV']['PATH'] + os.pathsep + os.getcwd() SConscript('S') file.in - + touch $* @@ -325,7 +325,7 @@ env['ENV']['PATH'] = env['ENV']['PATH'] + os.pathsep + os.getcwd() SConscript('S') file.in - + touch $* @@ -416,7 +416,7 @@ env['ENV']['PATH'] = env['ENV']['PATH'] + os.pathsep + os.getcwd() SConscript('S') file.in - + touch $* @@ -452,7 +452,7 @@ touch $* Command("file.out", "file.in", [ Copy("$TARGET", "$SOURCE"), - Chmod("$TARGET", 0755), + Chmod("$TARGET", 0o755), ]) file.in diff --git a/doc/user/file-removal.xml b/doc/user/file-removal.xml index c6c695f..6c7c71a 100644 --- a/doc/user/file-removal.xml +++ b/doc/user/file-removal.xml @@ -214,7 +214,7 @@ foo.in foo.log - + cat $3 > $2 diff --git a/doc/user/mergeflags.xml b/doc/user/mergeflags.xml index 280eb82..879a7b2 100644 --- a/doc/user/mergeflags.xml +++ b/doc/user/mergeflags.xml @@ -77,7 +77,7 @@ env = Environment() env.Append(CCFLAGS = '-option -O3 -O1') flags = { 'CCFLAGS' : '-whatever -O3' } env.MergeFlags(flags) -print env['CCFLAGS'] +print(env['CCFLAGS']) @@ -104,7 +104,7 @@ env = Environment() env.Append(CPPPATH = ['/include', '/usr/local/include', '/usr/include']) flags = { 'CPPPATH' : ['/usr/opt/include', '/usr/local/include'] } env.MergeFlags(flags) -print env['CPPPATH'] +print(env['CPPPATH']) @@ -138,8 +138,8 @@ env = Environment() env.Append(CCFLAGS = '-option -O3 -O1') env.Append(CPPPATH = ['/include', '/usr/local/include', '/usr/include']) env.MergeFlags('-whatever -I/usr/opt/include -O3 -I/usr/local/include') -print env['CCFLAGS'] -print env['CPPPATH'] +print(env['CCFLAGS']) +print(env['CPPPATH']) diff --git a/doc/user/parseconfig.xml b/doc/user/parseconfig.xml index 1ddd42d..a07201a 100644 --- a/doc/user/parseconfig.xml +++ b/doc/user/parseconfig.xml @@ -87,7 +87,7 @@ env = Environment() env['CPPPATH'] = ['/lib/compat'] env.ParseConfig("pkg-config x11 --cflags --libs") -print env['CPPPATH'] +print(env['CPPPATH']) @@ -139,7 +139,7 @@ scons: `.' is up to date. env = Environment() env.ParseConfig("pkg-config x11 --cflags --libs") env.ParseConfig("pkg-config x11 --cflags --libs") -print env['CPPPATH'] +print(env['CPPPATH']) diff --git a/doc/user/parseflags.xml b/doc/user/parseflags.xml index 46d6866..836b7f2 100644 --- a/doc/user/parseflags.xml +++ b/doc/user/parseflags.xml @@ -80,11 +80,12 @@ +from __future__ import print_function env = Environment() d = env.ParseFlags("-I/opt/include -L/opt/lib -lfoo") for k,v in sorted(d.items()): if v: - print k, v + print(k, v) env.MergeFlags(d) env.Program('f1.c') @@ -119,11 +120,12 @@ int main() { return 0; } +from __future__ import print_function env = Environment() d = env.ParseFlags("-whatever") for k,v in sorted(d.items()): if v: - print k, v + print(k, v) env.MergeFlags(d) env.Program('f1.c') @@ -145,11 +147,12 @@ env.Program('f1.c') +from __future__ import print_function env = Environment() d = env.ParseFlags(["-I/opt/include", ["-L/opt/lib", "-lfoo"]]) for k,v in sorted(d.items()): if v: - print k, v + print(k, v) env.MergeFlags(d) env.Program('f1.c') @@ -172,11 +175,12 @@ int main() { return 0; } +from __future__ import print_function env = Environment() d = env.ParseFlags(["!echo -I/opt/include", "!echo -L/opt/lib", "-lfoo"]) for k,v in sorted(d.items()): if v: - print k, v + print(k, v) env.MergeFlags(d) env.Program('f1.c') diff --git a/doc/user/sideeffect.xml b/doc/user/sideeffect.xml index ffbfde7..6a10c3b 100644 --- a/doc/user/sideeffect.xml +++ b/doc/user/sideeffect.xml @@ -164,7 +164,7 @@ env.SideEffect('logfile.txt', f1 + f2) file1.in file2.in - + cat diff --git a/doc/user/troubleshoot.xml b/doc/user/troubleshoot.xml index feac970..80e0e24 100644 --- a/doc/user/troubleshoot.xml +++ b/doc/user/troubleshoot.xml @@ -289,7 +289,7 @@ file3.c env = Environment() -print env.Dump() +print(env.Dump()) @@ -349,7 +349,7 @@ print env.Dump() env = Environment() -print env.Dump('ENV') +print(env.Dump('ENV')) diff --git a/src/engine/SCons/Action.xml b/src/engine/SCons/Action.xml index ab42958..7a8194e 100644 --- a/src/engine/SCons/Action.xml +++ b/src/engine/SCons/Action.xml @@ -1,4 +1,4 @@ - + The subsidiary script(s) must use the -Import +Import function to import the variables. Examples: - + 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') - + If the optional variant_dir argument is present, it causes an effect equivalent to the -VariantDir +VariantDir method described below. (If variant_dir @@ -3668,14 +3603,14 @@ and arguments are interpreted relative to the directory of the calling --> argument is interpreted relative to the directory of the calling -SConscript +SConscript file. See the description of the -VariantDir +VariantDir function below for additional details and restrictions. - + If variant_dir is present, @@ -3685,46 +3620,46 @@ but is not, --> the source directory is the directory in which the -SConscript +SConscript file resides and the -SConscript +SConscript file is evaluated as if it were in the variant_dir directory: - + SConscript('src/SConscript', variant_dir = 'build') - + is equivalent to - + VariantDir('build', 'src') SConscript('build/SConscript') - + This later paradigm is often used when the sources are in the same directory as the -SConstruct: +SConstruct: - + SConscript('SConscript', variant_dir = 'build') - + is equivalent to - + VariantDir('build', '.') SConscript('build/SConscript') - + - + The optional must_exist argument, if true, causes an exception to be raised if a requested -SConscript file is not found. The current default is false, +SConscript file is not found. The current default is false, causing only a warning to be omitted, but this behavior is deprecated. For scripts which truly intend to be optional, transition to explicty supplying must_exist=False to the call. - + Here are some composite examples: - + # 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') - + # 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) - + # build debugging and production versions. SConscript # is passed flags to use. opts = { 'CPPDEFINES' : ['DEBUG'], 'CCFLAGS' : '-pgdb' } @@ -3795,7 +3730,7 @@ opts = { 'CPPDEFINES' : ['NODEBUG'], 'CCFLAGS' : '-O' } SConscript('SConscript', variant_dir='prod', duplicate=0, exports=opts) - + # 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) @@ -3810,10 +3745,9 @@ SConscript('src/SConscript', variant_dir='build/ppc', duplicate=0) env.SConscriptChdir(value) - - + By default, -scons +scons changes its working directory to the directory in which each subsidiary SConscript file lives. @@ -3821,14 +3755,14 @@ This behavior may be disabled by specifying either: - + SConscriptChdir(0) env.SConscriptChdir(0) - + in which case -scons +scons will stay in the top-level directory while reading all SConscript files. (This may be necessary when building from repositories, @@ -3840,11 +3774,11 @@ SConscriptChdir() multiple times. - + Example: - + env = Environment() SConscriptChdir(0) SConscript('foo/SConscript') # will not chdir to foo @@ -3860,10 +3794,9 @@ SConscript('bar/SConscript') # will chdir to bar env.SConsignFile([file, dbm_module]) - - + This tells -scons +scons to store all file signatures in the specified database file. @@ -3880,17 +3813,17 @@ If file is not an absolute path name, the file is placed in the same directory as the top-level -SConstruct +SConstruct file. - + If file is None, then -scons +scons will store file signatures in a separate .sconsign @@ -3900,7 +3833,7 @@ not in one global database file. prior to SCons 0.96.91 and 0.97.) - + The optional dbm_module argument can be used to specify @@ -3912,11 +3845,11 @@ Python data structures, and which works on all Python versions. - + Examples: - + # Explicitly stores signatures in ".sconsign.dblite" # in the top-level SConstruct directory (the # default behavior). @@ -3939,14 +3872,13 @@ SConsignFile(None) 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: - + env.SetDefault(FOO = 'foo') if 'FOO' not in env: env['FOO'] = 'foo' @@ -3960,13 +3892,12 @@ if 'FOO' not in env: env['FOO'] = 'foo' 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: - + clean @@ -4051,17 +3982,17 @@ which corresponds to --stack-size. - + See the documentation for the corresponding command line object for information about each specific option. - + Example: - + SetOption('max_drift', 1) @@ -4073,8 +4004,7 @@ SetOption('max_drift', 1) env.SideEffect(side_effect, target) - - + Declares side_effect as a side effect of building @@ -4092,7 +4022,7 @@ 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 +scons will ensure that only one set of commands is executed at a time. Consequently, you only need to use this method @@ -4100,7 +4030,7 @@ 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 @@ -4124,9 +4054,9 @@ is cleaned whenever a specific is cleaned, you must specify this explicitly with the -Clean +Clean or -env.Clean +env.Clean function. @@ -4138,17 +4068,16 @@ function. env.SourceCode(entries, builder) - - + This function and its associate factory functions are deprecated. There is no replacement. The intended use was to keep a local tree in sync with an archive, but in actuality the function only causes the archive to be fetched on the first run. -Synchronizing with the archive is best done external to SCons. +Synchronizing with the archive is best done external to SCons. - + Arrange for non-existent source files to be fetched from a source code management system using the specified @@ -4161,30 +4090,30 @@ source files or directories in which source files can be found. - + For any non-existent source files, -scons +scons will search up the directory tree and use the first -SourceCode +SourceCode builder it finds. The specified builder may be None, in which case -scons +scons will not use a builder to fetch source files for the specified entries, even if a -SourceCode +SourceCode builder has been specified for a directory higher up the tree. - -scons + +scons will, by default, fetch files from SCCS or RCS subdirectories without explicit configuration. @@ -4196,11 +4125,11 @@ and speed up your build a little by disabling these searches as follows: - + env.SourceCode('.', None) - + Note that if the specified builder is one you create by hand, @@ -4209,8 +4138,8 @@ construction environment to use when fetching a source file. - -scons + +scons provides a set of canned factory functions that return appropriate Builders for various popular @@ -4218,119 +4147,18 @@ source code management systems. Canonical examples of invocation include: - + 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) - + - - - SourceSignatures(type) - - - env.SourceSignatures(type) - - - -Note: Although it is not yet officially deprecated, -use of this function is discouraged. -See the -Decider -function for a more flexible and straightforward way -to configure SCons' decision-making. - - - -The -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 -MD5 -or -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. - - - -MD5 -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. - - - -timestamp -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 -older -than the last time it was used to rebuild the target file.) - - - -There is no different between the two behaviors -for Python -Value -node objects. - - - -MD5 -signatures take longer to compute, -but are more accurate than -timestamp -signatures. -The default value is -MD5. - - - -Note that the default -TargetSignatures -setting (see below) -is to use this -SourceSignatures -setting for any target files that are used -to build other target files. -Consequently, changing the value of -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 -env.SourceSignatures -is used). - - - Split(arg) @@ -4338,8 +4166,7 @@ is used). 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 @@ -4352,11 +4179,11 @@ it will be returned as a list containing just the object. - + Example: - + files = Split("f1.c f2.c f3.c") files = env.Split("f4.c f5.c f6.c") files = Split(""" @@ -4371,14 +4198,13 @@ files = Split(""" env.subst(input, [raw, target, source, conv]) - - + Performs construction variable interpolation on the specified string or sequence argument input. - + By default, leading or trailing white space will be removed from the result. @@ -4410,7 +4236,7 @@ pairs (as is done for signature calculation). - + If the input is a sequence (list or tuple), the individual elements of @@ -4418,7 +4244,7 @@ the sequence will be expanded, and the results will be returned as a list. - + The optional target and @@ -4427,20 +4253,20 @@ keyword arguments must be set to lists of target and source nodes, respectively, if you want the -$TARGET, -$TARGETS, -$SOURCE +$TARGET, +$TARGETS, +$SOURCE and -$SOURCES +$SOURCES to be available for expansion. This is usually necessary if you are calling -env.subst +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 @@ -4458,11 +4284,11 @@ idiom to pass in an unnamed function that simply returns its unconverted argument. - + Example: - + print(env.subst("The C compiler is: $CC")) def compile(target, source, env): @@ -4479,20 +4305,19 @@ source_nodes = env.subst('$EXPAND_TO_NODELIST', Tag(node, tags) - - + Annotates file or directory Nodes with information about how the -Package +Package Builder should package those files or directories. All tags are optional. - + Examples: - + # makes sure the built library will be installed with 0o644 file # access mode Tag( Library( 'lib.c' ), UNIX_ATTR="0o644" ) @@ -4502,161 +4327,6 @@ Tag( 'file2.txt', DOC ) - - - TargetSignatures(type) - - - env.TargetSignatures(type) - - - -Note: Although it is not yet officially deprecated, -use of this function is discouraged. -See the -Decider -function for a more flexible and straightforward way -to configure SCons' decision-making. - - - -The -TargetSignatures -function tells -scons -how to decide if a target file -(a file that -is -built from any other files) -has changed since the last time it -was used to build some other target file. -Legal values are -"build"; -"content" -(or its synonym -"MD5"); -"timestamp"; -or -"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. - - - -"content" -(or its synonym -"MD5") -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. - - - -"timestamp" -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 -older -than the last time it was used to rebuild the target file.) - - - -"source" -means -scons -decides that a target file has changed -as specified by the corresponding -SourceSignatures -setting -("MD5" -or -"timestamp"). -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. - - - -"build" -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 -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. - - - -"build" -signatures are fastest because -"content" -(or -"MD5") -signatures take longer to compute, -but are more accurate than -"timestamp" -signatures, -and can prevent unnecessary "downstream" rebuilds -when a target file is rebuilt to the exact same contents -as the previous build. -The -"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 -"source". - - - -Because the default setting is -"source", -using -SourceSignatures -is generally preferable to -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 -TargetSignatures -provides specific control for how built target files -affect their "downstream" dependencies. - - - Tool(string, [toolpath, **kw]) @@ -4664,10 +4334,9 @@ affect their "downstream" dependencies. env.Tool(string, [toolpath, **kw]) - - + The -Tool +Tool form of the function returns a callable object that can be used to initialize @@ -4679,21 +4348,21 @@ 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 -$TOOLS +$TOOLS construction variable. - + Additional keyword arguments are passed to the tool's generate() method. - + Examples: - + env = Environment(tools = [ Tool('msvc') ]) env = Environment() @@ -4703,22 +4372,22 @@ u = Tool('opengl', toolpath = ['tools']) u(env) # adds 'opengl' to the TOOLS variable - + The -env.Tool +env.Tool form of the function applies the callable object for the specified tool string to the environment through which the method was called. - + Additional keyword arguments are passed to the tool's generate() method. - + env.Tool('gcc') env.Tool('opengl', toolpath = ['build/tools']) @@ -4731,8 +4400,7 @@ env.Tool('opengl', toolpath = ['build/tools']) 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 @@ -4746,7 +4414,7 @@ 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 write() method that can be used to "build" a Value Node @@ -4762,11 +4430,11 @@ There is a corresponding method that will return the built value of the Node. - + Examples: - + env = Environment() def create(target, source, env): @@ -4808,10 +4476,9 @@ env.UpdateValue(target = Value(output), source = Value(input)) env.VariantDir(variant_dir, src_dir, [duplicate]) - - + Use the -VariantDir +VariantDir function to create a copy of your sources in another location: if a name under variant_dir @@ -4824,8 +4491,8 @@ than the original sources by simply refering to the sources (and targets) within the variant tree. - -VariantDir + +VariantDir can be called multiple times with the same src_dir to set up multiple builds with different options @@ -4843,9 +4510,9 @@ TODO: src_dir = '.' works fine with a build dir under it. --> - + The default behavior is for -scons +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 @@ -4856,7 +4523,7 @@ 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 @@ -4867,14 +4534,14 @@ files and directories that are not used are not present in variant_dir. - + Duplicating the source tree may be disabled by setting the duplicate argument to 0 (zero). This will cause -scons +scons to invoke Builders using the path names of source files in src_dir and the path names of derived files within @@ -4885,9 +4552,9 @@ and is usually safe for most builds (but see above for cases that may cause problems). - + Note that -VariantDir +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 @@ -4895,11 +4562,11 @@ not in the source directory, but in the regardless of the value of duplicate. This is how you tell -scons +scons which variant of a source tree to build: - + # run src/SConscript in two variant directories VariantDir('build/variant1', 'src') SConscript('build/variant1/SConscript') @@ -4907,31 +4574,31 @@ VariantDir('build/variant2', 'src') SConscript('build/variant2/SConscript') - + See also the -SConscript +SConscript function, described above, for another way to specify a variant directory in conjunction with calling a subsidiary SConscript file. - + Examples: - + # use names in the build directory, not the source directory VariantDir('build', 'src', duplicate=0) Program('build/prog', 'build/source.c') - + # this builds both the source and docs in a separate subtree VariantDir('build', '.', duplicate=0) SConscript(dirs=['build/src','build/doc']) - + # 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) @@ -4945,35 +4612,55 @@ SConscript(dirs='doc', variant_dir='build/doc', duplicate=0) env.WhereIs(program, [path, pathext, reject]) - - + Searches for the specified executable program, returning the full path name to the program -if it is found, -and returning None if not. -Searches the specified -path, -the value of the calling environment's PATH -(env['ENV']['PATH']), -or the user's current external PATH -(os.environ['PATH']) -by default. +if it is found, else None. +Searches the value of the +path keyword argument, +or if None (the default) +the value of the calling environment's PATH +(env['ENV']['PATH']). +If path is None and +the env['ENV']['PATH'] key does not exist, +the user's current external PATH +(os.environ['PATH']) is used as fallback. + + On Windows systems, searches for executable -programs with any of the file extensions -listed in the specified -pathext, -the calling environment's PATHEXT -(env['ENV']['PATHEXT']) -or the user's current PATHEXT +programs with any of the file extensions listed in the +pathext keyword argument, +or if None (the default) +the calling environment's PATHEXT +(env['ENV']['PATHEXT']). +The user's current external PATHEXT (os.environ['PATHEXT']) -by default. +is used as a fallback if pathext is +None +and the key env['ENV']['PATHEXT'] +does not exist. + + Will not select any path name or names in the specified reject list, if any. + + +If you would prefer to search +the user's current external PATH +(os.environ['PATH']) +by default, +consider using the function SCons.Util.WhereIs instead. +Note that SCons.Util.WhereIs +does not expand environment variables automatically +(no implicit env.subst for its arguments). + + + diff --git a/doc/generated/functions.mod b/doc/generated/functions.mod index e460aaf..91710a3 100644 --- a/doc/generated/functions.mod +++ b/doc/generated/functions.mod @@ -82,11 +82,9 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. SetOption"> SideEffect"> SourceCode"> -SourceSignatures"> Split"> subst"> Tag"> -TargetSignatures"> Tool"> Value"> VariantDir"> @@ -166,11 +164,9 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. env.SetOption"> env.SideEffect"> env.SourceCode"> -env.SourceSignatures"> env.Split"> env.subst"> env.Tag"> -env.TargetSignatures"> env.Tool"> env.Value"> env.VariantDir"> @@ -260,11 +256,9 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. SetOption"> SideEffect"> SourceCode"> -SourceSignatures"> Split"> subst"> Tag"> -TargetSignatures"> Tool"> Value"> VariantDir"> @@ -344,11 +338,9 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. env.SetOption"> env.SideEffect"> env.SourceCode"> -env.SourceSignatures"> env.Split"> env.subst"> env.Tag"> -env.TargetSignatures"> env.Tool"> env.Value"> env.VariantDir"> diff --git a/doc/generated/tools.gen b/doc/generated/tools.gen index 0d30f6f..bf6381c 100644 --- a/doc/generated/tools.gen +++ b/doc/generated/tools.gen @@ -1,4 +1,3 @@ - %scons; @@ -12,153 +11,137 @@ %variables-mod; ]> - + 386asm - - + Sets construction variables for the 386ASM assembler for the Phar Lap ETS embedded operating system. -Sets: &cv-link-AS;, &cv-link-ASCOM;, &cv-link-ASFLAGS;, &cv-link-ASPPCOM;, &cv-link-ASPPFLAGS;.Uses: &cv-link-CC;, &cv-link-CPPFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. +Sets: &cv-link-AS;, &cv-link-ASCOM;, &cv-link-ASFLAGS;, &cv-link-ASPPCOM;, &cv-link-ASPPFLAGS;.Uses: &cv-link-CC;, &cv-link-CPPFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. aixc++ - - + Sets construction variables for the IMB xlc / Visual Age C++ compiler. -Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXX;, &cv-link-SHOBJSUFFIX;. +Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXX;, &cv-link-SHOBJSUFFIX;. aixcc - - + Sets construction variables for the IBM xlc / Visual Age C compiler. -Sets: &cv-link-CC;, &cv-link-CCVERSION;, &cv-link-SHCC;. +Sets: &cv-link-CC;, &cv-link-CCVERSION;, &cv-link-SHCC;. aixf77 - - + Sets construction variables for the IBM Visual Age f77 Fortran compiler. -Sets: &cv-link-F77;, &cv-link-SHF77;. +Sets: &cv-link-F77;, &cv-link-SHF77;. aixlink - - + Sets construction variables for the IBM Visual Age linker. -Sets: &cv-link-LINKFLAGS;, &cv-link-SHLIBSUFFIX;, &cv-link-SHLINKFLAGS;. +Sets: &cv-link-LINKFLAGS;, &cv-link-SHLIBSUFFIX;, &cv-link-SHLINKFLAGS;. applelink - - + Sets construction variables for the Apple linker (similar to the GNU linker). - Sets: &cv-link-APPLELINK_COMPATIBILITY_VERSION;, &cv-link-APPLELINK_CURRENT_VERSION;, &cv-link-APPLELINK_NO_COMPATIBILITY_VERSION;, &cv-link-APPLELINK_NO_CURRENT_VERSION;, &cv-link-FRAMEWORKPATHPREFIX;, &cv-link-LDMODULECOM;, &cv-link-LDMODULEFLAGS;, &cv-link-LDMODULEPREFIX;, &cv-link-LDMODULESUFFIX;, &cv-link-LINKCOM;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-_APPLELINK_COMPATIBILITY_VERSION;, &cv-link-_APPLELINK_CURRENT_VERSION;, &cv-link-_FRAMEWORKPATH;, &cv-link-_FRAMEWORKS;.Uses: &cv-link-FRAMEWORKSFLAGS;. + Sets: &cv-link-APPLELINK_COMPATIBILITY_VERSION;, &cv-link-APPLELINK_CURRENT_VERSION;, &cv-link-APPLELINK_NO_COMPATIBILITY_VERSION;, &cv-link-APPLELINK_NO_CURRENT_VERSION;, &cv-link-FRAMEWORKPATHPREFIX;, &cv-link-LDMODULECOM;, &cv-link-LDMODULEFLAGS;, &cv-link-LDMODULEPREFIX;, &cv-link-LDMODULESUFFIX;, &cv-link-LINKCOM;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-_APPLELINK_COMPATIBILITY_VERSION;, &cv-link-_APPLELINK_CURRENT_VERSION;, &cv-link-_FRAMEWORKPATH;, &cv-link-_FRAMEWORKS;.Uses: &cv-link-FRAMEWORKSFLAGS;. ar - - -Sets construction variables for the ar library archiver. + +Sets construction variables for the ar library archiver. -Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;, &cv-link-RANLIB;, &cv-link-RANLIBCOM;, &cv-link-RANLIBFLAGS;. +Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;, &cv-link-RANLIB;, &cv-link-RANLIBCOM;, &cv-link-RANLIBFLAGS;. as - - -Sets construction variables for the as assembler. + +Sets construction variables for the as assembler. -Sets: &cv-link-AS;, &cv-link-ASCOM;, &cv-link-ASFLAGS;, &cv-link-ASPPCOM;, &cv-link-ASPPFLAGS;.Uses: &cv-link-CC;, &cv-link-CPPFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. +Sets: &cv-link-AS;, &cv-link-ASCOM;, &cv-link-ASFLAGS;, &cv-link-ASPPCOM;, &cv-link-ASPPFLAGS;.Uses: &cv-link-CC;, &cv-link-CPPFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. bcc32 - - + Sets construction variables for the bcc32 compiler. -Sets: &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CCFLAGS;, &cv-link-CFILESUFFIX;, &cv-link-CFLAGS;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-SHCC;, &cv-link-SHCCCOM;, &cv-link-SHCCFLAGS;, &cv-link-SHCFLAGS;, &cv-link-SHOBJSUFFIX;.Uses: &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. +Sets: &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CCFLAGS;, &cv-link-CFILESUFFIX;, &cv-link-CFLAGS;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-SHCC;, &cv-link-SHCCCOM;, &cv-link-SHCCFLAGS;, &cv-link-SHCFLAGS;, &cv-link-SHOBJSUFFIX;.Uses: &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. cc - - + Sets construction variables for generic POSIX C compilers. -Sets: &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CCFLAGS;, &cv-link-CFILESUFFIX;, &cv-link-CFLAGS;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-FRAMEWORKPATH;, &cv-link-FRAMEWORKS;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-SHCC;, &cv-link-SHCCCOM;, &cv-link-SHCCFLAGS;, &cv-link-SHCFLAGS;, &cv-link-SHOBJSUFFIX;.Uses: &cv-link-PLATFORM;. +Sets: &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CCFLAGS;, &cv-link-CFILESUFFIX;, &cv-link-CFLAGS;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-FRAMEWORKPATH;, &cv-link-FRAMEWORKS;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-SHCC;, &cv-link-SHCCCOM;, &cv-link-SHCCFLAGS;, &cv-link-SHCFLAGS;, &cv-link-SHOBJSUFFIX;.Uses: &cv-link-PLATFORM;. clang - - + Set construction variables for the Clang C compiler. -Sets: &cv-link-CC;, &cv-link-CCVERSION;, &cv-link-SHCCFLAGS;. +Sets: &cv-link-CC;, &cv-link-CCVERSION;, &cv-link-SHCCFLAGS;. clangxx - - + Set construction variables for the Clang C++ compiler. -Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJSUFFIX;, &cv-link-STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME;. +Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJSUFFIX;, &cv-link-STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME;. cvf - - + Sets construction variables for the Compaq Visual Fortran compiler. -Sets: &cv-link-FORTRAN;, &cv-link-FORTRANCOM;, &cv-link-FORTRANMODDIR;, &cv-link-FORTRANMODDIRPREFIX;, &cv-link-FORTRANMODDIRSUFFIX;, &cv-link-FORTRANPPCOM;, &cv-link-OBJSUFFIX;, &cv-link-SHFORTRANCOM;, &cv-link-SHFORTRANPPCOM;.Uses: &cv-link-CPPFLAGS;, &cv-link-FORTRANFLAGS;, &cv-link-SHFORTRANFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_FORTRANINCFLAGS;, &cv-link-_FORTRANMODFLAG;. +Sets: &cv-link-FORTRAN;, &cv-link-FORTRANCOM;, &cv-link-FORTRANMODDIR;, &cv-link-FORTRANMODDIRPREFIX;, &cv-link-FORTRANMODDIRSUFFIX;, &cv-link-FORTRANPPCOM;, &cv-link-OBJSUFFIX;, &cv-link-SHFORTRANCOM;, &cv-link-SHFORTRANPPCOM;.Uses: &cv-link-CPPFLAGS;, &cv-link-FORTRANFLAGS;, &cv-link-SHFORTRANFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_FORTRANINCFLAGS;, &cv-link-_FORTRANMODFLAG;. cXX - - + Sets construction variables for generic POSIX C++ compilers. -Sets: &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-CXX;, &cv-link-CXXCOM;, &cv-link-CXXFILESUFFIX;, &cv-link-CXXFLAGS;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-OBJSUFFIX;, &cv-link-SHCXX;, &cv-link-SHCXXCOM;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJSUFFIX;.Uses: &cv-link-CXXCOMSTR;. +Sets: &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-CXX;, &cv-link-CXXCOM;, &cv-link-CXXFILESUFFIX;, &cv-link-CXXFLAGS;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-OBJSUFFIX;, &cv-link-SHCXX;, &cv-link-SHCXXCOM;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJSUFFIX;.Uses: &cv-link-CXXCOMSTR;. cyglink - - + Set construction variables for cygwin linker/loader. -Sets: &cv-link-IMPLIBPREFIX;, &cv-link-IMPLIBSUFFIX;, &cv-link-LDMODULEVERSIONFLAGS;, &cv-link-LINKFLAGS;, &cv-link-RPATHPREFIX;, &cv-link-RPATHSUFFIX;, &cv-link-SHLIBPREFIX;, &cv-link-SHLIBSUFFIX;, &cv-link-SHLIBVERSIONFLAGS;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-_LDMODULEVERSIONFLAGS;, &cv-link-_SHLIBVERSIONFLAGS;. +Sets: &cv-link-IMPLIBPREFIX;, &cv-link-IMPLIBSUFFIX;, &cv-link-LDMODULEVERSIONFLAGS;, &cv-link-LINKFLAGS;, &cv-link-RPATHPREFIX;, &cv-link-RPATHSUFFIX;, &cv-link-SHLIBPREFIX;, &cv-link-SHLIBSUFFIX;, &cv-link-SHLIBVERSIONFLAGS;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-_LDMODULEVERSIONFLAGS;, &cv-link-_SHLIBVERSIONFLAGS;. default - - -Sets construction variables for a default list of Tool modules. + +Sets construction variables for a default list of Tool modules. Use default in the tools list to retain the original defaults, since the tools parameter is treated as a literal statement of the tools -to be made available in that construction environment, not an addition. +to be made available in that construction environment, not an addition. - + The list of tools selected by default is not static, but is dependent both on the platform and on the software installed on the platform. Some tools will not initialize if an underlying command is not found, and some tools are selected from a list of choices on a first-found basis. The finished tool list can be -examined by inspecting the TOOLS construction variable -in the construction environment. +examined by inspecting the TOOLS construction variable +in the construction environment. - + On all platforms, all tools from the following list are selected whose respective conditions are met: filesystem, wix, lex, yacc, rpcgen, swig, @@ -166,7 +149,7 @@ jar, javac, javah, rmic, dvipdf, dvips, gs, tex, latex, pdflatex, pdftex, tar, zip, textfile. - + On Linux systems, the default tools list selects (first-found): a C compiler from gcc, intelc, icc, cc; @@ -183,7 +166,7 @@ It also selects all found from the list m4, rpm. - + On Windows systems, the default tools list selects (first-found): a C compiler from msvc, mingw, gcc, intelc, icl, icc, cc, bcc32; @@ -201,7 +184,7 @@ It also selects all found from the list msvs, midl. - + On MacOS systems, the default tools list selects (first-found): a C compiler from gcc, cc; @@ -217,9 +200,9 @@ It also selects all found from the list m4, rpm. - + Default lists for other platforms can be found by -examining the scons +examining the scons source code (see SCons/Tool/__init__.py). @@ -228,16 +211,14 @@ source code (see dmd - - + Sets construction variables for D language compiler DMD. -Sets: &cv-link-DC;, &cv-link-DCOM;, &cv-link-DDEBUG;, &cv-link-DDEBUGPREFIX;, &cv-link-DDEBUGSUFFIX;, &cv-link-DFILESUFFIX;, &cv-link-DFLAGPREFIX;, &cv-link-DFLAGS;, &cv-link-DFLAGSUFFIX;, &cv-link-DINCPREFIX;, &cv-link-DINCSUFFIX;, &cv-link-DLIB;, &cv-link-DLIBCOM;, &cv-link-DLIBDIRPREFIX;, &cv-link-DLIBDIRSUFFIX;, &cv-link-DLIBFLAGPREFIX;, &cv-link-DLIBFLAGSUFFIX;, &cv-link-DLIBLINKPREFIX;, &cv-link-DLIBLINKSUFFIX;, &cv-link-DLINK;, &cv-link-DLINKCOM;, &cv-link-DLINKFLAGPREFIX;, &cv-link-DLINKFLAGS;, &cv-link-DLINKFLAGSUFFIX;, &cv-link-DPATH;, &cv-link-DRPATHPREFIX;, &cv-link-DRPATHSUFFIX;, &cv-link-DShLibSonameGenerator;, &cv-link-DVERPREFIX;, &cv-link-DVERSIONS;, &cv-link-DVERSUFFIX;, &cv-link-SHDC;, &cv-link-SHDCOM;, &cv-link-SHDLIBVERSION;, &cv-link-SHDLIBVERSIONFLAGS;, &cv-link-SHDLINK;, &cv-link-SHDLINKCOM;, &cv-link-SHDLINKFLAGS;. +Sets: &cv-link-DC;, &cv-link-DCOM;, &cv-link-DDEBUG;, &cv-link-DDEBUGPREFIX;, &cv-link-DDEBUGSUFFIX;, &cv-link-DFILESUFFIX;, &cv-link-DFLAGPREFIX;, &cv-link-DFLAGS;, &cv-link-DFLAGSUFFIX;, &cv-link-DINCPREFIX;, &cv-link-DINCSUFFIX;, &cv-link-DLIB;, &cv-link-DLIBCOM;, &cv-link-DLIBDIRPREFIX;, &cv-link-DLIBDIRSUFFIX;, &cv-link-DLIBFLAGPREFIX;, &cv-link-DLIBFLAGSUFFIX;, &cv-link-DLIBLINKPREFIX;, &cv-link-DLIBLINKSUFFIX;, &cv-link-DLINK;, &cv-link-DLINKCOM;, &cv-link-DLINKFLAGPREFIX;, &cv-link-DLINKFLAGS;, &cv-link-DLINKFLAGSUFFIX;, &cv-link-DPATH;, &cv-link-DRPATHPREFIX;, &cv-link-DRPATHSUFFIX;, &cv-link-DShLibSonameGenerator;, &cv-link-DVERPREFIX;, &cv-link-DVERSIONS;, &cv-link-DVERSUFFIX;, &cv-link-SHDC;, &cv-link-SHDCOM;, &cv-link-SHDLIBVERSION;, &cv-link-SHDLIBVERSIONFLAGS;, &cv-link-SHDLINK;, &cv-link-SHDLINKCOM;, &cv-link-SHDLINKFLAGS;. docbook - -This tool tries to make working with Docbook in SCons a little easier. + This tool tries to make working with Docbook in SCons a little easier. It provides several toolchains for creating different output formats, like HTML or PDF. Contained in the package is a distribution of the Docbook XSL stylesheets as of version 1.76.1. @@ -245,27 +226,27 @@ As long as you don't specify your own stylesheets for customization, these official versions are picked as default...which should reduce the inevitable setup hassles for you. -Implicit dependencies to images and XIncludes are detected automatically +Implicit dependencies to images and XIncludes are detected automatically if you meet the HTML requirements. The additional stylesheet utils/xmldepend.xsl by Paul DuBois is used for this purpose. -Note, that there is no support for XML catalog resolving offered! This tool calls +Note, that there is no support for XML catalog resolving offered! This tool calls the XSLT processors and PDF renderers with the stylesheets you specified, that's it. The rest lies in your hands and you still have to know what you're doing when resolving names via a catalog. -For activating the tool "docbook", you have to add its name to the Environment constructor, +For activating the tool "docbook", you have to add its name to the Environment constructor, like this -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) -On its startup, the Docbook tool tries to find a required xsltproc processor, and +On its startup, the Docbook tool tries to find a required xsltproc processor, and a PDF renderer, e.g. fop. So make sure that these are added to your system's environment PATH and can be called directly, without specifying their full path. -For the most basic processing of Docbook to HTML, you need to have installed +For the most basic processing of Docbook to HTML, you need to have installed -the Python lxml binding to libxml2, or +the Python lxml binding to libxml2, or the direct Python bindings for libxml2/libxslt, or @@ -276,49 +257,49 @@ and xalan. -Rendering to PDF requires you to have one of the applications +Rendering to PDF requires you to have one of the applications fop or xep installed. -Creating a HTML or PDF document is very simple and straightforward. Say +Creating a HTML or PDF document is very simple and straightforward. Say -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookHtml('manual.html', 'manual.xml') env.DocbookPdf('manual.pdf', 'manual.xml') -to get both outputs from your XML source manual.xml. As a shortcut, you can +to get both outputs from your XML source manual.xml. As a shortcut, you can give the stem of the filenames alone, like this: -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookHtml('manual') env.DocbookPdf('manual') -and get the same result. Target and source lists are also supported: +and get the same result. Target and source lists are also supported: -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookHtml(['manual.html','reference.html'], ['manual.xml','reference.xml']) -or even +or even -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookHtml(['manual','reference']) -Whenever you leave out the list of sources, you may not specify a file extension! The +Whenever you leave out the list of sources, you may not specify a file extension! The Tool uses the given names as file stems, and adds the suffixes for target and source files accordingly. -The rules given above are valid for the Builders DocbookHtml, -DocbookPdf, DocbookEpub, DocbookSlidesPdf and DocbookXInclude. For the -DocbookMan transformation you +The rules given above are valid for the Builders DocbookHtml, +DocbookPdf, DocbookEpub, DocbookSlidesPdf and DocbookXInclude. For the +DocbookMan transformation you can specify a target name, but the actual output names are automatically set from the refname entries in your XML source. -The Builders DocbookHtmlChunked, DocbookHtmlhelp and -DocbookSlidesHtml are special, in that: +The Builders DocbookHtmlChunked, DocbookHtmlhelp and +DocbookSlidesHtml are special, in that: -they create a large set of files, where the exact names and their number depend +they create a large set of files, where the exact names and their number depend on the content of the source file, and @@ -327,24 +308,24 @@ XSL transformation is not picked up by the stylesheets. -As a result, there is simply no use in specifying a target HTML name. +As a result, there is simply no use in specifying a target HTML name. So the basic syntax for these builders is always: -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookHtmlhelp('manual') -If you want to use a specific XSL file, you can set the +If you want to use a specific XSL file, you can set the additional xsl parameter to your Builder call as follows: -env.DocbookHtml('other.html', 'manual.xml', xsl='html.xsl') +env.DocbookHtml('other.html', 'manual.xml', xsl='html.xsl') -Since this may get tedious if you always use the same local naming for your customized XSL files, +Since this may get tedious if you always use the same local naming for your customized XSL files, e.g. html.xsl for HTML and pdf.xsl for PDF output, a set of variables for setting the default XSL name is provided. These are: -DOCBOOK_DEFAULT_XSL_HTML +DOCBOOK_DEFAULT_XSL_HTML DOCBOOK_DEFAULT_XSL_HTMLCHUNKED DOCBOOK_DEFAULT_XSL_HTMLHELP DOCBOOK_DEFAULT_XSL_PDF @@ -353,735 +334,656 @@ DOCBOOK_DEFAULT_XSL_MAN DOCBOOK_DEFAULT_XSL_SLIDESPDF DOCBOOK_DEFAULT_XSL_SLIDESHTML -and you can set them when constructing your environment: +and you can set them when constructing your environment: -env = Environment(tools=['docbook'], +env = Environment(tools=['docbook'], DOCBOOK_DEFAULT_XSL_HTML='html.xsl', DOCBOOK_DEFAULT_XSL_PDF='pdf.xsl') env.DocbookHtml('manual') # now uses html.xsl -Sets: &cv-link-DOCBOOK_DEFAULT_XSL_EPUB;, &cv-link-DOCBOOK_DEFAULT_XSL_HTML;, &cv-link-DOCBOOK_DEFAULT_XSL_HTMLCHUNKED;, &cv-link-DOCBOOK_DEFAULT_XSL_HTMLHELP;, &cv-link-DOCBOOK_DEFAULT_XSL_MAN;, &cv-link-DOCBOOK_DEFAULT_XSL_PDF;, &cv-link-DOCBOOK_DEFAULT_XSL_SLIDESHTML;, &cv-link-DOCBOOK_DEFAULT_XSL_SLIDESPDF;, &cv-link-DOCBOOK_FOP;, &cv-link-DOCBOOK_FOPCOM;, &cv-link-DOCBOOK_FOPFLAGS;, &cv-link-DOCBOOK_XMLLINT;, &cv-link-DOCBOOK_XMLLINTCOM;, &cv-link-DOCBOOK_XMLLINTFLAGS;, &cv-link-DOCBOOK_XSLTPROC;, &cv-link-DOCBOOK_XSLTPROCCOM;, &cv-link-DOCBOOK_XSLTPROCFLAGS;, &cv-link-DOCBOOK_XSLTPROCPARAMS;.Uses: &cv-link-DOCBOOK_FOPCOMSTR;, &cv-link-DOCBOOK_XMLLINTCOMSTR;, &cv-link-DOCBOOK_XSLTPROCCOMSTR;. +Sets: &cv-link-DOCBOOK_DEFAULT_XSL_EPUB;, &cv-link-DOCBOOK_DEFAULT_XSL_HTML;, &cv-link-DOCBOOK_DEFAULT_XSL_HTMLCHUNKED;, &cv-link-DOCBOOK_DEFAULT_XSL_HTMLHELP;, &cv-link-DOCBOOK_DEFAULT_XSL_MAN;, &cv-link-DOCBOOK_DEFAULT_XSL_PDF;, &cv-link-DOCBOOK_DEFAULT_XSL_SLIDESHTML;, &cv-link-DOCBOOK_DEFAULT_XSL_SLIDESPDF;, &cv-link-DOCBOOK_FOP;, &cv-link-DOCBOOK_FOPCOM;, &cv-link-DOCBOOK_FOPFLAGS;, &cv-link-DOCBOOK_XMLLINT;, &cv-link-DOCBOOK_XMLLINTCOM;, &cv-link-DOCBOOK_XMLLINTFLAGS;, &cv-link-DOCBOOK_XSLTPROC;, &cv-link-DOCBOOK_XSLTPROCCOM;, &cv-link-DOCBOOK_XSLTPROCFLAGS;, &cv-link-DOCBOOK_XSLTPROCPARAMS;.Uses: &cv-link-DOCBOOK_FOPCOMSTR;, &cv-link-DOCBOOK_XMLLINTCOMSTR;, &cv-link-DOCBOOK_XSLTPROCCOMSTR;. dvi - - -Attaches the DVI builder to the + +Attaches the DVI builder to the construction environment. dvipdf - - + Sets construction variables for the dvipdf utility. -Sets: &cv-link-DVIPDF;, &cv-link-DVIPDFCOM;, &cv-link-DVIPDFFLAGS;.Uses: &cv-link-DVIPDFCOMSTR;. +Sets: &cv-link-DVIPDF;, &cv-link-DVIPDFCOM;, &cv-link-DVIPDFFLAGS;.Uses: &cv-link-DVIPDFCOMSTR;. dvips - - + Sets construction variables for the dvips utility. -Sets: &cv-link-DVIPS;, &cv-link-DVIPSFLAGS;, &cv-link-PSCOM;, &cv-link-PSPREFIX;, &cv-link-PSSUFFIX;.Uses: &cv-link-PSCOMSTR;. +Sets: &cv-link-DVIPS;, &cv-link-DVIPSFLAGS;, &cv-link-PSCOM;, &cv-link-PSPREFIX;, &cv-link-PSSUFFIX;.Uses: &cv-link-PSCOMSTR;. f03 - - + Set construction variables for generic POSIX Fortran 03 compilers. -Sets: &cv-link-F03;, &cv-link-F03COM;, &cv-link-F03FLAGS;, &cv-link-F03PPCOM;, &cv-link-SHF03;, &cv-link-SHF03COM;, &cv-link-SHF03FLAGS;, &cv-link-SHF03PPCOM;, &cv-link-_F03INCFLAGS;.Uses: &cv-link-F03COMSTR;, &cv-link-F03PPCOMSTR;, &cv-link-SHF03COMSTR;, &cv-link-SHF03PPCOMSTR;. +Sets: &cv-link-F03;, &cv-link-F03COM;, &cv-link-F03FLAGS;, &cv-link-F03PPCOM;, &cv-link-SHF03;, &cv-link-SHF03COM;, &cv-link-SHF03FLAGS;, &cv-link-SHF03PPCOM;, &cv-link-_F03INCFLAGS;.Uses: &cv-link-F03COMSTR;, &cv-link-F03PPCOMSTR;, &cv-link-SHF03COMSTR;, &cv-link-SHF03PPCOMSTR;. f08 - - + Set construction variables for generic POSIX Fortran 08 compilers. -Sets: &cv-link-F08;, &cv-link-F08COM;, &cv-link-F08FLAGS;, &cv-link-F08PPCOM;, &cv-link-SHF08;, &cv-link-SHF08COM;, &cv-link-SHF08FLAGS;, &cv-link-SHF08PPCOM;, &cv-link-_F08INCFLAGS;.Uses: &cv-link-F08COMSTR;, &cv-link-F08PPCOMSTR;, &cv-link-SHF08COMSTR;, &cv-link-SHF08PPCOMSTR;. +Sets: &cv-link-F08;, &cv-link-F08COM;, &cv-link-F08FLAGS;, &cv-link-F08PPCOM;, &cv-link-SHF08;, &cv-link-SHF08COM;, &cv-link-SHF08FLAGS;, &cv-link-SHF08PPCOM;, &cv-link-_F08INCFLAGS;.Uses: &cv-link-F08COMSTR;, &cv-link-F08PPCOMSTR;, &cv-link-SHF08COMSTR;, &cv-link-SHF08PPCOMSTR;. f77 - - + Set construction variables for generic POSIX Fortran 77 compilers. -Sets: &cv-link-F77;, &cv-link-F77COM;, &cv-link-F77FILESUFFIXES;, &cv-link-F77FLAGS;, &cv-link-F77PPCOM;, &cv-link-F77PPFILESUFFIXES;, &cv-link-FORTRAN;, &cv-link-FORTRANCOM;, &cv-link-FORTRANFLAGS;, &cv-link-SHF77;, &cv-link-SHF77COM;, &cv-link-SHF77FLAGS;, &cv-link-SHF77PPCOM;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANCOM;, &cv-link-SHFORTRANFLAGS;, &cv-link-SHFORTRANPPCOM;, &cv-link-_F77INCFLAGS;.Uses: &cv-link-F77COMSTR;, &cv-link-F77PPCOMSTR;, &cv-link-FORTRANCOMSTR;, &cv-link-FORTRANPPCOMSTR;, &cv-link-SHF77COMSTR;, &cv-link-SHF77PPCOMSTR;, &cv-link-SHFORTRANCOMSTR;, &cv-link-SHFORTRANPPCOMSTR;. +Sets: &cv-link-F77;, &cv-link-F77COM;, &cv-link-F77FILESUFFIXES;, &cv-link-F77FLAGS;, &cv-link-F77PPCOM;, &cv-link-F77PPFILESUFFIXES;, &cv-link-FORTRAN;, &cv-link-FORTRANCOM;, &cv-link-FORTRANFLAGS;, &cv-link-SHF77;, &cv-link-SHF77COM;, &cv-link-SHF77FLAGS;, &cv-link-SHF77PPCOM;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANCOM;, &cv-link-SHFORTRANFLAGS;, &cv-link-SHFORTRANPPCOM;, &cv-link-_F77INCFLAGS;.Uses: &cv-link-F77COMSTR;, &cv-link-F77PPCOMSTR;, &cv-link-FORTRANCOMSTR;, &cv-link-FORTRANPPCOMSTR;, &cv-link-SHF77COMSTR;, &cv-link-SHF77PPCOMSTR;, &cv-link-SHFORTRANCOMSTR;, &cv-link-SHFORTRANPPCOMSTR;. f90 - - + Set construction variables for generic POSIX Fortran 90 compilers. -Sets: &cv-link-F90;, &cv-link-F90COM;, &cv-link-F90FLAGS;, &cv-link-F90PPCOM;, &cv-link-SHF90;, &cv-link-SHF90COM;, &cv-link-SHF90FLAGS;, &cv-link-SHF90PPCOM;, &cv-link-_F90INCFLAGS;.Uses: &cv-link-F90COMSTR;, &cv-link-F90PPCOMSTR;, &cv-link-SHF90COMSTR;, &cv-link-SHF90PPCOMSTR;. +Sets: &cv-link-F90;, &cv-link-F90COM;, &cv-link-F90FLAGS;, &cv-link-F90PPCOM;, &cv-link-SHF90;, &cv-link-SHF90COM;, &cv-link-SHF90FLAGS;, &cv-link-SHF90PPCOM;, &cv-link-_F90INCFLAGS;.Uses: &cv-link-F90COMSTR;, &cv-link-F90PPCOMSTR;, &cv-link-SHF90COMSTR;, &cv-link-SHF90PPCOMSTR;. f95 - - + Set construction variables for generic POSIX Fortran 95 compilers. -Sets: &cv-link-F95;, &cv-link-F95COM;, &cv-link-F95FLAGS;, &cv-link-F95PPCOM;, &cv-link-SHF95;, &cv-link-SHF95COM;, &cv-link-SHF95FLAGS;, &cv-link-SHF95PPCOM;, &cv-link-_F95INCFLAGS;.Uses: &cv-link-F95COMSTR;, &cv-link-F95PPCOMSTR;, &cv-link-SHF95COMSTR;, &cv-link-SHF95PPCOMSTR;. +Sets: &cv-link-F95;, &cv-link-F95COM;, &cv-link-F95FLAGS;, &cv-link-F95PPCOM;, &cv-link-SHF95;, &cv-link-SHF95COM;, &cv-link-SHF95FLAGS;, &cv-link-SHF95PPCOM;, &cv-link-_F95INCFLAGS;.Uses: &cv-link-F95COMSTR;, &cv-link-F95PPCOMSTR;, &cv-link-SHF95COMSTR;, &cv-link-SHF95PPCOMSTR;. fortran - - + Set construction variables for generic POSIX Fortran compilers. -Sets: &cv-link-FORTRAN;, &cv-link-FORTRANCOM;, &cv-link-FORTRANFLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANCOM;, &cv-link-SHFORTRANFLAGS;, &cv-link-SHFORTRANPPCOM;.Uses: &cv-link-FORTRANCOMSTR;, &cv-link-FORTRANPPCOMSTR;, &cv-link-SHFORTRANCOMSTR;, &cv-link-SHFORTRANPPCOMSTR;. +Sets: &cv-link-FORTRAN;, &cv-link-FORTRANCOM;, &cv-link-FORTRANFLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANCOM;, &cv-link-SHFORTRANFLAGS;, &cv-link-SHFORTRANPPCOM;.Uses: &cv-link-FORTRANCOMSTR;, &cv-link-FORTRANPPCOMSTR;, &cv-link-SHFORTRANCOMSTR;, &cv-link-SHFORTRANPPCOMSTR;. g++ - - -Set construction variables for the gXX C++ compiler. + +Set construction variables for the gXX C++ compiler. -Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJSUFFIX;. +Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJSUFFIX;. g77 - - -Set construction variables for the g77 Fortran compiler. -Calls the f77 Tool module + +Set construction variables for the g77 Fortran compiler. +Calls the f77 Tool module to set variables. gas - - -Sets construction variables for the gas assembler. -Calls the as module. + +Sets construction variables for the gas assembler. +Calls the as module. -Sets: &cv-link-AS;. +Sets: &cv-link-AS;. gcc - - -Set construction variables for the gcc C compiler. + +Set construction variables for the gcc C compiler. -Sets: &cv-link-CC;, &cv-link-CCVERSION;, &cv-link-SHCCFLAGS;. +Sets: &cv-link-CC;, &cv-link-CCVERSION;, &cv-link-SHCCFLAGS;. gdc - - + Sets construction variables for the D language compiler GDC. -Sets: &cv-link-DC;, &cv-link-DCOM;, &cv-link-DDEBUG;, &cv-link-DDEBUGPREFIX;, &cv-link-DDEBUGSUFFIX;, &cv-link-DFILESUFFIX;, &cv-link-DFLAGPREFIX;, &cv-link-DFLAGS;, &cv-link-DFLAGSUFFIX;, &cv-link-DINCPREFIX;, &cv-link-DINCSUFFIX;, &cv-link-DLIB;, &cv-link-DLIBCOM;, &cv-link-DLIBDIRPREFIX;, &cv-link-DLIBDIRSUFFIX;, &cv-link-DLIBFLAGPREFIX;, &cv-link-DLIBFLAGSUFFIX;, &cv-link-DLIBLINKPREFIX;, &cv-link-DLIBLINKSUFFIX;, &cv-link-DLINK;, &cv-link-DLINKCOM;, &cv-link-DLINKFLAGPREFIX;, &cv-link-DLINKFLAGS;, &cv-link-DLINKFLAGSUFFIX;, &cv-link-DPATH;, &cv-link-DRPATHPREFIX;, &cv-link-DRPATHSUFFIX;, &cv-link-DShLibSonameGenerator;, &cv-link-DVERPREFIX;, &cv-link-DVERSIONS;, &cv-link-DVERSUFFIX;, &cv-link-SHDC;, &cv-link-SHDCOM;, &cv-link-SHDLIBVERSION;, &cv-link-SHDLIBVERSIONFLAGS;, &cv-link-SHDLINK;, &cv-link-SHDLINKCOM;, &cv-link-SHDLINKFLAGS;. +Sets: &cv-link-DC;, &cv-link-DCOM;, &cv-link-DDEBUG;, &cv-link-DDEBUGPREFIX;, &cv-link-DDEBUGSUFFIX;, &cv-link-DFILESUFFIX;, &cv-link-DFLAGPREFIX;, &cv-link-DFLAGS;, &cv-link-DFLAGSUFFIX;, &cv-link-DINCPREFIX;, &cv-link-DINCSUFFIX;, &cv-link-DLIB;, &cv-link-DLIBCOM;, &cv-link-DLIBDIRPREFIX;, &cv-link-DLIBDIRSUFFIX;, &cv-link-DLIBFLAGPREFIX;, &cv-link-DLIBFLAGSUFFIX;, &cv-link-DLIBLINKPREFIX;, &cv-link-DLIBLINKSUFFIX;, &cv-link-DLINK;, &cv-link-DLINKCOM;, &cv-link-DLINKFLAGPREFIX;, &cv-link-DLINKFLAGS;, &cv-link-DLINKFLAGSUFFIX;, &cv-link-DPATH;, &cv-link-DRPATHPREFIX;, &cv-link-DRPATHSUFFIX;, &cv-link-DShLibSonameGenerator;, &cv-link-DVERPREFIX;, &cv-link-DVERSIONS;, &cv-link-DVERSUFFIX;, &cv-link-SHDC;, &cv-link-SHDCOM;, &cv-link-SHDLIBVERSION;, &cv-link-SHDLIBVERSIONFLAGS;, &cv-link-SHDLINK;, &cv-link-SHDLINKCOM;, &cv-link-SHDLINKFLAGS;. gettext - - + This is actually a toolset, which supports internationalization and localization of software being constructed with SCons. The toolset loads following tools: - + - xgettext - to extract internationalized messages from source code to + xgettext - to extract internationalized messages from source code to POT file(s), - msginit - may be optionally used to initialize PO + msginit - may be optionally used to initialize PO files, - msgmerge - to update PO files, that already contain + msgmerge - to update PO files, that already contain translated messages, - msgfmt - to compile textual PO file to binary + msgfmt - to compile textual PO file to binary installable MO file. - -When you enable gettext, it internally loads all abovementioned tools, + +When you enable gettext, it internally loads all abovementioned tools, so you're encouraged to see their individual documentation. - + Each of the above tools provides its own builder(s) which may be used to perform particular activities related to software internationalization. You may be however interested in top-level builder -Translate described few paragraphs later. +Translate described few paragraphs later. - -To use gettext tools add 'gettext' tool to your + +To use gettext tools add 'gettext' tool to your environment: - + env = Environment( tools = ['default', 'gettext'] ) gfortran - - + Sets construction variables for the GNU F95/F2003 GNU compiler. -Sets: &cv-link-F77;, &cv-link-F90;, &cv-link-F95;, &cv-link-FORTRAN;, &cv-link-SHF77;, &cv-link-SHF77FLAGS;, &cv-link-SHF90;, &cv-link-SHF90FLAGS;, &cv-link-SHF95;, &cv-link-SHF95FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. +Sets: &cv-link-F77;, &cv-link-F90;, &cv-link-F95;, &cv-link-FORTRAN;, &cv-link-SHF77;, &cv-link-SHF77FLAGS;, &cv-link-SHF90;, &cv-link-SHF90FLAGS;, &cv-link-SHF95;, &cv-link-SHF95FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. gnulink - - + Set construction variables for GNU linker/loader. -Sets: &cv-link-LDMODULEVERSIONFLAGS;, &cv-link-RPATHPREFIX;, &cv-link-RPATHSUFFIX;, &cv-link-SHLIBVERSIONFLAGS;, &cv-link-SHLINKFLAGS;, &cv-link-_LDMODULESONAME;, &cv-link-_SHLIBSONAME;. +Sets: &cv-link-LDMODULEVERSIONFLAGS;, &cv-link-RPATHPREFIX;, &cv-link-RPATHSUFFIX;, &cv-link-SHLIBVERSIONFLAGS;, &cv-link-SHLINKFLAGS;, &cv-link-_LDMODULESONAME;, &cv-link-_SHLIBSONAME;. gs - - + This Tool sets the required construction variables for working with the Ghostscript command. It also registers an appropriate Action -with the PDF Builder (PDF), such that the conversion from +with the PDF Builder (PDF), such that the conversion from PS/EPS to PDF happens automatically for the TeX/LaTeX toolchain. -Finally, it adds an explicit Ghostscript Builder (Gs) to the +Finally, it adds an explicit Ghostscript Builder (Gs) to the environment. -Sets: &cv-link-GS;, &cv-link-GSCOM;, &cv-link-GSFLAGS;.Uses: &cv-link-GSCOMSTR;. +Sets: &cv-link-GS;, &cv-link-GSCOM;, &cv-link-GSFLAGS;.Uses: &cv-link-GSCOMSTR;. hpc++ - - + Set construction variables for the compilers aCC on HP/UX systems. hpcc - - + Set construction variables for the aCC on HP/UX systems. -Calls the cXX tool for additional variables. +Calls the cXX tool for additional variables. -Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXXFLAGS;. +Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXXFLAGS;. hplink - - + Sets construction variables for the linker on HP/UX systems. -Sets: &cv-link-LINKFLAGS;, &cv-link-SHLIBSUFFIX;, &cv-link-SHLINKFLAGS;. +Sets: &cv-link-LINKFLAGS;, &cv-link-SHLIBSUFFIX;, &cv-link-SHLINKFLAGS;. icc - - + Sets construction variables for the icc compiler on OS/2 systems. -Sets: &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CFILESUFFIX;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-CXXCOM;, &cv-link-CXXFILESUFFIX;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;.Uses: &cv-link-CCFLAGS;, &cv-link-CFLAGS;, &cv-link-CPPFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. +Sets: &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CFILESUFFIX;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-CXXCOM;, &cv-link-CXXFILESUFFIX;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;.Uses: &cv-link-CCFLAGS;, &cv-link-CFLAGS;, &cv-link-CPPFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. icl - - + Sets construction variables for the Intel C/C++ compiler. -Calls the intelc Tool module to set its variables. +Calls the intelc Tool module to set its variables. ifl - - + Sets construction variables for the Intel Fortran compiler. -Sets: &cv-link-FORTRAN;, &cv-link-FORTRANCOM;, &cv-link-FORTRANPPCOM;, &cv-link-SHFORTRANCOM;, &cv-link-SHFORTRANPPCOM;.Uses: &cv-link-CPPFLAGS;, &cv-link-FORTRANFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_FORTRANINCFLAGS;. +Sets: &cv-link-FORTRAN;, &cv-link-FORTRANCOM;, &cv-link-FORTRANPPCOM;, &cv-link-SHFORTRANCOM;, &cv-link-SHFORTRANPPCOM;.Uses: &cv-link-CPPFLAGS;, &cv-link-FORTRANFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_FORTRANINCFLAGS;. ifort - - + Sets construction variables for newer versions of the Intel Fortran compiler for Linux. -Sets: &cv-link-F77;, &cv-link-F90;, &cv-link-F95;, &cv-link-FORTRAN;, &cv-link-SHF77;, &cv-link-SHF77FLAGS;, &cv-link-SHF90;, &cv-link-SHF90FLAGS;, &cv-link-SHF95;, &cv-link-SHF95FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. +Sets: &cv-link-F77;, &cv-link-F90;, &cv-link-F95;, &cv-link-FORTRAN;, &cv-link-SHF77;, &cv-link-SHF77FLAGS;, &cv-link-SHF90;, &cv-link-SHF90FLAGS;, &cv-link-SHF95;, &cv-link-SHF95FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. ilink - - + Sets construction variables for the ilink linker on OS/2 systems. -Sets: &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;. +Sets: &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;. ilink32 - - + Sets construction variables for the Borland ilink32 linker. -Sets: &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;. +Sets: &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;. install - - + Sets construction variables for file and directory installation. -Sets: &cv-link-INSTALL;, &cv-link-INSTALLSTR;. +Sets: &cv-link-INSTALL;, &cv-link-INSTALLSTR;. intelc - - + Sets construction variables for the Intel C/C++ compiler (Linux and Windows, version 7 and later). -Calls the gcc or msvc +Calls the gcc or msvc (on Linux and Windows, respectively) to set underlying variables. -Sets: &cv-link-AR;, &cv-link-CC;, &cv-link-CXX;, &cv-link-INTEL_C_COMPILER_VERSION;, &cv-link-LINK;. +Sets: &cv-link-AR;, &cv-link-CC;, &cv-link-CXX;, &cv-link-INTEL_C_COMPILER_VERSION;, &cv-link-LINK;. jar - - -Sets construction variables for the jar utility. + +Sets construction variables for the jar utility. -Sets: &cv-link-JAR;, &cv-link-JARCOM;, &cv-link-JARFLAGS;, &cv-link-JARSUFFIX;.Uses: &cv-link-JARCOMSTR;. +Sets: &cv-link-JAR;, &cv-link-JARCOM;, &cv-link-JARFLAGS;, &cv-link-JARSUFFIX;.Uses: &cv-link-JARCOMSTR;. javac - - - Sets construction variables for the javac compiler. + + Sets construction variables for the javac compiler. - Sets: &cv-link-JAVABOOTCLASSPATH;, &cv-link-JAVAC;, &cv-link-JAVACCOM;, &cv-link-JAVACFLAGS;, &cv-link-JAVACLASSPATH;, &cv-link-JAVACLASSSUFFIX;, &cv-link-JAVAINCLUDES;, &cv-link-JAVASOURCEPATH;, &cv-link-JAVASUFFIX;.Uses: &cv-link-JAVACCOMSTR;. + Sets: &cv-link-JAVABOOTCLASSPATH;, &cv-link-JAVAC;, &cv-link-JAVACCOM;, &cv-link-JAVACFLAGS;, &cv-link-JAVACLASSPATH;, &cv-link-JAVACLASSSUFFIX;, &cv-link-JAVAINCLUDES;, &cv-link-JAVASOURCEPATH;, &cv-link-JAVASUFFIX;.Uses: &cv-link-JAVACCOMSTR;. javah - - -Sets construction variables for the javah tool. + +Sets construction variables for the javah tool. -Sets: &cv-link-JAVACLASSSUFFIX;, &cv-link-JAVAH;, &cv-link-JAVAHCOM;, &cv-link-JAVAHFLAGS;.Uses: &cv-link-JAVACLASSPATH;, &cv-link-JAVAHCOMSTR;. +Sets: &cv-link-JAVACLASSSUFFIX;, &cv-link-JAVAH;, &cv-link-JAVAHCOM;, &cv-link-JAVAHFLAGS;.Uses: &cv-link-JAVACLASSPATH;, &cv-link-JAVAHCOMSTR;. latex - - -Sets construction variables for the latex utility. + +Sets construction variables for the latex utility. -Sets: &cv-link-LATEX;, &cv-link-LATEXCOM;, &cv-link-LATEXFLAGS;.Uses: &cv-link-LATEXCOMSTR;. +Sets: &cv-link-LATEX;, &cv-link-LATEXCOM;, &cv-link-LATEXFLAGS;.Uses: &cv-link-LATEXCOMSTR;. ldc - - + Sets construction variables for the D language compiler LDC2. -Sets: &cv-link-DC;, &cv-link-DCOM;, &cv-link-DDEBUG;, &cv-link-DDEBUGPREFIX;, &cv-link-DDEBUGSUFFIX;, &cv-link-DFILESUFFIX;, &cv-link-DFLAGPREFIX;, &cv-link-DFLAGS;, &cv-link-DFLAGSUFFIX;, &cv-link-DINCPREFIX;, &cv-link-DINCSUFFIX;, &cv-link-DLIB;, &cv-link-DLIBCOM;, &cv-link-DLIBDIRPREFIX;, &cv-link-DLIBDIRSUFFIX;, &cv-link-DLIBFLAGPREFIX;, &cv-link-DLIBFLAGSUFFIX;, &cv-link-DLIBLINKPREFIX;, &cv-link-DLIBLINKSUFFIX;, &cv-link-DLINK;, &cv-link-DLINKCOM;, &cv-link-DLINKFLAGPREFIX;, &cv-link-DLINKFLAGS;, &cv-link-DLINKFLAGSUFFIX;, &cv-link-DPATH;, &cv-link-DRPATHPREFIX;, &cv-link-DRPATHSUFFIX;, &cv-link-DShLibSonameGenerator;, &cv-link-DVERPREFIX;, &cv-link-DVERSIONS;, &cv-link-DVERSUFFIX;, &cv-link-SHDC;, &cv-link-SHDCOM;, &cv-link-SHDLIBVERSION;, &cv-link-SHDLIBVERSIONFLAGS;, &cv-link-SHDLINK;, &cv-link-SHDLINKCOM;, &cv-link-SHDLINKFLAGS;. +Sets: &cv-link-DC;, &cv-link-DCOM;, &cv-link-DDEBUG;, &cv-link-DDEBUGPREFIX;, &cv-link-DDEBUGSUFFIX;, &cv-link-DFILESUFFIX;, &cv-link-DFLAGPREFIX;, &cv-link-DFLAGS;, &cv-link-DFLAGSUFFIX;, &cv-link-DINCPREFIX;, &cv-link-DINCSUFFIX;, &cv-link-DLIB;, &cv-link-DLIBCOM;, &cv-link-DLIBDIRPREFIX;, &cv-link-DLIBDIRSUFFIX;, &cv-link-DLIBFLAGPREFIX;, &cv-link-DLIBFLAGSUFFIX;, &cv-link-DLIBLINKPREFIX;, &cv-link-DLIBLINKSUFFIX;, &cv-link-DLINK;, &cv-link-DLINKCOM;, &cv-link-DLINKFLAGPREFIX;, &cv-link-DLINKFLAGS;, &cv-link-DLINKFLAGSUFFIX;, &cv-link-DPATH;, &cv-link-DRPATHPREFIX;, &cv-link-DRPATHSUFFIX;, &cv-link-DShLibSonameGenerator;, &cv-link-DVERPREFIX;, &cv-link-DVERSIONS;, &cv-link-DVERSUFFIX;, &cv-link-SHDC;, &cv-link-SHDCOM;, &cv-link-SHDLIBVERSION;, &cv-link-SHDLIBVERSIONFLAGS;, &cv-link-SHDLINK;, &cv-link-SHDLINKCOM;, &cv-link-SHDLINKFLAGS;. lex - - -Sets construction variables for the lex lexical analyser. + +Sets construction variables for the lex lexical analyser. -Sets: &cv-link-LEX;, &cv-link-LEXCOM;, &cv-link-LEXFLAGS;, &cv-link-LEXUNISTD;.Uses: &cv-link-LEXCOMSTR;. +Sets: &cv-link-LEX;, &cv-link-LEXCOM;, &cv-link-LEXFLAGS;, &cv-link-LEXUNISTD;.Uses: &cv-link-LEXCOMSTR;. link - - + Sets construction variables for generic POSIX linkers. This is a "smart" linker tool which selects a compiler to complete the linking based on the types of source files. -Sets: &cv-link-LDMODULE;, &cv-link-LDMODULECOM;, &cv-link-LDMODULEFLAGS;, &cv-link-LDMODULENOVERSIONSYMLINKS;, &cv-link-LDMODULEPREFIX;, &cv-link-LDMODULESUFFIX;, &cv-link-LDMODULEVERSION;, &cv-link-LDMODULEVERSIONFLAGS;, &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;, &cv-link-SHLIBSUFFIX;, &cv-link-SHLINK;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-__LDMODULEVERSIONFLAGS;, &cv-link-__SHLIBVERSIONFLAGS;.Uses: &cv-link-LDMODULECOMSTR;, &cv-link-LINKCOMSTR;, &cv-link-SHLINKCOMSTR;. +Sets: &cv-link-LDMODULE;, &cv-link-LDMODULECOM;, &cv-link-LDMODULEFLAGS;, &cv-link-LDMODULENOVERSIONSYMLINKS;, &cv-link-LDMODULEPREFIX;, &cv-link-LDMODULESUFFIX;, &cv-link-LDMODULEVERSION;, &cv-link-LDMODULEVERSIONFLAGS;, &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;, &cv-link-SHLIBSUFFIX;, &cv-link-SHLINK;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-__LDMODULEVERSIONFLAGS;, &cv-link-__SHLIBVERSIONFLAGS;.Uses: &cv-link-LDMODULECOMSTR;, &cv-link-LINKCOMSTR;, &cv-link-SHLINKCOMSTR;. linkloc - - + Sets construction variables for the LinkLoc linker for the Phar Lap ETS embedded operating system. -Sets: &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;, &cv-link-SHLINK;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;.Uses: &cv-link-LINKCOMSTR;, &cv-link-SHLINKCOMSTR;. +Sets: &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;, &cv-link-SHLINK;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;.Uses: &cv-link-LINKCOMSTR;, &cv-link-SHLINKCOMSTR;. m4 - - -Sets construction variables for the m4 macro processor. + +Sets construction variables for the m4 macro processor. -Sets: &cv-link-M4;, &cv-link-M4COM;, &cv-link-M4FLAGS;.Uses: &cv-link-M4COMSTR;. +Sets: &cv-link-M4;, &cv-link-M4COM;, &cv-link-M4FLAGS;.Uses: &cv-link-M4COMSTR;. masm - - + Sets construction variables for the Microsoft assembler. -Sets: &cv-link-AS;, &cv-link-ASCOM;, &cv-link-ASFLAGS;, &cv-link-ASPPCOM;, &cv-link-ASPPFLAGS;.Uses: &cv-link-ASCOMSTR;, &cv-link-ASPPCOMSTR;, &cv-link-CPPFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. +Sets: &cv-link-AS;, &cv-link-ASCOM;, &cv-link-ASFLAGS;, &cv-link-ASPPCOM;, &cv-link-ASPPFLAGS;.Uses: &cv-link-ASCOMSTR;, &cv-link-ASPPCOMSTR;, &cv-link-CPPFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. midl - - + Sets construction variables for the Microsoft IDL compiler. -Sets: &cv-link-MIDL;, &cv-link-MIDLCOM;, &cv-link-MIDLFLAGS;.Uses: &cv-link-MIDLCOMSTR;. +Sets: &cv-link-MIDL;, &cv-link-MIDLCOM;, &cv-link-MIDLFLAGS;.Uses: &cv-link-MIDLCOMSTR;. mingw - - + Sets construction variables for MinGW (Minimal Gnu on Windows). -Sets: &cv-link-AS;, &cv-link-CC;, &cv-link-CXX;, &cv-link-LDMODULECOM;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;, &cv-link-OBJSUFFIX;, &cv-link-RC;, &cv-link-RCCOM;, &cv-link-RCFLAGS;, &cv-link-RCINCFLAGS;, &cv-link-RCINCPREFIX;, &cv-link-RCINCSUFFIX;, &cv-link-SHCCFLAGS;, &cv-link-SHCXXFLAGS;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-SHOBJSUFFIX;, &cv-link-WINDOWSDEFPREFIX;, &cv-link-WINDOWSDEFSUFFIX;.Uses: &cv-link-RCCOMSTR;, &cv-link-SHLINKCOMSTR;. +Sets: &cv-link-AS;, &cv-link-CC;, &cv-link-CXX;, &cv-link-LDMODULECOM;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;, &cv-link-OBJSUFFIX;, &cv-link-RC;, &cv-link-RCCOM;, &cv-link-RCFLAGS;, &cv-link-RCINCFLAGS;, &cv-link-RCINCPREFIX;, &cv-link-RCINCSUFFIX;, &cv-link-SHCCFLAGS;, &cv-link-SHCXXFLAGS;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-SHOBJSUFFIX;, &cv-link-WINDOWSDEFPREFIX;, &cv-link-WINDOWSDEFSUFFIX;.Uses: &cv-link-RCCOMSTR;, &cv-link-SHLINKCOMSTR;. msgfmt - - -This scons tool is a part of scons gettext toolset. It provides scons + +This scons tool is a part of scons gettext toolset. It provides scons interface to msgfmt(1) command, which generates binary message catalog (MO) from a textual translation description (PO). -Sets: &cv-link-MOSUFFIX;, &cv-link-MSGFMT;, &cv-link-MSGFMTCOM;, &cv-link-MSGFMTCOMSTR;, &cv-link-MSGFMTFLAGS;, &cv-link-POSUFFIX;.Uses: &cv-link-LINGUAS_FILE;. +Sets: &cv-link-MOSUFFIX;, &cv-link-MSGFMT;, &cv-link-MSGFMTCOM;, &cv-link-MSGFMTCOMSTR;, &cv-link-MSGFMTFLAGS;, &cv-link-POSUFFIX;.Uses: &cv-link-LINGUAS_FILE;. msginit - - -This scons tool is a part of scons gettext toolset. It provides + +This scons tool is a part of scons gettext toolset. It provides scons interface to msginit(1) program, which creates new PO file, initializing the meta information with values from user's environment (or options). -Sets: &cv-link-MSGINIT;, &cv-link-MSGINITCOM;, &cv-link-MSGINITCOMSTR;, &cv-link-MSGINITFLAGS;, &cv-link-POAUTOINIT;, &cv-link-POCREATE_ALIAS;, &cv-link-POSUFFIX;, &cv-link-POTSUFFIX;, &cv-link-_MSGINITLOCALE;.Uses: &cv-link-LINGUAS_FILE;, &cv-link-POAUTOINIT;, &cv-link-POTDOMAIN;. +Sets: &cv-link-MSGINIT;, &cv-link-MSGINITCOM;, &cv-link-MSGINITCOMSTR;, &cv-link-MSGINITFLAGS;, &cv-link-POAUTOINIT;, &cv-link-POCREATE_ALIAS;, &cv-link-POSUFFIX;, &cv-link-POTSUFFIX;, &cv-link-_MSGINITLOCALE;.Uses: &cv-link-LINGUAS_FILE;, &cv-link-POAUTOINIT;, &cv-link-POTDOMAIN;. msgmerge - - -This scons tool is a part of scons gettext toolset. It provides + +This scons tool is a part of scons gettext toolset. It provides scons interface to msgmerge(1) command, which merges two Uniform style .po files together. -Sets: &cv-link-MSGMERGE;, &cv-link-MSGMERGECOM;, &cv-link-MSGMERGECOMSTR;, &cv-link-MSGMERGEFLAGS;, &cv-link-POSUFFIX;, &cv-link-POTSUFFIX;, &cv-link-POUPDATE_ALIAS;.Uses: &cv-link-LINGUAS_FILE;, &cv-link-POAUTOINIT;, &cv-link-POTDOMAIN;. +Sets: &cv-link-MSGMERGE;, &cv-link-MSGMERGECOM;, &cv-link-MSGMERGECOMSTR;, &cv-link-MSGMERGEFLAGS;, &cv-link-POSUFFIX;, &cv-link-POTSUFFIX;, &cv-link-POUPDATE_ALIAS;.Uses: &cv-link-LINGUAS_FILE;, &cv-link-POAUTOINIT;, &cv-link-POTDOMAIN;. mslib - - + Sets construction variables for the Microsoft mslib library archiver. -Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;.Uses: &cv-link-ARCOMSTR;. +Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;.Uses: &cv-link-ARCOMSTR;. mslink - - + Sets construction variables for the Microsoft linker. -Sets: &cv-link-LDMODULE;, &cv-link-LDMODULECOM;, &cv-link-LDMODULEFLAGS;, &cv-link-LDMODULEPREFIX;, &cv-link-LDMODULESUFFIX;, &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;, &cv-link-REGSVR;, &cv-link-REGSVRCOM;, &cv-link-REGSVRFLAGS;, &cv-link-SHLINK;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-WIN32DEFPREFIX;, &cv-link-WIN32DEFSUFFIX;, &cv-link-WIN32EXPPREFIX;, &cv-link-WIN32EXPSUFFIX;, &cv-link-WINDOWSDEFPREFIX;, &cv-link-WINDOWSDEFSUFFIX;, &cv-link-WINDOWSEXPPREFIX;, &cv-link-WINDOWSEXPSUFFIX;, &cv-link-WINDOWSPROGMANIFESTPREFIX;, &cv-link-WINDOWSPROGMANIFESTSUFFIX;, &cv-link-WINDOWSSHLIBMANIFESTPREFIX;, &cv-link-WINDOWSSHLIBMANIFESTSUFFIX;, &cv-link-WINDOWS_INSERT_DEF;.Uses: &cv-link-LDMODULECOMSTR;, &cv-link-LINKCOMSTR;, &cv-link-REGSVRCOMSTR;, &cv-link-SHLINKCOMSTR;. +Sets: &cv-link-LDMODULE;, &cv-link-LDMODULECOM;, &cv-link-LDMODULEFLAGS;, &cv-link-LDMODULEPREFIX;, &cv-link-LDMODULESUFFIX;, &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;, &cv-link-REGSVR;, &cv-link-REGSVRCOM;, &cv-link-REGSVRFLAGS;, &cv-link-SHLINK;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-WIN32DEFPREFIX;, &cv-link-WIN32DEFSUFFIX;, &cv-link-WIN32EXPPREFIX;, &cv-link-WIN32EXPSUFFIX;, &cv-link-WINDOWSDEFPREFIX;, &cv-link-WINDOWSDEFSUFFIX;, &cv-link-WINDOWSEXPPREFIX;, &cv-link-WINDOWSEXPSUFFIX;, &cv-link-WINDOWSPROGMANIFESTPREFIX;, &cv-link-WINDOWSPROGMANIFESTSUFFIX;, &cv-link-WINDOWSSHLIBMANIFESTPREFIX;, &cv-link-WINDOWSSHLIBMANIFESTSUFFIX;, &cv-link-WINDOWS_INSERT_DEF;.Uses: &cv-link-LDMODULECOMSTR;, &cv-link-LINKCOMSTR;, &cv-link-REGSVRCOMSTR;, &cv-link-SHLINKCOMSTR;. mssdk - - + Sets variables for Microsoft Platform SDK and/or Windows SDK. Note that unlike most other Tool modules, mssdk does not set construction variables, but sets the environment variables -in the environment SCons uses to execute +in the environment SCons uses to execute the Microsoft toolchain: %INCLUDE%, %LIB%, %LIBPATH% and %PATH%. -Uses: &cv-link-MSSDK_DIR;, &cv-link-MSSDK_VERSION;, &cv-link-MSVS_VERSION;. +Uses: &cv-link-MSSDK_DIR;, &cv-link-MSSDK_VERSION;, &cv-link-MSVS_VERSION;. msvc - - + Sets construction variables for the Microsoft Visual C/C++ compiler. -Sets: &cv-link-BUILDERS;, &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CCFLAGS;, &cv-link-CCPCHFLAGS;, &cv-link-CCPDBFLAGS;, &cv-link-CFILESUFFIX;, &cv-link-CFLAGS;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-CXX;, &cv-link-CXXCOM;, &cv-link-CXXFILESUFFIX;, &cv-link-CXXFLAGS;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-OBJPREFIX;, &cv-link-OBJSUFFIX;, &cv-link-PCHCOM;, &cv-link-PCHPDBFLAGS;, &cv-link-RC;, &cv-link-RCCOM;, &cv-link-RCFLAGS;, &cv-link-SHCC;, &cv-link-SHCCCOM;, &cv-link-SHCCFLAGS;, &cv-link-SHCFLAGS;, &cv-link-SHCXX;, &cv-link-SHCXXCOM;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJPREFIX;, &cv-link-SHOBJSUFFIX;.Uses: &cv-link-CCCOMSTR;, &cv-link-CXXCOMSTR;, &cv-link-PCH;, &cv-link-PCHSTOP;, &cv-link-PDB;, &cv-link-SHCCCOMSTR;, &cv-link-SHCXXCOMSTR;. +Sets: &cv-link-BUILDERS;, &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CCFLAGS;, &cv-link-CCPCHFLAGS;, &cv-link-CCPDBFLAGS;, &cv-link-CFILESUFFIX;, &cv-link-CFLAGS;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-CXX;, &cv-link-CXXCOM;, &cv-link-CXXFILESUFFIX;, &cv-link-CXXFLAGS;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-OBJPREFIX;, &cv-link-OBJSUFFIX;, &cv-link-PCHCOM;, &cv-link-PCHPDBFLAGS;, &cv-link-RC;, &cv-link-RCCOM;, &cv-link-RCFLAGS;, &cv-link-SHCC;, &cv-link-SHCCCOM;, &cv-link-SHCCFLAGS;, &cv-link-SHCFLAGS;, &cv-link-SHCXX;, &cv-link-SHCXXCOM;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJPREFIX;, &cv-link-SHOBJSUFFIX;.Uses: &cv-link-CCCOMSTR;, &cv-link-CXXCOMSTR;, &cv-link-PCH;, &cv-link-PCHSTOP;, &cv-link-PDB;, &cv-link-SHCCCOMSTR;, &cv-link-SHCXXCOMSTR;. msvs - - Sets construction variables for Microsoft Visual Studio. - Sets: &cv-link-MSVSBUILDCOM;, &cv-link-MSVSCLEANCOM;, &cv-link-MSVSENCODING;, &cv-link-MSVSPROJECTCOM;, &cv-link-MSVSREBUILDCOM;, &cv-link-MSVSSCONS;, &cv-link-MSVSSCONSCOM;, &cv-link-MSVSSCONSCRIPT;, &cv-link-MSVSSCONSFLAGS;, &cv-link-MSVSSOLUTIONCOM;. + Sets construction variables for Microsoft Visual Studio. + Sets: &cv-link-MSVSBUILDCOM;, &cv-link-MSVSCLEANCOM;, &cv-link-MSVSENCODING;, &cv-link-MSVSPROJECTCOM;, &cv-link-MSVSREBUILDCOM;, &cv-link-MSVSSCONS;, &cv-link-MSVSSCONSCOM;, &cv-link-MSVSSCONSCRIPT;, &cv-link-MSVSSCONSFLAGS;, &cv-link-MSVSSOLUTIONCOM;. mwcc - - + Sets construction variables for the Metrowerks CodeWarrior compiler. -Sets: &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CFILESUFFIX;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-CXX;, &cv-link-CXXCOM;, &cv-link-CXXFILESUFFIX;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-MWCW_VERSION;, &cv-link-MWCW_VERSIONS;, &cv-link-SHCC;, &cv-link-SHCCCOM;, &cv-link-SHCCFLAGS;, &cv-link-SHCFLAGS;, &cv-link-SHCXX;, &cv-link-SHCXXCOM;, &cv-link-SHCXXFLAGS;.Uses: &cv-link-CCCOMSTR;, &cv-link-CXXCOMSTR;, &cv-link-SHCCCOMSTR;, &cv-link-SHCXXCOMSTR;. +Sets: &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CFILESUFFIX;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-CXX;, &cv-link-CXXCOM;, &cv-link-CXXFILESUFFIX;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-MWCW_VERSION;, &cv-link-MWCW_VERSIONS;, &cv-link-SHCC;, &cv-link-SHCCCOM;, &cv-link-SHCCFLAGS;, &cv-link-SHCFLAGS;, &cv-link-SHCXX;, &cv-link-SHCXXCOM;, &cv-link-SHCXXFLAGS;.Uses: &cv-link-CCCOMSTR;, &cv-link-CXXCOMSTR;, &cv-link-SHCCCOMSTR;, &cv-link-SHCXXCOMSTR;. mwld - - + Sets construction variables for the Metrowerks CodeWarrior linker. -Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-SHLINK;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;. +Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-SHLINK;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;. nasm - - + Sets construction variables for the nasm Netwide Assembler. -Sets: &cv-link-AS;, &cv-link-ASCOM;, &cv-link-ASFLAGS;, &cv-link-ASPPCOM;, &cv-link-ASPPFLAGS;.Uses: &cv-link-ASCOMSTR;, &cv-link-ASPPCOMSTR;. - - - Packaging - - -Sets construction variables for the Package Builder. - - +Sets: &cv-link-AS;, &cv-link-ASCOM;, &cv-link-ASFLAGS;, &cv-link-ASPPCOM;, &cv-link-ASPPFLAGS;.Uses: &cv-link-ASCOMSTR;, &cv-link-ASPPCOMSTR;. packaging - - + A framework for building binary and source packages. + + Packaging + +Sets construction variables for the Package Builder. + + + pdf - - + Sets construction variables for the Portable Document Format builder. -Sets: &cv-link-PDFPREFIX;, &cv-link-PDFSUFFIX;. +Sets: &cv-link-PDFPREFIX;, &cv-link-PDFSUFFIX;. pdflatex - - -Sets construction variables for the pdflatex utility. + +Sets construction variables for the pdflatex utility. -Sets: &cv-link-LATEXRETRIES;, &cv-link-PDFLATEX;, &cv-link-PDFLATEXCOM;, &cv-link-PDFLATEXFLAGS;.Uses: &cv-link-PDFLATEXCOMSTR;. +Sets: &cv-link-LATEXRETRIES;, &cv-link-PDFLATEX;, &cv-link-PDFLATEXCOM;, &cv-link-PDFLATEXFLAGS;.Uses: &cv-link-PDFLATEXCOMSTR;. pdftex - - -Sets construction variables for the pdftex utility. + +Sets construction variables for the pdftex utility. -Sets: &cv-link-LATEXRETRIES;, &cv-link-PDFLATEX;, &cv-link-PDFLATEXCOM;, &cv-link-PDFLATEXFLAGS;, &cv-link-PDFTEX;, &cv-link-PDFTEXCOM;, &cv-link-PDFTEXFLAGS;.Uses: &cv-link-PDFLATEXCOMSTR;, &cv-link-PDFTEXCOMSTR;. +Sets: &cv-link-LATEXRETRIES;, &cv-link-PDFLATEX;, &cv-link-PDFLATEXCOM;, &cv-link-PDFLATEXFLAGS;, &cv-link-PDFTEX;, &cv-link-PDFTEXCOM;, &cv-link-PDFTEXFLAGS;.Uses: &cv-link-PDFLATEXCOMSTR;, &cv-link-PDFTEXCOMSTR;. qt - - + Sets construction variables for building Qt applications. -Sets: &cv-link-QTDIR;, &cv-link-QT_AUTOSCAN;, &cv-link-QT_BINPATH;, &cv-link-QT_CPPPATH;, &cv-link-QT_LIB;, &cv-link-QT_LIBPATH;, &cv-link-QT_MOC;, &cv-link-QT_MOCCXXPREFIX;, &cv-link-QT_MOCCXXSUFFIX;, &cv-link-QT_MOCFROMCXXCOM;, &cv-link-QT_MOCFROMCXXFLAGS;, &cv-link-QT_MOCFROMHCOM;, &cv-link-QT_MOCFROMHFLAGS;, &cv-link-QT_MOCHPREFIX;, &cv-link-QT_MOCHSUFFIX;, &cv-link-QT_UIC;, &cv-link-QT_UICCOM;, &cv-link-QT_UICDECLFLAGS;, &cv-link-QT_UICDECLPREFIX;, &cv-link-QT_UICDECLSUFFIX;, &cv-link-QT_UICIMPLFLAGS;, &cv-link-QT_UICIMPLPREFIX;, &cv-link-QT_UICIMPLSUFFIX;, &cv-link-QT_UISUFFIX;. +Sets: &cv-link-QTDIR;, &cv-link-QT_AUTOSCAN;, &cv-link-QT_BINPATH;, &cv-link-QT_CPPPATH;, &cv-link-QT_LIB;, &cv-link-QT_LIBPATH;, &cv-link-QT_MOC;, &cv-link-QT_MOCCXXPREFIX;, &cv-link-QT_MOCCXXSUFFIX;, &cv-link-QT_MOCFROMCXXCOM;, &cv-link-QT_MOCFROMCXXFLAGS;, &cv-link-QT_MOCFROMHCOM;, &cv-link-QT_MOCFROMHFLAGS;, &cv-link-QT_MOCHPREFIX;, &cv-link-QT_MOCHSUFFIX;, &cv-link-QT_UIC;, &cv-link-QT_UICCOM;, &cv-link-QT_UICDECLFLAGS;, &cv-link-QT_UICDECLPREFIX;, &cv-link-QT_UICDECLSUFFIX;, &cv-link-QT_UICIMPLFLAGS;, &cv-link-QT_UICIMPLPREFIX;, &cv-link-QT_UICIMPLSUFFIX;, &cv-link-QT_UISUFFIX;. rmic - - -Sets construction variables for the rmic utility. + +Sets construction variables for the rmic utility. -Sets: &cv-link-JAVACLASSSUFFIX;, &cv-link-RMIC;, &cv-link-RMICCOM;, &cv-link-RMICFLAGS;.Uses: &cv-link-RMICCOMSTR;. +Sets: &cv-link-JAVACLASSSUFFIX;, &cv-link-RMIC;, &cv-link-RMICCOM;, &cv-link-RMICFLAGS;.Uses: &cv-link-RMICCOMSTR;. rpcgen - - + Sets construction variables for building with RPCGEN. -Sets: &cv-link-RPCGEN;, &cv-link-RPCGENCLIENTFLAGS;, &cv-link-RPCGENFLAGS;, &cv-link-RPCGENHEADERFLAGS;, &cv-link-RPCGENSERVICEFLAGS;, &cv-link-RPCGENXDRFLAGS;. +Sets: &cv-link-RPCGEN;, &cv-link-RPCGENCLIENTFLAGS;, &cv-link-RPCGENFLAGS;, &cv-link-RPCGENHEADERFLAGS;, &cv-link-RPCGENSERVICEFLAGS;, &cv-link-RPCGENXDRFLAGS;. sgiar - - + Sets construction variables for the SGI library archiver. -Sets: &cv-link-AR;, &cv-link-ARCOMSTR;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;, &cv-link-SHLINK;, &cv-link-SHLINKFLAGS;.Uses: &cv-link-ARCOMSTR;, &cv-link-SHLINKCOMSTR;. +Sets: &cv-link-AR;, &cv-link-ARCOMSTR;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;, &cv-link-SHLINK;, &cv-link-SHLINKFLAGS;.Uses: &cv-link-ARCOMSTR;, &cv-link-SHLINKCOMSTR;. sgic++ - - + Sets construction variables for the SGI C++ compiler. -Sets: &cv-link-CXX;, &cv-link-CXXFLAGS;, &cv-link-SHCXX;, &cv-link-SHOBJSUFFIX;. +Sets: &cv-link-CXX;, &cv-link-CXXFLAGS;, &cv-link-SHCXX;, &cv-link-SHOBJSUFFIX;. sgicc - - + Sets construction variables for the SGI C compiler. -Sets: &cv-link-CXX;, &cv-link-SHOBJSUFFIX;. +Sets: &cv-link-CXX;, &cv-link-SHOBJSUFFIX;. sgilink - - + Sets construction variables for the SGI linker. -Sets: &cv-link-LINK;, &cv-link-RPATHPREFIX;, &cv-link-RPATHSUFFIX;, &cv-link-SHLINKFLAGS;. +Sets: &cv-link-LINK;, &cv-link-RPATHPREFIX;, &cv-link-RPATHSUFFIX;, &cv-link-SHLINKFLAGS;. sunar - - + Sets construction variables for the Sun library archiver. -Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;.Uses: &cv-link-ARCOMSTR;. +Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;.Uses: &cv-link-ARCOMSTR;. sunc++ - - + Sets construction variables for the Sun C++ compiler. -Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXX;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJPREFIX;, &cv-link-SHOBJSUFFIX;. +Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXX;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJPREFIX;, &cv-link-SHOBJSUFFIX;. suncc - - + Sets construction variables for the Sun C compiler. -Sets: &cv-link-CXX;, &cv-link-SHCCFLAGS;, &cv-link-SHOBJPREFIX;, &cv-link-SHOBJSUFFIX;. +Sets: &cv-link-CXX;, &cv-link-SHCCFLAGS;, &cv-link-SHOBJPREFIX;, &cv-link-SHOBJSUFFIX;. sunf77 - - -Set construction variables for the Sun f77 Fortran compiler. + +Set construction variables for the Sun f77 Fortran compiler. -Sets: &cv-link-F77;, &cv-link-FORTRAN;, &cv-link-SHF77;, &cv-link-SHF77FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. +Sets: &cv-link-F77;, &cv-link-FORTRAN;, &cv-link-SHF77;, &cv-link-SHF77FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. sunf90 - - -Set construction variables for the Sun f90 Fortran compiler. + +Set construction variables for the Sun f90 Fortran compiler. -Sets: &cv-link-F90;, &cv-link-FORTRAN;, &cv-link-SHF90;, &cv-link-SHF90FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. +Sets: &cv-link-F90;, &cv-link-FORTRAN;, &cv-link-SHF90;, &cv-link-SHF90FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. sunf95 - - -Set construction variables for the Sun f95 Fortran compiler. + +Set construction variables for the Sun f95 Fortran compiler. -Sets: &cv-link-F95;, &cv-link-FORTRAN;, &cv-link-SHF95;, &cv-link-SHF95FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. +Sets: &cv-link-F95;, &cv-link-FORTRAN;, &cv-link-SHF95;, &cv-link-SHF95FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. sunlink - - + Sets construction variables for the Sun linker. -Sets: &cv-link-RPATHPREFIX;, &cv-link-RPATHSUFFIX;, &cv-link-SHLINKFLAGS;. +Sets: &cv-link-RPATHPREFIX;, &cv-link-RPATHSUFFIX;, &cv-link-SHLINKFLAGS;. swig - - + Sets construction variables for the SWIG interface generator. -Sets: &cv-link-SWIG;, &cv-link-SWIGCFILESUFFIX;, &cv-link-SWIGCOM;, &cv-link-SWIGCXXFILESUFFIX;, &cv-link-SWIGDIRECTORSUFFIX;, &cv-link-SWIGFLAGS;, &cv-link-SWIGINCPREFIX;, &cv-link-SWIGINCSUFFIX;, &cv-link-SWIGPATH;, &cv-link-SWIGVERSION;, &cv-link-_SWIGINCFLAGS;.Uses: &cv-link-SWIGCOMSTR;. +Sets: &cv-link-SWIG;, &cv-link-SWIGCFILESUFFIX;, &cv-link-SWIGCOM;, &cv-link-SWIGCXXFILESUFFIX;, &cv-link-SWIGDIRECTORSUFFIX;, &cv-link-SWIGFLAGS;, &cv-link-SWIGINCPREFIX;, &cv-link-SWIGINCSUFFIX;, &cv-link-SWIGPATH;, &cv-link-SWIGVERSION;, &cv-link-_SWIGINCFLAGS;.Uses: &cv-link-SWIGCOMSTR;. tar - - -Sets construction variables for the tar archiver. + +Sets construction variables for the tar archiver. -Sets: &cv-link-TAR;, &cv-link-TARCOM;, &cv-link-TARFLAGS;, &cv-link-TARSUFFIX;.Uses: &cv-link-TARCOMSTR;. +Sets: &cv-link-TAR;, &cv-link-TARCOM;, &cv-link-TARFLAGS;, &cv-link-TARSUFFIX;.Uses: &cv-link-TARCOMSTR;. tex - - + Sets construction variables for the TeX formatter and typesetter. -Sets: &cv-link-BIBTEX;, &cv-link-BIBTEXCOM;, &cv-link-BIBTEXFLAGS;, &cv-link-LATEX;, &cv-link-LATEXCOM;, &cv-link-LATEXFLAGS;, &cv-link-MAKEINDEX;, &cv-link-MAKEINDEXCOM;, &cv-link-MAKEINDEXFLAGS;, &cv-link-TEX;, &cv-link-TEXCOM;, &cv-link-TEXFLAGS;.Uses: &cv-link-BIBTEXCOMSTR;, &cv-link-LATEXCOMSTR;, &cv-link-MAKEINDEXCOMSTR;, &cv-link-TEXCOMSTR;. +Sets: &cv-link-BIBTEX;, &cv-link-BIBTEXCOM;, &cv-link-BIBTEXFLAGS;, &cv-link-LATEX;, &cv-link-LATEXCOM;, &cv-link-LATEXFLAGS;, &cv-link-MAKEINDEX;, &cv-link-MAKEINDEXCOM;, &cv-link-MAKEINDEXFLAGS;, &cv-link-TEX;, &cv-link-TEXCOM;, &cv-link-TEXFLAGS;.Uses: &cv-link-BIBTEXCOMSTR;, &cv-link-LATEXCOMSTR;, &cv-link-MAKEINDEXCOMSTR;, &cv-link-TEXCOMSTR;. textfile - - -Set construction variables for the Textfile and Substfile builders. + +Set construction variables for the Textfile and Substfile builders. -Sets: &cv-link-LINESEPARATOR;, &cv-link-SUBSTFILEPREFIX;, &cv-link-SUBSTFILESUFFIX;, &cv-link-TEXTFILEPREFIX;, &cv-link-TEXTFILESUFFIX;.Uses: &cv-link-SUBST_DICT;. +Sets: &cv-link-LINESEPARATOR;, &cv-link-SUBSTFILEPREFIX;, &cv-link-SUBSTFILESUFFIX;, &cv-link-TEXTFILEPREFIX;, &cv-link-TEXTFILESUFFIX;.Uses: &cv-link-SUBST_DICT;. tlib - - + Sets construction variables for the Borlan tib library archiver. -Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;.Uses: &cv-link-ARCOMSTR;. +Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;.Uses: &cv-link-ARCOMSTR;. xgettext - - -This scons tool is a part of scons gettext toolset. It provides + +This scons tool is a part of scons gettext toolset. It provides scons interface to xgettext(1) program, which extracts internationalized messages from source code. The tool -provides POTUpdate builder to make PO +provides POTUpdate builder to make PO Template files. -Sets: &cv-link-POTSUFFIX;, &cv-link-POTUPDATE_ALIAS;, &cv-link-XGETTEXTCOM;, &cv-link-XGETTEXTCOMSTR;, &cv-link-XGETTEXTFLAGS;, &cv-link-XGETTEXTFROM;, &cv-link-XGETTEXTFROMPREFIX;, &cv-link-XGETTEXTFROMSUFFIX;, &cv-link-XGETTEXTPATH;, &cv-link-XGETTEXTPATHPREFIX;, &cv-link-XGETTEXTPATHSUFFIX;, &cv-link-_XGETTEXTDOMAIN;, &cv-link-_XGETTEXTFROMFLAGS;, &cv-link-_XGETTEXTPATHFLAGS;.Uses: &cv-link-POTDOMAIN;. +Sets: &cv-link-POTSUFFIX;, &cv-link-POTUPDATE_ALIAS;, &cv-link-XGETTEXTCOM;, &cv-link-XGETTEXTCOMSTR;, &cv-link-XGETTEXTFLAGS;, &cv-link-XGETTEXTFROM;, &cv-link-XGETTEXTFROMPREFIX;, &cv-link-XGETTEXTFROMSUFFIX;, &cv-link-XGETTEXTPATH;, &cv-link-XGETTEXTPATHPREFIX;, &cv-link-XGETTEXTPATHSUFFIX;, &cv-link-_XGETTEXTDOMAIN;, &cv-link-_XGETTEXTFROMFLAGS;, &cv-link-_XGETTEXTPATHFLAGS;.Uses: &cv-link-POTDOMAIN;. yacc - - -Sets construction variables for the yacc parse generator. + +Sets construction variables for the yacc parse generator. -Sets: &cv-link-YACC;, &cv-link-YACCCOM;, &cv-link-YACCFLAGS;, &cv-link-YACCHFILESUFFIX;, &cv-link-YACCHXXFILESUFFIX;, &cv-link-YACCVCGFILESUFFIX;.Uses: &cv-link-YACCCOMSTR;. +Sets: &cv-link-YACC;, &cv-link-YACCCOM;, &cv-link-YACCFLAGS;, &cv-link-YACCHFILESUFFIX;, &cv-link-YACCHXXFILESUFFIX;, &cv-link-YACCVCGFILESUFFIX;.Uses: &cv-link-YACCCOMSTR;. zip - - -Sets construction variables for the zip archiver. + +Sets construction variables for the zip archiver. -Sets: &cv-link-ZIP;, &cv-link-ZIPCOM;, &cv-link-ZIPCOMPRESSION;, &cv-link-ZIPFLAGS;, &cv-link-ZIPSUFFIX;.Uses: &cv-link-ZIPCOMSTR;. +Sets: &cv-link-ZIP;, &cv-link-ZIPCOM;, &cv-link-ZIPCOMPRESSION;, &cv-link-ZIPFLAGS;, &cv-link-ZIPSUFFIX;.Uses: &cv-link-ZIPCOMSTR;. diff --git a/doc/generated/tools.mod b/doc/generated/tools.mod index 1209d74..f9bc1d7 100644 --- a/doc/generated/tools.mod +++ b/doc/generated/tools.mod @@ -78,8 +78,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. mwcc"> mwld"> nasm"> -Packaging"> packaging"> +Packaging"> pdf"> pdflatex"> pdftex"> @@ -186,8 +186,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. mwcc"> mwld"> nasm"> -Packaging"> packaging"> +Packaging"> pdf"> pdflatex"> pdftex"> diff --git a/doc/generated/variables.gen b/doc/generated/variables.gen index 8f09512..db4c416 100644 --- a/doc/generated/variables.gen +++ b/doc/generated/variables.gen @@ -1,4 +1,3 @@ - %scons; @@ -12,125 +11,115 @@ %variables-mod; ]> - + __LDMODULEVERSIONFLAGS - - -This construction variable automatically introduces $_LDMODULEVERSIONFLAGS -if $LDMODULEVERSION is set. Othervise it evaluates to an empty string. + +This construction variable automatically introduces $_LDMODULEVERSIONFLAGS +if $LDMODULEVERSION is set. Othervise it evaluates to an empty string. __SHLIBVERSIONFLAGS - - -This construction variable automatically introduces $_SHLIBVERSIONFLAGS -if $SHLIBVERSION is set. Othervise it evaluates to an empty string. + +This construction variable automatically introduces $_SHLIBVERSIONFLAGS +if $SHLIBVERSION is set. Othervise it evaluates to an empty string. - - _APPLELINK_COMPATIBILITY_VERSION - - - A macro (by default a generator function) used to create the linker flags to specify - apple's linker's -compatibility_version flag. - The default generator uses $APPLELINK_COMPATIBILITY_VERSION - and $APPLELINK_NO_COMPATIBILITY_VERSION and $SHLIBVERSION - to determine the correct flag. - - - APPLELINK_COMPATIBILITY_VERSION - - + On Mac OS X this is used to set the linker flag: -compatibility_version - + The value is specified as X[.Y[.Z]] where X is between 1 and 65535, Y can be omitted or between 1 and - 255, Z can be omitted or between 1 and 255. This value will be derived from $SHLIBVERSION if + 255, Z can be omitted or between 1 and 255. This value will be derived from $SHLIBVERSION if not specified. The lowest digit will be dropped and replaced by a 0. - - If the $APPLELINK_NO_COMPATIBILITY_VERSION is set then no -compatibility_version will be + + If the $APPLELINK_NO_COMPATIBILITY_VERSION is set then no -compatibility_version will be output. - See MacOS's ld manpage for more details + See MacOS's ld manpage for more details - - _APPLELINK_CURRENT_VERSION - - - A macro (by default a generator function) used to create the linker flags to specify apple's linker's - -current_version flag. The default generator uses $APPLELINK_CURRENT_VERSION and - $APPLELINK_NO_CURRENT_VERSION and $SHLIBVERSION to determine the correct flag. + + _APPLELINK_COMPATIBILITY_VERSION + + A macro (by default a generator function) used to create the linker flags to specify + apple's linker's -compatibility_version flag. + The default generator uses $APPLELINK_COMPATIBILITY_VERSION + and $APPLELINK_NO_COMPATIBILITY_VERSION and $SHLIBVERSION + to determine the correct flag. APPLELINK_CURRENT_VERSION - - + On Mac OS X this is used to set the linker flag: -current_version - + The value is specified as X[.Y[.Z]] where X is between 1 and 65535, Y can be omitted or between 1 and - 255, Z can be omitted or between 1 and 255. This value will be set to $SHLIBVERSION if not + 255, Z can be omitted or between 1 and 255. This value will be set to $SHLIBVERSION if not specified. - - If the $APPLELINK_NO_CURRENT_VERSION is set then no -current_version will be + + If the $APPLELINK_NO_CURRENT_VERSION is set then no -current_version will be output. - See MacOS's ld manpage for more details + See MacOS's ld manpage for more details + + _APPLELINK_CURRENT_VERSION + + A macro (by default a generator function) used to create the linker flags to specify apple's linker's + -current_version flag. The default generator uses $APPLELINK_CURRENT_VERSION and + $APPLELINK_NO_CURRENT_VERSION and $SHLIBVERSION to determine the correct flag. + + + APPLELINK_NO_COMPATIBILITY_VERSION - - + Set this to any True (1|True|non-empty string) value to disable adding -compatibility_version flag when generating versioned shared libraries. - - This overrides $APPLELINK_COMPATIBILITY_VERSION. + + This overrides $APPLELINK_COMPATIBILITY_VERSION. APPLELINK_NO_CURRENT_VERSION - - + Set this to any True (1|True|non-empty string) value to disable adding -current_version flag when generating versioned shared libraries. - - This overrides $APPLELINK_CURRENT_VERSION. + + This overrides $APPLELINK_CURRENT_VERSION. AR - - + The static library archiver. ARCHITECTURE - - + Specifies the system architecture for which the package is being built. The default is the system architecture @@ -147,46 +136,41 @@ as well as forming part of the name of a generated RPM package file. ARCOM - - + The command line used to generate a static library from object files. ARCOMSTR - - + The string displayed when an object file is generated from an assembly-language source file. -If this is not set, then $ARCOM (the command line) is displayed. +If this is not set, then $ARCOM (the command line) is displayed. - + env = Environment(ARCOMSTR = "Archiving $TARGET") ARFLAGS - - + General options passed to the static library archiver. AS - - + The assembler. ASCOM - - + The command line used to generate an object file from an assembly-language source file. @@ -194,69 +178,63 @@ from an assembly-language source file. ASCOMSTR - - + The string displayed when an object file is generated from an assembly-language source file. -If this is not set, then $ASCOM (the command line) is displayed. +If this is not set, then $ASCOM (the command line) is displayed. - + env = Environment(ASCOMSTR = "Assembling $TARGET") ASFLAGS - - + General options passed to the assembler. ASPPCOM - - + The command line used to assemble an assembly-language source file into an object file after first running the file through the C preprocessor. Any options specified -in the $ASFLAGS and $CPPFLAGS construction variables +in the $ASFLAGS and $CPPFLAGS construction variables are included on this command line. ASPPCOMSTR - - + The string displayed when an object file is generated from an assembly-language source file after first running the file through the C preprocessor. -If this is not set, then $ASPPCOM (the command line) is displayed. +If this is not set, then $ASPPCOM (the command line) is displayed. - + env = Environment(ASPPCOMSTR = "Assembling $TARGET") ASPPFLAGS - - + General options when an assembling an assembly-language source file into an object file after first running the file through the C preprocessor. -The default is to use the value of $ASFLAGS. +The default is to use the value of $ASFLAGS. BIBTEX - - + The bibliography generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter. @@ -264,8 +242,7 @@ LaTeX structured formatter and typesetter. BIBTEXCOM - - + The command line used to call the bibliography generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter. @@ -274,22 +251,20 @@ typesetter. BIBTEXCOMSTR - - + The string displayed when generating a bibliography for TeX or LaTeX. -If this is not set, then $BIBTEXCOM (the command line) is displayed. +If this is not set, then $BIBTEXCOM (the command line) is displayed. - + env = Environment(BIBTEXCOMSTR = "Generating bibliography $TARGET") BIBTEXFLAGS - - + General options passed to the bibliography generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter. @@ -297,8 +272,7 @@ and typesetter and the LaTeX structured formatter and typesetter. BUILDERS - - + A dictionary mapping the names of the builders available through this environment to underlying Builder objects. @@ -309,26 +283,26 @@ If you initialize this variable when an Environment is created: - + env = Environment(BUILDERS = {'NewBuilder' : foo}) - + the default Builders will no longer be available. To use a new Builder object in addition to the default Builders, add your new Builder object like this: - + env = Environment() env.Append(BUILDERS = {'NewBuilder' : foo}) - + or this: - + env = Environment() env['BUILDERS']['NewBuilder'] = foo @@ -336,70 +310,64 @@ env['BUILDERS']['NewBuilder'] = foo CC - - + The C compiler. CCCOM - - + The command line used to compile a C source file to a (static) object -file. Any options specified in the $CFLAGS, $CCFLAGS and -$CPPFLAGS construction variables are included on this command +file. Any options specified in the $CFLAGS, $CCFLAGS and +$CPPFLAGS construction variables are included on this command line. CCCOMSTR - - + The string displayed when a C source file is compiled to a (static) object file. -If this is not set, then $CCCOM (the command line) is displayed. +If this is not set, then $CCCOM (the command line) is displayed. - + env = Environment(CCCOMSTR = "Compiling static object $TARGET") CCFLAGS - - + General options that are passed to the C and C++ compilers. CCPCHFLAGS - - + Options added to the compiler command line to support building with precompiled headers. The default value expands expands to the appropriate Microsoft Visual C++ command-line options -when the $PCH construction variable is set. +when the $PCH construction variable is set. CCPDBFLAGS - - + Options added to the compiler command line to support storing debugging information in a Microsoft Visual C++ PDB file. The default value expands expands to appropriate Microsoft Visual C++ command-line options -when the $PDB construction variable is set. +when the $PDB construction variable is set. - + The Visual C++ compiler option that SCons uses by default to generate PDB information is . This works correctly with parallel () builds @@ -412,31 +380,30 @@ link-time performance, although parallel builds will no longer work. - + You can generate PDB files with the -switch by overriding the default $CCPDBFLAGS variable as follows: +switch by overriding the default $CCPDBFLAGS variable as follows: - + env['CCPDBFLAGS'] = ['${(PDB and "/Zi /Fd%s" % File(PDB)) or ""}'] - + An alternative would be to use the to put the debugging information in a separate .pdb file for each object file by overriding -the $CCPDBFLAGS variable as follows: +the $CCPDBFLAGS variable as follows: - + env['CCPDBFLAGS'] = '/Zi /Fd${TARGET}.pdb' CCVERSION - - + The version number of the C compiler. This may or may not be set, depending on the specific C compiler being used. @@ -445,8 +412,7 @@ depending on the specific C compiler being used. CFILESUFFIX - - + The suffix for C source files. This is used by the internal CFile builder when generating C files from Lex (.l) or YACC (.y) input files. @@ -463,16 +429,14 @@ as C files. CFLAGS - - + General options that are passed to the C compiler (C only; not C++). CHANGE_SPECFILE - - + A hook for modifying the file that controls the packaging build (the .spec for RPM, the control for Ipkg, @@ -484,28 +448,27 @@ after the SCons template for the file has been written. CHANGED_SOURCES - - + A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). CHANGED_TARGETS - - + A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). CHANGELOG - - + The name of a file containing the change log text to be included in the package. This is included as the @@ -517,9 +480,8 @@ section of the RPM _concat - - -A function used to produce variables like $_CPPINCFLAGS. It takes + +A function used to produce variables like $_CPPINCFLAGS. It takes four or five arguments: a prefix to concatenate onto each element, a list of elements, a suffix to concatenate onto each element, an environment @@ -527,15 +489,14 @@ for variable interpolation, and an optional function that will be called to transform the list before concatenation. - + env['_CPPINCFLAGS'] = '$( ${_concat(INCPREFIX, CPPPATH, INCSUFFIX, __env__, RDirs)} $)', CONFIGUREDIR - - + The name of the directory in which Configure context test files are written. The default is @@ -549,8 +510,7 @@ file. CONFIGURELOG - - + The name of the Configure context log file. The default is config.log @@ -563,50 +523,48 @@ file. _CPPDEFFLAGS - - + An automatically-generated construction variable containing the C preprocessor command-line options to define values. -The value of $_CPPDEFFLAGS is created +The value of $_CPPDEFFLAGS is created by respectively prepending and appending -$CPPDEFPREFIX and $CPPDEFSUFFIX +$CPPDEFPREFIX and $CPPDEFSUFFIX to the beginning and end -of each definition in $CPPDEFINES. +of each definition in $CPPDEFINES. CPPDEFINES - - + A platform independent specification of C preprocessor definitions. The definitions will be added to command lines through the automatically-generated -$_CPPDEFFLAGS construction variable (see above), +$_CPPDEFFLAGS construction variable (see above), which is constructed according to -the type of value of $CPPDEFINES: +the type of value of $CPPDEFINES: - -If $CPPDEFINES is a string, + +If $CPPDEFINES is a string, the values of the -$CPPDEFPREFIX and $CPPDEFSUFFIX +$CPPDEFPREFIX and $CPPDEFSUFFIX construction variables will be respectively prepended and appended to the beginning and end -of each definition in $CPPDEFINES. +of each definition in $CPPDEFINES. - + # Will add -Dxyz to POSIX compiler command lines, # and /Dxyz to Microsoft Visual C++ command lines. env = Environment(CPPDEFINES='xyz') - -If $CPPDEFINES is a list, + +If $CPPDEFINES is a list, the values of the -$CPPDEFPREFIX and $CPPDEFSUFFIX +$CPPDEFPREFIX and $CPPDEFSUFFIX construction variables will be respectively prepended and appended to the beginning and end of each element in the list. @@ -615,16 +573,16 @@ then the first item is the name being defined and the second item is its value: - + # Will add -DB=2 -DA to POSIX compiler command lines, # and /DB=2 /DA to Microsoft Visual C++ command lines. env = Environment(CPPDEFINES=[('B', 2), 'A']) - -If $CPPDEFINES is a dictionary, + +If $CPPDEFINES is a dictionary, the values of the -$CPPDEFPREFIX and $CPPDEFSUFFIX +$CPPDEFPREFIX and $CPPDEFSUFFIX construction variables will be respectively prepended and appended to the beginning and end of each item from the dictionary. @@ -637,11 +595,11 @@ then the name is defined without an explicit value. Note that the resulting flags are sorted by keyword to ensure that the order of the options on the command line is consistent each time -scons +scons is run. - + # Will add -DA -DB=2 to POSIX compiler command lines, # and /DA /DB=2 to Microsoft Visual C++ command lines. env = Environment(CPPDEFINES={'B':2, 'A':None}) @@ -650,45 +608,42 @@ env = Environment(CPPDEFINES={'B':2, 'A':None}) CPPDEFPREFIX - - + The prefix used to specify preprocessor definitions on the C compiler command line. This will be prepended to the beginning of each definition -in the $CPPDEFINES construction variable -when the $_CPPDEFFLAGS variable is automatically generated. +in the $CPPDEFINES construction variable +when the $_CPPDEFFLAGS variable is automatically generated. CPPDEFSUFFIX - - + The suffix used to specify preprocessor definitions on the C compiler command line. This will be appended to the end of each definition -in the $CPPDEFINES construction variable -when the $_CPPDEFFLAGS variable is automatically generated. +in the $CPPDEFINES construction variable +when the $_CPPDEFFLAGS variable is automatically generated. CPPFLAGS - - + User-specified C preprocessor options. These will be included in any command that uses the C preprocessor, including not just compilation of C and C++ source files -via the $CCCOM, -$SHCCCOM, -$CXXCOM and -$SHCXXCOM command lines, -but also the $FORTRANPPCOM, -$SHFORTRANPPCOM, -$F77PPCOM and -$SHF77PPCOM command lines +via the $CCCOM, +$SHCCCOM, +$CXXCOM and +$SHCXXCOM command lines, +but also the $FORTRANPPCOM, +$SHFORTRANPPCOM, +$F77PPCOM and +$SHF77PPCOM command lines used to compile a Fortran source file, -and the $ASPPCOM command line +and the $ASPPCOM command line used to assemble an assembly language source file, after first running each file through the C preprocessor. Note that this variable does @@ -696,30 +651,28 @@ Note that this variable does contain (or similar) include search path options -that scons generates automatically from $CPPPATH. -See $_CPPINCFLAGS, below, +that scons generates automatically from $CPPPATH. +See $_CPPINCFLAGS, below, for the variable that expands to those options. _CPPINCFLAGS - - + An automatically-generated construction variable containing the C preprocessor command-line options for specifying directories to be searched for include files. -The value of $_CPPINCFLAGS is created -by respectively prepending and appending $INCPREFIX and $INCSUFFIX +The value of $_CPPINCFLAGS is created +by respectively prepending and appending $INCPREFIX and $INCSUFFIX to the beginning and end -of each directory in $CPPPATH. +of each directory in $CPPPATH. CPPPATH - - + The list of directories that the C preprocessor will search for include directories. The C/C++ implicit dependency scanner will search these directories for include files. Don't explicitly put include directory @@ -727,57 +680,56 @@ arguments in CCFLAGS or CXXFLAGS because the result will be non-portable and the directories will not be searched by the dependency scanner. Note: directory names in CPPPATH will be looked-up relative to the SConscript directory when they are used in a command. To force -scons +scons to look-up a directory relative to the root of the source tree use #: - + env = Environment(CPPPATH='#/include') - + The directory look-up can also be forced using the -Dir() +Dir() function: - + include = Dir('include') env = Environment(CPPPATH=include) - + The directory list will be added to command lines through the automatically-generated -$_CPPINCFLAGS +$_CPPINCFLAGS construction variable, which is constructed by respectively prepending and appending the value of the -$INCPREFIX and $INCSUFFIX +$INCPREFIX and $INCSUFFIX construction variables to the beginning and end -of each directory in $CPPPATH. +of each directory in $CPPPATH. Any command lines you define that need the CPPPATH directory list should -include $_CPPINCFLAGS: +include $_CPPINCFLAGS: - + env = Environment(CCCOM="my_compiler $_CPPINCFLAGS -c -o $TARGET $SOURCE") CPPSUFFIXES - - + The list of suffixes of files that will be scanned for C preprocessor implicit dependencies (#include lines). The default list is: - + [".c", ".C", ".cxx", ".cpp", ".c++", ".cc", ".h", ".H", ".hxx", ".hpp", ".hh", ".F", ".fpp", ".FPP", @@ -788,41 +740,37 @@ The default list is: CXX - - + The C++ compiler. CXXCOM - - + The command line used to compile a C++ source file to an object file. -Any options specified in the $CXXFLAGS and -$CPPFLAGS construction variables +Any options specified in the $CXXFLAGS and +$CPPFLAGS construction variables are included on this command line. CXXCOMSTR - - + The string displayed when a C++ source file is compiled to a (static) object file. -If this is not set, then $CXXCOM (the command line) is displayed. +If this is not set, then $CXXCOM (the command line) is displayed. - + env = Environment(CXXCOMSTR = "Compiling static object $TARGET") CXXFILESUFFIX - - + The suffix for C++ source files. This is used by the internal CXXFile builder when generating C++ files from Lex (.ll) or YACC (.yy) input files. @@ -848,20 +796,18 @@ as C++ files. CXXFLAGS - - + General options that are passed to the C++ compiler. -By default, this includes the value of $CCFLAGS, -so that setting $CCFLAGS affects both C and C++ compilation. +By default, this includes the value of $CCFLAGS, +so that setting $CCFLAGS affects both C and C++ compilation. If you want to add C++-specific flags, -you must set or override the value of $CXXFLAGS. +you must set or override the value of $CXXFLAGS. CXXVERSION - - + The version number of the C++ compiler. This may or may not be set, depending on the specific C++ compiler being used. @@ -870,50 +816,44 @@ depending on the specific C++ compiler being used. DC - - + The D compiler to use. DCOM - - + The command line used to compile a D file to an object file. -Any options specified in the $DFLAGS construction variable +Any options specified in the $DFLAGS construction variable is included on this command line. DDEBUG - - + List of debug tags to enable when compiling. DDEBUGPREFIX - - + DDEBUGPREFIX. DDEBUGSUFFIX - - + DDEBUGSUFFIX. DESCRIPTION - - + A long description of the project being packaged. This is included in the relevant section of the file that controls the packaging build. @@ -922,8 +862,7 @@ of the file that controls the packaging build. DESCRIPTION_lang - - + A language-specific long description for the specified lang. This is used to populate a @@ -935,61 +874,53 @@ section of an RPM DFILESUFFIX - - + DFILESUFFIX. DFLAGPREFIX - - + DFLAGPREFIX. DFLAGS - - + General options that are passed to the D compiler. DFLAGSUFFIX - - + DFLAGSUFFIX. DINCPREFIX - - + DINCPREFIX. DINCSUFFIX - - + DLIBFLAGSUFFIX. Dir - - + A function that converts a string into a Dir instance relative to the target being built. - - + A function that converts a string into a Dir instance relative to the target being built. @@ -997,8 +928,7 @@ into a Dir instance relative to the target being built. Dirs - - + A function that converts a list of strings into a list of Dir instances relative to the target being built. @@ -1006,184 +936,162 @@ into a list of Dir instances relative to the target being built. DLIB - - + Name of the lib tool to use for D codes. DLIBCOM - - + The command line to use when creating libraries. DLIBDIRPREFIX - - + DLIBLINKPREFIX. DLIBDIRSUFFIX - - + DLIBLINKSUFFIX. DLIBFLAGPREFIX - - + DLIBFLAGPREFIX. DLIBFLAGSUFFIX - - + DLIBFLAGSUFFIX. DLIBLINKPREFIX - - + DLIBLINKPREFIX. DLIBLINKSUFFIX - - + DLIBLINKSUFFIX. DLINK - - + Name of the linker to use for linking systems including D sources. DLINKCOM - - + The command line to use when linking systems including D sources. DLINKFLAGPREFIX - - + DLINKFLAGPREFIX. DLINKFLAGS - - + List of linker flags. DLINKFLAGSUFFIX - - + DLINKFLAGSUFFIX. DOCBOOK_DEFAULT_XSL_EPUB - - -The default XSLT file for the DocbookEpub builder within the + +The default XSLT file for the DocbookEpub builder within the current environment, if no other XSLT gets specified via keyword. DOCBOOK_DEFAULT_XSL_HTML - - -The default XSLT file for the DocbookHtml builder within the + +The default XSLT file for the DocbookHtml builder within the current environment, if no other XSLT gets specified via keyword. DOCBOOK_DEFAULT_XSL_HTMLCHUNKED - - -The default XSLT file for the DocbookHtmlChunked builder within the + +The default XSLT file for the DocbookHtmlChunked builder within the current environment, if no other XSLT gets specified via keyword. DOCBOOK_DEFAULT_XSL_HTMLHELP - - -The default XSLT file for the DocbookHtmlhelp builder within the + +The default XSLT file for the DocbookHtmlhelp builder within the current environment, if no other XSLT gets specified via keyword. DOCBOOK_DEFAULT_XSL_MAN - - -The default XSLT file for the DocbookMan builder within the + +The default XSLT file for the DocbookMan builder within the current environment, if no other XSLT gets specified via keyword. DOCBOOK_DEFAULT_XSL_PDF - - -The default XSLT file for the DocbookPdf builder within the + +The default XSLT file for the DocbookPdf builder within the current environment, if no other XSLT gets specified via keyword. DOCBOOK_DEFAULT_XSL_SLIDESHTML - - -The default XSLT file for the DocbookSlidesHtml builder within the + +The default XSLT file for the DocbookSlidesHtml builder within the current environment, if no other XSLT gets specified via keyword. DOCBOOK_DEFAULT_XSL_SLIDESPDF - - -The default XSLT file for the DocbookSlidesPdf builder within the + +The default XSLT file for the DocbookSlidesPdf builder within the current environment, if no other XSLT gets specified via keyword. DOCBOOK_FOP - - + The path to the PDF renderer fop or xep, if one of them is installed (fop gets checked first). @@ -1191,8 +1099,7 @@ if one of them is installed (fop gets checked first). DOCBOOK_FOPCOM - - + The full command-line for the PDF renderer fop or xep. @@ -1200,8 +1107,7 @@ PDF renderer fop or xep. DOCBOOK_FOPCOMSTR - - + The string displayed when a renderer like fop or xep is used to create PDF output from an XML file. @@ -1209,8 +1115,7 @@ The string displayed when a renderer like fop or DOCBOOK_FOPFLAGS - - + Additonal command-line flags for the PDF renderer fop or xep. @@ -1218,8 +1123,7 @@ PDF renderer fop or xep. DOCBOOK_XMLLINT - - + The path to the external executable xmllint, if it's installed. Note, that this is only used as last fallback for resolving XIncludes, if no libxml2 or lxml Python binding can be imported @@ -1229,8 +1133,7 @@ in the current system. DOCBOOK_XMLLINTCOM - - + The full command-line for the external executable xmllint. @@ -1238,8 +1141,7 @@ The full command-line for the external executable DOCBOOK_XMLLINTCOMSTR - - + The string displayed when xmllint is used to resolve XIncludes for a given XML file. @@ -1247,8 +1149,7 @@ XIncludes for a given XML file. DOCBOOK_XMLLINTFLAGS - - + Additonal command-line flags for the external executable xmllint. @@ -1256,8 +1157,7 @@ Additonal command-line flags for the external executable DOCBOOK_XSLTPROC - - + The path to the external executable xsltproc (or saxon, xalan), if one of them is installed. @@ -1268,8 +1168,7 @@ no libxml2 or lxml Python binding can be imported in the current system. DOCBOOK_XSLTPROCCOM - - + The full command-line for the external executable xsltproc (or saxon, xalan). @@ -1278,8 +1177,7 @@ The full command-line for the external executable DOCBOOK_XSLTPROCCOMSTR - - + The string displayed when xsltproc is used to transform an XML file via a given XSLT stylesheet. @@ -1287,8 +1185,7 @@ an XML file via a given XSLT stylesheet. DOCBOOK_XSLTPROCFLAGS - - + Additonal command-line flags for the external executable xsltproc (or saxon, xalan). @@ -1297,8 +1194,7 @@ Additonal command-line flags for the external executable DOCBOOK_XSLTPROCPARAMS - - + Additonal parameters that are not intended for the XSLT processor executable, but the XSL processing itself. By default, they get appended at the end of the command line for saxon and saxon-xslt, respectively. @@ -1307,149 +1203,134 @@ for saxon and saxon-xslt, respectively. DPATH - - + List of paths to search for import modules. DRPATHPREFIX - - + DRPATHPREFIX. DRPATHSUFFIX - - + DRPATHSUFFIX. DShLibSonameGenerator - - + DShLibSonameGenerator. DSUFFIXES - - + The list of suffixes of files that will be scanned for imported D package files. The default list is: - + ['.d'] DVERPREFIX - - + DVERPREFIX. DVERSIONS - - + List of version tags to enable when compiling. DVERSUFFIX - - + DVERSUFFIX. DVIPDF - - + The TeX DVI file to PDF file converter. DVIPDFCOM - - + The command line used to convert TeX DVI files into a PDF file. DVIPDFCOMSTR - - + The string displayed when a TeX DVI file is converted into a PDF file. -If this is not set, then $DVIPDFCOM (the command line) is displayed. +If this is not set, then $DVIPDFCOM (the command line) is displayed. DVIPDFFLAGS - - + General options passed to the TeX DVI file to PDF file converter. DVIPS - - + The TeX DVI file to PostScript converter. DVIPSFLAGS - - + General options passed to the TeX DVI file to PostScript converter. ENV - - + A dictionary of environment variables to use when invoking commands. When -$ENV is used in a command all list +$ENV is used in a command all list values will be joined using the path separator and any other non-string values will simply be coerced to a string. Note that, by default, -scons +scons does not propagate the environment in force when you execute -scons +scons to the commands used to build target files. This is so that builds will be guaranteed repeatable regardless of the environment variables set at the time -scons +scons is invoked. - + If you want to propagate your environment variables to the commands executed @@ -1457,12 +1338,12 @@ to build target files, you must do so explicitly: - + import os env = Environment(ENV = os.environ) - + Note that you can choose only to propagate certain environment variables. A common example is @@ -1470,12 +1351,12 @@ the system PATH environment variable, so that -scons +scons uses the same utilities as the invoking shell (or other process): - + import os env = Environment(ENV = {'PATH' : os.environ['PATH']}) @@ -1483,8 +1364,7 @@ env = Environment(ENV = {'PATH' : os.environ['PATH']}) ESCAPE - - + A function that will be called to escape shell special characters in command lines. The function should take one argument: the command line string to escape; and should return the escaped command line. @@ -1493,25 +1373,23 @@ string to escape; and should return the escaped command line. F03 - - + The Fortran 03 compiler. -You should normally set the $FORTRAN variable, +You should normally set the $FORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $F03 if you need to use a specific compiler +You only need to set $F03 if you need to use a specific compiler or compiler version for Fortran 03 files. F03COM - - + The command line used to compile a Fortran 03 source file to an object file. -You only need to set $F03COM if you need to use a specific +You only need to set $F03COM if you need to use a specific command line for Fortran 03 files. -You should normally set the $FORTRANCOM variable, +You should normally set the $FORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -1519,19 +1397,17 @@ for all Fortran versions. F03COMSTR - - + The string displayed when a Fortran 03 source file is compiled to an object file. -If this is not set, then $F03COM or $FORTRANCOM +If this is not set, then $F03COM or $FORTRANCOM (the command line) is displayed. F03FILESUFFIXES - - + The list of file extensions for which the F03 dialect will be used. By default, this is ['.f03'] @@ -1539,22 +1415,21 @@ default, this is ['.f03'] F03FLAGS - - + General user-specified options that are passed to the Fortran 03 compiler. Note that this variable does not contain (or similar) include search path options -that scons generates automatically from $F03PATH. +that scons generates automatically from $F03PATH. See -$_F03INCFLAGS +$_F03INCFLAGS below, for the variable that expands to those options. -You only need to set $F03FLAGS if you need to define specific +You only need to set $F03FLAGS if you need to define specific user options for Fortran 03 files. -You should normally set the $FORTRANFLAGS variable, +You should normally set the $FORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -1563,86 +1438,83 @@ for all Fortran versions. _F03INCFLAGS - - + 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 $_F03INCFLAGS is created -by appending $INCPREFIX and $INCSUFFIX +The value of $_F03INCFLAGS is created +by appending $INCPREFIX and $INCSUFFIX to the beginning and end -of each directory in $F03PATH. +of each directory in $F03PATH. F03PATH - - + 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 $F03FLAGS because the result will be non-portable +arguments in $F03FLAGS because the result will be non-portable and the directories will not be searched by the dependency scanner. Note: -directory names in $F03PATH will be looked-up relative to the SConscript +directory names in $F03PATH will be looked-up relative to the SConscript directory when they are used in a command. To force -scons +scons to look-up a directory relative to the root of the source tree use #: -You only need to set $F03PATH if you need to define a specific +You only need to set $F03PATH if you need to define a specific include path for Fortran 03 files. -You should normally set the $FORTRANPATH variable, +You should normally set the $FORTRANPATH variable, which specifies the include path for the default Fortran compiler for all Fortran versions. - + env = Environment(F03PATH='#/include') - + The directory look-up can also be forced using the -Dir() +Dir() function: - + include = Dir('include') env = Environment(F03PATH=include) - + The directory list will be added to command lines through the automatically-generated -$_F03INCFLAGS +$_F03INCFLAGS construction variable, which is constructed by appending the values of the -$INCPREFIX and $INCSUFFIX +$INCPREFIX and $INCSUFFIX construction variables to the beginning and end -of each directory in $F03PATH. +of each directory in $F03PATH. Any command lines you define that need the F03PATH directory list should -include $_F03INCFLAGS: +include $_F03INCFLAGS: - + env = Environment(F03COM="my_compiler $_F03INCFLAGS -c -o $TARGET $SOURCE") F03PPCOM - - + 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 $F03FLAGS and $CPPFLAGS construction variables +Any options specified in the $F03FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $F03PPCOM if you need to use a specific +You only need to set $F03PPCOM if you need to use a specific C-preprocessor command line for Fortran 03 files. -You should normally set the $FORTRANPPCOM variable, +You should normally set the $FORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -1650,20 +1522,18 @@ for all Fortran versions. F03PPCOMSTR - - + 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 $F03PPCOM or $FORTRANPPCOM +If this is not set, then $F03PPCOM or $FORTRANPPCOM (the command line) is displayed. F03PPFILESUFFIXES - - + The list of file extensions for which the compilation + preprocessor pass for F03 dialect will be used. By default, this is empty @@ -1671,25 +1541,23 @@ F03 dialect will be used. By default, this is empty F08 - - + The Fortran 08 compiler. -You should normally set the $FORTRAN variable, +You should normally set the $FORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $F08 if you need to use a specific compiler +You only need to set $F08 if you need to use a specific compiler or compiler version for Fortran 08 files. F08COM - - + The command line used to compile a Fortran 08 source file to an object file. -You only need to set $F08COM if you need to use a specific +You only need to set $F08COM if you need to use a specific command line for Fortran 08 files. -You should normally set the $FORTRANCOM variable, +You should normally set the $FORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -1697,19 +1565,17 @@ for all Fortran versions. F08COMSTR - - + The string displayed when a Fortran 08 source file is compiled to an object file. -If this is not set, then $F08COM or $FORTRANCOM +If this is not set, then $F08COM or $FORTRANCOM (the command line) is displayed. F08FILESUFFIXES - - + The list of file extensions for which the F08 dialect will be used. By default, this is ['.f08'] @@ -1717,22 +1583,21 @@ default, this is ['.f08'] F08FLAGS - - + General user-specified options that are passed to the Fortran 08 compiler. Note that this variable does not contain (or similar) include search path options -that scons generates automatically from $F08PATH. +that scons generates automatically from $F08PATH. See -$_F08INCFLAGS +$_F08INCFLAGS below, for the variable that expands to those options. -You only need to set $F08FLAGS if you need to define specific +You only need to set $F08FLAGS if you need to define specific user options for Fortran 08 files. -You should normally set the $FORTRANFLAGS variable, +You should normally set the $FORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -1741,86 +1606,83 @@ for all Fortran versions. _F08INCFLAGS - - + An automatically-generated construction variable containing the Fortran 08 compiler command-line options for specifying directories to be searched for include files. -The value of $_F08INCFLAGS is created -by appending $INCPREFIX and $INCSUFFIX +The value of $_F08INCFLAGS is created +by appending $INCPREFIX and $INCSUFFIX to the beginning and end -of each directory in $F08PATH. +of each directory in $F08PATH. F08PATH - - + The list of directories that the Fortran 08 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 $F08FLAGS because the result will be non-portable +arguments in $F08FLAGS because the result will be non-portable and the directories will not be searched by the dependency scanner. Note: -directory names in $F08PATH will be looked-up relative to the SConscript +directory names in $F08PATH will be looked-up relative to the SConscript directory when they are used in a command. To force -scons +scons to look-up a directory relative to the root of the source tree use #: -You only need to set $F08PATH if you need to define a specific +You only need to set $F08PATH if you need to define a specific include path for Fortran 08 files. -You should normally set the $FORTRANPATH variable, +You should normally set the $FORTRANPATH variable, which specifies the include path for the default Fortran compiler for all Fortran versions. - + env = Environment(F08PATH='#/include') - + The directory look-up can also be forced using the -Dir() +Dir() function: - + include = Dir('include') env = Environment(F08PATH=include) - + The directory list will be added to command lines through the automatically-generated -$_F08INCFLAGS +$_F08INCFLAGS construction variable, which is constructed by appending the values of the -$INCPREFIX and $INCSUFFIX +$INCPREFIX and $INCSUFFIX construction variables to the beginning and end -of each directory in $F08PATH. +of each directory in $F08PATH. Any command lines you define that need the F08PATH directory list should -include $_F08INCFLAGS: +include $_F08INCFLAGS: - + env = Environment(F08COM="my_compiler $_F08INCFLAGS -c -o $TARGET $SOURCE") F08PPCOM - - + The command line used to compile a Fortran 08 source file to an object file after first running the file through the C preprocessor. -Any options specified in the $F08FLAGS and $CPPFLAGS construction variables +Any options specified in the $F08FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $F08PPCOM if you need to use a specific +You only need to set $F08PPCOM if you need to use a specific C-preprocessor command line for Fortran 08 files. -You should normally set the $FORTRANPPCOM variable, +You should normally set the $FORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -1828,20 +1690,18 @@ for all Fortran versions. F08PPCOMSTR - - + The string displayed when a Fortran 08 source file is compiled to an object file after first running the file through the C preprocessor. -If this is not set, then $F08PPCOM or $FORTRANPPCOM +If this is not set, then $F08PPCOM or $FORTRANPPCOM (the command line) is displayed. F08PPFILESUFFIXES - - + The list of file extensions for which the compilation + preprocessor pass for F08 dialect will be used. By default, this is empty @@ -1849,25 +1709,23 @@ F08 dialect will be used. By default, this is empty F77 - - + The Fortran 77 compiler. -You should normally set the $FORTRAN variable, +You should normally set the $FORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $F77 if you need to use a specific compiler +You only need to set $F77 if you need to use a specific compiler or compiler version for Fortran 77 files. F77COM - - + The command line used to compile a Fortran 77 source file to an object file. -You only need to set $F77COM if you need to use a specific +You only need to set $F77COM if you need to use a specific command line for Fortran 77 files. -You should normally set the $FORTRANCOM variable, +You should normally set the $FORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -1875,19 +1733,17 @@ for all Fortran versions. F77COMSTR - - + The string displayed when a Fortran 77 source file is compiled to an object file. -If this is not set, then $F77COM or $FORTRANCOM +If this is not set, then $F77COM or $FORTRANCOM (the command line) is displayed. F77FILESUFFIXES - - + The list of file extensions for which the F77 dialect will be used. By default, this is ['.f77'] @@ -1895,22 +1751,21 @@ default, this is ['.f77'] F77FLAGS - - + General user-specified options that are passed to the Fortran 77 compiler. Note that this variable does not contain (or similar) include search path options -that scons generates automatically from $F77PATH. +that scons generates automatically from $F77PATH. See -$_F77INCFLAGS +$_F77INCFLAGS below, for the variable that expands to those options. -You only need to set $F77FLAGS if you need to define specific +You only need to set $F77FLAGS if you need to define specific user options for Fortran 77 files. -You should normally set the $FORTRANFLAGS variable, +You should normally set the $FORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -1919,86 +1774,83 @@ for all Fortran versions. _F77INCFLAGS - - + An automatically-generated construction variable containing the Fortran 77 compiler command-line options for specifying directories to be searched for include files. -The value of $_F77INCFLAGS is created -by appending $INCPREFIX and $INCSUFFIX +The value of $_F77INCFLAGS is created +by appending $INCPREFIX and $INCSUFFIX to the beginning and end -of each directory in $F77PATH. +of each directory in $F77PATH. F77PATH - - + The list of directories that the Fortran 77 compiler will search for include directories. The implicit dependency scanner will search these directories for include files. Don't explicitly put include directory -arguments in $F77FLAGS because the result will be non-portable +arguments in $F77FLAGS because the result will be non-portable and the directories will not be searched by the dependency scanner. Note: -directory names in $F77PATH will be looked-up relative to the SConscript +directory names in $F77PATH will be looked-up relative to the SConscript directory when they are used in a command. To force -scons +scons to look-up a directory relative to the root of the source tree use #: -You only need to set $F77PATH if you need to define a specific +You only need to set $F77PATH if you need to define a specific include path for Fortran 77 files. -You should normally set the $FORTRANPATH variable, +You should normally set the $FORTRANPATH variable, which specifies the include path for the default Fortran compiler for all Fortran versions. - + env = Environment(F77PATH='#/include') - + The directory look-up can also be forced using the -Dir() +Dir() function: - + include = Dir('include') env = Environment(F77PATH=include) - + The directory list will be added to command lines through the automatically-generated -$_F77INCFLAGS +$_F77INCFLAGS construction variable, which is constructed by appending the values of the -$INCPREFIX and $INCSUFFIX +$INCPREFIX and $INCSUFFIX construction variables to the beginning and end -of each directory in $F77PATH. +of each directory in $F77PATH. Any command lines you define that need the F77PATH directory list should -include $_F77INCFLAGS: +include $_F77INCFLAGS: - + env = Environment(F77COM="my_compiler $_F77INCFLAGS -c -o $TARGET $SOURCE") F77PPCOM - - + The command line used to compile a Fortran 77 source file to an object file after first running the file through the C preprocessor. -Any options specified in the $F77FLAGS and $CPPFLAGS construction variables +Any options specified in the $F77FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $F77PPCOM if you need to use a specific +You only need to set $F77PPCOM if you need to use a specific C-preprocessor command line for Fortran 77 files. -You should normally set the $FORTRANPPCOM variable, +You should normally set the $FORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -2006,20 +1858,18 @@ for all Fortran versions. F77PPCOMSTR - - + The string displayed when a Fortran 77 source file is compiled to an object file after first running the file through the C preprocessor. -If this is not set, then $F77PPCOM or $FORTRANPPCOM +If this is not set, then $F77PPCOM or $FORTRANPPCOM (the command line) is displayed. F77PPFILESUFFIXES - - + The list of file extensions for which the compilation + preprocessor pass for F77 dialect will be used. By default, this is empty @@ -2027,25 +1877,23 @@ F77 dialect will be used. By default, this is empty F90 - - + The Fortran 90 compiler. -You should normally set the $FORTRAN variable, +You should normally set the $FORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $F90 if you need to use a specific compiler +You only need to set $F90 if you need to use a specific compiler or compiler version for Fortran 90 files. F90COM - - + The command line used to compile a Fortran 90 source file to an object file. -You only need to set $F90COM if you need to use a specific +You only need to set $F90COM if you need to use a specific command line for Fortran 90 files. -You should normally set the $FORTRANCOM variable, +You should normally set the $FORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -2053,19 +1901,17 @@ for all Fortran versions. F90COMSTR - - + The string displayed when a Fortran 90 source file is compiled to an object file. -If this is not set, then $F90COM or $FORTRANCOM +If this is not set, then $F90COM or $FORTRANCOM (the command line) is displayed. F90FILESUFFIXES - - + The list of file extensions for which the F90 dialect will be used. By default, this is ['.f90'] @@ -2073,22 +1919,21 @@ default, this is ['.f90'] F90FLAGS - - + General user-specified options that are passed to the Fortran 90 compiler. Note that this variable does not contain (or similar) include search path options -that scons generates automatically from $F90PATH. +that scons generates automatically from $F90PATH. See -$_F90INCFLAGS +$_F90INCFLAGS below, for the variable that expands to those options. -You only need to set $F90FLAGS if you need to define specific +You only need to set $F90FLAGS if you need to define specific user options for Fortran 90 files. -You should normally set the $FORTRANFLAGS variable, +You should normally set the $FORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -2097,86 +1942,83 @@ for all Fortran versions. _F90INCFLAGS - - + An automatically-generated construction variable containing the Fortran 90 compiler command-line options for specifying directories to be searched for include files. -The value of $_F90INCFLAGS is created -by appending $INCPREFIX and $INCSUFFIX +The value of $_F90INCFLAGS is created +by appending $INCPREFIX and $INCSUFFIX to the beginning and end -of each directory in $F90PATH. +of each directory in $F90PATH. F90PATH - - + The list of directories that the Fortran 90 compiler will search for include directories. The implicit dependency scanner will search these directories for include files. Don't explicitly put include directory -arguments in $F90FLAGS because the result will be non-portable +arguments in $F90FLAGS because the result will be non-portable and the directories will not be searched by the dependency scanner. Note: -directory names in $F90PATH will be looked-up relative to the SConscript +directory names in $F90PATH will be looked-up relative to the SConscript directory when they are used in a command. To force -scons +scons to look-up a directory relative to the root of the source tree use #: -You only need to set $F90PATH if you need to define a specific +You only need to set $F90PATH if you need to define a specific include path for Fortran 90 files. -You should normally set the $FORTRANPATH variable, +You should normally set the $FORTRANPATH variable, which specifies the include path for the default Fortran compiler for all Fortran versions. - + env = Environment(F90PATH='#/include') - + The directory look-up can also be forced using the -Dir() +Dir() function: - + include = Dir('include') env = Environment(F90PATH=include) - + The directory list will be added to command lines through the automatically-generated -$_F90INCFLAGS +$_F90INCFLAGS construction variable, which is constructed by appending the values of the -$INCPREFIX and $INCSUFFIX +$INCPREFIX and $INCSUFFIX construction variables to the beginning and end -of each directory in $F90PATH. +of each directory in $F90PATH. Any command lines you define that need the F90PATH directory list should -include $_F90INCFLAGS: +include $_F90INCFLAGS: - + env = Environment(F90COM="my_compiler $_F90INCFLAGS -c -o $TARGET $SOURCE") F90PPCOM - - + The command line used to compile a Fortran 90 source file to an object file after first running the file through the C preprocessor. -Any options specified in the $F90FLAGS and $CPPFLAGS construction variables +Any options specified in the $F90FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $F90PPCOM if you need to use a specific +You only need to set $F90PPCOM if you need to use a specific C-preprocessor command line for Fortran 90 files. -You should normally set the $FORTRANPPCOM variable, +You should normally set the $FORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -2184,19 +2026,17 @@ for all Fortran versions. F90PPCOMSTR - - + The string displayed when a Fortran 90 source file is compiled after first running the file through the C preprocessor. -If this is not set, then $F90PPCOM or $FORTRANPPCOM +If this is not set, then $F90PPCOM or $FORTRANPPCOM (the command line) is displayed. F90PPFILESUFFIXES - - + The list of file extensions for which the compilation + preprocessor pass for F90 dialect will be used. By default, this is empty @@ -2204,25 +2044,23 @@ F90 dialect will be used. By default, this is empty F95 - - + The Fortran 95 compiler. -You should normally set the $FORTRAN variable, +You should normally set the $FORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $F95 if you need to use a specific compiler +You only need to set $F95 if you need to use a specific compiler or compiler version for Fortran 95 files. F95COM - - + The command line used to compile a Fortran 95 source file to an object file. -You only need to set $F95COM if you need to use a specific +You only need to set $F95COM if you need to use a specific command line for Fortran 95 files. -You should normally set the $FORTRANCOM variable, +You should normally set the $FORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -2230,19 +2068,17 @@ for all Fortran versions. F95COMSTR - - + The string displayed when a Fortran 95 source file is compiled to an object file. -If this is not set, then $F95COM or $FORTRANCOM +If this is not set, then $F95COM or $FORTRANCOM (the command line) is displayed. F95FILESUFFIXES - - + The list of file extensions for which the F95 dialect will be used. By default, this is ['.f95'] @@ -2250,22 +2086,21 @@ default, this is ['.f95'] F95FLAGS - - + General user-specified options that are passed to the Fortran 95 compiler. Note that this variable does not contain (or similar) include search path options -that scons generates automatically from $F95PATH. +that scons generates automatically from $F95PATH. See -$_F95INCFLAGS +$_F95INCFLAGS below, for the variable that expands to those options. -You only need to set $F95FLAGS if you need to define specific +You only need to set $F95FLAGS if you need to define specific user options for Fortran 95 files. -You should normally set the $FORTRANFLAGS variable, +You should normally set the $FORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -2274,86 +2109,83 @@ for all Fortran versions. _F95INCFLAGS - - + An automatically-generated construction variable containing the Fortran 95 compiler command-line options for specifying directories to be searched for include files. -The value of $_F95INCFLAGS is created -by appending $INCPREFIX and $INCSUFFIX +The value of $_F95INCFLAGS is created +by appending $INCPREFIX and $INCSUFFIX to the beginning and end -of each directory in $F95PATH. +of each directory in $F95PATH. F95PATH - - + The list of directories that the Fortran 95 compiler will search for include directories. The implicit dependency scanner will search these directories for include files. Don't explicitly put include directory -arguments in $F95FLAGS because the result will be non-portable +arguments in $F95FLAGS because the result will be non-portable and the directories will not be searched by the dependency scanner. Note: -directory names in $F95PATH will be looked-up relative to the SConscript +directory names in $F95PATH will be looked-up relative to the SConscript directory when they are used in a command. To force -scons +scons to look-up a directory relative to the root of the source tree use #: -You only need to set $F95PATH if you need to define a specific +You only need to set $F95PATH if you need to define a specific include path for Fortran 95 files. -You should normally set the $FORTRANPATH variable, +You should normally set the $FORTRANPATH variable, which specifies the include path for the default Fortran compiler for all Fortran versions. - + env = Environment(F95PATH='#/include') - + The directory look-up can also be forced using the -Dir() +Dir() function: - + include = Dir('include') env = Environment(F95PATH=include) - + The directory list will be added to command lines through the automatically-generated -$_F95INCFLAGS +$_F95INCFLAGS construction variable, which is constructed by appending the values of the -$INCPREFIX and $INCSUFFIX +$INCPREFIX and $INCSUFFIX construction variables to the beginning and end -of each directory in $F95PATH. +of each directory in $F95PATH. Any command lines you define that need the F95PATH directory list should -include $_F95INCFLAGS: +include $_F95INCFLAGS: - + env = Environment(F95COM="my_compiler $_F95INCFLAGS -c -o $TARGET $SOURCE") F95PPCOM - - + The command line used to compile a Fortran 95 source file to an object file after first running the file through the C preprocessor. -Any options specified in the $F95FLAGS and $CPPFLAGS construction variables +Any options specified in the $F95FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $F95PPCOM if you need to use a specific +You only need to set $F95PPCOM if you need to use a specific C-preprocessor command line for Fortran 95 files. -You should normally set the $FORTRANPPCOM variable, +You should normally set the $FORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -2361,20 +2193,18 @@ for all Fortran versions. F95PPCOMSTR - - + The string displayed when a Fortran 95 source file is compiled to an object file after first running the file through the C preprocessor. -If this is not set, then $F95PPCOM or $FORTRANPPCOM +If this is not set, then $F95PPCOM or $FORTRANPPCOM (the command line) is displayed. F95PPFILESUFFIXES - - + The list of file extensions for which the compilation + preprocessor pass for F95 dialect will be used. By default, this is empty @@ -2382,13 +2212,11 @@ F95 dialect will be used. By default, this is empty File - - + A function that converts a string into a File instance relative to the target being built. - - + A function that converts a string into a File instance relative to the target being built. @@ -2396,8 +2224,7 @@ target being built. FORTRAN - - + The default Fortran compiler for all versions of Fortran. @@ -2405,34 +2232,31 @@ for all versions of Fortran. FORTRANCOM - - + The command line used to compile a Fortran source file to an object file. By default, any options specified -in the $FORTRANFLAGS, -$CPPFLAGS, -$_CPPDEFFLAGS, -$_FORTRANMODFLAG, and -$_FORTRANINCFLAGS construction variables +in the $FORTRANFLAGS, +$CPPFLAGS, +$_CPPDEFFLAGS, +$_FORTRANMODFLAG, and +$_FORTRANINCFLAGS construction variables are included on this command line. FORTRANCOMSTR - - + The string displayed when a Fortran source file is compiled to an object file. -If this is not set, then $FORTRANCOM +If this is not set, then $FORTRANCOM (the command line) is displayed. FORTRANFILESUFFIXES - - + The list of file extensions for which the FORTRAN dialect will be used. By default, this is ['.f', '.for', '.ftn'] @@ -2440,17 +2264,16 @@ default, this is ['.f', '.for', '.ftn'] FORTRANFLAGS - - + General user-specified options that are passed to the Fortran compiler. Note that this variable does not contain (or similar) include or module search path options -that scons generates automatically from $FORTRANPATH. +that scons generates automatically from $FORTRANPATH. See -$_FORTRANINCFLAGS and $_FORTRANMODFLAG, +$_FORTRANINCFLAGS and $_FORTRANMODFLAG, below, for the variables that expand those options. @@ -2458,24 +2281,22 @@ for the variables that expand those options. _FORTRANINCFLAGS - - + An automatically-generated construction variable containing the Fortran compiler command-line options for specifying directories to be searched for include files and module files. -The value of $_FORTRANINCFLAGS is created +The value of $_FORTRANINCFLAGS is created by respectively prepending and appending -$INCPREFIX and $INCSUFFIX +$INCPREFIX and $INCSUFFIX to the beginning and end -of each directory in $FORTRANPATH. +of each directory in $FORTRANPATH. FORTRANMODDIR - - + Directory location where the Fortran compiler should place any module files it generates. This variable is empty, by default. Some Fortran compilers will internally append this directory in the search path @@ -2485,48 +2306,44 @@ for module files, as well. FORTRANMODDIRPREFIX - - + The prefix used to specify a module directory on the Fortran compiler command line. This will be prepended to the beginning of the directory -in the $FORTRANMODDIR construction variables -when the $_FORTRANMODFLAG variables is automatically generated. +in the $FORTRANMODDIR construction variables +when the $_FORTRANMODFLAG variables is automatically generated. FORTRANMODDIRSUFFIX - - + The suffix used to specify a module directory on the Fortran compiler command line. This will be appended to the end of the directory -in the $FORTRANMODDIR construction variables -when the $_FORTRANMODFLAG variables is automatically generated. +in the $FORTRANMODDIR construction variables +when the $_FORTRANMODFLAG variables is automatically generated. _FORTRANMODFLAG - - + An automatically-generated construction variable containing the Fortran compiler command-line option for specifying the directory location where the Fortran compiler should place any module files that happen to get generated during compilation. -The value of $_FORTRANMODFLAG is created +The value of $_FORTRANMODFLAG is created by respectively prepending and appending -$FORTRANMODDIRPREFIX and $FORTRANMODDIRSUFFIX -to the beginning and end of the directory in $FORTRANMODDIR. +$FORTRANMODDIRPREFIX and $FORTRANMODDIRSUFFIX +to the beginning and end of the directory in $FORTRANMODDIR. FORTRANMODPREFIX - - + The module file prefix used by the Fortran compiler. SCons assumes that the Fortran compiler follows the quasi-standard naming convention for module files of @@ -2540,8 +2357,7 @@ module file name as scons attempts to resolve dependencies. FORTRANMODSUFFIX - - + The module file suffix used by the Fortran compiler. SCons assumes that the Fortran compiler follows the quasi-standard naming convention for module files of @@ -2555,8 +2371,7 @@ module file name as scons attempts to resolve dependencies. FORTRANPATH - - + The list of directories that the Fortran compiler will search for include files and (for some compilers) module files. The Fortran implicit dependency scanner will search these directories for include files (but @@ -2566,77 +2381,74 @@ include directory arguments in FORTRANFLAGS because the result will be non-portable and the directories will not be searched by the dependency scanner. Note: directory names in FORTRANPATH will be looked-up relative to the SConscript directory when they are used in a command. To force -scons +scons to look-up a directory relative to the root of the source tree use #: - + env = Environment(FORTRANPATH='#/include') - + The directory look-up can also be forced using the -Dir() +Dir() function: - + include = Dir('include') env = Environment(FORTRANPATH=include) - + The directory list will be added to command lines through the automatically-generated -$_FORTRANINCFLAGS +$_FORTRANINCFLAGS construction variable, which is constructed by respectively prepending and appending the values of the -$INCPREFIX and $INCSUFFIX +$INCPREFIX and $INCSUFFIX construction variables to the beginning and end -of each directory in $FORTRANPATH. +of each directory in $FORTRANPATH. Any command lines you define that need the FORTRANPATH directory list should -include $_FORTRANINCFLAGS: +include $_FORTRANINCFLAGS: - + env = Environment(FORTRANCOM="my_compiler $_FORTRANINCFLAGS -c -o $TARGET $SOURCE") FORTRANPPCOM - - + The command line used to compile a Fortran source file to an object file after first running the file through the C preprocessor. -By default, any options specified in the $FORTRANFLAGS, -$CPPFLAGS, -$_CPPDEFFLAGS, -$_FORTRANMODFLAG, and -$_FORTRANINCFLAGS +By default, any options specified in the $FORTRANFLAGS, +$CPPFLAGS, +$_CPPDEFFLAGS, +$_FORTRANMODFLAG, and +$_FORTRANINCFLAGS construction variables are included on this command line. FORTRANPPCOMSTR - - + The string displayed when a Fortran source file is compiled to an object file after first running the file through the C preprocessor. -If this is not set, then $FORTRANPPCOM +If this is not set, then $FORTRANPPCOM (the command line) is displayed. FORTRANPPFILESUFFIXES - - + The list of file extensions for which the compilation + preprocessor pass for FORTRAN dialect will be used. By default, this is ['.fpp', '.FPP'] @@ -2644,15 +2456,14 @@ FORTRAN dialect will be used. By default, this is ['.fpp', '.FPP'] FORTRANSUFFIXES - - + The list of suffixes of files that will be scanned for Fortran implicit dependencies (INCLUDE lines and USE statements). The default list is: - + [".f", ".F", ".for", ".FOR", ".ftn", ".FTN", ".fpp", ".FPP", ".f77", ".F77", ".f90", ".F90", ".f95", ".F95"] @@ -2660,50 +2471,47 @@ The default list is: FRAMEWORKPATH - - + On Mac OS X with gcc, a list containing the paths to search for frameworks. Used by the compiler to find framework-style includes like #include <Fmwk/Header.h>. Used by the linker to find user-specified frameworks when linking (see - $FRAMEWORKS). + $FRAMEWORKS). For example: - + env.AppendUnique(FRAMEWORKPATH='#myframeworkdir') - + will add - + ... -Fmyframeworkdir - + to the compiler and linker command lines. _FRAMEWORKPATH - - + On Mac OS X with gcc, an automatically-generated construction variable containing the linker command-line options corresponding to - $FRAMEWORKPATH. + $FRAMEWORKPATH. FRAMEWORKPATHPREFIX - - + On Mac OS X with gcc, the prefix to be used for the FRAMEWORKPATH entries. - (see $FRAMEWORKPATH). + (see $FRAMEWORKPATH). The default value is . @@ -2711,70 +2519,64 @@ The default list is: FRAMEWORKPREFIX - - + On Mac OS X with gcc, the prefix to be used for linking in frameworks - (see $FRAMEWORKS). + (see $FRAMEWORKS). The default value is . - - _FRAMEWORKS - - - On Mac OS X with gcc, - an automatically-generated construction variable - containing the linker command-line options - for linking with FRAMEWORKS. - - - FRAMEWORKS - - + On Mac OS X with gcc, a list of the framework names to be linked into a program or shared library or bundle. The default value is the empty list. For example: - + env.AppendUnique(FRAMEWORKS=Split('System Cocoa SystemConfiguration')) + + _FRAMEWORKS + + On Mac OS X with gcc, + an automatically-generated construction variable + containing the linker command-line options + for linking with FRAMEWORKS. + + + FRAMEWORKSFLAGS - - + On Mac OS X with gcc, general user-supplied frameworks options to be added at the end of a command line building a loadable module. (This has been largely superseded by - the $FRAMEWORKPATH, $FRAMEWORKPATHPREFIX, - $FRAMEWORKPREFIX and $FRAMEWORKS variables + the $FRAMEWORKPATH, $FRAMEWORKPATHPREFIX, + $FRAMEWORKPREFIX and $FRAMEWORKS variables described above.) GS - - + The Ghostscript program used, e.g. to convert PostScript to PDF files. GSCOM - - + The full Ghostscript command line used for the conversion process. Its default value is $GS $GSFLAGS -sOutputFile=$TARGET $SOURCES. @@ -2782,18 +2584,16 @@ value is $GS $GSFLAGS -sOutputFile=$TARGET $SOURCES GSCOMSTR - - + The string displayed when Ghostscript is called for the conversion process. -If this is not set (the default), then $GSCOM (the command line) is displayed. +If this is not set (the default), then $GSCOM (the command line) is displayed. GSFLAGS - - + General options passed to the Ghostscript program, when converting PostScript to PDF files for example. Its default value is -dNOPAUSE -dBATCH -sDEVICE=pdfwrite @@ -2802,17 +2602,7 @@ is -dNOPAUSE -dBATCH -sDEVICE=pdfwrite HOST_ARCH - - - The name of the host hardware architecture used to create the Environment. - If a platform is specified when creating the Environment, then - that Platform's logic will handle setting this value. - This value is immutable, and should not be changed by the user after - the Environment is initialized. - Currently only set for Win32. - - - + Sets the host architecture for Visual Studio compiler. If not set, default to the detected host architecture: note that this may depend on the python you are using. @@ -2820,20 +2610,27 @@ This variable must be passed as an argument to the Environment() constructor; setting it later has no effect. - -Valid values are the same as for $TARGET_ARCH. + +Valid values are the same as for $TARGET_ARCH. - + This is currently only used on Windows, but in the future it will be used on other OSes as well. - + + The name of the host hardware architecture used to create the Environment. + If a platform is specified when creating the Environment, then + that Platform's logic will handle setting this value. + This value is immutable, and should not be changed by the user after + the Environment is initialized. + Currently only set for Win32. + + HOST_OS - - + The name of the host operating system used to create the Environment. If a platform is specified when creating the Environment, then that Platform's logic will handle setting this value. @@ -2845,75 +2642,69 @@ used on other OSes as well. IDLSUFFIXES - - + The list of suffixes of files that will be scanned for IDL implicit dependencies (#include or import lines). The default list is: - + [".idl", ".IDL"] IMPLIBNOVERSIONSYMLINKS - - -Used to override $SHLIBNOVERSIONSYMLINKS/$LDMODULENOVERSIONSYMLINKS when + +Used to override $SHLIBNOVERSIONSYMLINKS/$LDMODULENOVERSIONSYMLINKS when creating versioned import library for a shared library/loadable module. If not defined, -then $SHLIBNOVERSIONSYMLINKS/$LDMODULENOVERSIONSYMLINKS is used to determine +then $SHLIBNOVERSIONSYMLINKS/$LDMODULENOVERSIONSYMLINKS is used to determine whether to disable symlink generation or not. IMPLIBPREFIX - - + The prefix used for import library names. For example, cygwin uses import libraries (libfoo.dll.a) in pair with dynamic libraries -(cygfoo.dll). The cyglink linker sets -$IMPLIBPREFIX to 'lib' and $SHLIBPREFIX +(cygfoo.dll). The cyglink linker sets +$IMPLIBPREFIX to 'lib' and $SHLIBPREFIX to 'cyg'. IMPLIBSUFFIX - - + The suffix used for import library names. For example, cygwin uses import libraries (libfoo.dll.a) in pair with dynamic libraries -(cygfoo.dll). The cyglink linker sets -$IMPLIBSUFFIX to '.dll.a' and $SHLIBSUFFIX +(cygfoo.dll). The cyglink linker sets +$IMPLIBSUFFIX to '.dll.a' and $SHLIBSUFFIX to '.dll'. IMPLIBVERSION - - -Used to override $SHLIBVERSION/$LDMODULEVERSION when + +Used to override $SHLIBVERSION/$LDMODULEVERSION when generating versioned import library for a shared library/loadable module. If -undefined, the $SHLIBVERSION/$LDMODULEVERSION is used to -determine the version of versioned import library. +undefined, the $SHLIBVERSION/$LDMODULEVERSION is used to +determine the version of versioned import library. IMPLICIT_COMMAND_DEPENDENCIES - - + Controls whether or not SCons will add implicit dependencies for the commands executed to build targets. - + By default, SCons will add to each target an implicit dependency on the command @@ -2927,9 +2718,9 @@ variable in the environment used to execute the command. - + If the construction variable -$IMPLICIT_COMMAND_DEPENDENCIES +$IMPLICIT_COMMAND_DEPENDENCIES is set to a false value (None, False, @@ -2940,41 +2731,38 @@ not be added to the targets built with that construction environment. - + env = Environment(IMPLICIT_COMMAND_DEPENDENCIES = 0) INCPREFIX - - + The prefix used to specify an include directory on the C compiler command line. This will be prepended to the beginning of each directory -in the $CPPPATH and $FORTRANPATH construction variables -when the $_CPPINCFLAGS and $_FORTRANINCFLAGS +in the $CPPPATH and $FORTRANPATH construction variables +when the $_CPPINCFLAGS and $_FORTRANINCFLAGS variables are automatically generated. INCSUFFIX - - + The suffix used to specify an include directory on the C compiler command line. This will be appended to the end of each directory -in the $CPPPATH and $FORTRANPATH construction variables -when the $_CPPINCFLAGS and $_FORTRANINCFLAGS +in the $CPPPATH and $FORTRANPATH construction variables +when the $_CPPINCFLAGS and $_FORTRANINCFLAGS variables are automatically generated. INSTALL - - + A function to be called to install a file into a destination file name. The default function copies the file into the destination @@ -2983,11 +2771,11 @@ to match the source file's). The function takes the following arguments: - + def install(dest, source, env): - + dest is the path name of the destination file. source @@ -3001,21 +2789,19 @@ in force for this file installation. INSTALLSTR - - + The string displayed when a file is installed into a destination file name. The default is: - + Install file: "$SOURCE" as "$TARGET" INTEL_C_COMPILER_VERSION - - + Set by the "intelc" Tool to the major version number of the Intel C compiler selected for use. @@ -3024,27 +2810,23 @@ selected for use. JAR - - + The Java archive tool. - - + The Java archive tool. JARCHDIR - - + The directory to which the Java archive tool should change (using the option). - - + The directory to which the Java archive tool should change (using the @@ -3054,44 +2836,39 @@ option). JARCOM - - + The command line used to call the Java archive tool. - - + The command line used to call the Java archive tool. JARCOMSTR - - + The string displayed when the Java archive tool is called -If this is not set, then $JARCOM (the command line) is displayed. +If this is not set, then $JARCOM (the command line) is displayed. - + env = Environment(JARCOMSTR = "JARchiving $SOURCES into $TARGET") - - + The string displayed when the Java archive tool is called -If this is not set, then $JARCOM (the command line) is displayed. +If this is not set, then $JARCOM (the command line) is displayed. - + env = Environment(JARCOMSTR = "JARchiving $SOURCES into $TARGET") JARFLAGS - - + General options passed to the Java archive tool. By default this is set to @@ -3099,8 +2876,7 @@ to create the necessary jar file. - - + General options passed to the Java archive tool. By default this is set to @@ -3112,14 +2888,12 @@ file. JARSUFFIX - - + The suffix for Java archives: .jar by default. - - + The suffix for Java archives: .jar by default. @@ -3128,11 +2902,10 @@ by default. JAVABOOTCLASSPATH - - + Specifies the list of directories that will be added to the - javac command line + javac command line via the option. The individual directory names will be separated by the operating system's path separate character @@ -3144,51 +2917,46 @@ by default. JAVAC - - + The Java compiler. JAVACCOM - - + The command line used to compile a directory tree containing Java source files to corresponding Java class files. - Any options specified in the $JAVACFLAGS construction variable + Any options specified in the $JAVACFLAGS construction variable are included on this command line. JAVACCOMSTR - - + The string displayed when compiling a directory tree of Java source files to corresponding Java class files. - If this is not set, then $JAVACCOM (the command line) is displayed. + If this is not set, then $JAVACCOM (the command line) is displayed. - + env = Environment(JAVACCOMSTR = "Compiling class files $TARGETS from $SOURCES") JAVACFLAGS - - + General options that are passed to the Java compiler. JAVACLASSDIR - - + The directory in which Java class files may be found. This is stripped from the beginning of any Java .class file names supplied to the @@ -3199,14 +2967,13 @@ by default. JAVACLASSPATH - - + Specifies the list of directories that will be searched for Java .class file. The directories in this list will be added to the - javac and javah command lines + javac and javah command lines via the option. The individual directory names will be separated by the operating system's path separate character @@ -3215,11 +2982,11 @@ by default. on Windows). - + Note that this currently just adds the specified directory via the option. - SCons does not currently search the - $JAVACLASSPATH directories for dependency + SCons does not currently search the + $JAVACLASSPATH directories for dependency .class files. @@ -3227,8 +2994,7 @@ by default. JAVACLASSSUFFIX - - + The suffix for Java class files; .class by default. @@ -3237,41 +3003,37 @@ by default. JAVAH - - + The Java generator for C header and stub files. JAVAHCOM - - + The command line used to generate C header and stub files from Java classes. -Any options specified in the $JAVAHFLAGS construction variable +Any options specified in the $JAVAHFLAGS construction variable are included on this command line. JAVAHCOMSTR - - + The string displayed when C header and stub files are generated from Java classes. -If this is not set, then $JAVAHCOM (the command line) is displayed. +If this is not set, then $JAVAHCOM (the command line) is displayed. - + env = Environment(JAVAHCOMSTR = "Generating header/stub file(s) $TARGETS from $SOURCES") JAVAHFLAGS - - + General options passed to the C header and stub file generator for Java classes. @@ -3279,22 +3041,20 @@ for Java classes. JAVAINCLUDES - - + Include path for Java header files (such as jni.h) JAVASOURCEPATH - - + Specifies the list of directories that will be searched for input .java file. The directories in this list will be added to the - javac command line + javac command line via the option. The individual directory names will be separated by the operating system's path separate character @@ -3303,11 +3063,11 @@ for Java classes. on Windows). - + Note that this currently just adds the specified directory via the option. - SCons does not currently search the - $JAVASOURCEPATH directories for dependency + SCons does not currently search the + $JAVASOURCEPATH directories for dependency .java files. @@ -3315,8 +3075,7 @@ for Java classes. JAVASUFFIX - - + The suffix for Java files; .java by default. @@ -3325,76 +3084,70 @@ for Java classes. JAVAVERSION - - - Specifies the Java version being used by the Java builder. + + Specifies the Java version being used by the Java builder. This is not currently used to select one version of the Java compiler vs. another. Instead, you should set this to specify the version of Java - supported by your javac compiler. + supported by your javac compiler. The default is 1.4. - + This is sometimes necessary because Java 1.5 changed the file names that are created for nested anonymous inner classes, which can cause a mismatch with the files - that SCons expects will be generated by the javac compiler. - Setting $JAVAVERSION to + that SCons expects will be generated by the javac compiler. + Setting $JAVAVERSION to 1.5 (or 1.6, as appropriate) - can make SCons realize that a Java 1.5 or 1.6 + can make SCons realize that a Java 1.5 or 1.6 build is actually up to date. LATEX - - + The LaTeX structured formatter and typesetter. LATEXCOM - - + The command line used to call the LaTeX structured formatter and typesetter. LATEXCOMSTR - - + The string displayed when calling the LaTeX structured formatter and typesetter. -If this is not set, then $LATEXCOM (the command line) is displayed. +If this is not set, then $LATEXCOM (the command line) is displayed. - + env = Environment(LATEXCOMSTR = "Building $TARGET from LaTeX input $SOURCES") LATEXFLAGS - - + General options passed to the LaTeX structured formatter and typesetter. LATEXRETRIES - - + The maximum number of times that LaTeX will be re-run if the .log -generated by the $LATEXCOM command +generated by the $LATEXCOM command indicates that there are undefined references. The default is to try to resolve undefined references by re-running LaTeX up to three times. @@ -3403,91 +3156,92 @@ by re-running LaTeX up to three times. LATEXSUFFIXES - - + The list of suffixes of files that will be scanned for LaTeX implicit dependencies (\include or \import files). The default list is: - + [".tex", ".ltx", ".latex"] LDMODULE - - + The linker for building loadable modules. -By default, this is the same as $SHLINK. +By default, this is the same as $SHLINK. LDMODULECOM - - + The command line for building loadable modules. -On Mac OS X, this uses the $LDMODULE, -$LDMODULEFLAGS and -$FRAMEWORKSFLAGS variables. -On other systems, this is the same as $SHLINK. +On Mac OS X, this uses the $LDMODULE, +$LDMODULEFLAGS and +$FRAMEWORKSFLAGS variables. +On other systems, this is the same as $SHLINK. LDMODULECOMSTR - - + The string displayed when building loadable modules. -If this is not set, then $LDMODULECOM (the command line) is displayed. +If this is not set, then $LDMODULECOM (the command line) is displayed. + + + + + LDMODULEEMITTER + +Contains the emitter specification for the +LoadableModule builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. LDMODULEFLAGS - - + General user options passed to the linker for building loadable modules. LDMODULENOVERSIONSYMLINKS - - -Instructs the LoadableModule builder to not automatically create symlinks + +Instructs the LoadableModule builder to not automatically create symlinks for versioned modules. Defaults to $SHLIBNOVERSIONSYMLINKS LDMODULEPREFIX - - + The prefix used for loadable module file names. On Mac OS X, this is null; on other systems, this is -the same as $SHLIBPREFIX. +the same as $SHLIBPREFIX. _LDMODULESONAME - - + A macro that automatically generates loadable module's SONAME based on $TARGET, -$LDMODULEVERSION and $LDMODULESUFFIX. Used by LoadableModule builder -when the linker tool supports SONAME (e.g. gnulink). +$LDMODULEVERSION and $LDMODULESUFFIX. Used by LoadableModule builder +when the linker tool supports SONAME (e.g. gnulink). LDMODULESUFFIX - - + The suffix used for loadable module file names. On Mac OS X, this is null; on other systems, this is @@ -3497,52 +3251,47 @@ the same as $SHLIBSUFFIX. LDMODULEVERSION - - + When this construction variable is defined, a versioned loadable module -is created by LoadableModule builder. This activates the -$_LDMODULEVERSIONFLAGS and thus modifies the $LDMODULECOM as +is created by LoadableModule builder. This activates the +$_LDMODULEVERSIONFLAGS and thus modifies the $LDMODULECOM as required, adds the version number to the library name, and creates the symlinks -that are needed. $LDMODULEVERSION versions should exist in the same -format as $SHLIBVERSION. - - - - - LDMODULEVERSIONFLAGS - - -Extra flags added to $LDMODULECOM when building versioned -LoadableModule. These flags are only used when $LDMODULEVERSION is -set. +that are needed. $LDMODULEVERSION versions should exist in the same +format as $SHLIBVERSION. _LDMODULEVERSIONFLAGS - - -This macro automatically introduces extra flags to $LDMODULECOM when -building versioned LoadableModule (that is when -$LDMODULEVERSION is set). _LDMODULEVERSIONFLAGS -usually adds $SHLIBVERSIONFLAGS and some extra dynamically generated + +This macro automatically introduces extra flags to $LDMODULECOM when +building versioned LoadableModule (that is when +$LDMODULEVERSION is set). _LDMODULEVERSIONFLAGS +usually adds $SHLIBVERSIONFLAGS and some extra dynamically generated options (such as -Wl,-soname=$_LDMODULESONAME). It is unused by plain (unversioned) loadable modules. + + LDMODULEVERSIONFLAGS + +Extra flags added to $LDMODULECOM when building versioned +LoadableModule. These flags are only used when $LDMODULEVERSION is +set. + + + LEX - - + The lexical analyzer generator. LEXCOM - - + The command line used to call the lexical analyzer generator to generate a source file. @@ -3550,170 +3299,161 @@ to generate a source file. LEXCOMSTR - - + The string displayed when generating a source file using the lexical analyzer generator. -If this is not set, then $LEXCOM (the command line) is displayed. +If this is not set, then $LEXCOM (the command line) is displayed. - + env = Environment(LEXCOMSTR = "Lex'ing $TARGET from $SOURCES") LEXFLAGS - - + General options passed to the lexical analyzer generator. LEXUNISTD - - + Used only on windows environments to set a lex flag to prevent 'unistd.h' from being included. The default value is '--nounistd'. _LIBDIRFLAGS - - + An automatically-generated construction variable containing the linker command-line options for specifying directories to be searched for library. -The value of $_LIBDIRFLAGS is created -by respectively prepending and appending $LIBDIRPREFIX and $LIBDIRSUFFIX +The value of $_LIBDIRFLAGS is created +by respectively prepending and appending $LIBDIRPREFIX and $LIBDIRSUFFIX to the beginning and end -of each directory in $LIBPATH. +of each directory in $LIBPATH. LIBDIRPREFIX - - + The prefix used to specify a library directory on the linker command line. This will be prepended to the beginning of each directory -in the $LIBPATH construction variable -when the $_LIBDIRFLAGS variable is automatically generated. +in the $LIBPATH construction variable +when the $_LIBDIRFLAGS variable is automatically generated. LIBDIRSUFFIX - - + The suffix used to specify a library directory on the linker command line. This will be appended to the end of each directory -in the $LIBPATH construction variable -when the $_LIBDIRFLAGS variable is automatically generated. +in the $LIBPATH construction variable +when the $_LIBDIRFLAGS variable is automatically generated. LIBEMITTER - - -TODO + +Contains the emitter specification for the +StaticLibrary builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. _LIBFLAGS - - + An automatically-generated construction variable containing the linker command-line options for specifying libraries to be linked with the resulting target. -The value of $_LIBFLAGS is created -by respectively prepending and appending $LIBLINKPREFIX and $LIBLINKSUFFIX +The value of $_LIBFLAGS is created +by respectively prepending and appending $LIBLINKPREFIX and $LIBLINKSUFFIX to the beginning and end -of each filename in $LIBS. +of each filename in $LIBS. LIBLINKPREFIX - - + The prefix used to specify a library to link on the linker command line. This will be prepended to the beginning of each library -in the $LIBS construction variable -when the $_LIBFLAGS variable is automatically generated. +in the $LIBS construction variable +when the $_LIBFLAGS variable is automatically generated. LIBLINKSUFFIX - - + The suffix used to specify a library to link on the linker command line. This will be appended to the end of each library -in the $LIBS construction variable -when the $_LIBFLAGS variable is automatically generated. +in the $LIBS construction variable +when the $_LIBFLAGS variable is automatically generated. LIBPATH - - + The list of directories that will be searched for libraries. The implicit dependency scanner will search these directories for include files. Don't explicitly put include directory -arguments in $LINKFLAGS or $SHLINKFLAGS +arguments in $LINKFLAGS or $SHLINKFLAGS because the result will be non-portable and the directories will not be searched by the dependency scanner. Note: directory names in LIBPATH will be looked-up relative to the SConscript directory when they are used in a command. To force -scons +scons to look-up a directory relative to the root of the source tree use #: - + env = Environment(LIBPATH='#/libs') - + The directory look-up can also be forced using the -Dir() +Dir() function: - + libs = Dir('libs') env = Environment(LIBPATH=libs) - + The directory list will be added to command lines through the automatically-generated -$_LIBDIRFLAGS +$_LIBDIRFLAGS construction variable, which is constructed by respectively prepending and appending the values of the -$LIBDIRPREFIX and $LIBDIRSUFFIX +$LIBDIRPREFIX and $LIBDIRSUFFIX construction variables to the beginning and end -of each directory in $LIBPATH. +of each directory in $LIBPATH. Any command lines you define that need the LIBPATH directory list should -include $_LIBDIRFLAGS: +include $_LIBDIRFLAGS: - + env = Environment(LINKCOM="my_linker $_LIBDIRFLAGS $_LIBFLAGS -o $TARGET $SOURCE") LIBPREFIX - - + The prefix used for (static) library file names. A default value is set for each platform (posix, win32, os2, etc.), @@ -3725,65 +3465,63 @@ to reflect the names of the libraries they create. LIBPREFIXES - - + A list of all legal prefixes for library file names. When searching for library dependencies, SCons will look for files with these prefixes, the base library name, -and suffixes in the $LIBSUFFIXES list. +and suffixes in the $LIBSUFFIXES list. LIBS - - + A list of one or more libraries that will be linked with any executable programs created by this environment. - + The library list will be added to command lines through the automatically-generated -$_LIBFLAGS +$_LIBFLAGS construction variable, which is constructed by respectively prepending and appending the values of the -$LIBLINKPREFIX and $LIBLINKSUFFIX +$LIBLINKPREFIX and $LIBLINKSUFFIX construction variables to the beginning and end -of each filename in $LIBS. +of each filename in $LIBS. Any command lines you define that need the LIBS library list should -include $_LIBFLAGS: +include $_LIBFLAGS: - + env = Environment(LINKCOM="my_linker $_LIBDIRFLAGS $_LIBFLAGS -o $TARGET $SOURCE") - + If you add a File object to the -$LIBS +$LIBS list, the name of that file will be added to -$_LIBFLAGS, +$_LIBFLAGS, and thus the link line, as is, without -$LIBLINKPREFIX +$LIBLINKPREFIX or -$LIBLINKSUFFIX. +$LIBLINKSUFFIX. For example: - + env.Append(LIBS=File('/tmp/mylib.so')) - + In all cases, scons will add dependencies from the executable program to all the libraries in this list. @@ -3791,8 +3529,7 @@ all the libraries in this list. LIBSUFFIX - - + The suffix used for (static) library file names. A default value is set for each platform (posix, win32, os2, etc.), @@ -3804,11 +3541,10 @@ to reflect the names of the libraries they create. LIBSUFFIXES - - + A list of all legal suffixes for library file names. When searching for library dependencies, -SCons will look for files with prefixes, in the $LIBPREFIXES list, +SCons will look for files with prefixes, in the $LIBPREFIXES list, the base library name, and these suffixes. @@ -3816,8 +3552,7 @@ and these suffixes. LICENSE - - + The abbreviated name, preferably the SPDX code, of the license under which this project is released (GPL-3.0, LGPL-2.1, BSD-2-Clause etc.). See http://www.opensource.org/licenses/alphabetical @@ -3827,9 +3562,8 @@ for a list of license names and SPDX codes. LINESEPARATOR - - -The separator used by the Substfile and Textfile builders. + +The separator used by the Substfile and Textfile builders. This value is used between sources when constructing the target. It defaults to the current system line separator. @@ -3837,13 +3571,12 @@ It defaults to the current system line separator. LINGUAS_FILE - - -The $LINGUAS_FILE defines file(s) containing list of additional linguas -to be processed by POInit, POUpdate or MOFiles -builders. It also affects Translate builder. If the variable contains -a string, it defines name of the list file. The $LINGUAS_FILE may be a -list of file names as well. If $LINGUAS_FILE is set to + +The $LINGUAS_FILE defines file(s) containing list of additional linguas +to be processed by POInit, POUpdate or MOFiles +builders. It also affects Translate builder. If the variable contains +a string, it defines name of the list file. The $LINGUAS_FILE may be a +list of file names as well. If $LINGUAS_FILE is set to True (or non-zero numeric value), the list will be read from default file named LINGUAS. @@ -3853,54 +3586,50 @@ default file named LINK - - + The linker. LINKCOM - - + The command line used to link object files into an executable. LINKCOMSTR - - + The string displayed when object files are linked into an executable. -If this is not set, then $LINKCOM (the command line) is displayed. +If this is not set, then $LINKCOM (the command line) is displayed. - + env = Environment(LINKCOMSTR = "Linking $TARGET") LINKFLAGS - - + General user options passed to the linker. Note that this variable should not contain -(or similar) options for linking with the libraries listed in $LIBS, +(or similar) options for linking with the libraries listed in $LIBS, nor (or similar) library search path options -that scons generates automatically from $LIBPATH. +that scons generates automatically from $LIBPATH. See -$_LIBFLAGS +$_LIBFLAGS above, for the variable that expands to library-link options, and -$_LIBDIRFLAGS +$_LIBDIRFLAGS above, for the variable that expands to library search path options. @@ -3908,42 +3637,37 @@ for the variable that expands to library search path options. M4 - - + The M4 macro preprocessor. M4COM - - + The command line used to pass files through the M4 macro preprocessor. M4COMSTR - - + The string displayed when a file is passed through the M4 macro preprocessor. -If this is not set, then $M4COM (the command line) is displayed. +If this is not set, then $M4COM (the command line) is displayed. M4FLAGS - - + General options passed to the M4 macro preprocessor. MAKEINDEX - - + The makeindex generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter. @@ -3951,8 +3675,7 @@ LaTeX structured formatter and typesetter. MAKEINDEXCOM - - + The command line used to call the makeindex generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter. @@ -3961,19 +3684,17 @@ typesetter. MAKEINDEXCOMSTR - - + The string displayed when calling the makeindex generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter. -If this is not set, then $MAKEINDEXCOM (the command line) is displayed. +If this is not set, then $MAKEINDEXCOM (the command line) is displayed. MAKEINDEXFLAGS - - + General options passed to the makeindex generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter. @@ -3981,8 +3702,7 @@ and typesetter and the LaTeX structured formatter and typesetter. MAXLINELENGTH - - + The maximum number of characters allowed on an external command line. On Win32 systems, link lines longer than this many characters @@ -3992,178 +3712,159 @@ are linked via a temporary file name. MIDL - - + The Microsoft IDL compiler. MIDLCOM - - + The command line used to pass files to the Microsoft IDL compiler. MIDLCOMSTR - - + The string displayed when the Microsoft IDL compiler is called. -If this is not set, then $MIDLCOM (the command line) is displayed. +If this is not set, then $MIDLCOM (the command line) is displayed. MIDLFLAGS - - + General options passed to the Microsoft IDL compiler. MOSUFFIX - - + Suffix used for MO files (default: '.mo'). -See msgfmt tool and MOFiles builder. +See msgfmt tool and MOFiles builder. MSGFMT - - + Absolute path to msgfmt(1) binary, found by Detect(). -See msgfmt tool and MOFiles builder. +See msgfmt tool and MOFiles builder. MSGFMTCOM - - + Complete command line to run msgfmt(1) program. -See msgfmt tool and MOFiles builder. +See msgfmt tool and MOFiles builder. MSGFMTCOMSTR - - + String to display when msgfmt(1) is invoked -(default: '', which means ``print $MSGFMTCOM''). -See msgfmt tool and MOFiles builder. +(default: '', which means ``print $MSGFMTCOM''). +See msgfmt tool and MOFiles builder. MSGFMTFLAGS - - + Additional flags to msgfmt(1). -See msgfmt tool and MOFiles builder. +See msgfmt tool and MOFiles builder. MSGINIT - - + Path to msginit(1) program (found via Detect()). -See msginit tool and POInit builder. +See msginit tool and POInit builder. MSGINITCOM - - + Complete command line to run msginit(1) program. -See msginit tool and POInit builder. +See msginit tool and POInit builder. MSGINITCOMSTR - - + String to display when msginit(1) is invoked -(default: '', which means ``print $MSGINITCOM''). -See msginit tool and POInit builder. +(default: '', which means ``print $MSGINITCOM''). +See msginit tool and POInit builder. MSGINITFLAGS - - + List of additional flags to msginit(1) (default: []). -See msginit tool and POInit builder. +See msginit tool and POInit builder. _MSGINITLOCALE - - + Internal ``macro''. Computes locale (language) name based on target filename (default: '${TARGET.filebase}' ). - -See msginit tool and POInit builder. + +See msginit tool and POInit builder. MSGMERGE - - + Absolute path to msgmerge(1) binary as found by Detect(). -See msgmerge tool and POUpdate builder. +See msgmerge tool and POUpdate builder. MSGMERGECOM - - + Complete command line to run msgmerge(1) command. -See msgmerge tool and POUpdate builder. +See msgmerge tool and POUpdate builder. MSGMERGECOMSTR - - + String to be displayed when msgmerge(1) is invoked -(default: '', which means ``print $MSGMERGECOM''). -See msgmerge tool and POUpdate builder. +(default: '', which means ``print $MSGMERGECOM''). +See msgmerge tool and POUpdate builder. MSGMERGEFLAGS - - + Additional flags to msgmerge(1) command. -See msgmerge tool and POUpdate builder. +See msgmerge tool and POUpdate builder. MSSDK_DIR - - + The directory containing the Microsoft SDK (either Platform SDK or Windows SDK) to be used for compilation. @@ -4172,8 +3873,7 @@ to be used for compilation. MSSDK_VERSION - - + The version string of the Microsoft SDK (either Platform SDK or Windows SDK) to be used for compilation. @@ -4189,8 +3889,7 @@ and MSVC_BATCH - - + When set to any true value, specifies that SCons should batch compilation of object files @@ -4201,7 +3900,7 @@ and were configured in SCons using the same construction environment will be built in a single call to the compiler. Only source files that have changed since their object files were built will be passed to each compiler invocation -(via the $CHANGED_SOURCES construction variable). +(via the $CHANGED_SOURCES construction variable). Any compilations where the object (target) file base name (minus the .obj) does not match the source file base name @@ -4211,13 +3910,12 @@ will be compiled separately. MSVC_USE_SCRIPT - - + Use a batch script to set up Microsoft Visual Studio compiler - -$MSVC_USE_SCRIPT overrides $MSVC_VERSION and $TARGET_ARCH. + +$MSVC_USE_SCRIPT overrides $MSVC_VERSION and $TARGET_ARCH. If set to the name of a Visual Studio .bat file (e.g. vcvars.bat), SCons will run that bat file and extract the relevant variables from the result (typically %INCLUDE%, %LIB%, and %PATH%). Setting @@ -4229,13 +3927,12 @@ window and importing the shell's environment variables. MSVC_UWP_APP - - + Build libraries for a Universal Windows Platform (UWP) Application. - -If $MSVC_UWP_APP is set, the Visual Studio environment will be set up to point + +If $MSVC_UWP_APP is set, the Visual Studio environment will be set up to point to the Windows Store compatible libraries and Visual Studio runtimes. In doing so, any libraries that are built will be able to be used in a UWP App and published to the Windows Store. @@ -4244,7 +3941,7 @@ This variable must be passed as an argument to the Environment() constructor; setting it later has no effect. - + Valid values are '1' or '0' @@ -4252,20 +3949,19 @@ Valid values are '1' or '0' MSVC_VERSION - - + Sets the preferred version of Microsoft Visual C/C++ to use. - -If $MSVC_VERSION is not set, SCons will (by default) select the + +If $MSVC_VERSION is not set, SCons will (by default) select the latest version of Visual C/C++ installed on your system. If the specified version isn't installed, tool initialization will fail. This variable must be passed as an argument to the Environment() constructor; setting it later has no effect. - + Valid values for Windows are 14.2, 14.1, @@ -4292,16 +3988,15 @@ Versions ending in Exp refer to "Express" or MSVS - - + When the Microsoft Visual Studio tools are initialized, they set up this dictionary with the following keys: - + VERSION the version of MSVS being used (can be set via - $MSVS_VERSION) + $MSVS_VERSION) VERSIONS @@ -4357,20 +4052,19 @@ Versions ending in Exp refer to "Express" or - If a value is not set, it was not available in the registry. + If a value is not set, it was not available in the registry. MSVS_ARCH - - Sets the architecture for which the generated project(s) should build. - + Sets the architecture for which the generated project(s) should build. + The default value is x86. - amd64 is also supported by SCons for + amd64 is also supported by SCons for most Visual Studio versions. Since Visual Studio 2015 arm is supported, and since Visual Studio 2017 arm64 is supported. - Trying to set $MSVS_ARCH + Trying to set $MSVS_ARCH to an architecture that's not supported for a given Visual Studio version will generate an error. @@ -4378,8 +4072,7 @@ Versions ending in Exp refer to "Express" or MSVS_PROJECT_GUID - - + The string placed in a generated Microsoft Visual Studio project file as the value of the ProjectGUID attribute. There is no default @@ -4391,8 +4084,7 @@ defined, a new GUID is generated. MSVS_SCC_AUX_PATH - - + The path name placed in a generated Microsoft Visual Studio project file as the value of the SccAuxPath attribute if the @@ -4405,8 +4097,7 @@ no default value. MSVS_SCC_CONNECTION_ROOT - - + The root path of projects in your SCC workspace, i.e the path under which all project and solution files will be generated. It is used as a reference path from which the @@ -4430,8 +4121,7 @@ no default value. MSVS_SCC_PROJECT_NAME - - + The project name placed in a generated Microsoft Visual Studio project file as the value of the SccProjectName attribute if the @@ -4446,8 +4136,7 @@ no default value. MSVS_SCC_PROVIDER - - + The string placed in a generated Microsoft Visual Studio project file as the value of the SccProvider attribute. The string is @@ -4460,10 +4149,9 @@ no default value. MSVS_VERSION - - Sets the preferred version of Microsoft Visual Studio to use. - - If $MSVS_VERSION is not set, SCons will (by default) + Sets the preferred version of Microsoft Visual Studio to use. + + If $MSVS_VERSION is not set, SCons will (by default) select the latest version of Visual Studio installed on your system. So, if you have version 6 and version 7 (MSVS .NET) installed, it will prefer version 7. You can override this by @@ -4472,19 +4160,18 @@ no default value. version ('6.0' or '7.0', for example). If the specified version isn't installed, tool initialization will fail. - - This is obsolete: use $MSVC_VERSION instead. If - $MSVS_VERSION is set and $MSVC_VERSION is - not, $MSVC_VERSION will be set automatically to - $MSVS_VERSION. If both are set to different values, + + This is obsolete: use $MSVC_VERSION instead. If + $MSVS_VERSION is set and $MSVC_VERSION is + not, $MSVC_VERSION will be set automatically to + $MSVS_VERSION. If both are set to different values, scons will raise an error. MSVSBUILDCOM - - + The build command line placed in a generated Microsoft Visual Studio project file. The default is to have Visual Studio invoke SCons with any specified build targets. @@ -4493,8 +4180,7 @@ no default value. MSVSCLEANCOM - - + The clean command line placed in a generated Microsoft Visual Studio project file. The default is to have Visual Studio invoke SCons with the -c option to remove any specified @@ -4504,8 +4190,7 @@ no default value. MSVSENCODING - - + The encoding string placed in a generated Microsoft Visual Studio project file. The default is encoding Windows-1252. @@ -4514,14 +4199,12 @@ no default value. MSVSPROJECTCOM - - The action used to generate Microsoft Visual Studio project files. + The action used to generate Microsoft Visual Studio project files. MSVSPROJECTSUFFIX - - + The suffix used for Microsoft Visual Studio project (DSP) files. The default value is .vcproj when using Visual Studio version 7.x (.NET) or later version, @@ -4532,8 +4215,7 @@ no default value. MSVSREBUILDCOM - - + The rebuild command line placed in a generated Microsoft Visual Studio project file. The default is to have Visual Studio invoke SCons with any specified rebuild targets. @@ -4543,8 +4225,7 @@ no default value. MSVSSCONS - - + The SCons used in generated Microsoft Visual Studio project files. The default is the version of SCons being used to generate the project file. @@ -4553,8 +4234,7 @@ no default value. MSVSSCONSCOM - - + The default SCons command used in generated Microsoft Visual Studio project files. @@ -4562,34 +4242,30 @@ no default value. MSVSSCONSCRIPT - - - The sconscript file (that is, SConstruct or SConscript + + The sconscript file (that is, SConstruct or SConscript file) that will be invoked by Visual Studio project files - (through the $MSVSSCONSCOM variable). The default + (through the $MSVSSCONSCOM variable). The default is the same sconscript file that contains the call to - MSVSProject to build the project file. + MSVSProject to build the project file. MSVSSCONSFLAGS - - + The SCons flags used in generated Microsoft Visual Studio project files. MSVSSOLUTIONCOM - - The action used to generate Microsoft Visual Studio solution files. + The action used to generate Microsoft Visual Studio solution files. MSVSSOLUTIONSUFFIX - - + The suffix used for Microsoft Visual Studio solution (DSW) files. The default value is .sln when using Visual Studio version 7.x (.NET), and @@ -4600,43 +4276,38 @@ no default value. MT - - + The program used on Windows systems to embed manifests into DLLs and EXEs. -See also $WINDOWS_EMBED_MANIFEST. +See also $WINDOWS_EMBED_MANIFEST. MTEXECOM - - + The Windows command line used to embed manifests into executables. -See also $MTSHLIBCOM. +See also $MTSHLIBCOM. MTFLAGS - - -Flags passed to the $MT manifest embedding program (Windows only). + +Flags passed to the $MT manifest embedding program (Windows only). MTSHLIBCOM - - + The Windows command line used to embed manifests into shared libraries (DLLs). -See also $MTEXECOM. +See also $MTEXECOM. MWCW_VERSION - - + The version number of the MetroWerks CodeWarrior C compiler to be used. @@ -4644,8 +4315,7 @@ to be used. MWCW_VERSIONS - - + A list of installed versions of the MetroWerks CodeWarrior C compiler on this system. @@ -4653,16 +4323,14 @@ on this system. NAME - - + Specfies the name of the project to package. no_import_lib - - + When set to non-zero, suppresses creation of a corresponding Windows static import lib by the SharedLibrary @@ -4676,24 +4344,21 @@ when using Microsoft Visual Studio. OBJPREFIX - - + The prefix used for (static) object file names. OBJSUFFIX - - + The suffix used for (static) object file names. PACKAGEROOT - - + Specifies the directory where all files in resulting archive will be placed if applicable. The default value is "$NAME-$VERSION". @@ -4701,12 +4366,11 @@ placed if applicable. The default value is "$NAME-$VERSION". PACKAGETYPE - - + Selects the package type to build. Currently these are available: - + * msi - Microsoft Installer * rpm - Redhat Package Manger * ipkg - Itsy Package Management System @@ -4718,15 +4382,14 @@ Selects the package type to build. Currently these are available: * src_zip - zip file source - + This may be overridden with the "package_type" command line option. PACKAGEVERSION - - + The version of the package (not the underlying project). This is currently only used by the rpm packager and should reflect changes in the packaging, @@ -4736,8 +4399,7 @@ not the underlying project code itself. PCH - - + The Microsoft Visual C++ precompiled header that will be used when compiling object files. This variable is ignored by tools other than Microsoft Visual C++. When this variable is @@ -4747,44 +4409,40 @@ dependencies for the PCH file. Example: - + env['PCH'] = 'StdAfx.pch' PCHCOM - - + The command line used by the -PCH +PCH builder to generated a precompiled header. PCHCOMSTR - - + The string displayed when generating a precompiled header. -If this is not set, then $PCHCOM (the command line) is displayed. +If this is not set, then $PCHCOM (the command line) is displayed. PCHPDBFLAGS - - + A construction variable that, when expanded, adds the /yD flag to the command line -only if the $PDB construction variable is set. +only if the $PDB construction variable is set. PCHSTOP - - + This variable specifies how much of a source file is precompiled. This variable is ignored by tools other than Microsoft Visual C++, or when the PCH variable is not being used. When this variable is define it @@ -4793,15 +4451,14 @@ is included at the end of the precompiled portion of the source files, or the empty string if the "#pragma hrdstop" construct is being used: - + env['PCHSTOP'] = 'StdAfx.h' PDB - - + The Microsoft Visual C++ PDB file that will store debugging information for object files, shared libraries, and programs. This variable is ignored by tools other than Microsoft Visual C++. @@ -4812,11 +4469,11 @@ dependencies for the PDB file. Example: - + env['PDB'] = 'hello.pdb' - + The Visual C++ compiler switch that SCons uses by default to generate PDB information is . This works correctly with parallel () builds @@ -4828,116 +4485,104 @@ Using the instead may yield improved link-time performance, although parallel builds will no longer work. You can generate PDB files with the -switch by overriding the default $CCPDBFLAGS variable; +switch by overriding the default $CCPDBFLAGS variable; see the entry for that variable for specific examples. PDFCOM - - -A deprecated synonym for $DVIPDFCOM. + +A deprecated synonym for $DVIPDFCOM. PDFLATEX - - -The pdflatex utility. + +The pdflatex utility. PDFLATEXCOM - - -The command line used to call the pdflatex utility. + +The command line used to call the pdflatex utility. PDFLATEXCOMSTR - - -The string displayed when calling the pdflatex utility. -If this is not set, then $PDFLATEXCOM (the command line) is displayed. + +The string displayed when calling the pdflatex utility. +If this is not set, then $PDFLATEXCOM (the command line) is displayed. - + env = Environment(PDFLATEX;COMSTR = "Building $TARGET from LaTeX input $SOURCES") PDFLATEXFLAGS - - -General options passed to the pdflatex utility. + +General options passed to the pdflatex utility. PDFPREFIX - - + The prefix used for PDF file names. PDFSUFFIX - - + The suffix used for PDF file names. PDFTEX - - -The pdftex utility. + +The pdftex utility. PDFTEXCOM - - -The command line used to call the pdftex utility. + +The command line used to call the pdftex utility. PDFTEXCOMSTR - - -The string displayed when calling the pdftex utility. -If this is not set, then $PDFTEXCOM (the command line) is displayed. + +The string displayed when calling the pdftex utility. +If this is not set, then $PDFTEXCOM (the command line) is displayed. - + env = Environment(PDFTEXCOMSTR = "Building $TARGET from TeX input $SOURCES") PDFTEXFLAGS - - -General options passed to the pdftex utility. + +General options passed to the pdftex utility. PKGCHK - - + On Solaris systems, the package-checking program that will -be used (along with $PKGINFO) +be used (along with $PKGINFO) to look for installed versions of the Sun PRO C++ compiler. The default is @@ -4947,11 +4592,10 @@ The default is PKGINFO - - + On Solaris systems, the package information program that will -be used (along with $PKGCHK) +be used (along with $PKGCHK) to look for installed versions of the Sun PRO C++ compiler. The default is @@ -4961,15 +4605,14 @@ The default is PLATFORM - - + The name of the platform used to create the Environment. If no platform is specified when the Environment is created, -scons +scons autodetects the platform. - + env = Environment(tools = []) if env['PLATFORM'] == 'cygwin': Tool('mingw')(env) @@ -4980,45 +4623,41 @@ else: POAUTOINIT - - -The $POAUTOINIT variable, if set to True (on non-zero -numeric value), let the msginit tool to automatically initialize + +The $POAUTOINIT variable, if set to True (on non-zero +numeric value), let the msginit tool to automatically initialize missing PO files with msginit(1). This applies to both, -POInit and POUpdate builders (and others that use any of +POInit and POUpdate builders (and others that use any of them). POCREATE_ALIAS - - -Common alias for all PO files created with POInit + +Common alias for all PO files created with POInit builder (default: 'po-create'). -See msginit tool and POInit builder. +See msginit tool and POInit builder. POSUFFIX - - + Suffix used for PO files (default: '.po') -See msginit tool and POInit builder. +See msginit tool and POInit builder. POTDOMAIN - - -The $POTDOMAIN defines default domain, used to generate -POT filename as $POTDOMAIN.pot when + +The $POTDOMAIN defines default domain, used to generate +POT filename as $POTDOMAIN.pot when no POT file name is provided by the user. This applies to -POTUpdate, POInit and POUpdate builders (and -builders, that use them, e.g. Translate). Normally (if $POTDOMAIN is +POTUpdate, POInit and POUpdate builders (and +builders, that use them, e.g. Translate). Normally (if $POTDOMAIN is not defined), the builders use messages.pot as default POT file name. @@ -5026,37 +4665,33 @@ not defined), the builders use messages.pot as default POTSUFFIX - - + Suffix used for PO Template files (default: '.pot'). -See xgettext tool and POTUpdate builder. +See xgettext tool and POTUpdate builder. POTUPDATE_ALIAS - - + Name of the common phony target for all PO Templates created with -POUpdate (default: 'pot-update'). -See xgettext tool and POTUpdate builder. +POUpdate (default: 'pot-update'). +See xgettext tool and POTUpdate builder. POUPDATE_ALIAS - - + Common alias for all PO files being defined with -POUpdate builder (default: 'po-update'). -See msgmerge tool and POUpdate builder. +POUpdate builder (default: 'po-update'). +See msgmerge tool and POUpdate builder. PRINT_CMD_LINE_FUNC - - + A Python function used to print the command lines as they are executed (assuming command printing is not disabled by the @@ -5074,20 +4709,20 @@ the source(s) used (file node, list, or string name(s)), and the environment being used. - + The function must do the printing itself. The default implementation, used if this variable is not set or is None, is: - + def print_cmd_line(s, target, source, env): sys.stdout.write(s + "\n") - + Here's an example of a more interesting function: - + def print_cmd_line(s, target, source, env): sys.stdout.write("Building %s -> %s...\n" % (' and '.join([str(x) for x in source]), @@ -5096,7 +4731,7 @@ env=Environment(PRINT_CMD_LINE_FUNC=print_cmd_line) env.Program('foo', 'foo.c') - + This just prints "Building targetname from sourcename..." instead of the actual commands. Such a function could also log the actual commands to a log file, @@ -5106,66 +4741,61 @@ for example. PROGEMITTER - - -TODO + +Contains the emitter specification for the +Program builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. PROGPREFIX - - + The prefix used for executable file names. PROGSUFFIX - - + The suffix used for executable file names. PSCOM - - + The command line used to convert TeX DVI files into a PostScript file. PSCOMSTR - - + The string displayed when a TeX DVI file is converted into a PostScript file. -If this is not set, then $PSCOM (the command line) is displayed. +If this is not set, then $PSCOM (the command line) is displayed. PSPREFIX - - + The prefix used for PostScript file names. PSSUFFIX - - + The prefix used for PostScript file names. QT_AUTOSCAN - - + Turn off scanning for mocable files. Use the Moc Builder to explicitly specify files to run moc on. @@ -5173,74 +4803,66 @@ specify files to run moc on. QT_BINPATH - - + The path where the qt binaries are installed. -The default value is '$QTDIR/bin'. +The default value is '$QTDIR/bin'. QT_CPPPATH - - + The path where the qt header files are installed. -The default value is '$QTDIR/include'. +The default value is '$QTDIR/include'. Note: If you set this variable to None, -the tool won't change the $CPPPATH +the tool won't change the $CPPPATH construction variable. QT_DEBUG - - + Prints lots of debugging information while scanning for moc files. QT_LIB - - + Default value is 'qt'. You may want to set this to 'qt-mt'. Note: If you set -this variable to None, the tool won't change the $LIBS variable. +this variable to None, the tool won't change the $LIBS variable. QT_LIBPATH - - + The path where the qt libraries are installed. -The default value is '$QTDIR/lib'. +The default value is '$QTDIR/lib'. Note: If you set this variable to None, -the tool won't change the $LIBPATH +the tool won't change the $LIBPATH construction variable. QT_MOC - - -Default value is '$QT_BINPATH/moc'. + +Default value is '$QT_BINPATH/moc'. QT_MOCCXXPREFIX - - + Default value is ''. Prefix for moc output files, when source is a cxx file. QT_MOCCXXSUFFIX - - + Default value is '.moc'. Suffix for moc output files, when source is a cxx file. @@ -5248,25 +4870,22 @@ file. QT_MOCFROMCXXCOM - - + Command to generate a moc file from a cpp file. QT_MOCFROMCXXCOMSTR - - + The string displayed when generating a moc file from a cpp file. -If this is not set, then $QT_MOCFROMCXXCOM (the command line) is displayed. +If this is not set, then $QT_MOCFROMCXXCOM (the command line) is displayed. QT_MOCFROMCXXFLAGS - - + Default value is '-i'. These flags are passed to moc, when moccing a C++ file. @@ -5274,25 +4893,22 @@ C++ file. QT_MOCFROMHCOM - - + Command to generate a moc file from a header. QT_MOCFROMHCOMSTR - - + The string displayed when generating a moc file from a cpp file. -If this is not set, then $QT_MOCFROMHCOM (the command line) is displayed. +If this is not set, then $QT_MOCFROMHCOM (the command line) is displayed. QT_MOCFROMHFLAGS - - + Default value is ''. These flags are passed to moc, when moccing a header file. @@ -5300,50 +4916,44 @@ file. QT_MOCHPREFIX - - + Default value is 'moc_'. Prefix for moc output files, when source is a header. QT_MOCHSUFFIX - - -Default value is '$CXXFILESUFFIX'. Suffix for moc output files, when source is + +Default value is '$CXXFILESUFFIX'. Suffix for moc output files, when source is a header. QT_UIC - - -Default value is '$QT_BINPATH/uic'. + +Default value is '$QT_BINPATH/uic'. QT_UICCOM - - + Command to generate header files from .ui files. QT_UICCOMSTR - - + The string displayed when generating header files from .ui files. -If this is not set, then $QT_UICCOM (the command line) is displayed. +If this is not set, then $QT_UICCOM (the command line) is displayed. QT_UICDECLFLAGS - - + Default value is ''. These flags are passed to uic, when creating a a h file from a .ui file. @@ -5351,24 +4961,21 @@ file from a .ui file. QT_UICDECLPREFIX - - + Default value is ''. Prefix for uic generated header files. QT_UICDECLSUFFIX - - + Default value is '.h'. Suffix for uic generated header files. QT_UICIMPLFLAGS - - + Default value is ''. These flags are passed to uic, when creating a cxx file from a .ui file. @@ -5376,33 +4983,29 @@ file from a .ui file. QT_UICIMPLPREFIX - - + Default value is 'uic_'. Prefix for uic generated implementation files. QT_UICIMPLSUFFIX - - -Default value is '$CXXFILESUFFIX'. Suffix for uic generated implementation + +Default value is '$CXXFILESUFFIX'. Suffix for uic generated implementation files. QT_UISUFFIX - - + Default value is '.ui'. Suffix of designer input files. QTDIR - - + The qt tool tries to take this from os.environ. It also initializes all QT_* construction variables listed below. @@ -5411,24 +5014,24 @@ with python's os.path.join() method, but are listed here with the '/' separator for easier reading.) In addition, the construction environment -variables $CPPPATH, -$LIBPATH and -$LIBS may be modified +variables $CPPPATH, +$LIBPATH and +$LIBS may be modified and the variables -$PROGEMITTER, $SHLIBEMITTER and $LIBEMITTER +$PROGEMITTER, $SHLIBEMITTER and $LIBEMITTER are modified. Because the build-performance is affected when using this tool, you have to explicitly specify it at Environment creation: - + Environment(tools=['default','qt']) - + The qt tool supports the following operations: - + Automatic moc file generation from header files. You do not have to specify moc files explicitly, the tool does it for you. However, there are a few preconditions to do so: Your header file must have @@ -5436,11 +5039,11 @@ 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 -Moc() +Moc() builder method. - + Automatic moc file generation from cxx files. As stated in the qt documentation, include the moc file at the end of the cxx file. Note that you have to include the file, which is generated @@ -5449,11 +5052,11 @@ by the transformation ${QT_MOCCXXPREFIX}<basename>${QT_MOCCXXSUFFIX}, by d do not include the correct file. If you are using VariantDir, you may need to specify duplicate=1. You can turn off automatic moc file generation by setting QT_AUTOSCAN to 0. See also the corresponding -Moc +Moc builder method. - + Automatic handling of .ui files. The implementation files generated from .ui files are handled much the same as yacc or lex files. Each .ui file given as a source of Program, Library or @@ -5461,52 +5064,47 @@ SharedLibrary will generate three files, the declaration file, the implementation file and a moc file. Because there are also generated headers, you may need to specify duplicate=1 in calls to VariantDir. See also the corresponding -Uic +Uic builder method. RANLIB - - + The archive indexer. RANLIBCOM - - + The command line used to index a static library archive. RANLIBCOMSTR - - + The string displayed when a static library archive is indexed. -If this is not set, then $RANLIBCOM (the command line) is displayed. +If this is not set, then $RANLIBCOM (the command line) is displayed. - + env = Environment(RANLIBCOMSTR = "Indexing $TARGET") RANLIBFLAGS - - + General options passed to the archive indexer. RC - - + The resource compiler used to build a Microsoft Visual C++ resource file. @@ -5514,8 +5112,7 @@ a Microsoft Visual C++ resource file. RCCOM - - + The command line used to build a Microsoft Visual C++ resource file. @@ -5523,66 +5120,60 @@ a Microsoft Visual C++ resource file. RCCOMSTR - - + The string displayed when invoking the resource compiler to build a Microsoft Visual C++ resource file. -If this is not set, then $RCCOM (the command line) is displayed. +If this is not set, then $RCCOM (the command line) is displayed. RCFLAGS - - + The flags passed to the resource compiler by the RES builder. RCINCFLAGS - - + An automatically-generated construction variable containing the command-line options for specifying directories to be searched by the resource compiler. -The value of $RCINCFLAGS is created +The value of $RCINCFLAGS is created by respectively prepending and appending -$RCINCPREFIX and $RCINCSUFFIX +$RCINCPREFIX and $RCINCSUFFIX to the beginning and end -of each directory in $CPPPATH. +of each directory in $CPPPATH. RCINCPREFIX - - + The prefix (flag) used to specify an include directory on the resource compiler command line. This will be prepended to the beginning of each directory -in the $CPPPATH construction variable -when the $RCINCFLAGS variable is expanded. +in the $CPPPATH construction variable +when the $RCINCFLAGS variable is expanded. RCINCSUFFIX - - + The suffix used to specify an include directory on the resource compiler command line. This will be appended to the end of each directory -in the $CPPPATH construction variable -when the $RCINCFLAGS variable is expanded. +in the $CPPPATH construction variable +when the $RCINCFLAGS variable is expanded. RDirs - - + A function that converts a string into a list of Dir instances by searching the repositories. @@ -5590,39 +5181,35 @@ searching the repositories. REGSVR - - + The program used on Windows systems to register a newly-built DLL library -whenever the SharedLibrary builder +whenever the SharedLibrary builder is passed a keyword argument of register=1. REGSVRCOM - - + The command line used on Windows systems to register a newly-built DLL library -whenever the SharedLibrary builder +whenever the SharedLibrary builder is passed a keyword argument of register=1. REGSVRCOMSTR - - + The string displayed when registering a newly-built DLL file. -If this is not set, then $REGSVRCOM (the command line) is displayed. +If this is not set, then $REGSVRCOM (the command line) is displayed. REGSVRFLAGS - - + Flags passed to the DLL registration program on Windows systems when a newly-built DLL library is registered. By default, @@ -5634,232 +5221,212 @@ and requiring user attention. RMIC - - + The Java RMI stub compiler. RMICCOM - - + The command line used to compile stub and skeleton class files from Java classes that contain RMI implementations. -Any options specified in the $RMICFLAGS construction variable +Any options specified in the $RMICFLAGS construction variable are included on this command line. RMICCOMSTR - - + The string displayed when compiling stub and skeleton class files from Java classes that contain RMI implementations. -If this is not set, then $RMICCOM (the command line) is displayed. +If this is not set, then $RMICCOM (the command line) is displayed. - + env = Environment(RMICCOMSTR = "Generating stub/skeleton class files $TARGETS from $SOURCES") RMICFLAGS - - + General options passed to the Java RMI stub compiler. - - _RPATH - - -An automatically-generated construction variable -containing the rpath flags to be used when linking -a program with shared libraries. -The value of $_RPATH is created -by respectively prepending $RPATHPREFIX and appending $RPATHSUFFIX -to the beginning and end -of each directory in $RPATH. - - - RPATH - - + A list of paths to search for shared libraries when running programs. Currently only used in the GNU (gnulink), IRIX (sgilink) and Sun (sunlink) linkers. Ignored on platforms and toolchains that don't support it. Note that the paths added to RPATH are not transformed by -scons +scons in any way: if you want an absolute path, you must make it absolute yourself. + + _RPATH + +An automatically-generated construction variable +containing the rpath flags to be used when linking +a program with shared libraries. +The value of $_RPATH is created +by respectively prepending $RPATHPREFIX and appending $RPATHSUFFIX +to the beginning and end +of each directory in $RPATH. + + + RPATHPREFIX - - + The prefix used to specify a directory to be searched for shared libraries when running programs. This will be prepended to the beginning of each directory -in the $RPATH construction variable -when the $_RPATH variable is automatically generated. +in the $RPATH construction variable +when the $_RPATH variable is automatically generated. RPATHSUFFIX - - + The suffix used to specify a directory to be searched for shared libraries when running programs. This will be appended to the end of each directory -in the $RPATH construction variable -when the $_RPATH variable is automatically generated. +in the $RPATH construction variable +when the $_RPATH variable is automatically generated. RPCGEN - - + The RPC protocol compiler. RPCGENCLIENTFLAGS - - + Options passed to the RPC protocol compiler when generating client side stubs. These are in addition to any flags specified in the -$RPCGENFLAGS +$RPCGENFLAGS construction variable. RPCGENFLAGS - - + General options passed to the RPC protocol compiler. RPCGENHEADERFLAGS - - + Options passed to the RPC protocol compiler when generating a header file. These are in addition to any flags specified in the -$RPCGENFLAGS +$RPCGENFLAGS construction variable. RPCGENSERVICEFLAGS - - + Options passed to the RPC protocol compiler when generating server side stubs. These are in addition to any flags specified in the -$RPCGENFLAGS +$RPCGENFLAGS construction variable. RPCGENXDRFLAGS - - + Options passed to the RPC protocol compiler when generating XDR routines. These are in addition to any flags specified in the -$RPCGENFLAGS +$RPCGENFLAGS construction variable. SCANNERS - - + A list of the available implicit dependency scanners. New file scanners may be added by appending to this list, although the more flexible approach is to associate scanners with a specific Builder. -See the sections "Builder Objects" -and "Scanner Objects," -below, for more information. +See the manpage sections "Builder Objects" +and "Scanner Objects" +for more information. SCONS_HOME - - + The (optional) path to the SCons library directory, initialized from the external environment. If set, this is used to construct a shorter and more efficient search path in - the $MSVSSCONS command line executed from Microsoft + the $MSVSSCONS command line executed from Microsoft Visual Studio project files. SHCC - - + The C compiler used for generating shared-library objects. SHCCCOM - - + The command line used to compile a C source file to a shared-library object file. -Any options specified in the $SHCFLAGS, -$SHCCFLAGS and -$CPPFLAGS construction variables +Any options specified in the $SHCFLAGS, +$SHCCFLAGS and +$CPPFLAGS construction variables are included on this command line. SHCCCOMSTR - - + The string displayed when a C source file is compiled to a shared object file. -If this is not set, then $SHCCCOM (the command line) is displayed. +If this is not set, then $SHCCCOM (the command line) is displayed. - + env = Environment(SHCCCOMSTR = "Compiling shared object $TARGET") SHCCFLAGS - - + Options that are passed to the C and C++ compilers to generate shared-library objects. @@ -5867,8 +5434,7 @@ to generate shared-library objects. SHCFLAGS - - + Options that are passed to the C compiler (only; not C++) to generate shared-library objects. @@ -5876,42 +5442,38 @@ to generate shared-library objects. SHCXX - - + The C++ compiler used for generating shared-library objects. SHCXXCOM - - + The command line used to compile a C++ source file to a shared-library object file. -Any options specified in the $SHCXXFLAGS and -$CPPFLAGS construction variables +Any options specified in the $SHCXXFLAGS and +$CPPFLAGS construction variables are included on this command line. SHCXXCOMSTR - - + The string displayed when a C++ source file is compiled to a shared object file. -If this is not set, then $SHCXXCOM (the command line) is displayed. +If this is not set, then $SHCXXCOM (the command line) is displayed. - + env = Environment(SHCXXCOMSTR = "Compiling shared object $TARGET") SHCXXFLAGS - - + Options that are passed to the C++ compiler to generate shared-library objects. @@ -5919,8 +5481,7 @@ to generate shared-library objects. SHDC - - + The name of the compiler to use when compiling D source destined to be in a shared objects. @@ -5928,32 +5489,28 @@ destined to be in a shared objects. SHDCOM - - + The command line to use when compiling code to be part of shared objects. SHDLIBVERSION - - + SHDLIBVERSION. SHDLIBVERSIONFLAGS - - + SHDLIBVERSIONFLAGS. SHDLINK - - + The linker to use when creating shared objects for code bases include D sources. @@ -5961,55 +5518,50 @@ include D sources. SHDLINKCOM - - + The command line to use when generating shared objects. SHDLINKFLAGS - - + The list of flags to use when generating a shared object. SHELL - - + A string naming the shell program that will be passed to the -$SPAWN +$SPAWN function. See the -$SPAWN +$SPAWN construction variable for more information. SHF03 - - + The Fortran 03 compiler used for generating shared-library objects. -You should normally set the $SHFORTRAN variable, +You should normally set the $SHFORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $SHF03 if you need to use a specific compiler +You only need to set $SHF03 if you need to use a specific compiler or compiler version for Fortran 03 files. SHF03COM - - + The command line used to compile a Fortran 03 source file to a shared-library object file. -You only need to set $SHF03COM if you need to use a specific +You only need to set $SHF03COM if you need to use a specific command line for Fortran 03 files. -You should normally set the $SHFORTRANCOM variable, +You should normally set the $SHFORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -6017,24 +5569,22 @@ for all Fortran versions. SHF03COMSTR - - + The string displayed when a Fortran 03 source file is compiled to a shared-library object file. -If this is not set, then $SHF03COM or $SHFORTRANCOM +If this is not set, then $SHF03COM or $SHFORTRANCOM (the command line) is displayed. SHF03FLAGS - - + Options that are passed to the Fortran 03 compiler to generated shared-library objects. -You only need to set $SHF03FLAGS if you need to define specific +You only need to set $SHF03FLAGS if you need to define specific user options for Fortran 03 files. -You should normally set the $SHFORTRANFLAGS variable, +You should normally set the $SHFORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -6043,16 +5593,15 @@ for all Fortran versions. SHF03PPCOM - - + 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 $SHF03FLAGS and $CPPFLAGS construction variables +Any options specified in the $SHF03FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $SHF03PPCOM if you need to use a specific +You only need to set $SHF03PPCOM if you need to use a specific C-preprocessor command line for Fortran 03 files. -You should normally set the $SHFORTRANPPCOM variable, +You should normally set the $SHFORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -6060,38 +5609,35 @@ for all Fortran versions. SHF03PPCOMSTR - - + 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 $SHF03PPCOM or $SHFORTRANPPCOM +If this is not set, then $SHF03PPCOM or $SHFORTRANPPCOM (the command line) is displayed. SHF08 - - + The Fortran 08 compiler used for generating shared-library objects. -You should normally set the $SHFORTRAN variable, +You should normally set the $SHFORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $SHF08 if you need to use a specific compiler +You only need to set $SHF08 if you need to use a specific compiler or compiler version for Fortran 08 files. SHF08COM - - + The command line used to compile a Fortran 08 source file to a shared-library object file. -You only need to set $SHF08COM if you need to use a specific +You only need to set $SHF08COM if you need to use a specific command line for Fortran 08 files. -You should normally set the $SHFORTRANCOM variable, +You should normally set the $SHFORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -6099,24 +5645,22 @@ for all Fortran versions. SHF08COMSTR - - + The string displayed when a Fortran 08 source file is compiled to a shared-library object file. -If this is not set, then $SHF08COM or $SHFORTRANCOM +If this is not set, then $SHF08COM or $SHFORTRANCOM (the command line) is displayed. SHF08FLAGS - - + Options that are passed to the Fortran 08 compiler to generated shared-library objects. -You only need to set $SHF08FLAGS if you need to define specific +You only need to set $SHF08FLAGS if you need to define specific user options for Fortran 08 files. -You should normally set the $SHFORTRANFLAGS variable, +You should normally set the $SHFORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -6125,16 +5669,15 @@ for all Fortran versions. SHF08PPCOM - - + The command line used to compile a Fortran 08 source file to a shared-library object file after first running the file through the C preprocessor. -Any options specified in the $SHF08FLAGS and $CPPFLAGS construction variables +Any options specified in the $SHF08FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $SHF08PPCOM if you need to use a specific +You only need to set $SHF08PPCOM if you need to use a specific C-preprocessor command line for Fortran 08 files. -You should normally set the $SHFORTRANPPCOM variable, +You should normally set the $SHFORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -6142,38 +5685,35 @@ for all Fortran versions. SHF08PPCOMSTR - - + The string displayed when a Fortran 08 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 $SHF08PPCOM or $SHFORTRANPPCOM +If this is not set, then $SHF08PPCOM or $SHFORTRANPPCOM (the command line) is displayed. SHF77 - - + The Fortran 77 compiler used for generating shared-library objects. -You should normally set the $SHFORTRAN variable, +You should normally set the $SHFORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $SHF77 if you need to use a specific compiler +You only need to set $SHF77 if you need to use a specific compiler or compiler version for Fortran 77 files. SHF77COM - - + The command line used to compile a Fortran 77 source file to a shared-library object file. -You only need to set $SHF77COM if you need to use a specific +You only need to set $SHF77COM if you need to use a specific command line for Fortran 77 files. -You should normally set the $SHFORTRANCOM variable, +You should normally set the $SHFORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -6181,24 +5721,22 @@ for all Fortran versions. SHF77COMSTR - - + The string displayed when a Fortran 77 source file is compiled to a shared-library object file. -If this is not set, then $SHF77COM or $SHFORTRANCOM +If this is not set, then $SHF77COM or $SHFORTRANCOM (the command line) is displayed. SHF77FLAGS - - + Options that are passed to the Fortran 77 compiler to generated shared-library objects. -You only need to set $SHF77FLAGS if you need to define specific +You only need to set $SHF77FLAGS if you need to define specific user options for Fortran 77 files. -You should normally set the $SHFORTRANFLAGS variable, +You should normally set the $SHFORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -6207,16 +5745,15 @@ for all Fortran versions. SHF77PPCOM - - + The command line used to compile a Fortran 77 source file to a shared-library object file after first running the file through the C preprocessor. -Any options specified in the $SHF77FLAGS and $CPPFLAGS construction variables +Any options specified in the $SHF77FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $SHF77PPCOM if you need to use a specific +You only need to set $SHF77PPCOM if you need to use a specific C-preprocessor command line for Fortran 77 files. -You should normally set the $SHFORTRANPPCOM variable, +You should normally set the $SHFORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -6224,38 +5761,35 @@ for all Fortran versions. SHF77PPCOMSTR - - + The string displayed when a Fortran 77 source file is compiled to a shared-library object file after first running the file through the C preprocessor. -If this is not set, then $SHF77PPCOM or $SHFORTRANPPCOM +If this is not set, then $SHF77PPCOM or $SHFORTRANPPCOM (the command line) is displayed. SHF90 - - + The Fortran 90 compiler used for generating shared-library objects. -You should normally set the $SHFORTRAN variable, +You should normally set the $SHFORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $SHF90 if you need to use a specific compiler +You only need to set $SHF90 if you need to use a specific compiler or compiler version for Fortran 90 files. SHF90COM - - + The command line used to compile a Fortran 90 source file to a shared-library object file. -You only need to set $SHF90COM if you need to use a specific +You only need to set $SHF90COM if you need to use a specific command line for Fortran 90 files. -You should normally set the $SHFORTRANCOM variable, +You should normally set the $SHFORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -6263,24 +5797,22 @@ for all Fortran versions. SHF90COMSTR - - + The string displayed when a Fortran 90 source file is compiled to a shared-library object file. -If this is not set, then $SHF90COM or $SHFORTRANCOM +If this is not set, then $SHF90COM or $SHFORTRANCOM (the command line) is displayed. SHF90FLAGS - - + Options that are passed to the Fortran 90 compiler to generated shared-library objects. -You only need to set $SHF90FLAGS if you need to define specific +You only need to set $SHF90FLAGS if you need to define specific user options for Fortran 90 files. -You should normally set the $SHFORTRANFLAGS variable, +You should normally set the $SHFORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -6289,16 +5821,15 @@ for all Fortran versions. SHF90PPCOM - - + The command line used to compile a Fortran 90 source file to a shared-library object file after first running the file through the C preprocessor. -Any options specified in the $SHF90FLAGS and $CPPFLAGS construction variables +Any options specified in the $SHF90FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $SHF90PPCOM if you need to use a specific +You only need to set $SHF90PPCOM if you need to use a specific C-preprocessor command line for Fortran 90 files. -You should normally set the $SHFORTRANPPCOM variable, +You should normally set the $SHFORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -6306,38 +5837,35 @@ for all Fortran versions. SHF90PPCOMSTR - - + The string displayed when a Fortran 90 source file is compiled to a shared-library object file after first running the file through the C preprocessor. -If this is not set, then $SHF90PPCOM or $SHFORTRANPPCOM +If this is not set, then $SHF90PPCOM or $SHFORTRANPPCOM (the command line) is displayed. SHF95 - - + The Fortran 95 compiler used for generating shared-library objects. -You should normally set the $SHFORTRAN variable, +You should normally set the $SHFORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $SHF95 if you need to use a specific compiler +You only need to set $SHF95 if you need to use a specific compiler or compiler version for Fortran 95 files. SHF95COM - - + The command line used to compile a Fortran 95 source file to a shared-library object file. -You only need to set $SHF95COM if you need to use a specific +You only need to set $SHF95COM if you need to use a specific command line for Fortran 95 files. -You should normally set the $SHFORTRANCOM variable, +You should normally set the $SHFORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -6345,24 +5873,22 @@ for all Fortran versions. SHF95COMSTR - - + The string displayed when a Fortran 95 source file is compiled to a shared-library object file. -If this is not set, then $SHF95COM or $SHFORTRANCOM +If this is not set, then $SHF95COM or $SHFORTRANCOM (the command line) is displayed. SHF95FLAGS - - + Options that are passed to the Fortran 95 compiler to generated shared-library objects. -You only need to set $SHF95FLAGS if you need to define specific +You only need to set $SHF95FLAGS if you need to define specific user options for Fortran 95 files. -You should normally set the $SHFORTRANFLAGS variable, +You should normally set the $SHFORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -6371,16 +5897,15 @@ for all Fortran versions. SHF95PPCOM - - + The command line used to compile a Fortran 95 source file to a shared-library object file after first running the file through the C preprocessor. -Any options specified in the $SHF95FLAGS and $CPPFLAGS construction variables +Any options specified in the $SHF95FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $SHF95PPCOM if you need to use a specific +You only need to set $SHF95PPCOM if you need to use a specific C-preprocessor command line for Fortran 95 files. -You should normally set the $SHFORTRANPPCOM variable, +You should normally set the $SHFORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -6388,28 +5913,25 @@ for all Fortran versions. SHF95PPCOMSTR - - + The string displayed when a Fortran 95 source file is compiled to a shared-library object file after first running the file through the C preprocessor. -If this is not set, then $SHF95PPCOM or $SHFORTRANPPCOM +If this is not set, then $SHF95PPCOM or $SHFORTRANPPCOM (the command line) is displayed. SHFORTRAN - - + The default Fortran compiler used for generating shared-library objects. SHFORTRANCOM - - + The command line used to compile a Fortran source file to a shared-library object file. @@ -6417,19 +5939,17 @@ to a shared-library object file. SHFORTRANCOMSTR - - + The string displayed when a Fortran source file is compiled to a shared-library object file. -If this is not set, then $SHFORTRANCOM +If this is not set, then $SHFORTRANCOM (the command line) is displayed. SHFORTRANFLAGS - - + Options that are passed to the Fortran compiler to generate shared-library objects. @@ -6437,94 +5957,88 @@ to generate shared-library objects. SHFORTRANPPCOM - - + The command line used to compile a Fortran source file to a shared-library object file after first running the file through the C preprocessor. Any options specified -in the $SHFORTRANFLAGS and -$CPPFLAGS construction variables +in the $SHFORTRANFLAGS and +$CPPFLAGS construction variables are included on this command line. SHFORTRANPPCOMSTR - - + The string displayed when a Fortran source file is compiled to a shared-library object file after first running the file through the C preprocessor. -If this is not set, then $SHFORTRANPPCOM +If this is not set, then $SHFORTRANPPCOM (the command line) is displayed. SHLIBEMITTER - - -TODO + +Contains the emitter specification for the +SharedLibrary builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. SHLIBNOVERSIONSYMLINKS - - -Instructs the SharedLibrary builder to not create symlinks for versioned + +Instructs the SharedLibrary builder to not create symlinks for versioned shared libraries. SHLIBPREFIX - - + The prefix used for shared library file names. _SHLIBSONAME - - + A macro that automatically generates shared library's SONAME based on $TARGET, -$SHLIBVERSION and $SHLIBSUFFIX. Used by SharedLibrary builder when -the linker tool supports SONAME (e.g. gnulink). +$SHLIBVERSION and $SHLIBSUFFIX. Used by SharedLibrary builder when +the linker tool supports SONAME (e.g. gnulink). SHLIBSUFFIX - - + The suffix used for shared library file names. SHLIBVERSION - - + When this construction variable is defined, a versioned shared library -is created by SharedLibrary builder. This activates the -$_SHLIBVERSIONFLAGS and thus modifies the $SHLINKCOM as +is created by the SharedLibrary builder. This activates the +$_SHLIBVERSIONFLAGS and thus modifies the $SHLINKCOM as required, adds the version number to the library name, and creates the symlinks -that are needed. $SHLIBVERSION versions should exist as alpha-numeric, +that are needed. $SHLIBVERSION versions should exist as alpha-numeric, decimal-delimited values as defined by the regular expression "\w+[\.\w+]*". -Example $SHLIBVERSION values include '1', '1.2.3', and '1.2.gitaa412c8b'. +Example $SHLIBVERSION values include '1', '1.2.3', and '1.2.gitaa412c8b'. _SHLIBVERSIONFLAGS - - -This macro automatically introduces extra flags to $SHLINKCOM when -building versioned SharedLibrary (that is when $SHLIBVERSION -is set). _SHLIBVERSIONFLAGS usually adds $SHLIBVERSIONFLAGS + +This macro automatically introduces extra flags to $SHLINKCOM when +building versioned SharedLibrary (that is when $SHLIBVERSION +is set). _SHLIBVERSIONFLAGS usually adds $SHLIBVERSIONFLAGS and some extra dynamically generated options (such as -Wl,-soname=$_SHLIBSONAME. It is unused by "plain" (unversioned) shared libraries. @@ -6533,63 +6047,58 @@ and some extra dynamically generated options (such as SHLIBVERSIONFLAGS - - -Extra flags added to $SHLINKCOM when building versioned -SharedLibrary. These flags are only used when $SHLIBVERSION is + +Extra flags added to $SHLINKCOM when building versioned +SharedLibrary. These flags are only used when $SHLIBVERSION is set. SHLINK - - + The linker for programs that use shared libraries. SHLINKCOM - - + The command line used to link programs using shared libraries. SHLINKCOMSTR - - + The string displayed when programs using shared libraries are linked. -If this is not set, then $SHLINKCOM (the command line) is displayed. +If this is not set, then $SHLINKCOM (the command line) is displayed. - + env = Environment(SHLINKCOMSTR = "Linking shared $TARGET") SHLINKFLAGS - - + General user options passed to the linker for programs using shared libraries. Note that this variable should not contain -(or similar) options for linking with the libraries listed in $LIBS, +(or similar) options for linking with the libraries listed in $LIBS, nor (or similar) include search path options -that scons generates automatically from $LIBPATH. +that scons generates automatically from $LIBPATH. See -$_LIBFLAGS +$_LIBFLAGS above, for the variable that expands to library-link options, and -$_LIBDIRFLAGS +$_LIBDIRFLAGS above, for the variable that expands to library search path options. @@ -6597,46 +6106,42 @@ for the variable that expands to library search path options. SHOBJPREFIX - - + The prefix used for shared object file names. SHOBJSUFFIX - - + The suffix used for shared object file names. SONAME - - + Variable used to hard-code SONAME for versioned shared library/loadable module. env.SharedLibrary('test', 'test.c', SHLIBVERSION='0.1.2', SONAME='libtest.so.2') -The variable is used, for example, by gnulink linker tool. +The variable is used, for example, by gnulink linker tool. SOURCE - - + A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). SOURCE_URL - - + The URL (web address) of the location from which the project was retrieved. @@ -6648,27 +6153,26 @@ field in the controlling information for Ipkg and RPM packages. SOURCES - - + A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). SPAWN - - + A command interpreter function that will be called to execute command line strings. The function must expect the following arguments: - + def spawn(shell, escape, cmd, args, env): - + sh is a string naming the shell program to use. escape @@ -6686,17 +6190,15 @@ in which the command should be executed. STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME - - + When this variable is true, static objects and shared objects are assumed to be the same; that is, SCons does not check for linking static objects into a shared library. SUBST_DICT - - -The dictionary used by the Substfile or Textfile builders + +The dictionary used by the Substfile or Textfile builders for substitution values. It can be anything acceptable to the dict() constructor, so in addition to a dictionary, @@ -6706,26 +6208,23 @@ lists of tuples are also acceptable. SUBSTFILEPREFIX - - -The prefix used for Substfile file names, + +The prefix used for Substfile file names, the null string by default. SUBSTFILESUFFIX - - -The suffix used for Substfile file names, + +The suffix used for Substfile file names, the null string by default. SUMMARY - - + A short summary of what the project is about. This is used to fill in the Summary: @@ -6738,35 +6237,32 @@ field in MSI packages. SWIG - - + The scripting language wrapper and interface generator. SWIGCFILESUFFIX - - + The suffix that will be used for intermediate C source files generated by the scripting language wrapper and interface generator. The default value is -_wrap$CFILESUFFIX. +_wrap$CFILESUFFIX. By default, this value is used whenever the option is not specified as part of the -$SWIGFLAGS +$SWIGFLAGS construction variable. SWIGCOM - - + The command line used to call the scripting language wrapper and interface generator. @@ -6774,35 +6270,32 @@ the scripting language wrapper and interface generator. SWIGCOMSTR - - + The string displayed when calling the scripting language wrapper and interface generator. -If this is not set, then $SWIGCOM (the command line) is displayed. +If this is not set, then $SWIGCOM (the command line) is displayed. SWIGCXXFILESUFFIX - - + The suffix that will be used for intermediate C++ source files generated by the scripting language wrapper and interface generator. The default value is -_wrap$CFILESUFFIX. +_wrap$CFILESUFFIX. By default, this value is used whenever the -c++ option is specified as part of the -$SWIGFLAGS +$SWIGFLAGS construction variable. SWIGDIRECTORSUFFIX - - + The suffix that will be used for intermediate C++ header files generated by the scripting language wrapper and interface generator. These are only generated for C++ code when the SWIG 'directors' feature is @@ -6814,8 +6307,7 @@ The default value is SWIGFLAGS - - + General options passed to the scripting language wrapper and interface generator. This is where you should set @@ -6826,61 +6318,57 @@ or whatever other options you want to specify to SWIG. If you set the option in this variable, -scons +scons will, by default, generate a C++ intermediate source file with the extension that is specified as the -$CXXFILESUFFIX +$CXXFILESUFFIX variable. _SWIGINCFLAGS - - + An automatically-generated construction variable containing the SWIG command-line options for specifying directories to be searched for included files. -The value of $_SWIGINCFLAGS is created +The value of $_SWIGINCFLAGS is created by respectively prepending and appending -$SWIGINCPREFIX and $SWIGINCSUFFIX +$SWIGINCPREFIX and $SWIGINCSUFFIX to the beginning and end -of each directory in $SWIGPATH. +of each directory in $SWIGPATH. SWIGINCPREFIX - - + The prefix used to specify an include directory on the SWIG command line. This will be prepended to the beginning of each directory -in the $SWIGPATH construction variable -when the $_SWIGINCFLAGS variable is automatically generated. +in the $SWIGPATH construction variable +when the $_SWIGINCFLAGS variable is automatically generated. SWIGINCSUFFIX - - + The suffix used to specify an include directory on the SWIG command line. This will be appended to the end of each directory -in the $SWIGPATH construction variable -when the $_SWIGINCFLAGS variable is automatically generated. +in the $SWIGPATH construction variable +when the $_SWIGINCFLAGS variable is automatically generated. SWIGOUTDIR - - + Specifies the output directory in which the scripting language wrapper and interface generator should place generated language-specific files. This will be used by SCons to identify -the files that will be generated by the swig call, +the files that will be generated by the swig call, and translated into the swig -outdir option on the command line. @@ -6888,15 +6376,14 @@ and translated into the SWIGPATH - - + The list of directories that the scripting language wrapper and interface generate will search for included files. The SWIG implicit dependency scanner will search these directories for include files. The default value is an empty list. - + Don't explicitly put include directory arguments in SWIGFLAGS; the result will be non-portable @@ -6904,116 +6391,103 @@ and the directories will not be searched by the dependency scanner. Note: directory names in SWIGPATH will be looked-up relative to the SConscript directory when they are used in a command. To force -scons +scons to look-up a directory relative to the root of the source tree use #: - + env = Environment(SWIGPATH='#/include') - + The directory look-up can also be forced using the -Dir() +Dir() function: - + include = Dir('include') env = Environment(SWIGPATH=include) - + The directory list will be added to command lines through the automatically-generated -$_SWIGINCFLAGS +$_SWIGINCFLAGS construction variable, which is constructed by respectively prepending and appending the values of the -$SWIGINCPREFIX and $SWIGINCSUFFIX +$SWIGINCPREFIX and $SWIGINCSUFFIX construction variables to the beginning and end -of each directory in $SWIGPATH. +of each directory in $SWIGPATH. Any command lines you define that need the SWIGPATH directory list should -include $_SWIGINCFLAGS: +include $_SWIGINCFLAGS: - + env = Environment(SWIGCOM="my_swig -o $TARGET $_SWIGINCFLAGS $SOURCES") SWIGVERSION - - + The version number of the SWIG tool. TAR - - + The tar archiver. TARCOM - - + The command line used to call the tar archiver. TARCOMSTR - - + The string displayed when archiving files using the tar archiver. -If this is not set, then $TARCOM (the command line) is displayed. +If this is not set, then $TARCOM (the command line) is displayed. - + env = Environment(TARCOMSTR = "Archiving $TARGET") TARFLAGS - - + General options passed to the tar archiver. TARGET - - + A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). TARGET_ARCH - - - The name of the target hardware architecture for the compiled objects - created by this Environment. - This defaults to the value of HOST_ARCH, and the user can override it. - Currently only set for Win32. - - - + Sets the target architecture for Visual Studio compiler (i.e. the arch of the binaries generated by the compiler). If not set, default to -$HOST_ARCH, or, if that is unset, to the architecture of the +$HOST_ARCH, or, if that is unset, to the architecture of the running machine's OS (note that the python build or architecture has no effect). This variable must be passed as an argument to the Environment() @@ -7025,7 +6499,7 @@ all installed MSVC's that support the TARGET_ARCH, selecting the latest version for use. - + Valid values for Windows are x86, arm, @@ -7041,12 +6515,17 @@ and ia64 (Itanium). For example, if you want to compile 64-bit binaries, you would set TARGET_ARCH='x86_64' in your SCons environment. - + + The name of the target hardware architecture for the compiled objects + created by this Environment. + This defaults to the value of HOST_ARCH, and the user can override it. + Currently only set for Win32. + + TARGET_OS - - + The name of the target operating system for the compiled objects created by this Environment. This defaults to the value of HOST_OS, and the user can override it. @@ -7056,27 +6535,25 @@ For example, if you want to compile 64-bit binaries, you would set TARGETS - - + A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). TARSUFFIX - - + The suffix used for tar file names. TEMPFILEARGJOIN - - -The string (or character) to be used to join the arguments passed to TEMPFILE when command line exceeds the limit set by $MAXLINELENGTH. + +The string (or character) to be used to join the arguments passed to TEMPFILE when command line exceeds the limit set by $MAXLINELENGTH. The default value is a space. However for MSVC, MSLINK the default is a line seperator characters as defined by os.linesep. Note this value is used literally and not expanded by the subst logic. @@ -7084,8 +6561,7 @@ Note this value is used literally and not expanded by the subst logic. TEMPFILEPREFIX - - + The prefix for a temporary file used to store lines lines longer than $MAXLINELENGTH as operations which call out to a shell will fail @@ -7101,8 +6577,7 @@ or '-via' for ARM toolchain. TEMPFILESUFFIX - - + The suffix used for the temporary file name used for long command lines. The name should include the dot ('.') if one is wanted as @@ -7113,46 +6588,41 @@ The default is '.lnk'. TEX - - + The TeX formatter and typesetter. TEXCOM - - + The command line used to call the TeX formatter and typesetter. TEXCOMSTR - - + The string displayed when calling the TeX formatter and typesetter. -If this is not set, then $TEXCOM (the command line) is displayed. +If this is not set, then $TEXCOM (the command line) is displayed. - + env = Environment(TEXCOMSTR = "Building $TARGET from TeX input $SOURCES") TEXFLAGS - - + General options passed to the TeX formatter and typesetter. TEXINPUTS - - + List of directories that the LaTeX program will search for include directories. The LaTeX implicit dependency scanner will search these @@ -7162,26 +6632,23 @@ directories for \include and \import files. TEXTFILEPREFIX - - -The prefix used for Textfile file names, + +The prefix used for Textfile file names, the null string by default. TEXTFILESUFFIX - - -The suffix used for Textfile file names; + +The suffix used for Textfile file names; .txt by default. TOOLS - - + A list of the names of the Tool specifications that are part of this construction environment. @@ -7189,28 +6656,27 @@ that are part of this construction environment. UNCHANGED_SOURCES - - + A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). UNCHANGED_TARGETS - - + A reserved variable name that may not be set or used in a construction environment. -(See "Variable Substitution," below.) +(See the manpage section "Variable Substitution" +for more information). VENDOR - - + The person or organization who supply the packaged software. This is used to fill in the Vendor: @@ -7223,68 +6689,60 @@ field in the controlling information for MSI packages. VERSION - - + The version of the project, specified as a string. WIN32_INSERT_DEF - - -A deprecated synonym for $WINDOWS_INSERT_DEF. + +A deprecated synonym for $WINDOWS_INSERT_DEF. WIN32DEFPREFIX - - -A deprecated synonym for $WINDOWSDEFPREFIX. + +A deprecated synonym for $WINDOWSDEFPREFIX. WIN32DEFSUFFIX - - -A deprecated synonym for $WINDOWSDEFSUFFIX. + +A deprecated synonym for $WINDOWSDEFSUFFIX. WIN32EXPPREFIX - - -A deprecated synonym for $WINDOWSEXPSUFFIX. + +A deprecated synonym for $WINDOWSEXPSUFFIX. WIN32EXPSUFFIX - - -A deprecated synonym for $WINDOWSEXPSUFFIX. + +A deprecated synonym for $WINDOWSEXPSUFFIX. WINDOWS_EMBED_MANIFEST - - + Set this variable to True or 1 to embed the compiler-generated manifest (normally ${TARGET}.manifest) into all Windows exes and DLLs built with this environment, as a resource during their link step. -This is done using $MT and $MTEXECOM and $MTSHLIBCOM. +This is done using $MT and $MTEXECOM and $MTSHLIBCOM. WINDOWS_INSERT_DEF - - + When this is set to true, a library build of a Windows shared library (.dll file) @@ -7298,10 +6756,9 @@ The default is 0 (do not build a .def file). WINDOWS_INSERT_MANIFEST - - + When this is set to true, -scons +scons will be aware of the .manifest files generated by Microsoft Visua C/C++ 8. @@ -7310,40 +6767,35 @@ files generated by Microsoft Visua C/C++ 8. WINDOWSDEFPREFIX - - + The prefix used for Windows .def file names. WINDOWSDEFSUFFIX - - + The suffix used for Windows .def file names. WINDOWSEXPPREFIX - - + The prefix used for Windows .exp file names. WINDOWSEXPSUFFIX - - + The suffix used for Windows .exp file names. WINDOWSPROGMANIFESTPREFIX - - + The prefix used for executable program .manifest files generated by Microsoft Visual C/C++. @@ -7351,8 +6803,7 @@ generated by Microsoft Visual C/C++. WINDOWSPROGMANIFESTSUFFIX - - + The suffix used for executable program .manifest files generated by Microsoft Visual C/C++. @@ -7360,8 +6811,7 @@ generated by Microsoft Visual C/C++. WINDOWSSHLIBMANIFESTPREFIX - - + The prefix used for shared library .manifest files generated by Microsoft Visual C/C++. @@ -7369,8 +6819,7 @@ generated by Microsoft Visual C/C++. WINDOWSSHLIBMANIFESTSUFFIX - - + The suffix used for shared library .manifest files generated by Microsoft Visual C/C++. @@ -7378,8 +6827,7 @@ generated by Microsoft Visual C/C++. X_IPK_DEPENDS - - + This is used to fill in the Depends: field in the controlling information for Ipkg packages. @@ -7388,8 +6836,7 @@ field in the controlling information for Ipkg packages. X_IPK_DESCRIPTION - - + This is used to fill in the Description: field in the controlling information for Ipkg packages. @@ -7400,8 +6847,7 @@ The default value is X_IPK_MAINTAINER - - + This is used to fill in the Maintainer: field in the controlling information for Ipkg packages. @@ -7410,8 +6856,7 @@ field in the controlling information for Ipkg packages. X_IPK_PRIORITY - - + This is used to fill in the Priority: field in the controlling information for Ipkg packages. @@ -7420,8 +6865,7 @@ field in the controlling information for Ipkg packages. X_IPK_SECTION - - + This is used to fill in the Section: field in the controlling information for Ipkg packages. @@ -7430,8 +6874,7 @@ field in the controlling information for Ipkg packages. X_MSI_LANGUAGE - - + This is used to fill in the Language: attribute in the controlling information for MSI packages. @@ -7440,8 +6883,7 @@ attribute in the controlling information for MSI packages. X_MSI_LICENSE_TEXT - - + The text of the software license in RTF format. Carriage return characters will be replaced with the RTF equivalent \\par. @@ -7450,16 +6892,14 @@ replaced with the RTF equivalent \\par. X_MSI_UPGRADE_CODE - - + TODO X_RPM_AUTOREQPROV - - + This is used to fill in the AutoReqProv: field in the RPM @@ -7469,16 +6909,14 @@ field in the RPM X_RPM_BUILD - - + internal, but overridable X_RPM_BUILDREQUIRES - - + This is used to fill in the BuildRequires: field in the RPM @@ -7489,24 +6927,21 @@ Note this should only be used on a host managed by rpm as the dependencies will X_RPM_BUILDROOT - - + internal, but overridable X_RPM_CLEAN - - + internal, but overridable X_RPM_CONFLICTS - - + This is used to fill in the Conflicts: field in the RPM @@ -7516,8 +6951,7 @@ field in the RPM X_RPM_DEFATTR - - + This value is used as the default attributes for the files in the RPM package. The default value is @@ -7527,8 +6961,7 @@ The default value is X_RPM_DISTRIBUTION - - + This is used to fill in the Distribution: field in the RPM @@ -7538,8 +6971,7 @@ field in the RPM X_RPM_EPOCH - - + This is used to fill in the Epoch: field in the RPM @@ -7549,8 +6981,7 @@ field in the RPM X_RPM_EXCLUDEARCH - - + This is used to fill in the ExcludeArch: field in the RPM @@ -7560,8 +6991,7 @@ field in the RPM X_RPM_EXLUSIVEARCH - - + This is used to fill in the ExclusiveArch: field in the RPM @@ -7571,8 +7001,7 @@ field in the RPM X_RPM_EXTRADEFS - - + A list used to supply extra defintions or flags to be added to the RPM .spec file. Each item is added as-is with a carriage return appended. @@ -7588,7 +7017,7 @@ list that does not include the default line. Added in version 3.1. - + env.Package( NAME = 'foo', ... @@ -7603,8 +7032,7 @@ env.Package( X_RPM_GROUP - - + This is used to fill in the Group: field in the RPM @@ -7614,8 +7042,7 @@ field in the RPM X_RPM_GROUP_lang - - + This is used to fill in the Group(lang): field in the RPM @@ -7630,8 +7057,7 @@ the appropriate language code. X_RPM_ICON - - + This is used to fill in the Icon: field in the RPM @@ -7641,16 +7067,14 @@ field in the RPM X_RPM_INSTALL - - + internal, but overridable X_RPM_PACKAGER - - + This is used to fill in the Packager: field in the RPM @@ -7660,8 +7084,7 @@ field in the RPM X_RPM_POSTINSTALL - - + This is used to fill in the %post: section in the RPM @@ -7671,8 +7094,7 @@ section in the RPM X_RPM_POSTUNINSTALL - - + This is used to fill in the %postun: section in the RPM @@ -7682,8 +7104,7 @@ section in the RPM X_RPM_PREFIX - - + This is used to fill in the Prefix: field in the RPM @@ -7693,8 +7114,7 @@ field in the RPM X_RPM_PREINSTALL - - + This is used to fill in the %pre: section in the RPM @@ -7704,16 +7124,14 @@ section in the RPM X_RPM_PREP - - + internal, but overridable X_RPM_PREUNINSTALL - - + This is used to fill in the %preun: section in the RPM @@ -7723,8 +7141,7 @@ section in the RPM X_RPM_PROVIDES - - + This is used to fill in the Provides: field in the RPM @@ -7734,8 +7151,7 @@ field in the RPM X_RPM_REQUIRES - - + This is used to fill in the Requires: field in the RPM @@ -7745,8 +7161,7 @@ field in the RPM X_RPM_SERIAL - - + This is used to fill in the Serial: field in the RPM @@ -7756,8 +7171,7 @@ field in the RPM X_RPM_URL - - + This is used to fill in the Url: field in the RPM @@ -7767,37 +7181,33 @@ field in the RPM XGETTEXT - - + Path to xgettext(1) program (found via Detect()). -See xgettext tool and POTUpdate builder. +See xgettext tool and POTUpdate builder. XGETTEXTCOM - - + Complete xgettext command line. -See xgettext tool and POTUpdate builder. +See xgettext tool and POTUpdate builder. XGETTEXTCOMSTR - - + A string that is shown when xgettext(1) command is invoked -(default: '', which means "print $XGETTEXTCOM"). -See xgettext tool and POTUpdate builder. +(default: '', which means "print $XGETTEXTCOM"). +See xgettext tool and POTUpdate builder. _XGETTEXTDOMAIN - - + Internal "macro". Generates xgettext domain name form source and target (default: '${TARGET.filebase}'). @@ -7805,40 +7215,36 @@ form source and target (default: '${TARGET.filebase}'). XGETTEXTFLAGS - - + Additional flags to xgettext(1). -See xgettext tool and POTUpdate builder. +See xgettext tool and POTUpdate builder. XGETTEXTFROM - - + Name of file containing list of xgettext(1)'s source files. Autotools' users know this as POTFILES.in so they will in most cases set XGETTEXTFROM="POTFILES.in" here. -The $XGETTEXTFROM files have same syntax and semantics as the well known +The $XGETTEXTFROM files have same syntax and semantics as the well known GNU POTFILES.in. -See xgettext tool and POTUpdate builder. +See xgettext tool and POTUpdate builder. _XGETTEXTFROMFLAGS - - + Internal "macro". Genrates list of -D<dir> flags -from the $XGETTEXTPATH list. +from the $XGETTEXTPATH list. XGETTEXTFROMPREFIX - - -This flag is used to add single $XGETTEXTFROM file to + +This flag is used to add single $XGETTEXTFROM file to xgettext(1)'s commandline (default: '-f'). @@ -7846,38 +7252,34 @@ This flag is used to add single XGETTEXTFROMSUFFIX - - + (default: '') XGETTEXTPATH - - + List of directories, there xgettext(1) will look for source files (default: []). -This variable works only together with $XGETTEXTFROM +This variable works only together with $XGETTEXTFROM -See also xgettext tool and POTUpdate builder. +See also xgettext tool and POTUpdate builder. _XGETTEXTPATHFLAGS - - + Internal "macro". Generates list of -f<file> flags -from $XGETTEXTFROM. +from $XGETTEXTFROM. XGETTEXTPATHPREFIX - - + This flag is used to add single search path to xgettext(1)'s commandline (default: '-D'). @@ -7886,24 +7288,21 @@ This flag is used to add single search path to XGETTEXTPATHSUFFIX - - + (default: '') YACC - - + The parser generator. YACCCOM - - + The command line used to call the parser generator to generate a source file. @@ -7911,24 +7310,22 @@ to generate a source file. YACCCOMSTR - - + The string displayed when generating a source file using the parser generator. -If this is not set, then $YACCCOM (the command line) is displayed. +If this is not set, then $YACCCOM (the command line) is displayed. - + env = Environment(YACCCOMSTR = "Yacc'ing $TARGET from $SOURCES") YACCFLAGS - - + General options passed to the parser generator. -If $YACCFLAGS contains a option, +If $YACCFLAGS contains a option, SCons assumes that the call will also create a .h file (if the yacc source file ends in a .y suffix) or a .hpp file @@ -7938,8 +7335,7 @@ or a .hpp file YACCHFILESUFFIX - - + The suffix of the C header file generated by the parser generator when the @@ -7957,8 +7353,7 @@ The default value is YACCHXXFILESUFFIX - - + The suffix of the C++ header file generated by the parser generator when the @@ -7974,7 +7369,7 @@ The default value is except on Mac OS X, where the default is ${TARGET.suffix}.h. -because the default bison parser generator just +because the default bison parser generator just appends .h to the name of the generated C++ file. @@ -7982,8 +7377,7 @@ to the name of the generated C++ file. YACCVCGFILESUFFIX - - + The suffix of the file containing the VCG grammar automaton definition when the @@ -8001,16 +7395,14 @@ The default value is ZIP - - + The zip compression and file packaging utility. ZIPCOM - - + The command line used to call the zip utility, or the internal Python function used to create a zip archive. @@ -8019,8 +7411,7 @@ zip archive. ZIPCOMPRESSION - - + The compression flag @@ -8040,42 +7431,39 @@ module is unavailable. ZIPCOMSTR - - + The string displayed when archiving files using the zip utility. -If this is not set, then $ZIPCOM +If this is not set, then $ZIPCOM (the command line or internal Python function) is displayed. - + env = Environment(ZIPCOMSTR = "Zipping $TARGET") ZIPFLAGS - - + General options passed to the zip utility. ZIPROOT - - + An optional zip root directory (default empty). The filenames stored in the zip file will be relative to this directory, if given. Otherwise the filenames are relative to the current directory of the command. For instance: - + env = Environment() env.Zip('foo.zip', 'subdir1/subdir2/file1', ZIPROOT='subdir1') - + will produce a zip file foo.zip containing a file with the name subdir2/file1 rather than @@ -8085,8 +7473,7 @@ containing a file with the name ZIPSUFFIX - - + The suffix used for zip file names. diff --git a/doc/generated/variables.mod b/doc/generated/variables.mod index 372a15f..b26a645 100644 --- a/doc/generated/variables.mod +++ b/doc/generated/variables.mod @@ -10,10 +10,10 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $__LDMODULEVERSIONFLAGS"> $__SHLIBVERSIONFLAGS"> -$_APPLELINK_COMPATIBILITY_VERSION"> $APPLELINK_COMPATIBILITY_VERSION"> -$_APPLELINK_CURRENT_VERSION"> +$_APPLELINK_COMPATIBILITY_VERSION"> $APPLELINK_CURRENT_VERSION"> +$_APPLELINK_CURRENT_VERSION"> $APPLELINK_NO_COMPATIBILITY_VERSION"> $APPLELINK_NO_CURRENT_VERSION"> $AR"> @@ -200,8 +200,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $_FRAMEWORKPATH"> $FRAMEWORKPATHPREFIX"> $FRAMEWORKPREFIX"> -$_FRAMEWORKS"> $FRAMEWORKS"> +$_FRAMEWORKS"> $FRAMEWORKSFLAGS"> $GS"> $GSCOM"> @@ -251,14 +251,15 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $LDMODULE"> $LDMODULECOM"> $LDMODULECOMSTR"> +$LDMODULEEMITTER"> $LDMODULEFLAGS"> $LDMODULENOVERSIONSYMLINKS"> $LDMODULEPREFIX"> $_LDMODULESONAME"> $LDMODULESUFFIX"> $LDMODULEVERSION"> -$LDMODULEVERSIONFLAGS"> $_LDMODULEVERSIONFLAGS"> +$LDMODULEVERSIONFLAGS"> $LEX"> $LEXCOM"> $LEXCOMSTR"> @@ -433,8 +434,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $RMICCOM"> $RMICCOMSTR"> $RMICFLAGS"> -$_RPATH"> $RPATH"> +$_RPATH"> $RPATHPREFIX"> $RPATHSUFFIX"> $RPCGEN"> @@ -504,8 +505,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $_SHLIBSONAME"> $SHLIBSUFFIX"> $SHLIBVERSION"> -$SHLIBVERSIONFLAGS"> $_SHLIBVERSIONFLAGS"> +$SHLIBVERSIONFLAGS"> $SHLINK"> $SHLINKCOM"> $SHLINKCOMSTR"> @@ -650,10 +651,10 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $__LDMODULEVERSIONFLAGS"> $__SHLIBVERSIONFLAGS"> -$_APPLELINK_COMPATIBILITY_VERSION"> $APPLELINK_COMPATIBILITY_VERSION"> -$_APPLELINK_CURRENT_VERSION"> +$_APPLELINK_COMPATIBILITY_VERSION"> $APPLELINK_CURRENT_VERSION"> +$_APPLELINK_CURRENT_VERSION"> $APPLELINK_NO_COMPATIBILITY_VERSION"> $APPLELINK_NO_CURRENT_VERSION"> $AR"> @@ -840,8 +841,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $_FRAMEWORKPATH"> $FRAMEWORKPATHPREFIX"> $FRAMEWORKPREFIX"> -$_FRAMEWORKS"> $FRAMEWORKS"> +$_FRAMEWORKS"> $FRAMEWORKSFLAGS"> $GS"> $GSCOM"> @@ -891,14 +892,15 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $LDMODULE"> $LDMODULECOM"> $LDMODULECOMSTR"> +$LDMODULEEMITTER"> $LDMODULEFLAGS"> $LDMODULENOVERSIONSYMLINKS"> $LDMODULEPREFIX"> $_LDMODULESONAME"> $LDMODULESUFFIX"> $LDMODULEVERSION"> -$LDMODULEVERSIONFLAGS"> $_LDMODULEVERSIONFLAGS"> +$LDMODULEVERSIONFLAGS"> $LEX"> $LEXCOM"> $LEXCOMSTR"> @@ -1073,8 +1075,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $RMICCOM"> $RMICCOMSTR"> $RMICFLAGS"> -$_RPATH"> $RPATH"> +$_RPATH"> $RPATHPREFIX"> $RPATHSUFFIX"> $RPCGEN"> @@ -1144,8 +1146,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $_SHLIBSONAME"> $SHLIBSUFFIX"> $SHLIBVERSION"> -$SHLIBVERSIONFLAGS"> $_SHLIBVERSIONFLAGS"> +$SHLIBVERSIONFLAGS"> $SHLINK"> $SHLINKCOM"> $SHLINKCOMSTR"> -- cgit v0.12 From 16f42198ba3afe2e40b21c5627274fec48c8611e Mon Sep 17 00:00:00 2001 From: Jason Kenny Date: Fri, 6 Dec 2019 11:00:25 -0600 Subject: add py3 compatible print() functions --- test/Command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Command.py b/test/Command.py index 380c171..7189d06 100644 --- a/test/Command.py +++ b/test/Command.py @@ -21,7 +21,6 @@ # 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons @@ -43,6 +42,7 @@ test.write('build.py', build_py) test.write(['expand_chdir_sub', 'subbuild.py'], build_py) test.write('SConstruct', """ +from __future__ import print_function import os import sys -- cgit v0.12 From ed66f1338f029a63b7a93f7027f3149ab5376bdd Mon Sep 17 00:00:00 2001 From: Adam Gross Date: Fri, 6 Dec 2019 16:43:52 -0500 Subject: Fix multithreaded Windows builds when a thread has a file open for write Python 2 enables handle inheritance by default for child processes. It wasn't until Python 3.4 that it was disabled. This causes problems because if a Python action is writing to a file and a child process is spawned at that exact moment, builds fail because of sharing issues. --- src/engine/SCons/Platform/win32.py | 59 ++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/src/engine/SCons/Platform/win32.py b/src/engine/SCons/Platform/win32.py index 0a3b199..c0cf03b 100644 --- a/src/engine/SCons/Platform/win32.py +++ b/src/engine/SCons/Platform/win32.py @@ -51,10 +51,6 @@ try: import msvcrt import win32api import win32con - - msvcrt.get_osfhandle - win32api.SetHandleInformation - win32con.HANDLE_FLAG_INHERIT except ImportError: parallel_msg = \ "you do not seem to have the pywin32 extensions installed;\n" + \ @@ -66,28 +62,41 @@ except AttributeError: else: parallel_msg = None - _builtin_open = open - - def _scons_open(*args, **kw): - fp = _builtin_open(*args, **kw) - win32api.SetHandleInformation(msvcrt.get_osfhandle(fp.fileno()), - win32con.HANDLE_FLAG_INHERIT, - 0) - return fp - - open = _scons_open - if sys.version_info.major == 2: - _builtin_file = file - class _scons_file(_builtin_file): - def __init__(self, *args, **kw): - _builtin_file.__init__(self, *args, **kw) - win32api.SetHandleInformation(msvcrt.get_osfhandle(self.fileno()), - win32con.HANDLE_FLAG_INHERIT, 0) - file = _scons_file - else: - # No longer needed for python 3.4 and above. Files are opened non sharable - pass + import __builtin__ + + _builtin_file = __builtin__.file + _builtin_open = __builtin__.open + + def _scons_fixup_mode(mode): + """Adjust 'mode' to mark handle as non-inheritable. + + SCons is multithreaded, so allowing handles to be inherited by + children opens us up to races, where (e.g.) processes spawned by + the Taskmaster may inherit and retain references to files opened + by other threads. This may lead to sharing violations and, + ultimately, build failures. + + By including 'N' as part of fopen's 'mode' parameter, all file + handles returned from these functions are atomically marked as + non-inheritable. + """ + if not mode: + # Python's default is 'r'. + # https://docs.python.org/2/library/functions.html#open + mode = 'rN' + elif 'N' not in mode: + mode += 'N' + return mode + + def _scons_file(name, mode=None, *args, **kwargs): + return _builtin_file(name, _scons_fixup_mode(mode), *args, **kwargs) + + def _scons_open(name, mode=None, *args, **kwargs): + return _builtin_open(name, _scons_fixup_mode(mode), *args, **kwargs) + + __builtin__.file = _scons_file + __builtin__.open = _scons_open -- cgit v0.12 From 3b9e2a859177952ecec8370e56a5ecfc29d307b1 Mon Sep 17 00:00:00 2001 From: Adam Gross Date: Fri, 6 Dec 2019 16:55:16 -0500 Subject: Change src\CHANGES.txt --- src/CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index e24555d..1c05960 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -16,6 +16,11 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER From Tim Gates - Resolved a typo in engine.SCons.Tool + From Adam Gross: + - Resolved a race condition in multithreaded Windows builds with Python 2 + in the case where a child process is spawned while a Python action has a + file open. + From Ivan Kravets - Added support for "-imacros" to ParseFlags -- cgit v0.12 From 3be99b7a05858fb00b99620ec1277a2fd967d415 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sat, 7 Dec 2019 08:46:20 -0700 Subject: Update debug=action-timestamps + Rename to action-timestamps (from action_timestamps) for consistency with other compound word options. + Put manpage entry in alphabetical order. + Describe what option does and shorten it (refers to debug=time instead of duplicating it) + Change prints a bit (and tests to match) + Show scons version where added. + Slight adjustment to manpage introduction to debug options. Along the way, fixes a lingering tag mismatch from an earlier documentation PR. Updates PR#3456 Signed-off-by: Mats Wichmann --- doc/man/scons.xml | 61 +++++++++++---------------------- doc/user/depends.xml | 1 + src/engine/SCons/Script/Main.py | 7 ++-- src/engine/SCons/Script/SConsOptions.py | 2 +- test/option/debug-action-timestamps.py | 10 +++--- 5 files changed, 30 insertions(+), 51 deletions(-) diff --git a/doc/man/scons.xml b/doc/man/scons.xml index ae54e2e..e0f920d 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -686,19 +686,32 @@ option except for the way default targets are handled. When this option is used and no targets are specified on the command line, all default targets are built, whether or not they are below the current directory. - + - --debug=type + --debug=type[,type...] Debug the build process. -type[,type...] -specifies what type of debugging. Multiple types may be specified, -separated by commas. The following types are valid: +type +specifies the kind of debugging info to emit. +Multiple types may be specified, separated by commas. +The following entries show the recognized types: + + + + --debug=action-timestamps + +Prints additional time profiling information. For +each command, shows the absolute start and end times. +This may be useful in debugging parallel builds. +Implies the option. + +Since &scons; 3.1. + --debug=count @@ -893,40 +906,6 @@ should take place in parallel.) - - --debug=action_timestamps - - Prints additional time profiling information: - - - The time spent executing each individual build command - - - The total build time (time SCons ran from beginning to end) - - - The total time spent reading and executing SConscript files - - - The total time spent SCons itself spend running -(that is, not counting reading and executing SConscript files) - - - The total time spent executing all build commands - - - The elapsed wall-clock time spent executing those build commands - - - The absolute start and end wall-clock time spent executing those build commands - - - The time spent processing each file passed to the SConscript() function - - - - - --diskcheck=types @@ -2278,10 +2257,10 @@ env.SomeTool(targets, sources) Builder Methods -You tell scons what to build +You tell scons what to build by calling Builders, functions which know to take a particular action when given files of a particular type -to produce a particular result type. scons +to produce a particular result type. scons defines a number of builders, and you can also write your own. Builders are attached to a &consenv; as methods, and the available builder methods are listed as diff --git a/doc/user/depends.xml b/doc/user/depends.xml index 5a78eb5..cd5094a 100644 --- a/doc/user/depends.xml +++ b/doc/user/depends.xml @@ -764,6 +764,7 @@ int main() { printf("Hello, world!\n"); } encounter them in older &SConscript; files. +
Implicit Dependencies: The &cv-CPPPATH; Construction Variable diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index 58dbf64..238a828 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -211,10 +211,9 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask): last_command_end = finish_time cumulative_command_time = cumulative_command_time+finish_time-start_time if print_action_timestamps: - sys.stdout.write("Command execution start time: %s: %f seconds\n"%(str(self.node), start_time)) + sys.stdout.write("Command execution start timestamp: %s: %f\n"%(str(self.node), start_time)) + sys.stdout.write("Command execution end timestamp: %s: %f\n"%(str(self.node), finish_time)) sys.stdout.write("Command execution time: %s: %f seconds\n"%(str(self.node), finish_time-start_time)) - if print_action_timestamps: - sys.stdout.write("Command execution stop time: %s: %f seconds\n"%(str(self.node), finish_time)) def do_failed(self, status=2): _BuildFailures.append(self.exception[1]) @@ -679,7 +678,7 @@ def _set_debug_values(options): options.tree_printers.append(TreePrinter(status=True)) if "time" in debug_values: print_time = 1 - if "action_timestamps" in debug_values: + if "action-timestamps" in debug_values: print_time = 1 print_action_timestamps = 1 if "tree" in debug_values: diff --git a/src/engine/SCons/Script/SConsOptions.py b/src/engine/SCons/Script/SConsOptions.py index 7b5d523..66c7239 100644 --- a/src/engine/SCons/Script/SConsOptions.py +++ b/src/engine/SCons/Script/SConsOptions.py @@ -622,7 +622,7 @@ def Parser(version): debug_options = ["count", "duplicate", "explain", "findlibs", "includes", "memoizer", "memory", "objects", "pdb", "prepare", "presub", "stacktrace", - "time", "action_timestamps"] + "time", "action-timestamps"] def opt_debug(option, opt, value__, parser, debug_options=debug_options, diff --git a/test/option/debug-action-timestamps.py b/test/option/debug-action-timestamps.py index 0277516..059cfdf 100644 --- a/test/option/debug-action-timestamps.py +++ b/test/option/debug-action-timestamps.py @@ -34,13 +34,13 @@ def setup_fixtures(): test.file_fixture('../fixture/SConstruct_test_main.py', 'SConstruct') def test_help_function(): - # Before anything else, make sure we get valid --debug=action_timestamps results + # Before anything else, make sure we get valid --debug=action-timestamps results # when just running the help option. - test.run(arguments = "-h --debug=action_timestamps") + test.run(arguments = "-h --debug=action-timestamps") def build(): # Execute build - test.run(arguments='--debug=action_timestamps') + test.run(arguments='--debug=action-timestamps') build_output = test.stdout() return build_output @@ -84,8 +84,8 @@ def test_correctness_of_timestamps(build_output): debug_time_patterns = [ r'Command execution time: (.*): (\d+\.\d+) seconds', - r'Command execution start time: (.*): (\d+\.\d+) seconds', - r'Command execution stop time: (.*): (\d+\.\d+) seconds' + r'Command execution start timestamp: (.*): (\d+\.\d+)', + r'Command execution end timestamp: (.*): (\d+\.\d+)' ] test = TestSCons.TestSCons() -- cgit v0.12 From b1ac9ecfe28437f7e3480cd31120f12bd43c968b Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sat, 7 Dec 2019 23:02:14 -0500 Subject: Address GaryO's feedback on PR 3129. Also reformatted Command() PEP8 --- src/CHANGES.txt | 9 ++++--- src/engine/SCons/Environment.py | 52 +++++++++++++++++++++++++++-------------- test/Command.py | 1 - 3 files changed, 40 insertions(+), 22 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index a5a37b8..34c7b9b 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -4,10 +4,9 @@ Change Log +NOTE: Please add your name below (and your changes) alphabetically by last name. + RELEASE VERSION/DATE TO BE FILLED IN LATER - From Jason Kenny - - Update Command() function to accept target_scanner, source_factory, and target_factory arguments. - This make Command act more like a one-off builder. From Edoardo Bezzeccheri - Added debug option "action_timestamps" which outputs to stdout the absolute start and end time for each target. @@ -19,6 +18,10 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER From Tim Gates - Resolved a typo in engine.SCons.Tool + From Jason Kenny + - Update Command() function to accept target_scanner, source_factory, and target_factory arguments. + This makes Command act more like a one-off builder. + From Ivan Kravets - Added support for "-imacros" to ParseFlags diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 4a9cf11..916ebc4 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -1983,26 +1983,42 @@ class Base(SubstitutionEnvironment): be any type that the Builder constructor will accept for an action.""" bkw = { - 'action' : action, - 'target_factory' : self.fs.Entry, - 'source_factory' : self.fs.Entry, + 'action': action, + 'target_factory': self.fs.Entry, + 'source_factory': self.fs.Entry, } # source scanner - try: bkw['source_scanner'] = kw['source_scanner'] - except KeyError: pass - else: del kw['source_scanner'] - #target scanner - try: bkw['target_scanner'] = kw['target_scanner'] - except KeyError: pass - else: del kw['target_scanner'] - #source factory - try: bkw['source_factory'] = kw['source_factory'] - except KeyError: pass - else: del kw['source_factory'] - #target factory - try: bkw['target_factory'] = kw['target_factory'] - except KeyError: pass - else: del kw['target_factory'] + try: + bkw['source_scanner'] = kw['source_scanner'] + except KeyError: + pass + else: + del kw['source_scanner'] + + # target scanner + try: + bkw['target_scanner'] = kw['target_scanner'] + except KeyError: + pass + else: + del kw['target_scanner'] + + # source factory + try: + bkw['source_factory'] = kw['source_factory'] + except KeyError: + pass + else: + del kw['source_factory'] + + # target factory + try: + bkw['target_factory'] = kw['target_factory'] + except KeyError: + pass + else: + del kw['target_factory'] + bld = SCons.Builder.Builder(**bkw) return bld(self, target, source, **kw) diff --git a/test/Command.py b/test/Command.py index 7189d06..1eb5f77 100644 --- a/test/Command.py +++ b/test/Command.py @@ -67,7 +67,6 @@ def source_scanner(node, env, path, builder): print("Source scanner node=", node, "builder =", builder,file=sys.stderr) return [] - def target_scanner(node, env, path, builder): print("Target scanner node=", node, "builder =", builder,file=sys.stderr) return [] -- cgit v0.12 From a8e707d20e1a7d7d6a45510194b2acbdf9ca8c3d Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sat, 7 Dec 2019 23:03:17 -0500 Subject: Reformat test/Command.py PEP8 --- test/Command.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/Command.py b/test/Command.py index 1eb5f77..d8ca86d 100644 --- a/test/Command.py +++ b/test/Command.py @@ -142,9 +142,9 @@ Source scanner node= f8.in builder = wo-env Target scanner node= f8s.out builder = wo-env ''' -out = test.run(arguments = '.', - stderr = test_str, - match=TestSCons.match_re_dotall) +out = test.run(arguments='.', + stderr=test_str, + match=TestSCons.match_re_dotall) test.must_match('f1.out', "f1.in\n", mode='r') @@ -159,7 +159,8 @@ test.must_match('f7s.out', "f7.in\n", mode='r') test.must_match('f8s.out', "f8.in\n", mode='r') test.must_match('f9.out', "f9.in\n", mode='r') test.must_match('f10.out', "f10.in\n", mode='r') -test.must_match(['expand_chdir_sub', 'f11.out'], "expand_chdir_sub/f11.in\n", mode='r') +test.must_match(['expand_chdir_sub', 'f11.out'], + "expand_chdir_sub/f11.in\n", mode='r') test.pass_test() -- cgit v0.12 From 82016c7b8f990391f8afdc120d89a9a1f0e0a5ad Mon Sep 17 00:00:00 2001 From: Adam Gross Date: Sun, 8 Dec 2019 14:34:16 -0500 Subject: Fix SConsTests.py to actually clear out the file/open overrides This was breaking the tests because it was not clearing the overrides in a manner consistent with the new logic. --- src/engine/SCons/SConfTests.py | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/engine/SCons/SConfTests.py b/src/engine/SCons/SConfTests.py index f770450..787138e 100644 --- a/src/engine/SCons/SConfTests.py +++ b/src/engine/SCons/SConfTests.py @@ -56,6 +56,18 @@ class SConfTestCase(unittest.TestCase): os.chdir(self.save_cwd) def _resetSConfState(self): + if sys.platform in ['cygwin', 'win32'] and sys.version_info.major == 2: + # On Windows with Python2, SCons.Platform.win32 redefines the + # built-in file() and open() functions to disable handle + # inheritance. Because we are unloading all SCons modules other + # than SCons.Compat, SCons.Platform.win32 will lose the variables + # it needs. As a result, we should reset the file() and open() + # functions to their original built-in versions. + import __builtin__ + import SCons.Platform.win32 + __builtin__.file = SCons.Platform.win32._builtin_file + __builtin__.open = SCons.Platform.win32._builtin_open + # Ok, this is tricky, and i do not know, if everything is sane. # We try to reset scons' state (including all global variables) import SCons.SConsign @@ -90,22 +102,6 @@ class SConfTestCase(unittest.TestCase): global existing_lib existing_lib = 'm' - if sys.platform in ['cygwin', 'win32']: - # On Windows, SCons.Platform.win32 redefines the builtin - # file() and open() functions to close the file handles. - # This interferes with the unittest.py infrastructure in - # some way. Just sidestep the issue by restoring the - # original builtin functions whenever we have to reset - # all of our global state. - - import SCons.Platform.win32 - - try: - file = SCons.Platform.win32._builtin_file - open = SCons.Platform.win32._builtin_open - except AttributeError: - pass - def _baseTryXXX(self, TryFunc): # TryCompile and TryLink are much the same, so we can test them # in one method, we pass the function as a string ('TryCompile', -- cgit v0.12 From b18b21d1cb1a000fb6e59338cc6f48afdea7348c Mon Sep 17 00:00:00 2001 From: Adam Gross Date: Sun, 8 Dec 2019 21:13:43 -0500 Subject: Convert our file replacement to be a class This hopefully will fix one unit test that validates that it's a class. --- src/engine/SCons/Platform/win32.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/engine/SCons/Platform/win32.py b/src/engine/SCons/Platform/win32.py index c0cf03b..77c048e 100644 --- a/src/engine/SCons/Platform/win32.py +++ b/src/engine/SCons/Platform/win32.py @@ -89,11 +89,14 @@ else: mode += 'N' return mode - def _scons_file(name, mode=None, *args, **kwargs): - return _builtin_file(name, _scons_fixup_mode(mode), *args, **kwargs) + class _scons_file(_builtin_file): + def __init__(self, name, mode=None, *args, **kwargs): + _builtin_file.__init__(self, name, _scons_fixup_mode(mode), + *args, **kwargs) def _scons_open(name, mode=None, *args, **kwargs): - return _builtin_open(name, _scons_fixup_mode(mode), *args, **kwargs) + return _builtin_open(name, _scons_fixup_mode(mode), + *args, **kwargs) __builtin__.file = _scons_file __builtin__.open = _scons_open -- cgit v0.12 From 46b24a5cc8094f81802bfa79534e496872fb97ab Mon Sep 17 00:00:00 2001 From: Adam Gross Date: Mon, 9 Dec 2019 10:51:32 -0500 Subject: Update CHANGES.txt to indicate original author of patch --- src/CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 2c239a2..47b63ee 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -21,7 +21,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER From Adam Gross: - Resolved a race condition in multithreaded Windows builds with Python 2 in the case where a child process is spawned while a Python action has a - file open. + file open. Original author: Ryan Beasley. From Jason Kenny - Update Command() function to accept target_scanner, source_factory, and target_factory arguments. -- cgit v0.12 From 93507d5535e68341ca93af7efbc05fe6af1025e6 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Wed, 11 Dec 2019 12:26:39 -0500 Subject: Fix looking for specific version of libSystem.B.dylib when running on macOS. Use regex of #.#.# instead --- test/LINK/applelink.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/test/LINK/applelink.py b/test/LINK/applelink.py index 86e0a4c..e1b2837 100644 --- a/test/LINK/applelink.py +++ b/test/LINK/applelink.py @@ -25,6 +25,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import sys +import re import TestSCons @@ -83,10 +84,14 @@ for SHLIBVERSION, APPLELINK_CURRENT_VERSION, APPLELINK_COMPATIBILITY_VERSION, sh # libfoo.1.2.3.dylib: # > libfoo.1.2.3.dylib (compatibility version 1.1.99, current version 9.9.9) # > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4) - otool_output = "libfoo.{SHLIBVERSION}.dylib:\n\tlibfoo.{SHLIBVERSION}.dylib (compatibility version {APPLELINK_COMPATIBILITY_VERSION}, current version {APPLELINK_CURRENT_VERSION})\n\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)\n".format( - **locals()) + # otool_output = "libfoo.{SHLIBVERSION}.dylib:\n\tlibfoo.{SHLIBVERSION}.dylib (compatibility version {APPLELINK_COMPATIBILITY_VERSION}, current version {APPLELINK_CURRENT_VERSION})\n\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)\n".format( + # **locals()) + otool_output = "libfoo.{SHLIBVERSION}.dylib:\n\tlibfoo.{SHLIBVERSION}.dylib (compatibility version {APPLELINK_COMPATIBILITY_VERSION}, current version {APPLELINK_CURRENT_VERSION})\n\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version REPLACEME)\n".format(**locals()) + otool_output = re.escape(otool_output) + otool_output = otool_output.replace('REPLACEME','\d+\.\d+\.\d+') + - test.run(program='/usr/bin/otool', arguments='-L libfoo.%s.dylib' % SHLIBVERSION, stdout=otool_output) + test.run(program='/usr/bin/otool', arguments='-L libfoo.%s.dylib' % SHLIBVERSION, stdout=otool_output, match=TestSCons.match_re_dotall) # Now test that None in APPLELINK_CURRENT_VERSION or APPLELINK_COMPATIBILITY_VERSION will skip # generating their relevant linker command line flag. @@ -135,15 +140,16 @@ for SHLIBVERSION, \ # We expect output such as this # libfoo.1.2.3.dylib: # > libfoo.1.2.3.dylib (compatibility version 1.1.99, current version 9.9.9) - # > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4) + # > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version #.#.#) if APPLELINK_NO_CURRENT_VERSION: APPLELINK_CURRENT_VERSION = '0.0.0' if APPLELINK_NO_COMPATIBILITY_VERSION: APPLELINK_COMPATIBILITY_VERSION = '0.0.0' - otool_output = "libfoo.{SHLIBVERSION}.dylib:\n\tlibfoo.{SHLIBVERSION}.dylib (compatibility version {APPLELINK_COMPATIBILITY_VERSION}, current version {APPLELINK_CURRENT_VERSION})\n\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)\n".format( + otool_output = "libfoo.{SHLIBVERSION}.dylib:\n\tlibfoo.{SHLIBVERSION}.dylib (compatibility version {APPLELINK_COMPATIBILITY_VERSION}, current version {APPLELINK_CURRENT_VERSION})\n\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version REPLACEME)\n".format( **locals()) + otool_output = re.escape(otool_output).replace('REPLACEME','\d+\.\d+\.\d+') - test.run(program='/usr/bin/otool', arguments='-L libfoo.%s.dylib' % SHLIBVERSION, stdout=otool_output) + test.run(program='/usr/bin/otool', arguments='-L libfoo.%s.dylib' % SHLIBVERSION, stdout=otool_output, match=TestSCons.match_re_dotall) test.pass_test() -- cgit v0.12 From 57bb593e4f562e6c6d5f64631bec5962c719295e Mon Sep 17 00:00:00 2001 From: Mathew Robinson Date: Wed, 11 Dec 2019 18:43:01 -0500 Subject: Improve DAG walk performance by preventing unnecessary list manipulation --- src/CHANGES.txt | 2 ++ src/engine/SCons/Taskmaster.py | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 47b63ee..c837157 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -46,6 +46,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Improved threading performance by ensuring NodeInfo is shared across threads. Results in ~13% improvement for parallel builds (-j# > 1) with many shared nodes. + - Improved DAG walk performance by reducing unnecessary work when + there are no un-visited children. From Mats Wichmann - Replace instances of string find method with "in" checks where diff --git a/src/engine/SCons/Taskmaster.py b/src/engine/SCons/Taskmaster.py index 4892026..06fc94c 100644 --- a/src/engine/SCons/Taskmaster.py +++ b/src/engine/SCons/Taskmaster.py @@ -874,8 +874,10 @@ class Taskmaster(object): # These nodes have not even been visited yet. Add # them to the list so that on some next pass we can # take a stab at evaluating them (or their children). - children_not_visited.reverse() - self.candidates.extend(self.order(children_not_visited)) + if children_not_visited: + if len(children_not_visited) > 1: + children_not_visited.reverse() + self.candidates.extend(self.order(children_not_visited)) # if T and children_not_visited: # T.write(self.trace_message(' adding to candidates: %s' % map(str, children_not_visited))) -- cgit v0.12 From 6a3a10d130817a4418bdfee5e3c746dfa7f9d60f Mon Sep 17 00:00:00 2001 From: Mathew Robinson Date: Wed, 11 Dec 2019 19:07:10 -0500 Subject: Optimize for most common case in Entry.disambiguate() This removes many unnecessary os.stat and related FS IO calls. --- src/CHANGES.txt | 2 ++ src/engine/SCons/Node/FS.py | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 47b63ee..f137598 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -46,6 +46,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Improved threading performance by ensuring NodeInfo is shared across threads. Results in ~13% improvement for parallel builds (-j# > 1) with many shared nodes. + - Improve performance of Entry.disambiguate() by making check for + most common case first, preventing unnecessary IO. From Mats Wichmann - Replace instances of string find method with "in" checks where diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py index 6b0fe98..4c68358 100644 --- a/src/engine/SCons/Node/FS.py +++ b/src/engine/SCons/Node/FS.py @@ -963,14 +963,14 @@ class Entry(Base): def disambiguate(self, must_exist=None): """ - """ - if self.isdir(): - self.__class__ = Dir - self._morph() - elif self.isfile(): + """ + if self.isfile(): self.__class__ = File self._morph() self.clear() + elif self.isdir(): + self.__class__ = Dir + self._morph() else: # There was nothing on-disk at this location, so look in # the src directory. -- cgit v0.12 From d960416fc4caa6e799812357fe91c3f3e11a9174 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Fri, 13 Dec 2019 08:25:01 -0700 Subject: Tweak DefaultEnvironment descriptions (ci skip) Doc-only change to be more explicit about when the default construction environment is used, and what it means to call DefaultEnvironment() - only the first call instantiates it, later calls return the object. Fixes #2477 Signed-off-by: Mats Wichmann --- doc/user/environments.xml | 58 ++++++++++++++++++++----------------------- src/engine/SCons/Defaults.xml | 16 ++++++++---- 2 files changed, 38 insertions(+), 36 deletions(-) diff --git a/doc/user/environments.xml b/doc/user/environments.xml index 43503a6..d3e5d6d 100644 --- a/doc/user/environments.xml +++ b/doc/user/environments.xml @@ -886,33 +886,30 @@ print("value is: %s"%env.subst( '->${1 / 0}<-' )) All of the &Builder; functions that we've introduced so far, - like &Program; and &Library;, - actually use a default &consenv; - that contains settings - for the various compilers - and other tools that - &SCons; configures by default, - or otherwise knows about - and has discovered on your system. - The goal of the default construction environment - is to make many configurations to "just work" - to build software using - readily available tools + like &Program; and &Library;, use a &consenv; + that contains settings for the various compilers + and other tools that &SCons; configures by default, + or otherwise knows about and has discovered on your system. + If not invoked as methods of a specific &consenv;, + they use the default &consenv; + The goal of the default &consenv; + is to make many configurations "just work" + to build software using readily available tools with a minimum of configuration changes. - You can, however, control the settings - in the default construction environment + If needed, you can control the default &consenv; by using the &DefaultEnvironment; function - to initialize various settings: + to initialize various settings by passing + them as keyword arguments: -DefaultEnvironment(CC = '/usr/local/bin/gcc') +DefaultEnvironment(CC='/usr/local/bin/gcc') @@ -928,15 +925,15 @@ DefaultEnvironment(CC = '/usr/local/bin/gcc') - Note that the &DefaultEnvironment; function - returns the initialized - default construction environment object, - which can then be manipulated like any - other construction environment. - So the following - would be equivalent to the - previous example, - setting the &cv-CC; + The &DefaultEnvironment; function + returns the initialized default &consenv; object, + which can then be manipulated like any other &consenv; + (note that the default environment works like a singleton - + it can have only one instance - so the keyword arguments + are processed only on the first call. On any subsequent + call the existing object is returned). + So the following would be equivalent to the + previous example, setting the &cv-CC; variable to /usr/local/bin/gcc but as a separate step after the default construction environment has been initialized: @@ -971,8 +968,8 @@ env['CC'] = '/usr/local/bin/gcc' -env = DefaultEnvironment(tools = ['gcc', 'gnulink'], - CC = '/usr/local/bin/gcc') +env = DefaultEnvironment(tools=['gcc', 'gnulink'], + CC='/usr/local/bin/gcc') @@ -994,9 +991,8 @@ env = DefaultEnvironment(tools = ['gcc', 'gnulink'], - The real advantage of construction environments - is that you can create as many different construction - environments as you need, + The real advantage of &consenvs; + is that you can create as many different ones as you need, each tailored to a different way to build some piece of software or other file. If, for example, we need to build @@ -1029,7 +1025,7 @@ int main() { } - We can even use multiple construction environments to build + We can even use multiple &consenvs; to build multiple versions of a single program. If you do this by simply trying to use the &b-link-Program; builder with both environments, though, diff --git a/src/engine/SCons/Defaults.xml b/src/engine/SCons/Defaults.xml index f215f5a..5002411 100644 --- a/src/engine/SCons/Defaults.xml +++ b/src/engine/SCons/Defaults.xml @@ -572,15 +572,21 @@ searching the repositories. -([args]) +([**kwargs]) -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 +Creates and returns a default &consenv; object. +The default &consenv; is used internally by SCons +in order to execute many of the global functions in this list +(i.e. those not called as methods of a specific +&consenv;), and to fetch source files transparently from source code management systems. +The default environment is a singleton, so the keyword +arguments affect it only on the first call, on subsequent +calls the already-constructed object is returned. +The default environment can be modified in the same way +as any &consenv;. -- cgit v0.12 From ddab0035a4ec1b2de1d105e26f82dcc7d153dc4b Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Fri, 13 Dec 2019 09:07:12 -0700 Subject: [PR #3493] fix review comment [ci skip] Signed-off-by: Mats Wichmann --- src/engine/SCons/Defaults.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/SCons/Defaults.xml b/src/engine/SCons/Defaults.xml index 5002411..22f46fe 100644 --- a/src/engine/SCons/Defaults.xml +++ b/src/engine/SCons/Defaults.xml @@ -576,7 +576,7 @@ searching the repositories. -Creates and returns a default &consenv; object. +Creates and returns the default &consenv; object. The default &consenv; is used internally by SCons in order to execute many of the global functions in this list (i.e. those not called as methods of a specific -- cgit v0.12 From 7c69e892566d189d83760ebd0e56b44fa11165ce Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sat, 14 Dec 2019 09:49:02 -0700 Subject: Remove deprecated env.Copy() Method removed. Test moved to test/Removed/Copy-Method/Old, and new test added to ensure it takes an AttributeError. Deprecation warning no longer useful for this one, so removed. Signed-off-by: Mats Wichmann --- doc/man/scons.xml | 18 ++--------- src/CHANGES.txt | 2 ++ src/engine/SCons/Environment.py | 8 ----- src/engine/SCons/EnvironmentTests.py | 12 ------- src/engine/SCons/Warnings.py | 3 -- test/Clone-compatibility.py | 2 ++ test/Deprecated/Copy-Method.py | 50 ----------------------------- test/Removed/Copy-Method/Copy-Method.py | 49 ++++++++++++++++++++++++++++ test/Removed/Copy-Method/Old/Copy-Method.py | 50 +++++++++++++++++++++++++++++ test/Removed/Copy-Method/Old/sconstest.skip | 0 test/Removed/Copy-Method/README.md | 6 ++++ test/Removed/Copy-Method/SConstruct.method | 2 ++ 12 files changed, 113 insertions(+), 89 deletions(-) delete mode 100644 test/Deprecated/Copy-Method.py create mode 100644 test/Removed/Copy-Method/Copy-Method.py create mode 100644 test/Removed/Copy-Method/Old/Copy-Method.py create mode 100644 test/Removed/Copy-Method/Old/sconstest.skip create mode 100644 test/Removed/Copy-Method/README.md create mode 100644 test/Removed/Copy-Method/SConstruct.method diff --git a/doc/man/scons.xml b/doc/man/scons.xml index a7327ea..899669e 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -1795,20 +1795,6 @@ Warnings for some specific deprecated features may be enabled or disabled individually; see below. -
- - - --warn=deprecated-copy, --warn=no-deprecated-copy - -Enables or disables warnings about use of the deprecated -env.Copy() -method. - - - - -
- @@ -7038,7 +7024,7 @@ value each time we call the SConscript function. SConstruct: - env = Environment(LIBPATH = ['#libA', '#libB']) + env = Environment(LIBPATH=['#libA', '#libB']) Export('env') SConscript('libA/SConscript') SConscript('libB/SConscript') @@ -7057,7 +7043,7 @@ libB/SConscript: Main/SConscript: Import('env') - e = env.Copy(LIBS = ['a', 'b']) + e = env.Clone(LIBS=['a', 'b']) e.Program('foo', Split('m1.c m2.c m3.c')) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index c837157..862e083 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -63,6 +63,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER helps test suite runs. - Remove deprecated SourceSignatures, TargetSignatures - Remove deprecated Builder keywords: overrides and scanner + - Remove deprecated env.Copy + - A number of documentation improvements. RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 916ebc4..4535be9 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -1428,14 +1428,6 @@ class Base(SubstitutionEnvironment): if SCons.Debug.track_instances: logInstanceCreation(self, 'Environment.EnvironmentClone') return clone - def Copy(self, *args, **kw): - global _warn_copy_deprecated - if _warn_copy_deprecated: - msg = "The env.Copy() method is deprecated; use the env.Clone() method instead." - SCons.Warnings.warn(SCons.Warnings.DeprecatedCopyWarning, msg) - _warn_copy_deprecated = False - return self.Clone(*args, **kw) - def _changed_build(self, dependency, target, prev_ni, repo_node=None): if dependency.changed_state(target, prev_ni, repo_node): return 1 diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index 0957361..b2f2bd5 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -1876,18 +1876,6 @@ def generate(env): assert ('BUILDERS' in env) is False env2 = env.Clone() - def test_Copy(self): - """Test copying using the old env.Copy() method""" - env1 = self.TestEnvironment(XXX = 'x', YYY = 'y') - env2 = env1.Copy() - env1copy = env1.Copy() - assert env1copy == env1copy - assert env2 == env2 - env2.Replace(YYY = 'yyy') - assert env2 == env2 - assert env1 != env2 - assert env1 == env1copy - def test_Detect(self): """Test Detect()ing tools""" test = TestCmd.TestCmd(workdir = '') diff --git a/src/engine/SCons/Warnings.py b/src/engine/SCons/Warnings.py index 718b3d5..cd24b7c 100644 --- a/src/engine/SCons/Warnings.py +++ b/src/engine/SCons/Warnings.py @@ -126,9 +126,6 @@ class DeprecatedBuildDirWarning(DeprecatedWarning): class TaskmasterNeedsExecuteWarning(DeprecatedWarning): pass -class DeprecatedCopyWarning(MandatoryDeprecatedWarning): - pass - class DeprecatedOptionsWarning(MandatoryDeprecatedWarning): pass diff --git a/test/Clone-compatibility.py b/test/Clone-compatibility.py index a2f6362..38cbeb3 100644 --- a/test/Clone-compatibility.py +++ b/test/Clone-compatibility.py @@ -39,6 +39,8 @@ test.write('SConstruct', """ # code as the correct pattern for maintaining the backwards compatibility # of SConstruct files to earlier release of SCons. Going forward, make # sure it still works (or at least doesn't blow up). +# Copy was removed for 3.1.2 but Clone will certainly be there - +# this test probably isn't needed any longer. import SCons.Environment try: SCons.Environment.Environment.Clone diff --git a/test/Deprecated/Copy-Method.py b/test/Deprecated/Copy-Method.py deleted file mode 100644 index 2714f64..0000000 --- a/test/Deprecated/Copy-Method.py +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -""" -Verify the message about the deprecated env.Copy() message, and the -ability to suppress it. -""" - -import TestSCons - -test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) - -test.write('SConscript', """ -env = Environment().Copy() -env.Copy() -""") - -msg = """The env.Copy() method is deprecated; use the env.Clone() method instead.""" -test.deprecated_warning('deprecated-copy', msg) - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/Copy-Method/Copy-Method.py b/test/Removed/Copy-Method/Copy-Method.py new file mode 100644 index 0000000..e55ebc6 --- /dev/null +++ b/test/Removed/Copy-Method/Copy-Method.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Verify that env.Copy() fails as expected since its removal +""" + +import TestSCons + +test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) + +test.file_fixture('SConstruct.method', 'SConstruct') +expect = """\ +AttributeError: 'SConsEnvironment' object has no attribute 'Copy': + File "{}", line 2: + env.Copy() +""".format(test.workpath('SConstruct')) +test.run(arguments='-Q -s', status=2, stdout=None, stderr=expect) + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/Copy-Method/Old/Copy-Method.py b/test/Removed/Copy-Method/Old/Copy-Method.py new file mode 100644 index 0000000..2714f64 --- /dev/null +++ b/test/Removed/Copy-Method/Old/Copy-Method.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Verify the message about the deprecated env.Copy() message, and the +ability to suppress it. +""" + +import TestSCons + +test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) + +test.write('SConscript', """ +env = Environment().Copy() +env.Copy() +""") + +msg = """The env.Copy() method is deprecated; use the env.Clone() method instead.""" +test.deprecated_warning('deprecated-copy', msg) + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/Copy-Method/Old/sconstest.skip b/test/Removed/Copy-Method/Old/sconstest.skip new file mode 100644 index 0000000..e69de29 diff --git a/test/Removed/Copy-Method/README.md b/test/Removed/Copy-Method/README.md new file mode 100644 index 0000000..609c6e4 --- /dev/null +++ b/test/Removed/Copy-Method/README.md @@ -0,0 +1,6 @@ +Copy-Method.py is the "new" test for env.Copy, making sure we +get an AttributeError. + +The Old directory is the former tests from the deprecated state, +preserved here for reference; the presence of an scontest.skip file +means they are never executed. diff --git a/test/Removed/Copy-Method/SConstruct.method b/test/Removed/Copy-Method/SConstruct.method new file mode 100644 index 0000000..99737e1 --- /dev/null +++ b/test/Removed/Copy-Method/SConstruct.method @@ -0,0 +1,2 @@ +env = Environment() +env.Copy() -- cgit v0.12 From f4137883a3967ce4a6f3a142c987f834d8694220 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sat, 14 Dec 2019 18:29:11 -0500 Subject: fixed match function to be non-regex --- test/Removed/Copy-Method/Copy-Method.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Removed/Copy-Method/Copy-Method.py b/test/Removed/Copy-Method/Copy-Method.py index e55ebc6..bca10fe 100644 --- a/test/Removed/Copy-Method/Copy-Method.py +++ b/test/Removed/Copy-Method/Copy-Method.py @@ -38,7 +38,7 @@ AttributeError: 'SConsEnvironment' object has no attribute 'Copy': File "{}", line 2: env.Copy() """.format(test.workpath('SConstruct')) -test.run(arguments='-Q -s', status=2, stdout=None, stderr=expect) +test.run(arguments='-Q -s', status=2, stderr=expect, match=TestSCons.match_exact) test.pass_test() -- cgit v0.12 From ac61e3fead14db2d61ac449d458c04f4bba4053f Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sun, 15 Dec 2019 06:48:35 -0700 Subject: Remove deprecated BuildDir, build_dir Updates docs and code; moves tests to test/Removed/BuildDir/Old. New tests verify that these can no longer be used. Along the way a small cleanup in SConscript.py Signed-off-by: Mats Wichmann --- doc/user/separate.xml | 6 +- src/CHANGES.txt | 1 + src/engine/SCons/Environment.py | 8 - src/engine/SCons/Environment.xml | 22 -- src/engine/SCons/Script/SConscript.py | 24 +- src/engine/SCons/Script/__init__.py | 1 - src/engine/SCons/Warnings.py | 9 - test/Deprecated/BuildDir.py | 295 ---------------------- test/Deprecated/SConscript-build_dir.py | 291 --------------------- test/Removed/BuildDir/Old/BuildDir.py | 295 ++++++++++++++++++++++ test/Removed/BuildDir/Old/SConscript-build_dir.py | 291 +++++++++++++++++++++ test/Removed/BuildDir/README.md | 6 + test/Removed/BuildDir/SConstruct.global | 1 + test/Removed/BuildDir/SConstruct.kwarg | 1 + test/Removed/BuildDir/SConstruct.method | 3 + 15 files changed, 608 insertions(+), 646 deletions(-) delete mode 100644 test/Deprecated/BuildDir.py delete mode 100644 test/Deprecated/SConscript-build_dir.py create mode 100644 test/Removed/BuildDir/Old/BuildDir.py create mode 100644 test/Removed/BuildDir/Old/SConscript-build_dir.py create mode 100644 test/Removed/BuildDir/README.md create mode 100644 test/Removed/BuildDir/SConstruct.global create mode 100644 test/Removed/BuildDir/SConstruct.kwarg create mode 100644 test/Removed/BuildDir/SConstruct.method diff --git a/doc/user/separate.xml b/doc/user/separate.xml index c276545..748a124 100644 --- a/doc/user/separate.xml +++ b/doc/user/separate.xml @@ -149,10 +149,8 @@ program using the F path name. One historical note: the &VariantDir; function - used to be called &BuildDir;. - That name is still supported - but has been deprecated - because the &SCons; functionality + used to be called &BuildDir;, a name which was + removed because the &SCons; functionality differs from the model of a "build directory" implemented by other build systems like the GNU Autotools. diff --git a/src/CHANGES.txt b/src/CHANGES.txt index dade5e0..28a4b43 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -66,6 +66,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Remove deprecated SourceSignatures, TargetSignatures - Remove deprecated Builder keywords: overrides and scanner - Remove deprecated env.Copy + - Remove deprecated BuildDir plus SConscript keyword build_dir - A number of documentation improvements. diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 4535be9..27179c3 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -1929,14 +1929,6 @@ class Base(SubstitutionEnvironment): t.set_always_build() return tlist - def BuildDir(self, *args, **kw): - msg = """BuildDir() and the build_dir keyword have been deprecated;\n\tuse VariantDir() and the variant_dir keyword instead.""" - SCons.Warnings.warn(SCons.Warnings.DeprecatedBuildDirWarning, msg) - if 'build_dir' in kw: - kw['variant_dir'] = kw['build_dir'] - del kw['build_dir'] - return self.VariantDir(*args, **kw) - def Builder(self, **kw): nkw = self.subst_kw(kw) return SCons.Builder.Builder(**nkw) diff --git a/src/engine/SCons/Environment.xml b/src/engine/SCons/Environment.xml index 73c347e..6f263a4 100644 --- a/src/engine/SCons/Environment.xml +++ b/src/engine/SCons/Environment.xml @@ -613,28 +613,6 @@ env.AppendUnique(CCFLAGS = '-g', FOO = ['foo.yyy'])
- - -(build_dir, src_dir, [duplicate]) - - - -Deprecated synonyms for -&f-VariantDir; -and -env.VariantDir(). -The -build_dir -argument becomes the -variant_dir -argument of -&f-VariantDir; -or -env.VariantDir(). - - - - (action, [arguments]) diff --git a/src/engine/SCons/Script/SConscript.py b/src/engine/SCons/Script/SConscript.py index eabaddb..0298a69 100644 --- a/src/engine/SCons/Script/SConscript.py +++ b/src/engine/SCons/Script/SConscript.py @@ -42,7 +42,7 @@ import SCons.Platform import SCons.SConf import SCons.Script.Main import SCons.Tool -import SCons.Util +from SCons.Util import is_List, is_String, is_Dict, flatten from . import Main @@ -98,7 +98,7 @@ def compute_exports(exports): retval = {} try: for export in exports: - if SCons.Util.is_Dict(export): + if is_Dict(export): retval.update(export) else: try: @@ -133,7 +133,7 @@ call_stack = [] def Return(*vars, **kw): retval = [] try: - fvars = SCons.Util.flatten(vars) + fvars = flatten(vars) for var in fvars: for v in var.split(): retval.append(call_stack[-1].globals[v]) @@ -420,7 +420,7 @@ class SConsEnvironment(SCons.Environment.Base): except KeyError: raise SCons.Errors.UserError("Invalid SConscript usage - no parameters") - if not SCons.Util.is_List(dirs): + if not is_List(dirs): dirs = [ dirs ] dirs = list(map(str, dirs)) @@ -441,13 +441,13 @@ class SConsEnvironment(SCons.Environment.Base): raise SCons.Errors.UserError("Invalid SConscript() usage - too many arguments") - if not SCons.Util.is_List(files): + if not is_List(files): files = [ files ] if kw.get('exports'): exports.extend(self.Split(kw['exports'])) - variant_dir = kw.get('variant_dir') or kw.get('build_dir') + variant_dir = kw.get('variant_dir') if variant_dir: if len(files) != 1: raise SCons.Errors.UserError("Invalid SConscript() usage - can only specify one SConscript with a variant_dir") @@ -577,9 +577,6 @@ class SConsEnvironment(SCons.Environment.Base): UserError: a script is not found and such exceptions are enabled. """ - if 'build_dir' in kw: - msg = """The build_dir keyword has been deprecated; use the variant_dir keyword instead.""" - SCons.Warnings.warn(SCons.Warnings.DeprecatedBuildDirWarning, msg) def subst_element(x, subst=self.subst): if SCons.Util.is_List(x): x = list(map(subst, x)) @@ -589,15 +586,10 @@ class SConsEnvironment(SCons.Environment.Base): ls = list(map(subst_element, ls)) subst_kw = {} for key, val in kw.items(): - if SCons.Util.is_String(val): + if is_String(val): val = self.subst(val) elif SCons.Util.is_List(val): - result = [] - for v in val: - if SCons.Util.is_String(v): - v = self.subst(v) - result.append(v) - val = result + val = [self.subst(v) if is_String(v) else v for v in val] subst_kw[key] = val files, exports = self._get_SConscript_filenames(ls, subst_kw) diff --git a/src/engine/SCons/Script/__init__.py b/src/engine/SCons/Script/__init__.py index 24af73e..9947943 100644 --- a/src/engine/SCons/Script/__init__.py +++ b/src/engine/SCons/Script/__init__.py @@ -314,7 +314,6 @@ GlobalDefaultEnvironmentFunctions = [ 'AddPreAction', 'Alias', 'AlwaysBuild', - 'BuildDir', 'CacheDir', 'Clean', #The Command() method is handled separately, below. diff --git a/src/engine/SCons/Warnings.py b/src/engine/SCons/Warnings.py index cd24b7c..fcec963 100644 --- a/src/engine/SCons/Warnings.py +++ b/src/engine/SCons/Warnings.py @@ -120,9 +120,6 @@ class PythonVersionWarning(DeprecatedWarning): class DeprecatedSourceCodeWarning(FutureDeprecatedWarning): pass -class DeprecatedBuildDirWarning(DeprecatedWarning): - pass - class TaskmasterNeedsExecuteWarning(DeprecatedWarning): pass @@ -132,12 +129,6 @@ class DeprecatedOptionsWarning(MandatoryDeprecatedWarning): class DeprecatedDebugOptionsWarning(MandatoryDeprecatedWarning): pass -class DeprecatedSigModuleWarning(MandatoryDeprecatedWarning): - pass - -class DeprecatedBuilderKeywordsWarning(MandatoryDeprecatedWarning): - pass - class DeprecatedMissingSConscriptWarning(DeprecatedWarning): pass diff --git a/test/Deprecated/BuildDir.py b/test/Deprecated/BuildDir.py deleted file mode 100644 index 1a1ba02..0000000 --- a/test/Deprecated/BuildDir.py +++ /dev/null @@ -1,295 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -""" -Verify that the deprecated BuildDir() function and method still -work to create a variant directory tree (by calling VariantDir() -under the covers). -""" - -import TestSCons - -_exe = TestSCons._exe - -test = TestSCons.TestSCons() - -test.write('SConscript', """ -BuildDir('build', 'src') -""") - -msg = """BuildDir() and the build_dir keyword have been deprecated; -\tuse VariantDir() and the variant_dir keyword instead.""" -test.deprecated_warning('deprecated-build-dir', msg) - -warning = '\nscons: warning: ' + TestSCons.re_escape(msg) \ - + '\n' + TestSCons.file_expr - -foo11 = test.workpath('work1', 'build', 'var1', 'foo1' + _exe) -foo12 = test.workpath('work1', 'build', 'var1', 'foo2' + _exe) -foo21 = test.workpath('work1', 'build', 'var2', 'foo1' + _exe) -foo22 = test.workpath('work1', 'build', 'var2', 'foo2' + _exe) -foo31 = test.workpath('work1', 'build', 'var3', 'foo1' + _exe) -foo32 = test.workpath('work1', 'build', 'var3', 'foo2' + _exe) -foo41 = test.workpath('work1', 'build', 'var4', 'foo1' + _exe) -foo42 = test.workpath('work1', 'build', 'var4', 'foo2' + _exe) -foo51 = test.workpath('build', 'var5', 'foo1' + _exe) -foo52 = test.workpath('build', 'var5', 'foo2' + _exe) - -test.subdir('work1') - -test.write(['work1', 'SConstruct'], """ -SetOption('warn', 'deprecated-build-dir') -src = Dir('src') -var2 = Dir('build/var2') -var3 = Dir('build/var3') -var4 = Dir('build/var4') -var5 = Dir('../build/var5') -var6 = Dir('../build/var6') - -env = Environment(BUILD = 'build', SRC = 'src') - -BuildDir('build/var1', src) -BuildDir(var2, src) -BuildDir(var3, src, duplicate=0) -env.BuildDir("$BUILD/var4", "$SRC", duplicate=0) -BuildDir(var5, src, duplicate=0) -BuildDir(var6, src) - -env = Environment(CPPPATH='#src', FORTRANPATH='#src') -SConscript('build/var1/SConscript', "env") -SConscript('build/var2/SConscript', "env") - -env = Environment(CPPPATH=src, FORTRANPATH=src) -SConscript('build/var3/SConscript', "env") -SConscript(File('SConscript', var4), "env") - -env = Environment(CPPPATH='.', FORTRANPATH='.') -SConscript('../build/var5/SConscript', "env") -SConscript('../build/var6/SConscript', "env") -""") - -test.subdir(['work1', 'src']) -test.write(['work1', 'src', 'SConscript'], """ -import os.path - -def buildIt(target, source, env): - if not os.path.exists('build'): - os.mkdir('build') - with open(str(source[0]), 'r') as ifp, open(str(target[0]), 'w') as ofp: - ofp.write(ifp.read()) - return 0 -Import("env") -env.Command(target='f2.c', source='f2.in', action=buildIt) -env.Program(target='foo2', source='f2.c') -env.Program(target='foo1', source='f1.c') -env.Command(target='f3.h', source='f3h.in', action=buildIt) -env.Command(target='f4.h', source='f4h.in', action=buildIt) -env.Command(target='f4.c', source='f4.in', action=buildIt) - -env2=env.Clone(CPPPATH='.') -env2.Program(target='foo3', source='f3.c') -env2.Program(target='foo4', source='f4.c') -""") - -test.write(['work1', 'src', 'f1.c'], r""" -#include -#include - -#include "f1.h" - -int -main(int argc, char *argv[]) -{ - argv[argc++] = "--"; - printf(F1_STR); - exit (0); -} -""") - -test.write(['work1', 'src', 'f2.in'], r""" -#include -#include - -#include "f2.h" - -int -main(int argc, char *argv[]) -{ - argv[argc++] = "--"; - printf(F2_STR); - exit (0); -} -""") - -test.write(['work1', 'src', 'f3.c'], r""" -#include -#include - -#include "f3.h" - -int -main(int argc, char *argv[]) -{ - argv[argc++] = "--"; - printf(F3_STR); - exit (0); -} -""") - -test.write(['work1', 'src', 'f4.in'], r""" -#include -#include - -#include "f4.h" - -int -main(int argc, char *argv[]) -{ - argv[argc++] = "--"; - printf(F4_STR); - exit (0); -} -""") - -test.write(['work1', 'src', 'f1.h'], r""" -#define F1_STR "f1.c\n" -""") - -test.write(['work1', 'src', 'f2.h'], r""" -#define F2_STR "f2.c\n" -""") - -test.write(['work1', 'src', 'f3h.in'], r""" -#define F3_STR "f3.c\n" -""") - -test.write(['work1', 'src', 'f4h.in'], r""" -#define F4_STR "f4.c\n" -""") - -# Some releases of freeBSD seem to have library complaints about -# tempnam(). Filter out these annoying messages before checking for -# error output. -def filter_tempnam(err): - if not err: - return '' - msg = "warning: tempnam() possibly used unsafely" - return '\n'.join([l for l in err.splitlines() if l.find(msg) == -1]) - -test.run(chdir='work1', arguments = '. ../build', stderr=None) - -stderr = filter_tempnam(test.stderr()) -test.fail_test(TestSCons.match_re_dotall(stderr, 6*warning)) - -test.run(program = foo11, stdout = "f1.c\n") -test.run(program = foo12, stdout = "f2.c\n") -test.run(program = foo41, stdout = "f1.c\n") -test.run(program = foo42, stdout = "f2.c\n") - -test.run(chdir='work1', - arguments='. ../build', - stderr = None, - stdout=test.wrap_stdout("""\ -scons: `.' is up to date. -scons: `%s' is up to date. -""" % test.workpath('build'))) - -stderr = filter_tempnam(test.stderr()) -test.fail_test(TestSCons.match_re_dotall(stderr, 6*warning)) - -import os -import stat -def equal_stats(x,y): - x = os.stat(x) - y = os.stat(y) - return (stat.S_IMODE(x[stat.ST_MODE]) == stat.S_IMODE(y[stat.ST_MODE]) and - x[stat.ST_MTIME] == y[stat.ST_MTIME]) - -# Make sure we did duplicate the source files in build/var2, -# and that their stats are the same: -test.must_exist(['work1', 'build', 'var2', 'f1.c']) -test.must_exist(['work1', 'build', 'var2', 'f2.in']) -test.fail_test(not equal_stats(test.workpath('work1', 'build', 'var2', 'f1.c'), test.workpath('work1', 'src', 'f1.c'))) -test.fail_test(not equal_stats(test.workpath('work1', 'build', 'var2', 'f2.in'), test.workpath('work1', 'src', 'f2.in'))) - -# Make sure we didn't duplicate the source files in build/var3. -test.must_not_exist(['work1', 'build', 'var3', 'f1.c']) -test.must_not_exist(['work1', 'build', 'var3', 'f2.in']) -test.must_not_exist(['work1', 'build', 'var3', 'b1.f']) -test.must_not_exist(['work1', 'build', 'var3', 'b2.in']) - -# Make sure we didn't duplicate the source files in build/var4. -test.must_not_exist(['work1', 'build', 'var4', 'f1.c']) -test.must_not_exist(['work1', 'build', 'var4', 'f2.in']) -test.must_not_exist(['work1', 'build', 'var4', 'b1.f']) -test.must_not_exist(['work1', 'build', 'var4', 'b2.in']) - -# Make sure we didn't duplicate the source files in build/var5. -test.must_not_exist(['build', 'var5', 'f1.c']) -test.must_not_exist(['build', 'var5', 'f2.in']) -test.must_not_exist(['build', 'var5', 'b1.f']) -test.must_not_exist(['build', 'var5', 'b2.in']) - -# verify that header files in the source directory are scanned properly: -test.write(['work1', 'src', 'f1.h'], r""" -#define F1_STR "f1.c 2\n" -""") - -test.write(['work1', 'src', 'f3h.in'], r""" -#define F3_STR "f3.c 2\n" -""") - -test.write(['work1', 'src', 'f4h.in'], r""" -#define F4_STR "f4.c 2\n" -""") - -test.run(chdir='work1', arguments = '../build/var5', stderr=None) - -stderr = filter_tempnam(test.stderr()) -test.fail_test(TestSCons.match_re_dotall(stderr, 6*warning)) - -test.run(program = foo51, stdout = "f1.c 2\n") -test.run(program = test.workpath('build', 'var5', 'foo3' + _exe), - stdout = "f3.c 2\n") -test.run(program = test.workpath('build', 'var5', 'foo4' + _exe), - stdout = "f4.c 2\n") - -test.run(chdir='work1', - arguments='../build/var5', - stderr=None, - stdout=test.wrap_stdout("""\ -scons: `%s' is up to date. -""" % test.workpath('build', 'var5'))) - -stderr = filter_tempnam(test.stderr()) -test.fail_test(TestSCons.match_re_dotall(stderr, 6*warning)) - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Deprecated/SConscript-build_dir.py b/test/Deprecated/SConscript-build_dir.py deleted file mode 100644 index 0d1ba6a..0000000 --- a/test/Deprecated/SConscript-build_dir.py +++ /dev/null @@ -1,291 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -""" -Verify that specifying a build_dir argument to SConscript still works. -""" - -import TestSCons - -test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) - -test.write('SConscript', """ -SConscript('DummyScript', build_dir = 'build') -""") - -test.write('DummyScript', """ -""") - -msg = """The build_dir keyword has been deprecated; use the variant_dir keyword instead.""" -test.deprecated_warning('deprecated-build-dir', msg) - -warning = '\nscons: warning: ' + TestSCons.re_escape(msg) \ - + '\n' + TestSCons.file_expr - -all1 = test.workpath('test', 'build', 'var1', 'all') -all2 = test.workpath('test', 'build', 'var2', 'all') -all3 = test.workpath('test', 'build', 'var3', 'all') -all4 = test.workpath('test', 'build', 'var4', 'all') -all5 = test.workpath('build', 'var5', 'all') -all6 = test.workpath('build', 'var6', 'all') -all7 = test.workpath('build', 'var7', 'all') -all8 = test.workpath('build', 'var8', 'all') -all9 = test.workpath('test', 'build', 'var9', 'src', 'all') - -test.subdir('test') - -test.write(['test', 'SConstruct'], """ -SetOption('warn', 'deprecated-build-dir') -src = Dir('src') -alt = Dir('alt') -var1 = Dir('build/var1') -var2 = Dir('build/var2') -var3 = Dir('build/var3') -var4 = Dir('build/var4') -var5 = Dir('../build/var5') -var6 = Dir('../build/var6') -var7 = Dir('../build/var7') -var8 = Dir('../build/var8') -var9 = Dir('../build/var9') - -def cat(env, source, target): - target = str(target[0]) - with open(target, "wb") as ofp: - for src in source: - with open(str(src), "rb") as ifp: - ofp.write(ifp.read()) - -env = Environment(BUILDERS={'Cat':Builder(action=cat)}, - BUILD='build') - -Export("env") - -SConscript('src/SConscript', build_dir=var1) -SConscript('src/SConscript', build_dir='build/var2', src_dir=src) - -SConscript('src/SConscript', build_dir='build/var3', duplicate=0) - -#XXX We can't support var4 and var5 yet, because our VariantDir linkage -#XXX is to an entire source directory. We haven't yet generalized our -#XXX infrastructure to be able to take the SConscript file from one source -#XXX directory, but the rest of the files from a different one. -#XXX SConscript('src/SConscript', build_dir=var4, src_dir=alt, duplicate=0) - -#XXX SConscript('src/SConscript', build_dir='../build/var5', src_dir='alt') -SConscript('src/SConscript', build_dir=var6) - -SConscript('src/SConscript', build_dir=var7, src_dir=src, duplicate=0) -env.SConscript('src/SConscript', build_dir='../$BUILD/var8', duplicate=0) - -# This tests the fact that if you specify a src_dir that is above -# the dir a SConscript is in, that we do the intuitive thing, i.e., -# we set the path of the SConscript accordingly. The below is -# equivalent to saying: -# -# VariantDir('build/var9', '.') -# SConscript('build/var9/src/SConscript') -SConscript('src/SConscript', build_dir='build/var9', src_dir='.') -""") - -test.subdir(['test', 'src'], ['test', 'alt']) - -test.write(['test', 'src', 'SConscript'], """ -Import("env") -env.Cat('aaa.out', 'aaa.in') -env.Cat('bbb.out', 'bbb.in') -env.Cat('ccc.out', 'ccc.in') -env.Cat('all', ['aaa.out', 'bbb.out', 'ccc.out']) -""") - -test.write('test/src/aaa.in', "test/src/aaa.in\n") -test.write('test/src/bbb.in', "test/src/bbb.in\n") -test.write('test/src/ccc.in', "test/src/ccc.in\n") - -test.write('test/alt/aaa.in', "test/alt/aaa.in\n") -test.write('test/alt/bbb.in', "test/alt/bbb.in\n") -test.write('test/alt/ccc.in', "test/alt/ccc.in\n") - -test.run(chdir='test', arguments = '. ../build', stderr = 7*warning) - -all_src = "test/src/aaa.in\ntest/src/bbb.in\ntest/src/ccc.in\n" -all_alt = "test/alt/aaa.in\ntest/alt/bbb.in\ntest/alt/ccc.in\n" - -test.must_match(all1, all_src) -test.must_match(all2, all_src) -test.must_match(all3, all_src) -#XXX We can't support var4 and var5 yet, because our VariantDir linkage -#XXX is to an entire source directory. We haven't yet generalized our -#XXX infrastructure to be able to take the SConscript file from one source -#XXX directory, but the rest of the files from a different one. -#XXX test.must_match(all4, all_alt) -#XXX test.must_match(all5, all_alt) -test.must_match(all6, all_src) -test.must_match(all7, all_src) -test.must_match(all8, all_src) -test.must_match(all9, all_src) - -import os -import stat -def equal_stats(x,y): - x = os.stat(x) - y = os.stat(y) - return (stat.S_IMODE(x[stat.ST_MODE]) == stat.S_IMODE(y[stat.ST_MODE]) and - x[stat.ST_MTIME] == y[stat.ST_MTIME]) - -# Make sure we did duplicate the source files in build/var1, -# and that their stats are the same: -for file in ['aaa.in', 'bbb.in', 'ccc.in']: - test.must_exist(test.workpath('test', 'build', 'var1', file)) - test.fail_test(not equal_stats(test.workpath('test', 'build', 'var1', file), - test.workpath('test', 'src', file))) - -# Make sure we did duplicate the source files in build/var2, -# and that their stats are the same: -for file in ['aaa.in', 'bbb.in', 'ccc.in']: - test.must_exist(test.workpath('test', 'build', 'var2', file)) - test.fail_test(not equal_stats(test.workpath('test', 'build', 'var2', file), - test.workpath('test', 'src', file))) - -# Make sure we didn't duplicate the source files in build/var3. -test.must_not_exist(test.workpath('test', 'build', 'var3', 'aaa.in')) -test.must_not_exist(test.workpath('test', 'build', 'var3', 'bbb.in')) -test.must_not_exist(test.workpath('test', 'build', 'var3', 'ccc.in')) - -#XXX We can't support var4 and var5 yet, because our VariantDir linkage -#XXX is to an entire source directory. We haven't yet generalized our -#XXX infrastructure to be able to take the SConscript file from one source -#XXX directory, but the rest of the files from a different one. -#XXX Make sure we didn't duplicate the source files in build/var4. -#XXXtest.must_not_exist(test.workpath('test', 'build', 'var4', 'aaa.in')) -#XXXtest.must_not_exist(test.workpath('test', 'build', 'var4', 'bbb.in')) -#XXXtest.must_not_exist(test.workpath('test', 'build', 'var4', 'ccc.in')) - -#XXX We can't support var4 and var5 yet, because our VariantDir linkage -#XXX is to an entire source directory. We haven't yet generalized our -#XXX infrastructure to be able to take the SConscript file from one source -#XXX directory, but the rest of the files from a different one. -#XXX Make sure we did duplicate the source files in build/var5, -#XXX and that their stats are the same: -#XXXfor file in ['aaa.in', 'bbb.in', 'ccc.in']: -#XXX test.must_exist(test.workpath('build', 'var5', file)) -#XXX test.fail_test(not equal_stats(test.workpath('build', 'var5', file), -#XXX test.workpath('test', 'src', file))) - -# Make sure we did duplicate the source files in build/var6, -# and that their stats are the same: -for file in ['aaa.in', 'bbb.in', 'ccc.in']: - test.must_exist(test.workpath('build', 'var6', file)) - test.fail_test(not equal_stats(test.workpath('build', 'var6', file), - test.workpath('test', 'src', file))) - -# Make sure we didn't duplicate the source files in build/var7. -test.must_not_exist(test.workpath('build', 'var7', 'aaa.in')) -test.must_not_exist(test.workpath('build', 'var7', 'bbb.in')) -test.must_not_exist(test.workpath('build', 'var7', 'ccc.in')) - -# Make sure we didn't duplicate the source files in build/var8. -test.must_not_exist(test.workpath('build', 'var8', 'aaa.in')) -test.must_not_exist(test.workpath('build', 'var8', 'bbb.in')) -test.must_not_exist(test.workpath('build', 'var8', 'ccc.in')) - -################### -test.subdir('test2') - -test.write(['test2', 'SConstruct'], """\ -SConscript('SConscript', build_dir='Build', src_dir='.', duplicate=0) -""") - -test.write(['test2', 'SConscript'], """\ -env = Environment() -foo_obj = env.Object('foo.c') -env.Program('foo', [foo_obj, 'bar.c']) -""") - -test.write(['test2', 'bar.c'], r""" -#include -#include - -void -bar(void) { - printf("bar.c\n"); -} -""") - -test.write(['test2', 'foo.c'], r""" -#include -#include - -extern void -bar(void); - -int -main(int argc, char *argv[]) { - bar(); - printf("foo.c\n"); -} -""") - -test.run(chdir="test2", stderr = warning) - -_obj = TestSCons._obj - -test.must_not_exist(test.workpath('test2', 'foo' + _obj)) -test.must_not_exist(test.workpath('test2', 'bar' + _obj)) -test.must_exist(test.workpath('test2', 'Build', 'foo' + _obj)) -test.must_exist(test.workpath('test2', 'Build', 'bar' + _obj)) - -################### -# Make sure that directories for subsidiary SConscript() calls -# in a build_dir get created if they don't already exist. -test.subdir('test3') - -test.subdir(['test3', 'src'], ['test3', 'src', '_glscry']) - -test.write(['test3', 'SConstruct'], """\ -SConscript(dirs=['src'], build_dir='build', duplicate=0) -""") - -test.write(['test3', 'src', 'SConscript'], """\ -SConscript(dirs=['_glscry']) -""") - -test.write(['test3', 'src', '_glscry', 'SConscript'], """\ -""") - -test.write(['test3', 'src', 'file.in'], "file.in\n") - -test.write(['test3', 'src', '_glscry', 'file.in'], "file.in\n") - -test.run(chdir='test3', stderr = warning) - - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/BuildDir/Old/BuildDir.py b/test/Removed/BuildDir/Old/BuildDir.py new file mode 100644 index 0000000..1a1ba02 --- /dev/null +++ b/test/Removed/BuildDir/Old/BuildDir.py @@ -0,0 +1,295 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Verify that the deprecated BuildDir() function and method still +work to create a variant directory tree (by calling VariantDir() +under the covers). +""" + +import TestSCons + +_exe = TestSCons._exe + +test = TestSCons.TestSCons() + +test.write('SConscript', """ +BuildDir('build', 'src') +""") + +msg = """BuildDir() and the build_dir keyword have been deprecated; +\tuse VariantDir() and the variant_dir keyword instead.""" +test.deprecated_warning('deprecated-build-dir', msg) + +warning = '\nscons: warning: ' + TestSCons.re_escape(msg) \ + + '\n' + TestSCons.file_expr + +foo11 = test.workpath('work1', 'build', 'var1', 'foo1' + _exe) +foo12 = test.workpath('work1', 'build', 'var1', 'foo2' + _exe) +foo21 = test.workpath('work1', 'build', 'var2', 'foo1' + _exe) +foo22 = test.workpath('work1', 'build', 'var2', 'foo2' + _exe) +foo31 = test.workpath('work1', 'build', 'var3', 'foo1' + _exe) +foo32 = test.workpath('work1', 'build', 'var3', 'foo2' + _exe) +foo41 = test.workpath('work1', 'build', 'var4', 'foo1' + _exe) +foo42 = test.workpath('work1', 'build', 'var4', 'foo2' + _exe) +foo51 = test.workpath('build', 'var5', 'foo1' + _exe) +foo52 = test.workpath('build', 'var5', 'foo2' + _exe) + +test.subdir('work1') + +test.write(['work1', 'SConstruct'], """ +SetOption('warn', 'deprecated-build-dir') +src = Dir('src') +var2 = Dir('build/var2') +var3 = Dir('build/var3') +var4 = Dir('build/var4') +var5 = Dir('../build/var5') +var6 = Dir('../build/var6') + +env = Environment(BUILD = 'build', SRC = 'src') + +BuildDir('build/var1', src) +BuildDir(var2, src) +BuildDir(var3, src, duplicate=0) +env.BuildDir("$BUILD/var4", "$SRC", duplicate=0) +BuildDir(var5, src, duplicate=0) +BuildDir(var6, src) + +env = Environment(CPPPATH='#src', FORTRANPATH='#src') +SConscript('build/var1/SConscript', "env") +SConscript('build/var2/SConscript', "env") + +env = Environment(CPPPATH=src, FORTRANPATH=src) +SConscript('build/var3/SConscript', "env") +SConscript(File('SConscript', var4), "env") + +env = Environment(CPPPATH='.', FORTRANPATH='.') +SConscript('../build/var5/SConscript', "env") +SConscript('../build/var6/SConscript', "env") +""") + +test.subdir(['work1', 'src']) +test.write(['work1', 'src', 'SConscript'], """ +import os.path + +def buildIt(target, source, env): + if not os.path.exists('build'): + os.mkdir('build') + with open(str(source[0]), 'r') as ifp, open(str(target[0]), 'w') as ofp: + ofp.write(ifp.read()) + return 0 +Import("env") +env.Command(target='f2.c', source='f2.in', action=buildIt) +env.Program(target='foo2', source='f2.c') +env.Program(target='foo1', source='f1.c') +env.Command(target='f3.h', source='f3h.in', action=buildIt) +env.Command(target='f4.h', source='f4h.in', action=buildIt) +env.Command(target='f4.c', source='f4.in', action=buildIt) + +env2=env.Clone(CPPPATH='.') +env2.Program(target='foo3', source='f3.c') +env2.Program(target='foo4', source='f4.c') +""") + +test.write(['work1', 'src', 'f1.c'], r""" +#include +#include + +#include "f1.h" + +int +main(int argc, char *argv[]) +{ + argv[argc++] = "--"; + printf(F1_STR); + exit (0); +} +""") + +test.write(['work1', 'src', 'f2.in'], r""" +#include +#include + +#include "f2.h" + +int +main(int argc, char *argv[]) +{ + argv[argc++] = "--"; + printf(F2_STR); + exit (0); +} +""") + +test.write(['work1', 'src', 'f3.c'], r""" +#include +#include + +#include "f3.h" + +int +main(int argc, char *argv[]) +{ + argv[argc++] = "--"; + printf(F3_STR); + exit (0); +} +""") + +test.write(['work1', 'src', 'f4.in'], r""" +#include +#include + +#include "f4.h" + +int +main(int argc, char *argv[]) +{ + argv[argc++] = "--"; + printf(F4_STR); + exit (0); +} +""") + +test.write(['work1', 'src', 'f1.h'], r""" +#define F1_STR "f1.c\n" +""") + +test.write(['work1', 'src', 'f2.h'], r""" +#define F2_STR "f2.c\n" +""") + +test.write(['work1', 'src', 'f3h.in'], r""" +#define F3_STR "f3.c\n" +""") + +test.write(['work1', 'src', 'f4h.in'], r""" +#define F4_STR "f4.c\n" +""") + +# Some releases of freeBSD seem to have library complaints about +# tempnam(). Filter out these annoying messages before checking for +# error output. +def filter_tempnam(err): + if not err: + return '' + msg = "warning: tempnam() possibly used unsafely" + return '\n'.join([l for l in err.splitlines() if l.find(msg) == -1]) + +test.run(chdir='work1', arguments = '. ../build', stderr=None) + +stderr = filter_tempnam(test.stderr()) +test.fail_test(TestSCons.match_re_dotall(stderr, 6*warning)) + +test.run(program = foo11, stdout = "f1.c\n") +test.run(program = foo12, stdout = "f2.c\n") +test.run(program = foo41, stdout = "f1.c\n") +test.run(program = foo42, stdout = "f2.c\n") + +test.run(chdir='work1', + arguments='. ../build', + stderr = None, + stdout=test.wrap_stdout("""\ +scons: `.' is up to date. +scons: `%s' is up to date. +""" % test.workpath('build'))) + +stderr = filter_tempnam(test.stderr()) +test.fail_test(TestSCons.match_re_dotall(stderr, 6*warning)) + +import os +import stat +def equal_stats(x,y): + x = os.stat(x) + y = os.stat(y) + return (stat.S_IMODE(x[stat.ST_MODE]) == stat.S_IMODE(y[stat.ST_MODE]) and + x[stat.ST_MTIME] == y[stat.ST_MTIME]) + +# Make sure we did duplicate the source files in build/var2, +# and that their stats are the same: +test.must_exist(['work1', 'build', 'var2', 'f1.c']) +test.must_exist(['work1', 'build', 'var2', 'f2.in']) +test.fail_test(not equal_stats(test.workpath('work1', 'build', 'var2', 'f1.c'), test.workpath('work1', 'src', 'f1.c'))) +test.fail_test(not equal_stats(test.workpath('work1', 'build', 'var2', 'f2.in'), test.workpath('work1', 'src', 'f2.in'))) + +# Make sure we didn't duplicate the source files in build/var3. +test.must_not_exist(['work1', 'build', 'var3', 'f1.c']) +test.must_not_exist(['work1', 'build', 'var3', 'f2.in']) +test.must_not_exist(['work1', 'build', 'var3', 'b1.f']) +test.must_not_exist(['work1', 'build', 'var3', 'b2.in']) + +# Make sure we didn't duplicate the source files in build/var4. +test.must_not_exist(['work1', 'build', 'var4', 'f1.c']) +test.must_not_exist(['work1', 'build', 'var4', 'f2.in']) +test.must_not_exist(['work1', 'build', 'var4', 'b1.f']) +test.must_not_exist(['work1', 'build', 'var4', 'b2.in']) + +# Make sure we didn't duplicate the source files in build/var5. +test.must_not_exist(['build', 'var5', 'f1.c']) +test.must_not_exist(['build', 'var5', 'f2.in']) +test.must_not_exist(['build', 'var5', 'b1.f']) +test.must_not_exist(['build', 'var5', 'b2.in']) + +# verify that header files in the source directory are scanned properly: +test.write(['work1', 'src', 'f1.h'], r""" +#define F1_STR "f1.c 2\n" +""") + +test.write(['work1', 'src', 'f3h.in'], r""" +#define F3_STR "f3.c 2\n" +""") + +test.write(['work1', 'src', 'f4h.in'], r""" +#define F4_STR "f4.c 2\n" +""") + +test.run(chdir='work1', arguments = '../build/var5', stderr=None) + +stderr = filter_tempnam(test.stderr()) +test.fail_test(TestSCons.match_re_dotall(stderr, 6*warning)) + +test.run(program = foo51, stdout = "f1.c 2\n") +test.run(program = test.workpath('build', 'var5', 'foo3' + _exe), + stdout = "f3.c 2\n") +test.run(program = test.workpath('build', 'var5', 'foo4' + _exe), + stdout = "f4.c 2\n") + +test.run(chdir='work1', + arguments='../build/var5', + stderr=None, + stdout=test.wrap_stdout("""\ +scons: `%s' is up to date. +""" % test.workpath('build', 'var5'))) + +stderr = filter_tempnam(test.stderr()) +test.fail_test(TestSCons.match_re_dotall(stderr, 6*warning)) + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/BuildDir/Old/SConscript-build_dir.py b/test/Removed/BuildDir/Old/SConscript-build_dir.py new file mode 100644 index 0000000..0d1ba6a --- /dev/null +++ b/test/Removed/BuildDir/Old/SConscript-build_dir.py @@ -0,0 +1,291 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Verify that specifying a build_dir argument to SConscript still works. +""" + +import TestSCons + +test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) + +test.write('SConscript', """ +SConscript('DummyScript', build_dir = 'build') +""") + +test.write('DummyScript', """ +""") + +msg = """The build_dir keyword has been deprecated; use the variant_dir keyword instead.""" +test.deprecated_warning('deprecated-build-dir', msg) + +warning = '\nscons: warning: ' + TestSCons.re_escape(msg) \ + + '\n' + TestSCons.file_expr + +all1 = test.workpath('test', 'build', 'var1', 'all') +all2 = test.workpath('test', 'build', 'var2', 'all') +all3 = test.workpath('test', 'build', 'var3', 'all') +all4 = test.workpath('test', 'build', 'var4', 'all') +all5 = test.workpath('build', 'var5', 'all') +all6 = test.workpath('build', 'var6', 'all') +all7 = test.workpath('build', 'var7', 'all') +all8 = test.workpath('build', 'var8', 'all') +all9 = test.workpath('test', 'build', 'var9', 'src', 'all') + +test.subdir('test') + +test.write(['test', 'SConstruct'], """ +SetOption('warn', 'deprecated-build-dir') +src = Dir('src') +alt = Dir('alt') +var1 = Dir('build/var1') +var2 = Dir('build/var2') +var3 = Dir('build/var3') +var4 = Dir('build/var4') +var5 = Dir('../build/var5') +var6 = Dir('../build/var6') +var7 = Dir('../build/var7') +var8 = Dir('../build/var8') +var9 = Dir('../build/var9') + +def cat(env, source, target): + target = str(target[0]) + with open(target, "wb") as ofp: + for src in source: + with open(str(src), "rb") as ifp: + ofp.write(ifp.read()) + +env = Environment(BUILDERS={'Cat':Builder(action=cat)}, + BUILD='build') + +Export("env") + +SConscript('src/SConscript', build_dir=var1) +SConscript('src/SConscript', build_dir='build/var2', src_dir=src) + +SConscript('src/SConscript', build_dir='build/var3', duplicate=0) + +#XXX We can't support var4 and var5 yet, because our VariantDir linkage +#XXX is to an entire source directory. We haven't yet generalized our +#XXX infrastructure to be able to take the SConscript file from one source +#XXX directory, but the rest of the files from a different one. +#XXX SConscript('src/SConscript', build_dir=var4, src_dir=alt, duplicate=0) + +#XXX SConscript('src/SConscript', build_dir='../build/var5', src_dir='alt') +SConscript('src/SConscript', build_dir=var6) + +SConscript('src/SConscript', build_dir=var7, src_dir=src, duplicate=0) +env.SConscript('src/SConscript', build_dir='../$BUILD/var8', duplicate=0) + +# This tests the fact that if you specify a src_dir that is above +# the dir a SConscript is in, that we do the intuitive thing, i.e., +# we set the path of the SConscript accordingly. The below is +# equivalent to saying: +# +# VariantDir('build/var9', '.') +# SConscript('build/var9/src/SConscript') +SConscript('src/SConscript', build_dir='build/var9', src_dir='.') +""") + +test.subdir(['test', 'src'], ['test', 'alt']) + +test.write(['test', 'src', 'SConscript'], """ +Import("env") +env.Cat('aaa.out', 'aaa.in') +env.Cat('bbb.out', 'bbb.in') +env.Cat('ccc.out', 'ccc.in') +env.Cat('all', ['aaa.out', 'bbb.out', 'ccc.out']) +""") + +test.write('test/src/aaa.in', "test/src/aaa.in\n") +test.write('test/src/bbb.in', "test/src/bbb.in\n") +test.write('test/src/ccc.in', "test/src/ccc.in\n") + +test.write('test/alt/aaa.in', "test/alt/aaa.in\n") +test.write('test/alt/bbb.in', "test/alt/bbb.in\n") +test.write('test/alt/ccc.in', "test/alt/ccc.in\n") + +test.run(chdir='test', arguments = '. ../build', stderr = 7*warning) + +all_src = "test/src/aaa.in\ntest/src/bbb.in\ntest/src/ccc.in\n" +all_alt = "test/alt/aaa.in\ntest/alt/bbb.in\ntest/alt/ccc.in\n" + +test.must_match(all1, all_src) +test.must_match(all2, all_src) +test.must_match(all3, all_src) +#XXX We can't support var4 and var5 yet, because our VariantDir linkage +#XXX is to an entire source directory. We haven't yet generalized our +#XXX infrastructure to be able to take the SConscript file from one source +#XXX directory, but the rest of the files from a different one. +#XXX test.must_match(all4, all_alt) +#XXX test.must_match(all5, all_alt) +test.must_match(all6, all_src) +test.must_match(all7, all_src) +test.must_match(all8, all_src) +test.must_match(all9, all_src) + +import os +import stat +def equal_stats(x,y): + x = os.stat(x) + y = os.stat(y) + return (stat.S_IMODE(x[stat.ST_MODE]) == stat.S_IMODE(y[stat.ST_MODE]) and + x[stat.ST_MTIME] == y[stat.ST_MTIME]) + +# Make sure we did duplicate the source files in build/var1, +# and that their stats are the same: +for file in ['aaa.in', 'bbb.in', 'ccc.in']: + test.must_exist(test.workpath('test', 'build', 'var1', file)) + test.fail_test(not equal_stats(test.workpath('test', 'build', 'var1', file), + test.workpath('test', 'src', file))) + +# Make sure we did duplicate the source files in build/var2, +# and that their stats are the same: +for file in ['aaa.in', 'bbb.in', 'ccc.in']: + test.must_exist(test.workpath('test', 'build', 'var2', file)) + test.fail_test(not equal_stats(test.workpath('test', 'build', 'var2', file), + test.workpath('test', 'src', file))) + +# Make sure we didn't duplicate the source files in build/var3. +test.must_not_exist(test.workpath('test', 'build', 'var3', 'aaa.in')) +test.must_not_exist(test.workpath('test', 'build', 'var3', 'bbb.in')) +test.must_not_exist(test.workpath('test', 'build', 'var3', 'ccc.in')) + +#XXX We can't support var4 and var5 yet, because our VariantDir linkage +#XXX is to an entire source directory. We haven't yet generalized our +#XXX infrastructure to be able to take the SConscript file from one source +#XXX directory, but the rest of the files from a different one. +#XXX Make sure we didn't duplicate the source files in build/var4. +#XXXtest.must_not_exist(test.workpath('test', 'build', 'var4', 'aaa.in')) +#XXXtest.must_not_exist(test.workpath('test', 'build', 'var4', 'bbb.in')) +#XXXtest.must_not_exist(test.workpath('test', 'build', 'var4', 'ccc.in')) + +#XXX We can't support var4 and var5 yet, because our VariantDir linkage +#XXX is to an entire source directory. We haven't yet generalized our +#XXX infrastructure to be able to take the SConscript file from one source +#XXX directory, but the rest of the files from a different one. +#XXX Make sure we did duplicate the source files in build/var5, +#XXX and that their stats are the same: +#XXXfor file in ['aaa.in', 'bbb.in', 'ccc.in']: +#XXX test.must_exist(test.workpath('build', 'var5', file)) +#XXX test.fail_test(not equal_stats(test.workpath('build', 'var5', file), +#XXX test.workpath('test', 'src', file))) + +# Make sure we did duplicate the source files in build/var6, +# and that their stats are the same: +for file in ['aaa.in', 'bbb.in', 'ccc.in']: + test.must_exist(test.workpath('build', 'var6', file)) + test.fail_test(not equal_stats(test.workpath('build', 'var6', file), + test.workpath('test', 'src', file))) + +# Make sure we didn't duplicate the source files in build/var7. +test.must_not_exist(test.workpath('build', 'var7', 'aaa.in')) +test.must_not_exist(test.workpath('build', 'var7', 'bbb.in')) +test.must_not_exist(test.workpath('build', 'var7', 'ccc.in')) + +# Make sure we didn't duplicate the source files in build/var8. +test.must_not_exist(test.workpath('build', 'var8', 'aaa.in')) +test.must_not_exist(test.workpath('build', 'var8', 'bbb.in')) +test.must_not_exist(test.workpath('build', 'var8', 'ccc.in')) + +################### +test.subdir('test2') + +test.write(['test2', 'SConstruct'], """\ +SConscript('SConscript', build_dir='Build', src_dir='.', duplicate=0) +""") + +test.write(['test2', 'SConscript'], """\ +env = Environment() +foo_obj = env.Object('foo.c') +env.Program('foo', [foo_obj, 'bar.c']) +""") + +test.write(['test2', 'bar.c'], r""" +#include +#include + +void +bar(void) { + printf("bar.c\n"); +} +""") + +test.write(['test2', 'foo.c'], r""" +#include +#include + +extern void +bar(void); + +int +main(int argc, char *argv[]) { + bar(); + printf("foo.c\n"); +} +""") + +test.run(chdir="test2", stderr = warning) + +_obj = TestSCons._obj + +test.must_not_exist(test.workpath('test2', 'foo' + _obj)) +test.must_not_exist(test.workpath('test2', 'bar' + _obj)) +test.must_exist(test.workpath('test2', 'Build', 'foo' + _obj)) +test.must_exist(test.workpath('test2', 'Build', 'bar' + _obj)) + +################### +# Make sure that directories for subsidiary SConscript() calls +# in a build_dir get created if they don't already exist. +test.subdir('test3') + +test.subdir(['test3', 'src'], ['test3', 'src', '_glscry']) + +test.write(['test3', 'SConstruct'], """\ +SConscript(dirs=['src'], build_dir='build', duplicate=0) +""") + +test.write(['test3', 'src', 'SConscript'], """\ +SConscript(dirs=['_glscry']) +""") + +test.write(['test3', 'src', '_glscry', 'SConscript'], """\ +""") + +test.write(['test3', 'src', 'file.in'], "file.in\n") + +test.write(['test3', 'src', '_glscry', 'file.in'], "file.in\n") + +test.run(chdir='test3', stderr = warning) + + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/BuildDir/README.md b/test/Removed/BuildDir/README.md new file mode 100644 index 0000000..c4fd879 --- /dev/null +++ b/test/Removed/BuildDir/README.md @@ -0,0 +1,6 @@ +BuildDir/Old contains old tests which used the now removed BuildDir +function, env.BuildDir method, and build_dir argument to SConscript, +preserved here for reference; the presence of an scontest.skip file +means they are never executed. + +The "new" tests verify failure using these symbols. diff --git a/test/Removed/BuildDir/SConstruct.global b/test/Removed/BuildDir/SConstruct.global new file mode 100644 index 0000000..086fbae --- /dev/null +++ b/test/Removed/BuildDir/SConstruct.global @@ -0,0 +1 @@ +BuildDir('build', 'src') diff --git a/test/Removed/BuildDir/SConstruct.kwarg b/test/Removed/BuildDir/SConstruct.kwarg new file mode 100644 index 0000000..a5c46fb --- /dev/null +++ b/test/Removed/BuildDir/SConstruct.kwarg @@ -0,0 +1 @@ +SConscript('src/SConscript', build_dir='build') diff --git a/test/Removed/BuildDir/SConstruct.method b/test/Removed/BuildDir/SConstruct.method new file mode 100644 index 0000000..afea459 --- /dev/null +++ b/test/Removed/BuildDir/SConstruct.method @@ -0,0 +1,3 @@ +env = Environment(BUILD='build', SRC='src') + +env.BuildDir('build', 'src') -- cgit v0.12 From 063a3281b4fe7f43a34c0e65dfd3a02446ba12f8 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sun, 15 Dec 2019 09:08:10 -0700 Subject: [PR #3497] add the missing testcases forgot to add these to the initial commit Signed-off-by: Mats Wichmann --- test/Removed/BuildDir/BuildDir.py | 61 +++++++++++++++++++++++++++ test/Removed/BuildDir/SConscript-build_dir.py | 54 ++++++++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 test/Removed/BuildDir/BuildDir.py create mode 100644 test/Removed/BuildDir/SConscript-build_dir.py diff --git a/test/Removed/BuildDir/BuildDir.py b/test/Removed/BuildDir/BuildDir.py new file mode 100644 index 0000000..43c8b8b --- /dev/null +++ b/test/Removed/BuildDir/BuildDir.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Verify that the BuildDir function and method no longer work. +""" + +import TestSCons + +_exe = TestSCons._exe + +test = TestSCons.TestSCons(match=TestSCons.match_exact) + +test.subdir('src') + +test.file_fixture('SConstruct.global', 'SConstruct') +expect = """\ +NameError: name 'BuildDir' is not defined: + File "{}", line 1: + BuildDir('build', 'src') +""".format(test.workpath('SConstruct')) +test.run(arguments='-Q -s', status=2, stderr=expect) + +test.file_fixture('SConstruct.method', 'SConstruct') +expect = """\ +AttributeError: 'SConsEnvironment' object has no attribute 'BuildDir': + File "{}", line 3: + env.BuildDir('build', 'src') +""".format(test.workpath('SConstruct')) +test.run(arguments='-Q -s', status=2, stderr=expect) + + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/BuildDir/SConscript-build_dir.py b/test/Removed/BuildDir/SConscript-build_dir.py new file mode 100644 index 0000000..55be7b1 --- /dev/null +++ b/test/Removed/BuildDir/SConscript-build_dir.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Verify that specifying a build_dir argument to SConscript no longer works. +""" + +import TestSCons + +test = TestSCons.TestSCons(match = TestSCons.match_exact) + +test.file_fixture('SConstruct.kwarg', 'SConstruct') +test.subdir('src') +test.write(['src', 'SConscript'], """ +""") + +# this doesn't work yet +expect = """\ +TypeError: SConscript() got an unexpected keyword argument 'build_dir': + File "{}", line 1: + SConscript('src/SConscript', build_dir='build') +""".format(test.workpath('SConstruct')) +test.run(arguments='-Q -s', status=2, stderr=expect) + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: -- cgit v0.12 From 81142e5249452a32a6b167709299ec45a92f0717 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sun, 15 Dec 2019 12:23:36 -0700 Subject: [PR #3497] add missed sconstest.skip Signed-off-by: Mats Wichmann --- test/Removed/BuildDir/Old/sconstest.skip | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test/Removed/BuildDir/Old/sconstest.skip diff --git a/test/Removed/BuildDir/Old/sconstest.skip b/test/Removed/BuildDir/Old/sconstest.skip new file mode 100644 index 0000000..e69de29 -- cgit v0.12 From 85b6c3efd79561dd9c9af71217ee8dff8b05c37a Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Mon, 16 Dec 2019 08:27:57 -0700 Subject: [PR #3497] skip test for build_dir kwarg Turns out cannot test for now-unknown build_dir arg because SConscript() doesn't error on such. Skip test for now, leaving a note (and and issue). Signed-off-by: Mats Wichmann --- test/Removed/BuildDir/SConscript-build_dir.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/Removed/BuildDir/SConscript-build_dir.py b/test/Removed/BuildDir/SConscript-build_dir.py index 55be7b1..5a8d1ca 100644 --- a/test/Removed/BuildDir/SConscript-build_dir.py +++ b/test/Removed/BuildDir/SConscript-build_dir.py @@ -32,6 +32,9 @@ import TestSCons test = TestSCons.TestSCons(match = TestSCons.match_exact) +#TODO: fix #3500 and restore test, or drop entirly +test.skip_test('SConscript() does not error on unknown kwargs, see Issue #3500, skipping test\n') + test.file_fixture('SConstruct.kwarg', 'SConstruct') test.subdir('src') test.write(['src', 'SConscript'], """ -- cgit v0.12 From 8383095df98ec6848a68c818a637acda40896972 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Tue, 17 Dec 2019 01:38:08 +0000 Subject: Regenerated docs for 3.1.2 release --- doc/generated/builders.gen | 858 ++--- doc/generated/examples/EnumVariable_map_1.xml | 3 +- doc/generated/examples/addmethod_ex1_1.xml | 3 +- doc/generated/examples/addmethod_ex2_1.xml | 3 +- doc/generated/examples/addmethod_ex2_2.xml | 3 +- doc/generated/examples/alias_ex1_1.xml | 3 +- doc/generated/examples/alias_ex2_1.xml | 3 +- doc/generated/examples/buildersbuiltin_ex1_1.xml | 3 +- doc/generated/examples/buildersbuiltin_ex2_1.xml | 3 +- doc/generated/examples/buildersbuiltin_ex3_1.xml | 3 +- doc/generated/examples/buildersbuiltin_ex4_1.xml | 3 +- doc/generated/examples/buildersbuiltin_libs_1.xml | 3 +- doc/generated/examples/buildersbuiltin_libs_2.xml | 3 +- doc/generated/examples/builderscommands_ex1_1.xml | 3 +- doc/generated/examples/builderscommands_ex2_1.xml | 3 +- .../examples/builderswriting_MY_EMITTER_1.xml | 3 +- doc/generated/examples/builderswriting_ex1_1.xml | 3 +- doc/generated/examples/builderswriting_ex2_1.xml | 3 +- doc/generated/examples/builderswriting_ex3_1.xml | 3 +- doc/generated/examples/builderswriting_ex4_1.xml | 3 +- doc/generated/examples/builderswriting_ex5_1.xml | 3 +- doc/generated/examples/builderswriting_ex6_1.xml | 3 +- doc/generated/examples/builderswriting_ex7_1.xml | 3 +- doc/generated/examples/caching_ex-random_1.xml | 9 +- doc/generated/examples/caching_ex1_1.xml | 3 +- doc/generated/examples/caching_ex1_2.xml | 3 +- doc/generated/examples/caching_ex1_4.xml | 3 +- doc/generated/examples/caching_ex1_5.xml | 3 +- doc/generated/examples/commandline_ARGLIST_1.xml | 3 +- doc/generated/examples/commandline_ARGUMENTS_1.xml | 3 +- doc/generated/examples/commandline_AddOption_1.xml | 3 +- doc/generated/examples/commandline_AddOption_2.xml | 3 +- .../examples/commandline_BUILD_TARGETS_1_1.xml | 3 +- .../examples/commandline_BoolVariable_1.xml | 3 +- .../examples/commandline_BoolVariable_2.xml | 3 +- .../examples/commandline_BoolVariable_3.xml | 3 +- .../examples/commandline_BoolVariable_4.xml | 3 +- .../examples/commandline_BoolVariable_5.xml | 3 +- .../commandline_COMMAND_LINE_TARGETS_1.xml | 3 +- .../examples/commandline_DEFAULT_TARGETS_1_1.xml | 3 +- .../examples/commandline_DEFAULT_TARGETS_2_1.xml | 3 +- doc/generated/examples/commandline_Default1_1.xml | 3 +- doc/generated/examples/commandline_Default1_2.xml | 3 +- doc/generated/examples/commandline_Default2_1.xml | 3 +- doc/generated/examples/commandline_Default3_1.xml | 3 +- doc/generated/examples/commandline_Default4_1.xml | 3 +- .../examples/commandline_EnumVariable_1.xml | 3 +- .../examples/commandline_EnumVariable_2.xml | 3 +- .../examples/commandline_EnumVariable_3.xml | 3 +- .../examples/commandline_EnumVariable_ic1_1.xml | 3 +- .../examples/commandline_EnumVariable_ic2_1.xml | 3 +- .../examples/commandline_ListVariable_1.xml | 3 +- .../examples/commandline_ListVariable_2.xml | 3 +- .../examples/commandline_ListVariable_3.xml | 3 +- .../examples/commandline_PackageVariable_1.xml | 3 +- .../examples/commandline_PathVariable_1.xml | 3 +- .../examples/commandline_PathVariable_2.xml | 3 +- .../examples/commandline_SCONSFLAGS_1.xml | 3 +- doc/generated/examples/commandline_SetOption_1.xml | 3 +- doc/generated/examples/commandline_SetOption_2.xml | 3 +- doc/generated/examples/commandline_SetOption_3.xml | 3 +- .../examples/commandline_UnknownVariables_1.xml | 5 +- .../examples/commandline_Variables1_1.xml | 3 +- .../examples/commandline_Variables_Help_1.xml | 3 +- .../commandline_Variables_custom_py_1_1.xml | 3 +- .../commandline_Variables_custom_py_2_1.xml | 3 +- doc/generated/examples/depends_AlwaysBuild_1.xml | 3 +- doc/generated/examples/depends_AlwaysBuild_2.xml | 3 +- doc/generated/examples/depends_Requires_1.xml | 3 +- doc/generated/examples/depends_ex1_1.xml | 3 +- doc/generated/examples/depends_ex1_2.xml | 3 +- doc/generated/examples/depends_ex1_3.xml | 3 +- doc/generated/examples/depends_ex1_4.xml | 3 +- doc/generated/examples/depends_ex1_5.xml | 3 +- doc/generated/examples/depends_ex1_6.xml | 3 +- doc/generated/examples/depends_ex1_7.xml | 3 +- doc/generated/examples/depends_ex1_8.xml | 3 +- doc/generated/examples/depends_ex5_1.xml | 3 +- doc/generated/examples/depends_ex5_2.xml | 3 +- .../examples/depends_ignore_explicit_1.xml | 3 +- doc/generated/examples/depends_include_1.xml | 3 +- doc/generated/examples/depends_macroinc_1.xml | 3 +- doc/generated/examples/depends_match_1.xml | 3 +- doc/generated/examples/depends_mixing_1.xml | 3 +- doc/generated/examples/depends_newer_1.xml | 3 +- doc/generated/examples/depends_no-Requires_1.xml | 3 +- doc/generated/examples/depends_parsedep_1.xml | 3 +- .../examples/environments_Append-nonexistent_1.xml | 3 +- .../environments_Prepend-nonexistent_1.xml | 3 +- .../environments_Replace-nonexistent_1.xml | 3 +- doc/generated/examples/environments_Replace1_1.xml | 3 +- doc/generated/examples/environments_Replace2_1.xml | 3 +- doc/generated/examples/environments_ex1_1.xml | 3 +- doc/generated/examples/environments_ex2_1.xml | 3 +- doc/generated/examples/environments_ex3_1.xml | 3 +- doc/generated/examples/environments_ex4_1.xml | 3 +- doc/generated/examples/environments_ex5_1.xml | 3 +- doc/generated/examples/environments_ex6_1.xml | 3 +- doc/generated/examples/environments_ex6b_1.xml | 3 +- doc/generated/examples/environments_ex6b_2.xml | 3 +- doc/generated/examples/environments_ex8_1.xml | 3 +- doc/generated/examples/environments_ex9_1.xml | 3 +- doc/generated/examples/environments_missing1_1.xml | 3 +- doc/generated/examples/environments_missing2_1.xml | 3 +- doc/generated/examples/environments_missing3_1.xml | 3 +- doc/generated/examples/factories_Chmod_1.xml | 3 +- doc/generated/examples/factories_Copy1_1.xml | 3 +- doc/generated/examples/factories_Copy2_1.xml | 3 +- doc/generated/examples/factories_Copy3_1.xml | 3 +- doc/generated/examples/factories_Delete1_1.xml | 3 +- doc/generated/examples/factories_Delete2_1.xml | 3 +- doc/generated/examples/factories_Execute_1.xml | 3 +- doc/generated/examples/factories_Mkdir_1.xml | 3 +- doc/generated/examples/factories_Move_1.xml | 3 +- doc/generated/examples/factories_Touch_1.xml | 3 +- doc/generated/examples/fileremoval_clean-ex1_1.xml | 3 +- .../examples/fileremoval_noclean-ex1_1.xml | 3 +- .../examples/fileremoval_precious-ex1_1.xml | 3 +- doc/generated/examples/hierarchy_Return_1.xml | 3 +- doc/generated/examples/hierarchy_ex1_1.xml | 3 +- doc/generated/examples/hierarchy_ex2_1.xml | 3 +- doc/generated/examples/hierarchy_ex3_1.xml | 3 +- doc/generated/examples/install_ex1_1.xml | 3 +- doc/generated/examples/install_ex2_1.xml | 3 +- doc/generated/examples/install_ex3_1.xml | 3 +- doc/generated/examples/install_ex4_1.xml | 3 +- doc/generated/examples/install_ex5_1.xml | 3 +- doc/generated/examples/java_JAVACLASSDIR_1.xml | 3 +- doc/generated/examples/java_RMIC_1.xml | 3 +- doc/generated/examples/java_jar1_1.xml | 3 +- doc/generated/examples/java_jar2_1.xml | 3 +- doc/generated/examples/java_java-classes_1.xml | 3 +- doc/generated/examples/java_java-classes_2.xml | 3 +- doc/generated/examples/java_java_1.xml | 3 +- doc/generated/examples/java_javah_1.xml | 3 +- doc/generated/examples/java_javah_file_1.xml | 3 +- doc/generated/examples/lesssimple_ex2_1.xml | 3 +- doc/generated/examples/lesssimple_ex3_1.xml | 3 +- doc/generated/examples/lesssimple_ex3_2.xml | 3 +- doc/generated/examples/lesssimple_ex4_1.xml | 3 +- doc/generated/examples/lesssimple_ex5_1.xml | 3 +- doc/generated/examples/lesssimple_target_1.xml | 3 +- doc/generated/examples/lesssimple_target_2.xml | 3 +- .../examples/libraries_SharedLibrary_1.xml | 3 +- .../examples/libraries_SharedLibrary_2.xml | 3 +- doc/generated/examples/libraries_ex1_1.xml | 3 +- doc/generated/examples/libraries_ex1_2.xml | 3 +- doc/generated/examples/libraries_ex2_1.xml | 3 +- doc/generated/examples/libraries_ex2_2.xml | 3 +- doc/generated/examples/libraries_ex3_1.xml | 3 +- doc/generated/examples/libraries_ex3_2.xml | 3 +- doc/generated/examples/libraries_objects_1.xml | 3 +- .../examples/mergeflags_MergeFlags1_1.xml | 3 +- .../examples/mergeflags_MergeFlags2_1.xml | 3 +- .../examples/mergeflags_MergeFlags3_1.xml | 3 +- doc/generated/examples/misc_Exit_1.xml | 3 +- doc/generated/examples/misc_FindFile1a_1.xml | 3 +- doc/generated/examples/misc_FindFile1b_1.xml | 3 +- doc/generated/examples/misc_FindFile1d_1.xml | 3 +- doc/generated/examples/misc_FindFile2_1.xml | 3 +- doc/generated/examples/misc_FindFile2_2.xml | 3 +- doc/generated/examples/misc_FindFile3_1.xml | 3 +- doc/generated/examples/misc_Flatten1_1.xml | 3 +- doc/generated/examples/misc_Flatten2_1.xml | 3 +- doc/generated/examples/nodes_GetBuildPath_1.xml | 3 +- doc/generated/examples/nodes_ex1_1.xml | 3 +- doc/generated/examples/nodes_ex1_2.xml | 3 +- doc/generated/examples/nodes_exists_1.xml | 3 +- doc/generated/examples/nodes_print_1.xml | 3 +- doc/generated/examples/nodes_print_2.xml | 3 +- .../examples/output_Progress-TARGET_1.xml | 3 +- doc/generated/examples/output_ex1_1.xml | 3 +- doc/generated/examples/output_ex2_1.xml | 3 +- doc/generated/examples/output_ex2_2.xml | 3 +- doc/generated/examples/output_gbf2_1.xml | 3 +- doc/generated/examples/parseflags_ex1_1.xml | 3 +- doc/generated/examples/parseflags_ex1_2.xml | 3 +- doc/generated/examples/parseflags_ex2_1.xml | 3 +- doc/generated/examples/parseflags_ex3_1.xml | 3 +- doc/generated/examples/parseflags_ex4_1.xml | 3 +- doc/generated/examples/repositories_CPPPATH3_1.xml | 3 +- doc/generated/examples/repositories_CPPPATH_1.xml | 3 +- doc/generated/examples/repositories_ex1_1.xml | 3 +- doc/generated/examples/repositories_ex2_1.xml | 3 +- doc/generated/examples/repositories_ex3_1.xml | 3 +- doc/generated/examples/repositories_ex4_1.xml | 3 +- doc/generated/examples/repositories_quote1_1.xml | 3 +- doc/generated/examples/separate_builddir_1.xml | 3 +- .../examples/separate_builddir_sconscript_1.xml | 3 +- doc/generated/examples/separate_duplicate0_1.xml | 3 +- doc/generated/examples/separate_ex1_1.xml | 3 +- .../separate_glob_builddir_sconscript_1.xml | 3 +- doc/generated/examples/sideeffect_parallel_1.xml | 3 +- doc/generated/examples/sideeffect_shared_1.xml | 3 +- doc/generated/examples/sideeffect_simple_1.xml | 3 +- doc/generated/examples/simple_Object_1.xml | 3 +- doc/generated/examples/simple_Object_2.xml | 3 +- doc/generated/examples/simple_clean_1.xml | 3 +- doc/generated/examples/simple_clean_2.xml | 3 +- doc/generated/examples/simple_declarative_1.xml | 3 +- doc/generated/examples/simple_ex1_1.xml | 3 +- doc/generated/examples/simple_ex1_2.xml | 3 +- doc/generated/examples/simple_ex1_3.xml | 3 +- doc/generated/examples/simple_ex1_4.xml | 3 +- doc/generated/examples/simple_java_1.xml | 3 +- doc/generated/examples/sourcecode_bitkeeper_1.xml | 3 +- doc/generated/examples/sourcecode_cvs_1.xml | 3 +- doc/generated/examples/sourcecode_rcs_1.xml | 3 +- doc/generated/examples/sourcecode_sccs_1.xml | 3 +- doc/generated/examples/tasks_ex1_1.xml | 3 +- doc/generated/examples/troubleshoot_Dump_1.xml | 18 +- doc/generated/examples/troubleshoot_Dump_2.xml | 34 +- doc/generated/examples/troubleshoot_Dump_ENV_1.xml | 5 +- doc/generated/examples/troubleshoot_Dump_ENV_2.xml | 3 +- doc/generated/examples/troubleshoot_explain1_1.xml | 3 +- doc/generated/examples/troubleshoot_explain1_2.xml | 3 +- doc/generated/examples/troubleshoot_explain1_3.xml | 5 +- doc/generated/examples/troubleshoot_explain2_1.xml | 3 +- doc/generated/examples/troubleshoot_explain3_1.xml | 3 +- doc/generated/examples/troubleshoot_findlibs_1.xml | 3 +- .../examples/troubleshoot_stacktrace_1.xml | 3 +- .../examples/troubleshoot_stacktrace_2.xml | 3 +- .../examples/troubleshoot_taskmastertrace_1.xml | 3 +- doc/generated/examples/troubleshoot_tree1_1.xml | 3 +- doc/generated/examples/troubleshoot_tree1_2.xml | 3 +- doc/generated/examples/troubleshoot_tree1_3.xml | 3 +- doc/generated/examples/troubleshoot_tree1_4.xml | 3 +- doc/generated/examples/troubleshoot_tree1_5.xml | 3 +- doc/generated/examples/troubleshoot_tree1_6.xml | 3 +- doc/generated/examples/troubleshoot_tree2_1.xml | 3 +- doc/generated/examples/troubleshoot_tree2_2.xml | 3 +- doc/generated/examples/variants_ex_1.xml | 3 +- doc/generated/examples/variants_ex_2.xml | 3 +- doc/generated/functions.gen | 1219 +++---- doc/generated/functions.mod | 4 - doc/generated/tools.gen | 664 ++-- doc/generated/tools.mod | 4 +- doc/generated/variables.gen | 3552 ++++++++++++-------- doc/generated/variables.mod | 20 +- 239 files changed, 4073 insertions(+), 3002 deletions(-) diff --git a/doc/generated/builders.gen b/doc/generated/builders.gen index 65201ea..59d2dca 100644 --- a/doc/generated/builders.gen +++ b/doc/generated/builders.gen @@ -1,3 +1,4 @@ + %scons; @@ -11,7 +12,7 @@ %variables-mod; ]> - + CFile() @@ -19,17 +20,18 @@ env.CFile() - + + Builds a C source file given a lex (.l) or yacc (.y) input file. -The suffix specified by the $CFILESUFFIX construction variable +The suffix specified by the $CFILESUFFIX construction variable (.c by default) is automatically added to the target if it is not already present. Example: - + # builds foo.c env.CFile(target = 'foo.c', source = 'foo.l') # builds bar.c @@ -66,18 +68,19 @@ for the calling syntax and details. env.CXXFile() - + + Builds a C++ source file given a lex (.ll) or yacc (.yy) input file. -The suffix specified by the $CXXFILESUFFIX construction variable +The suffix specified by the $CXXFILESUFFIX construction variable (.cc by default) is automatically added to the target if it is not already present. Example: - + # builds foo.cc env.CXXFile(target = 'foo.cc', source = 'foo.ll') # builds bar.cc @@ -92,19 +95,20 @@ env.CXXFile(target = 'bar', source = 'bar.yy') env.DocbookEpub() - + + A pseudo-Builder, providing a Docbook toolchain for EPUB output. -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookEpub('manual.epub', 'manual.xml') - + or simply -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookEpub('manual') @@ -117,16 +121,17 @@ env.DocbookEpub('manual') env.DocbookHtml() - + + A pseudo-Builder, providing a Docbook toolchain for HTML output. -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookHtml('manual.html', 'manual.xml') - + or simply -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookHtml('manual') @@ -138,34 +143,35 @@ env.DocbookHtml('manual') env.DocbookHtmlChunked() - + + A pseudo-Builder, providing a Docbook toolchain for chunked HTML output. It supports the base.dir parameter. The chunkfast.xsl file (requires "EXSLT") is used as the default stylesheet. Basic syntax: -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookHtmlChunked('manual') - + where manual.xml is the input file. -If you use the root.filename +If you use the root.filename parameter in your own stylesheets you have to specify the new target name. This ensures that the dependencies get correct, especially for the cleanup via scons -c: -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookHtmlChunked('mymanual.html', 'manual', xsl='htmlchunk.xsl') -Some basic support for the base.dir is provided. You +Some basic support for the base.dir is provided. You can add the base_dir keyword to your Builder call, and the given prefix gets prepended to all the created filenames: -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookHtmlChunked('manual', xsl='htmlchunk.xsl', base_dir='output/') -Make sure that you don't forget the trailing slash for the base folder, else +Make sure that you don't forget the trailing slash for the base folder, else your files get renamed only! @@ -177,34 +183,35 @@ your files get renamed only! env.DocbookHtmlhelp() - + + A pseudo-Builder, providing a Docbook toolchain for HTMLHELP output. Its basic syntax is: -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookHtmlhelp('manual') - + where manual.xml is the input file. -If you use the root.filename +If you use the root.filename parameter in your own stylesheets you have to specify the new target name. This ensures that the dependencies get correct, especially for the cleanup via scons -c: -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookHtmlhelp('mymanual.html', 'manual', xsl='htmlhelp.xsl') -Some basic support for the base.dir parameter +Some basic support for the base.dir parameter is provided. You can add the base_dir keyword to your Builder call, and the given prefix gets prepended to all the created filenames: -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookHtmlhelp('manual', xsl='htmlhelp.xsl', base_dir='output/') -Make sure that you don't forget the trailing slash for the base folder, else +Make sure that you don't forget the trailing slash for the base folder, else your files get renamed only! @@ -217,15 +224,16 @@ your files get renamed only! env.DocbookMan() - + + A pseudo-Builder, providing a Docbook toolchain for Man page output. Its basic syntax is: -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookMan('manual') - + where manual.xml is the input file. Note, that you can specify a target name, but the actual output names are automatically set from the refname entries in your XML source. @@ -239,19 +247,20 @@ set from the refname entries in your XML source. env.DocbookPdf() - + + A pseudo-Builder, providing a Docbook toolchain for PDF output. -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookPdf('manual.pdf', 'manual.xml') - + or simply -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookPdf('manual') @@ -264,32 +273,33 @@ env.DocbookPdf('manual') env.DocbookSlidesHtml() - + + A pseudo-Builder, providing a Docbook toolchain for HTML slides output. -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookSlidesHtml('manual') -If you use the titlefoil.html parameter in +If you use the titlefoil.html parameter in your own stylesheets you have to give the new target name. This ensures that the dependencies get correct, especially for the cleanup via scons -c: -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookSlidesHtml('mymanual.html','manual', xsl='slideshtml.xsl') -Some basic support for the base.dir parameter +Some basic support for the base.dir parameter is provided. You can add the base_dir keyword to your Builder call, and the given prefix gets prepended to all the created filenames: -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookSlidesHtml('manual', xsl='slideshtml.xsl', base_dir='output/') -Make sure that you don't forget the trailing slash for the base folder, else +Make sure that you don't forget the trailing slash for the base folder, else your files get renamed only! @@ -302,19 +312,20 @@ your files get renamed only! env.DocbookSlidesPdf() - + + A pseudo-Builder, providing a Docbook toolchain for PDF slides output. -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookSlidesPdf('manual.pdf', 'manual.xml') - + or simply -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookSlidesPdf('manual') @@ -326,11 +337,12 @@ env.DocbookSlidesPdf('manual') env.DocbookXInclude() - + + A pseudo-Builder, for resolving XIncludes in a separate processing step. -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookXInclude('manual_xincluded.xml', 'manual.xml') @@ -342,15 +354,16 @@ env.DocbookXInclude('manual_xincluded.xml', 'manual.xml') env.DocbookXslt() - + + A pseudo-Builder, applying a given XSL transformation to the input file. -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookXslt('manual_transformed.xml', 'manual.xml', xsl='transform.xslt') -Note, that this builder requires the xsl parameter +Note, that this builder requires the xsl parameter to be set. @@ -362,40 +375,41 @@ to be set. env.DVI() - + + Builds a .dvi file from a .tex, .ltx or .latex input file. If the source file suffix is .tex, -scons +scons will examine the contents of the file; if the string \documentclass or \documentstyle is found, the file is assumed to be a LaTeX file and -the target is built by invoking the $LATEXCOM command line; -otherwise, the $TEXCOM command line is used. +the target is built by invoking the $LATEXCOM command line; +otherwise, the $TEXCOM command line is used. If the file is a LaTeX file, the -DVI +DVI builder method will also examine the contents of the .aux -file and invoke the $BIBTEX command line +file and invoke the $BIBTEX command line if the string bibdata is found, -start $MAKEINDEX to generate an index if a +start $MAKEINDEX to generate an index if a .ind file is found and will examine the contents .log -file and re-run the $LATEXCOM command +file and re-run the $LATEXCOM command if the log file says it is necessary. - + The suffix .dvi (hard-coded within TeX itself) is automatically added to the target @@ -403,7 +417,7 @@ if it is not already present. Examples: - + # builds from aaa.tex env.DVI(target = 'aaa.dvi', source = 'aaa.tex') # builds bbb.dvi @@ -420,13 +434,14 @@ env.DVI(target = 'ccc.dvi', source = 'ccc.latex') env.Gs() - + + A Builder for explicitly calling the gs executable. Depending on the underlying OS, the different names gs, gsos2 and gswin32c are tried. -env = Environment(tools=['gs']) +env = Environment(tools=['gs']) env.Gs('cover.jpg','scons-scons.pdf', GSFLAGS='-dNOPAUSE -dBATCH -sDEVICE=jpeg -dFirstPage=1 -dLastPage=1 -q') ) @@ -440,7 +455,8 @@ env.Gs('cover.jpg','scons-scons.pdf', env.Install() - + + Installs one or more source files or directories in the specified target, which must be a directory. @@ -450,7 +466,7 @@ sources may be given as a string or as a node returned by a builder. - + env.Install('/usr/local/bin', source = ['foo', 'bar']) @@ -478,7 +494,8 @@ and the chapters on Installing Files and on Alias Targets). env.InstallAs() - + + Installs one or more source files or directories to specific names, allowing changing a file or directory name @@ -490,7 +507,7 @@ source arguments list different numbers of files or directories. - + env.InstallAs(target = '/usr/local/bin/foo', source = 'foo_debug') env.InstallAs(target = ['../lib/libfoo.a', '../lib/libbar.a'], @@ -506,12 +523,13 @@ env.InstallAs(target = ['../lib/libfoo.a', '../lib/libbar.a'], env.InstallVersionedLib() - + + Installs a versioned shared library. The symlinks appropriate to the architecture will be generated based on symlinks of the source library. - + env.InstallVersionedLib(target = '/usr/local/bin/foo', source = 'libxyz.1.5.2.so') @@ -524,40 +542,41 @@ env.InstallVersionedLib(target = '/usr/local/bin/foo', env.Jar() - + + Builds a Java archive (.jar) file from the specified list of sources. Any directories in the source list will be searched for .class files). Any .java files in the source list will be compiled to .class files -by calling the Java Builder. +by calling the Java Builder. - -If the $JARCHDIR value is set, the -jar + +If the $JARCHDIR value is set, the +jar command will change to the specified directory using the option. -If $JARCHDIR is not set explicitly, -SCons will use the top of any subdirectory tree +If $JARCHDIR is not set explicitly, +SCons will use the top of any subdirectory tree in which Java .class -were built by the Java Builder. +were built by the Java Builder. - + If the contents any of the source files begin with the string Manifest-Version, the file is assumed to be a manifest and is passed to the -jar +jar command with the option set. - + env.Jar(target = 'foo.jar', source = 'classes') env.Jar(target = 'bar.jar', @@ -572,7 +591,8 @@ env.Jar(target = 'bar.jar', env.Java() - + + Builds one or more Java class files. The sources may be any combination of explicit .java @@ -581,7 +601,7 @@ env.Jar(target = 'bar.jar', for .java files. - + SCons will parse each source .java file to find the classes (including inner classes) @@ -592,7 +612,7 @@ env.Jar(target = 'bar.jar', the specified target directory. - + SCons will also search each Java file for the Java package name, which it assumes can be found on a line @@ -615,17 +635,17 @@ env.Jar(target = 'bar.jar', class file. - + Examples: - + env.Java(target = 'classes', source = 'src') env.Java(target = 'classes', source = ['src1', 'src2']) env.Java(target = 'classes', source = ['File1.java', 'File2.java']) - + Java source files can use the native encoding for the underlying OS. Since SCons compiles in simple ASCII mode by default, the compiler will generate warnings about unmappable characters, @@ -638,7 +658,7 @@ env.Jar(target = 'bar.jar', with a different encoding. - + env = Environment() env['ENV']['LANG'] = 'en_GB.UTF-8' @@ -651,7 +671,8 @@ env.Jar(target = 'bar.jar', env.JavaH() - + + Builds C header and source files for implementing Java native methods. The target can be either a directory @@ -661,29 +682,29 @@ will contain all of the definitions. The source can be the names of .class files, the names of .java files to be compiled into .class files -by calling the Java builder method, +by calling the Java builder method, or the objects returned from the -Java +Java builder method. - + If the construction variable -$JAVACLASSDIR +$JAVACLASSDIR is set, either in the environment or in the call to the -JavaH +JavaH builder method itself, then the value of the variable will be stripped from the beginning of any .class file names. - + Examples: - + # builds java_native.h classes = env.Java(target = 'classdir', source = 'src') env.JavaH(target = 'java_native.h', source = classes) @@ -706,9 +727,10 @@ env.JavaH(target = 'export', env.Library() - + + A synonym for the -StaticLibrary +StaticLibrary builder method. @@ -720,10 +742,11 @@ builder method. env.LoadableModule() - + + On most systems, this is the same as -SharedLibrary. +SharedLibrary. On Mac OS X (Darwin) platforms, this creates a loadable module bundle. @@ -736,9 +759,10 @@ this creates a loadable module bundle. env.M4() - + + Builds an output file from an M4 input file. -This uses a default $M4FLAGS value of +This uses a default $M4FLAGS value of , which considers all warnings to be fatal and stops on the first warning @@ -746,7 +770,7 @@ when using the GNU version of m4. Example: - + env.M4(target = 'foo.c', source = 'foo.c.m4') @@ -758,14 +782,15 @@ env.M4(target = 'foo.c', source = 'foo.c.m4') env.Moc() - + + Builds an output file from a moc input file. Moc input files are either header files or cxx files. This builder is only available after using the -tool 'qt'. See the $QTDIR variable for more information. +tool 'qt'. See the $QTDIR variable for more information. Example: - + env.Moc('foo.h') # generates moc_foo.cc env.Moc('foo.cpp') # generates foo.moc @@ -778,47 +803,48 @@ env.Moc('foo.cpp') # generates foo.moc env.MOFiles() - -This builder belongs to msgfmt tool. The builder compiles + + +This builder belongs to msgfmt tool. The builder compiles PO files to MO files. - + Example 1. Create pl.mo and en.mo by compiling pl.po and en.po: - + # ... env.MOFiles(['pl', 'en']) - + Example 2. Compile files for languages defined in LINGUAS file: - + # ... env.MOFiles(LINGUAS_FILE = 1) - + Example 3. Create pl.mo and en.mo by compiling pl.po and en.po plus files for languages defined in LINGUAS file: - + # ... env.MOFiles(['pl', 'en'], LINGUAS_FILE = 1) - + Example 4. Compile files for languages defined in LINGUAS file (another version): - + # ... env['LINGUAS_FILE'] = 1 env.MOFiles() @@ -832,53 +858,54 @@ Compile files for languages defined in LINGUAS file env.MSVSProject() - + + Builds a Microsoft Visual Studio project file, and by default builds a solution file as well. - + This builds a Visual Studio project file, based on the version of Visual Studio that is configured (either the latest installed version, or the version specified by - $MSVS_VERSION in the Environment constructor). For + $MSVS_VERSION in the Environment constructor). For Visual Studio 6, it will generate a .dsp file. For Visual Studio 7, 8, and 9, it will generate a .vcproj file. For Visual Studio 10 and later, it will generate a .vcxproj file. - + By default, this also generates a solution file for the specified project, a .dsw file for Visual Studio 6 or a .sln file for Visual Studio 7 and later. This behavior may be disabled by specifying auto_build_solution=0 when you - call MSVSProject, in which case you presumably want to - build the solution file(s) by calling the MSVSSolution + call MSVSProject, in which case you presumably want to + build the solution file(s) by calling the MSVSSolution Builder (see below). - - The MSVSProject builder takes several lists of filenames + + The MSVSProject builder takes several lists of filenames to be placed into the project file. These are currently limited to srcs, incs, localincs, resources, and misc. These are pretty self-explanatory, but it should be noted that these lists are added to the - $SOURCES construction variable as strings, NOT as + $SOURCES construction variable as strings, NOT as SCons File Nodes. This is because they represent file names to be added to the project file, not the source files used to build the project file. - + The above filename lists are all optional, although at least one must be specified for the resulting project file to be non-empty. - + In addition to the above lists of values, the following values may be specified: - + target @@ -886,7 +913,7 @@ Compile files for languages defined in LINGUAS file The name of the target .dsp or .vcproj file. The correct suffix for the version of Visual Studio - must be used, but the $MSVSPROJECTSUFFIX + must be used, but the $MSVSPROJECTSUFFIX construction variable will be defined to the correct value (see example below). @@ -904,7 +931,7 @@ Compile files for languages defined in LINGUAS file separated from the variant name by a | (vertical pipe) character: Debug|Xbox. The default target platform is Win32. Multiple calls - to MSVSProject with different variants are allowed; + to MSVSProject with different variants are allowed; all variants will be added to the project file with their appropriate build targets and sources. @@ -980,20 +1007,20 @@ Compile files for languages defined in LINGUAS file - - Note that because SCons always executes its build commands - from the directory in which the SConstruct file is located, + + Note that because SCons always executes its build commands + from the directory in which the SConstruct file is located, if you generate a project file in a different directory - than the SConstruct directory, users will not be able to + than the SConstruct directory, users will not be able to double-click 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++ /FC - compiler option to the $CCFLAGS variable so that + compiler option to the $CCFLAGS variable so that the compiler will print the full path name of any files that cause compilation errors. - Example usage: - + Example usage: + barsrcs = ['bar.cpp'] barincs = ['bar.h'] barlocalincs = ['StdAfx.h'] @@ -1012,13 +1039,13 @@ env.MSVSProject(target='Bar' + env['MSVSPROJECTSUFFIX'], buildtarget=buildtarget, variant='Release') - + Starting with version 2.4 of SCons it is also possible to specify the optional argument DebugSettings, which creates files for debugging under Visual Studio: - + DebugSettings @@ -1034,7 +1061,7 @@ env.MSVSProject(target='Bar' + env['MSVSPROJECTSUFFIX'], - + Currently, only Visual Studio v9.0 and Visual Studio version v11 are implemented, for other versions no file is generated. To generate the user file, you just need to @@ -1043,11 +1070,11 @@ env.MSVSProject(target='Bar' + env['MSVSPROJECTSUFFIX'], the dictionary is empty, or does not contain any good value, no file will be generated. - + Following is a more contrived example, involving the setup of a project for variants and DebugSettings: - + # Assuming you store your defaults in a file vars = Variables('variables.py') msvcver = vars.args.get('vc', '9') @@ -1171,25 +1198,26 @@ env.MSVSProject(target='Bar' + env['MSVSPROJECTSUFFIX'], env.MSVSSolution() - Builds a Microsoft Visual Studio solution file. - + + Builds a Microsoft Visual Studio solution file. + This builds a Visual Studio solution file, based on the version of Visual Studio that is configured (either the latest installed version, or the version specified by - $MSVS_VERSION in the construction environment). For + $MSVS_VERSION in the construction environment). For Visual Studio 6, it will generate a .dsw file. For Visual Studio 7 (.NET), it will generate a .sln file. - The following values must be specified: - + The following values must be specified: + target The name of the target .dsw or .sln file. The correct suffix for the version of Visual Studio must be used, - but the value $MSVSSOLUTIONSUFFIX will be + but the value $MSVSSOLUTIONSUFFIX will be defined to the correct value (see example below). @@ -1208,7 +1236,7 @@ env.MSVSProject(target='Bar' + env['MSVSPROJECTSUFFIX'], projects A list of project file names, or Project nodes returned - by calls to the MSVSProject Builder, to be placed + by calls to the MSVSProject Builder, to be placed into the solution file. It should be noted that these file names are NOT added to the $SOURCES environment variable in form of files, but rather as strings. @@ -1219,8 +1247,8 @@ env.MSVSProject(target='Bar' + env['MSVSPROJECTSUFFIX'], - Example Usage: - + Example Usage: + env.MSVSSolution(target='Bar' + env['MSVSSOLUTIONSUFFIX'], projects=['bar' + env['MSVSPROJECTSUFFIX']], variant='Release') @@ -1232,9 +1260,10 @@ env.MSVSSolution(target='Bar' + env['MSVSSOLUTIONSUFFIX'], projects=['bar' + env env.Object() - + + A synonym for the -StaticObject +StaticObject builder method. @@ -1246,39 +1275,41 @@ builder method. env.Package() - + + Builds a Binary Package of the given source files. - + env.Package(source = FindInstalledFiles()) - + + Builds software distribution packages. Packages consist of files to install and packaging information. -The former may be specified with the source parameter and may be left out, -in which case the FindInstalledFiles function will collect -all files that have an Install or InstallAs Builder attached. -If the target is not specified +The former may be specified with the source parameter and may be left out, +in which case the FindInstalledFiles function will collect +all files that have an Install or InstallAs Builder attached. +If the target is not specified it will be deduced from additional information given to this Builder. - + The packaging information is specified with the help of construction variables documented below. This information is called a tag to stress that -some of them can also be attached to files with the Tag function. +some of them can also be attached to files with the Tag function. The mandatory ones will complain if they were not specified. They vary depending on chosen target packager. - + The target packager may be selected with the "PACKAGETYPE" command line -option or with the $PACKAGETYPE construction variable. Currently +option or with the $PACKAGETYPE construction variable. Currently the following packagers available: - + * msi - Microsoft Installer * rpm - RPM Package Manger * ipkg - Itsy Package Management System @@ -1292,11 +1323,11 @@ the following packagers available: * src_zip - zip file source - + An updated list is always available under the "package_type" option when running "scons --help" on a project that has packaging activated. - + env = Environment(tools=['default', 'packaging']) env.Install('/bin/', 'my_program') env.Package( NAME = 'foo', @@ -1319,7 +1350,8 @@ env.Package( NAME = 'foo', env.PCH() - + + Builds a Microsoft Visual C++ precompiled header. Calling this builder method returns a list of two targets: the PCH as the first element, and the object @@ -1331,7 +1363,7 @@ conjunction with the PCH construction variable to force object files to use the precompiled header: - + env['PCH'] = env.PCH('StdAfx.cpp')[0] @@ -1343,20 +1375,21 @@ env['PCH'] = env.PCH('StdAfx.cpp')[0] env.PDF() - + + Builds a .pdf file from a .dvi input file (or, by extension, a .tex, .ltx, or .latex input file). -The suffix specified by the $PDFSUFFIX construction variable +The suffix specified by the $PDFSUFFIX construction variable (.pdf by default) is added automatically to the target if it is not already present. Example: - + # builds from aaa.tex env.PDF(target = 'aaa.pdf', source = 'aaa.tex') # builds bbb.pdf from bbb.dvi @@ -1371,99 +1404,100 @@ env.PDF(target = 'bbb', source = 'bbb.dvi') env.POInit() - -This builder belongs to msginit tool. The builder initializes missing -PO file(s) if $POAUTOINIT is set. If -$POAUTOINIT is not set (default), POInit prints instruction for + + +This builder belongs to msginit tool. The builder initializes missing +PO file(s) if $POAUTOINIT is set. If +$POAUTOINIT is not set (default), POInit prints instruction for user (that is supposed to be a translator), telling how the PO file should be initialized. In normal projects -you should not use POInit and use POUpdate -instead. POUpdate chooses intelligently between -msgmerge(1) and msginit(1). POInit +you should not use POInit and use POUpdate +instead. POUpdate chooses intelligently between +msgmerge(1) and msginit(1). POInit always uses msginit(1) and should be regarded as builder for special purposes or for temporary use (e.g. for quick, one time initialization of a bunch of PO files) or for tests. - -Target nodes defined through POInit are not built by default (they're + +Target nodes defined through POInit are not built by default (they're Ignored from '.' node) but are added to special Alias ('po-create' by default). -The alias name may be changed through the $POCREATE_ALIAS +The alias name may be changed through the $POCREATE_ALIAS construction variable. All PO files defined through -POInit may be easily initialized by scons po-create. +POInit may be easily initialized by scons po-create. - + Example 1. Initialize en.po and pl.po from messages.pot: - + # ... env.POInit(['en', 'pl']) # messages.pot --> [en.po, pl.po] - + Example 2. Initialize en.po and pl.po from foo.pot: - + # ... env.POInit(['en', 'pl'], ['foo']) # foo.pot --> [en.po, pl.po] - + Example 3. Initialize en.po and pl.po from -foo.pot but using $POTDOMAIN construction +foo.pot but using $POTDOMAIN construction variable: - + # ... env.POInit(['en', 'pl'], POTDOMAIN='foo') # foo.pot --> [en.po, pl.po] - + Example 4. Initialize PO files for languages defined in LINGUAS file. The files will be initialized from template messages.pot: - + # ... env.POInit(LINGUAS_FILE = 1) # needs 'LINGUAS' file - + Example 5. Initialize en.po and pl.pl PO files plus files for languages defined in LINGUAS file. The files will be initialized from template messages.pot: - + # ... env.POInit(['en', 'pl'], LINGUAS_FILE = 1) - + Example 6. You may preconfigure your environment first, and then initialize PO files: - + # ... env['POAUTOINIT'] = 1 env['LINGUAS_FILE'] = 1 env['POTDOMAIN'] = 'foo' env.POInit() - + which has same efect as: - + # ... env.POInit(POAUTOINIT = 1, LINGUAS_FILE = 1, POTDOMAIN = 'foo') @@ -1476,20 +1510,21 @@ which has same efect as: env.PostScript() - + + Builds a .ps file from a .dvi input file (or, by extension, a .tex, .ltx, or .latex input file). -The suffix specified by the $PSSUFFIX construction variable +The suffix specified by the $PSSUFFIX construction variable (.ps by default) is added automatically to the target if it is not already present. Example: - + # builds from aaa.tex env.PostScript(target = 'aaa.ps', source = 'aaa.tex') # builds bbb.ps from bbb.dvi @@ -1504,23 +1539,24 @@ env.PostScript(target = 'bbb', source = 'bbb.dvi') env.POTUpdate() - -The builder belongs to xgettext tool. The builder updates target + + +The builder belongs to xgettext tool. The builder updates target POT file if exists or creates one if it doesn't. The node is not built by default (i.e. it is Ignored from '.'), but only on demand (i.e. when given POT file is required or when special alias is invoked). This builder adds its targe node (messages.pot, say) to a special alias (pot-update by default, see -$POTUPDATE_ALIAS) so you can update/create them easily with +$POTUPDATE_ALIAS) so you can update/create them easily with scons pot-update. The file is not written until there is no real change in internationalized messages (or in comments that enter POT file). - + You may see xgettext(1) being invoked by the -xgettext tool even if there is no real change in internationalized +xgettext tool even if there is no real change in internationalized messages (so the POT file is not being updated). This happens every time a source file has changed. In such case we invoke xgettext(1) and compare its output with the content of @@ -1528,38 +1564,38 @@ happens every time a source file has changed. In such case we invoke not. - + Example 1. Let's create po/ directory and place following SConstruct script there: - + # SConstruct in 'po/' subdir env = Environment( tools = ['default', 'xgettext'] ) env.POTUpdate(['foo'], ['../a.cpp', '../b.cpp']) env.POTUpdate(['bar'], ['../c.cpp', '../d.cpp']) - + Then invoke scons few times: - + user@host:$ scons # Does not create foo.pot nor bar.pot user@host:$ scons foo.pot # Updates or creates foo.pot user@host:$ scons pot-update # Updates or creates foo.pot and bar.pot user@host:$ scons -c # Does not clean foo.pot nor bar.pot. - + the results shall be as the comments above say. - + Example 2. -The POTUpdate builder may be used with no target specified, in which +The POTUpdate builder may be used with no target specified, in which case default target messages.pot will be used. The -default target may also be overridden by setting $POTDOMAIN construction -variable or providing it as an override to POTUpdate builder: +default target may also be overridden by setting $POTDOMAIN construction +variable or providing it as an override to POTUpdate builder: - + # SConstruct script env = Environment( tools = ['default', 'xgettext'] ) env['POTDOMAIN'] = "foo" @@ -1567,49 +1603,49 @@ variable or providing it as an override to POTUpdate builde env.POTUpdate(POTDOMAIN = "bar", source = ["c.cpp", "d.cpp"]) # and bar.pot - + Example 3. The sources may be specified within separate file, for example POTFILES.in: - + # POTFILES.in in 'po/' subdirectory ../a.cpp ../b.cpp # end of file - + The name of the file (POTFILES.in) containing the list of -sources is provided via $XGETTEXTFROM: +sources is provided via $XGETTEXTFROM: - + # SConstruct file in 'po/' subdirectory env = Environment( tools = ['default', 'xgettext'] ) env.POTUpdate(XGETTEXTFROM = 'POTFILES.in') - + Example 4. -You may use $XGETTEXTPATH to define source search path. Assume, for +You may use $XGETTEXTPATH to define source search path. Assume, for example, that you have files a.cpp, b.cpp, po/SConstruct, po/POTFILES.in. Then your POT-related files could look as below: - + # POTFILES.in in 'po/' subdirectory a.cpp b.cpp # end of file - + # SConstruct file in 'po/' subdirectory env = Environment( tools = ['default', 'xgettext'] ) env.POTUpdate(XGETTEXTFROM = 'POTFILES.in', XGETTEXTPATH='../') - + Example 5. Multiple search directories may be defined within a list, i.e. XGETTEXTPATH = ['dir1', 'dir2', ...]. The order in the list @@ -1617,48 +1653,48 @@ determines the search order of source files. The path to the first file found is used. - + Let's create 0/1/po/SConstruct script: - + # SConstruct file in '0/1/po/' subdirectory env = Environment( tools = ['default', 'xgettext'] ) env.POTUpdate(XGETTEXTFROM = 'POTFILES.in', XGETTEXTPATH=['../', '../../']) - + and 0/1/po/POTFILES.in: - + # POTFILES.in in '0/1/po/' subdirectory a.cpp # end of file - + Write two *.cpp files, the first one is 0/a.cpp: - + /* 0/a.cpp */ gettext("Hello from ../../a.cpp") - + and the second is 0/1/a.cpp: - + /* 0/1/a.cpp */ gettext("Hello from ../a.cpp") - + then run scons. You'll obtain 0/1/po/messages.pot with the message "Hello from ../a.cpp". When you reverse order in $XGETTEXTFOM, i.e. when you write SConscript as - + # SConstruct file in '0/1/po/' subdirectory env = Environment( tools = ['default', 'xgettext'] ) env.POTUpdate(XGETTEXTFROM = 'POTFILES.in', XGETTEXTPATH=['../../', '../']) - + then the messages.pot will contain msgid "Hello from ../../a.cpp" line and not msgid "Hello from ../a.cpp". @@ -1673,106 +1709,107 @@ then the messages.pot will contain env.POUpdate() - -The builder belongs to msgmerge tool. The builder updates + + +The builder belongs to msgmerge tool. The builder updates PO files with msgmerge(1), or initializes missing PO files as described in documentation of -msginit tool and POInit builder (see also -$POAUTOINIT). Note, that POUpdate does not add its -targets to po-create alias as POInit +msginit tool and POInit builder (see also +$POAUTOINIT). Note, that POUpdate does not add its +targets to po-create alias as POInit does. - -Target nodes defined through POUpdate are not built by default + +Target nodes defined through POUpdate are not built by default (they're Ignored from '.' node). Instead, they are added automatically to special Alias ('po-update' by default). The alias name may be changed -through the $POUPDATE_ALIAS construction variable. You can easily +through the $POUPDATE_ALIAS construction variable. You can easily update PO files in your project by scons po-update. - + Example 1. Update en.po and pl.po from -messages.pot template (see also $POTDOMAIN), +messages.pot template (see also $POTDOMAIN), assuming that the later one exists or there is rule to build it (see -POTUpdate): +POTUpdate): - + # ... env.POUpdate(['en','pl']) # messages.pot --> [en.po, pl.po] - + Example 2. Update en.po and pl.po from foo.pot template: - + # ... env.POUpdate(['en', 'pl'], ['foo']) # foo.pot --> [en.po, pl.pl] - + Example 3. Update en.po and pl.po from foo.pot (another version): - + # ... env.POUpdate(['en', 'pl'], POTDOMAIN='foo') # foo.pot -- > [en.po, pl.pl] - + Example 4. Update files for languages defined in LINGUAS file. The files are updated from messages.pot template: - + # ... env.POUpdate(LINGUAS_FILE = 1) # needs 'LINGUAS' file - + Example 5. Same as above, but update from foo.pot template: - + # ... env.POUpdate(LINGUAS_FILE = 1, source = ['foo']) - + Example 6. Update en.po and pl.po plus files for languages defined in LINGUAS file. The files are updated from messages.pot template: - + # produce 'en.po', 'pl.po' + files defined in 'LINGUAS': env.POUpdate(['en', 'pl' ], LINGUAS_FILE = 1) - + Example 7. -Use $POAUTOINIT to automatically initialize PO file +Use $POAUTOINIT to automatically initialize PO file if it doesn't exist: - + # ... env.POUpdate(LINGUAS_FILE = 1, POAUTOINIT = 1) - + Example 8. Update PO files for languages defined in LINGUAS file. The files are updated from foo.pot template. All necessary settings are pre-configured via environment. - + # ... env['POAUTOINIT'] = 1 env['LINGUAS_FILE'] = 1 @@ -1789,28 +1826,29 @@ pre-configured via environment. env.Program() - + + Builds an executable given one or more object files or C, C++, D, or Fortran source files. If any C, C++, D or Fortran source files are specified, then they will be automatically compiled to object files using the -Object +Object builder method; see that builder method's description for a list of legal source file suffixes and how they are interpreted. The target executable file prefix -(specified by the $PROGPREFIX construction variable; nothing by default) +(specified by the $PROGPREFIX construction variable; nothing by default) and suffix -(specified by the $PROGSUFFIX construction variable; +(specified by the $PROGSUFFIX construction variable; by default, .exe on Windows systems, nothing on POSIX systems) are automatically added to the target if not already present. Example: - + env.Program(target = 'foo', source = ['foo.o', 'bar.c', 'baz.f']) @@ -1822,22 +1860,23 @@ env.Program(target = 'foo', source = ['foo.o', 'bar.c', 'baz.f']) env.ProgramAllAtOnce() - + + Builds an executable from D sources without first creating individual objects for each file. - + D sources can be compiled file-by-file as C and C++ source are, and - D is integrated into the scons Object and Program builders for + D is integrated into the scons Object and Program builders for this model of build. D codes can though do whole source meta-programming (some of the testing frameworks do this). For this it is imperative that all sources are compiled and linked in a single call to the D compiler. This builder serves that purpose. - + env.ProgramAllAtOnce('executable', ['mod_a.d, mod_b.d', 'mod_c.d']) - + This command will compile the modules mod_a, mod_b, and mod_c in a single compilation process without first creating object files for the modules. Some of the D compilers will create executable.o others @@ -1852,7 +1891,8 @@ env.Program(target = 'foo', source = ['foo.o', 'bar.c', 'baz.f']) env.RES() - + + Builds a Microsoft Visual C++ resource file. This builder method is only provided when Microsoft Visual C++ or MinGW is being used as the compiler. The @@ -1865,7 +1905,7 @@ file is scanned for implicit dependencies as though it were a C file. Example: - + env.RES('resource.rc') @@ -1877,7 +1917,8 @@ env.RES('resource.rc') env.RMIC() - + + Builds stub and skeleton class files for remote objects from Java .class files. @@ -1886,16 +1927,16 @@ relative to which the stub and skeleton class files will be written. The source can be the names of .class files, or the objects return from the -Java +Java builder method. - + If the construction variable -$JAVACLASSDIR +$JAVACLASSDIR is set, either in the environment or in the call to the -RMIC +RMIC builder method itself, then the value of the variable will be stripped from the @@ -1903,7 +1944,7 @@ beginning of any .class file names. - + classes = env.Java(target = 'classdir', source = 'src') env.RMIC(target = 'outdir1', source = classes) @@ -1923,7 +1964,8 @@ env.RMIC(target = 'outdir3', env.RPCGenClient() - + + Generates an RPC client stub (_clnt.c) file from a specified RPC (.x) source file. Because rpcgen only builds output files @@ -1932,7 +1974,7 @@ the command will be executed in the source file's directory by default. - + # Builds src/rpcif_clnt.c env.RPCGenClient('src/rpcif.x') @@ -1945,7 +1987,8 @@ env.RPCGenClient('src/rpcif.x') env.RPCGenHeader() - + + Generates an RPC header (.h) file from a specified RPC (.x) source file. Because rpcgen only builds output files @@ -1954,7 +1997,7 @@ the command will be executed in the source file's directory by default. - + # Builds src/rpcif.h env.RPCGenHeader('src/rpcif.x') @@ -1967,7 +2010,8 @@ env.RPCGenHeader('src/rpcif.x') env.RPCGenService() - + + Generates an RPC server-skeleton (_svc.c) file from a specified RPC (.x) source file. Because rpcgen only builds output files @@ -1976,7 +2020,7 @@ the command will be executed in the source file's directory by default. - + # Builds src/rpcif_svc.c env.RPCGenClient('src/rpcif.x') @@ -1989,7 +2033,8 @@ env.RPCGenClient('src/rpcif.x') env.RPCGenXDR() - + + Generates an RPC XDR routine (_xdr.c) file from a specified RPC (.x) source file. Because rpcgen only builds output files @@ -1998,7 +2043,7 @@ the command will be executed in the source file's directory by default. - + # Builds src/rpcif_xdr.c env.RPCGenClient('src/rpcif.x') @@ -2011,7 +2056,8 @@ env.RPCGenClient('src/rpcif.x') env.SharedLibrary() - + + Builds a shared library (.so on a POSIX system, .dll on Windows) @@ -2023,24 +2069,24 @@ compiled to object files. The static library prefix and suffix (if any) are automatically added to the target. The target library file prefix -(specified by the $SHLIBPREFIX construction variable; +(specified by the $SHLIBPREFIX construction variable; by default, lib on POSIX systems, nothing on Windows systems) and suffix -(specified by the $SHLIBSUFFIX construction variable; +(specified by the $SHLIBSUFFIX construction variable; by default, .dll on Windows systems, .so on POSIX systems) are automatically added to the target if not already present. Example: - + env.SharedLibrary(target = 'bar', source = ['bar.c', 'foo.o']) - + On Windows systems, the -SharedLibrary +SharedLibrary builder method will always build an import (.lib) library in addition to the shared (.dll) library, @@ -2049,9 +2095,9 @@ if there is not already a .lib file explicitly listed in the targets. - + On Cygwin systems, the -SharedLibrary +SharedLibrary builder method will always build an import (.dll.a) library in addition to the shared (.dll) library, @@ -2060,36 +2106,36 @@ if there is not already a .dll.a file explicitly listed in the targets. - + Any object files listed in the source must have been built for a shared library (that is, using the -SharedObject +SharedObject builder method). -scons +scons will raise an error if there is any mismatch. - + On some platforms, there is a distinction between a shared library (loaded automatically by the system to resolve external references) and a loadable module (explicitly loaded by user action). -For maximum portability, use the LoadableModule builder for the latter. +For maximum portability, use the LoadableModule builder for the latter. - -When the $SHLIBVERSION construction variable is defined a versioned -shared library is created. This modifies the $SHLINKFLAGS as required, + +When the $SHLIBVERSION construction variable is defined a versioned +shared library is created. This modifies the $SHLINKFLAGS as required, adds the version number to the library name, and creates the symlinks that are needed. - + env.SharedLibrary(target = 'bar', source = ['bar.c', 'foo.o'], SHLIBVERSION='1.5.2') - + On a POSIX system, versions with a single token create exactly one symlink: libbar.so.6 would have symlinks libbar.so only. On a POSIX system, versions with two or more @@ -2098,28 +2144,28 @@ libbar.so and libbar.so.2; on a Darwin (OSX) system the library would be libbar.2.3.1.dylib and the link would be libbar.dylib. - + On Windows systems, specifying register=1 will cause the .dll to be registered after it is built using REGSVR32. The command that is run -("regsvr32" by default) is determined by $REGSVR construction -variable, and the flags passed are determined by $REGSVRFLAGS. By -default, $REGSVRFLAGS includes the option, +("regsvr32" by default) is determined by $REGSVR construction +variable, and the flags passed are determined by $REGSVRFLAGS. By +default, $REGSVRFLAGS includes the option, to prevent dialogs from popping up and requiring user attention when it is run. If you change -$REGSVRFLAGS, be sure to include the option. +$REGSVRFLAGS, be sure to include the option. For example, - + env.SharedLibrary(target = 'bar', source = ['bar.cxx', 'foo.obj'], register=1) - + will register bar.dll as a COM object when it is done linking it. @@ -2132,12 +2178,13 @@ when it is done linking it. env.SharedObject() - + + Builds an object file for inclusion in a shared library. Source files must have one of the same set of extensions specified above for the -StaticObject +StaticObject builder method. On some platforms building a shared object requires additional compiler option @@ -2152,21 +2199,21 @@ and shared objects to be linked into a shared library, and will use the same suffix for shared and normal (static) objects. The target object file prefix -(specified by the $SHOBJPREFIX construction variable; -by default, the same as $OBJPREFIX) +(specified by the $SHOBJPREFIX construction variable; +by default, the same as $OBJPREFIX) and suffix -(specified by the $SHOBJSUFFIX construction variable) +(specified by the $SHOBJSUFFIX construction variable) are automatically added to the target if not already present. Examples: - + env.SharedObject(target = 'ddd', source = 'ddd.c') env.SharedObject(target = 'eee.o', source = 'eee.cpp') env.SharedObject(target = 'fff.obj', source = 'fff.for') - + Note that the source files will be scanned according to the suffix mappings in the SourceFileScanner @@ -2183,7 +2230,8 @@ below, for more information. env.StaticLibrary() - + + Builds a static library given one or more object files or C, C++, D or Fortran source files. If any source files are given, @@ -2192,29 +2240,29 @@ compiled to object files. The static library prefix and suffix (if any) are automatically added to the target. The target library file prefix -(specified by the $LIBPREFIX construction variable; +(specified by the $LIBPREFIX construction variable; by default, lib on POSIX systems, nothing on Windows systems) and suffix -(specified by the $LIBSUFFIX construction variable; +(specified by the $LIBSUFFIX construction variable; by default, .lib on Windows systems, .a on POSIX systems) are automatically added to the target if not already present. Example: - + env.StaticLibrary(target = 'bar', source = ['bar.c', 'foo.o']) - + Any object files listed in the source must have been built for a static library (that is, using the -StaticObject +StaticObject builder method). -scons +scons will raise an error if there is any mismatch. @@ -2226,13 +2274,14 @@ will raise an error if there is any mismatch. env.StaticObject() - + + Builds a static object file from one or more C, C++, D, or Fortran source files. Source files must have one of the following extensions: - + .asm assembly language file .ASM assembly language file .c C file @@ -2263,24 +2312,24 @@ Source files must have one of the following extensions: .SPP assembly language file + C pre-processor - + The target object file prefix -(specified by the $OBJPREFIX construction variable; nothing by default) +(specified by the $OBJPREFIX construction variable; nothing by default) and suffix -(specified by the $OBJSUFFIX construction variable; +(specified by the $OBJSUFFIX construction variable; .obj on Windows systems, .o on POSIX systems) are automatically added to the target if not already present. Examples: - + env.StaticObject(target = 'aaa', source = 'aaa.c') env.StaticObject(target = 'bbb.o', source = 'bbb.c++') env.StaticObject(target = 'ccc.obj', source = 'ccc.f') - + Note that the source files will be scanned according to the suffix mappings in SourceFileScanner @@ -2297,27 +2346,28 @@ below, for more information. env.Substfile() - -The Substfile builder creates a single text file from another file or set of -files by concatenating them with $LINESEPARATOR and replacing text -using the $SUBST_DICT construction variable. Nested lists of source files -are flattened. See also Textfile. + + +The Substfile builder creates a single text file from another file or set of +files by concatenating them with $LINESEPARATOR and replacing text +using the $SUBST_DICT construction variable. Nested lists of source files +are flattened. See also Textfile. - + If a single source file is present with an .in suffix, the suffix is stripped and the remainder is used as the default target name. - -The prefix and suffix specified by the $SUBSTFILEPREFIX -and $SUBSTFILESUFFIX construction variables + +The prefix and suffix specified by the $SUBSTFILEPREFIX +and $SUBSTFILESUFFIX construction variables (the null string by default in both cases) are automatically added to the target if they are not already present. - -If a construction variable named $SUBST_DICT is present, + +If a construction variable named $SUBST_DICT is present, it may be either a Python dictionary or a sequence of (key,value) tuples. If it is a dictionary it is converted into a list of tuples in an arbitrary order, so if one key is a prefix of another key @@ -2325,7 +2375,7 @@ or if one substitution could be further expanded by another subsitition, it is unpredictable whether the expansion will occur. - + Any occurrences of a key in the source are replaced by the corresponding value, which may be a Python callable function or a string. @@ -2334,7 +2384,7 @@ Strings are subst-expanded and the result replaces the key. - + env = Environment(tools=['default']) env['prefix'] = '/usr/bin' @@ -2386,12 +2436,13 @@ subst.Substfile('pgm2.c', [Value('#include "@foo@.h"'), env.Tar() - + + Builds a tar archive of the specified files and/or directories. Unlike most builder methods, the -Tar +Tar builder method may be called multiple times for a given target; each additional call @@ -2401,11 +2452,11 @@ Any source directories will be scanned for changes to any on-disk files, regardless of whether or not -scons +scons knows about them from other Builder or function calls. - + env.Tar('src.tar', 'src') # Create the stuff.tar file. @@ -2431,28 +2482,29 @@ env.Tar('foo') env.Textfile() - -The Textfile builder generates a single text file. + + +The Textfile builder generates a single text file. The source strings constitute the lines; nested lists of sources are flattened. -$LINESEPARATOR is used to separate the strings. +$LINESEPARATOR is used to separate the strings. - -If present, the $SUBST_DICT construction variable + +If present, the $SUBST_DICT construction variable is used to modify the strings before they are written; -see the Substfile description for details. +see the Substfile description for details. - -The prefix and suffix specified by the $TEXTFILEPREFIX -and $TEXTFILESUFFIX construction variables + +The prefix and suffix specified by the $TEXTFILEPREFIX +and $TEXTFILESUFFIX construction variables (the null string and .txt by default, respectively) are automatically added to the target if they are not already present. Examples: - + # builds/writes foo.txt env.Textfile(target = 'foo.txt', source = ['Goethe', 42, 'Schiller']) @@ -2501,49 +2553,50 @@ blob.txt env.Translate() - -This pseudo-builder belongs to gettext toolset. The builder extracts + + +This pseudo-builder belongs to gettext toolset. The builder extracts internationalized messages from source files, updates POT template (if necessary) and then updates PO translations (if -necessary). If $POAUTOINIT is set, missing PO files +necessary). If $POAUTOINIT is set, missing PO files will be automatically created (i.e. without translator person intervention). -The variables $LINGUAS_FILE and $POTDOMAIN are taken into -acount too. All other construction variables used by POTUpdate, and -POUpdate work here too. +The variables $LINGUAS_FILE and $POTDOMAIN are taken into +acount too. All other construction variables used by POTUpdate, and +POUpdate work here too. - + Example 1. The simplest way is to specify input files and output languages inline in -a SCons script when invoking Translate +a SCons script when invoking Translate - + # SConscript in 'po/' directory env = Environment( tools = ["default", "gettext"] ) env['POAUTOINIT'] = 1 env.Translate(['en','pl'], ['../a.cpp','../b.cpp']) - + Example 2. If you wish, you may also stick to conventional style known from autotools, i.e. using POTFILES.in and LINGUAS files - + # LINGUAS en pl #end - + # POTFILES.in a.cpp b.cpp # end - + # SConscript env = Environment( tools = ["default", "gettext"] ) env['POAUTOINIT'] = 1 @@ -2551,7 +2604,7 @@ env['XGETTEXTPATH'] = ['../'] env.Translate(LINGUAS_FILE = 1, XGETTEXTFROM = 'POTFILES.in') - + The last approach is perhaps the recommended one. It allows easily split internationalization/localization onto separate SCons scripts, where a script in source tree is responsible for translations (from sources to @@ -2568,11 +2621,11 @@ so the source tree looks familiar to translators, and they may work with the project in their usual way. - + Example 3. Let's prepare a development tree as below - + project/ + SConstruct + build/ @@ -2583,11 +2636,11 @@ Let's prepare a development tree as below + POTFILES.in + LINGUAS - + with build being variant directory. Write the top-level SConstruct script as follows - + # SConstruct env = Environment( tools = ["default", "gettext"] ) VariantDir('build', 'src', duplicate = 0) @@ -2595,23 +2648,23 @@ with build being variant directory. Write the top-level SConscript('src/po/SConscript.i18n', exports = 'env') SConscript('build/po/SConscript', exports = 'env') - + the src/po/SConscript.i18n as - + # src/po/SConscript.i18n Import('env') env.Translate(LINGUAS_FILE=1, XGETTEXTFROM='POTFILES.in', XGETTEXTPATH=['../']) - + and the src/po/SConscript - + # src/po/SConscript Import('env') env.MOFiles(LINGUAS_FILE = 1) - + Such setup produces POT and PO files under source tree in src/po/ and binary MO files under variant tree in @@ -2621,7 +2674,7 @@ not be committed back to source repositories (e.g. MO files). - + In above example, the PO files are not updated, nor created automatically when you issue scons '.' command. The files must be updated (created) by hand via scons @@ -2638,7 +2691,8 @@ running scons '.'. env.TypeLibrary() - + + Builds a Windows type library (.tlb) file from an input IDL file (.idl). In addition, it will build the associated interface stub and @@ -2647,11 +2701,11 @@ naming them according to the base name of the .idl file. For example, - + env.TypeLibrary(source="foo.idl") - + Will create foo.tlb, foo.h, foo_i.c, @@ -2669,21 +2723,22 @@ files. env.Uic() - + + Builds a header file, an implementation file and a moc file from an ui file. and returns the corresponding nodes in the above order. This builder is only available after using the tool 'qt'. Note: you can specify .ui files directly as source -files to the Program, -Library and SharedLibrary builders +files to the Program, +Library and SharedLibrary builders without using this builder. Using this builder lets you override the standard naming conventions (be careful: prefixes are always prepended to names of built files; if you don't want prefixes, you may set them to ``). -See the $QTDIR variable for more information. +See the $QTDIR variable for more information. Example: - + env.Uic('foo.ui') # -> ['foo.h', 'uic_foo.cc', 'moc_foo.cc'] env.Uic(target = Split('include/foo.h gen/uicfoo.cc gen/mocfoo.cc'), source = 'foo.ui') # -> ['include/foo.h', 'gen/uicfoo.cc', 'gen/mocfoo.cc'] @@ -2697,12 +2752,13 @@ env.Uic(target = Split('include/foo.h gen/uicfoo.cc gen/mocfoo.cc'), env.Zip() - + + Builds a zip archive of the specified files and/or directories. Unlike most builder methods, the -Zip +Zip builder method may be called multiple times for a given target; each additional call @@ -2712,11 +2768,11 @@ Any source directories will be scanned for changes to any on-disk files, regardless of whether or not -scons +scons knows about them from other Builder or function calls. - + env.Zip('src.zip', 'src') # Create the stuff.zip file. diff --git a/doc/generated/examples/EnumVariable_map_1.xml b/doc/generated/examples/EnumVariable_map_1.xml index 856731e..4380be0 100644 --- a/doc/generated/examples/EnumVariable_map_1.xml +++ b/doc/generated/examples/EnumVariable_map_1.xml @@ -1,3 +1,4 @@ -% scons -Q COLOR=navy foo.o + +% scons -Q COLOR=navy foo.o cc -o foo.o -c -DCOLOR="blue" foo.c diff --git a/doc/generated/examples/addmethod_ex1_1.xml b/doc/generated/examples/addmethod_ex1_1.xml index 5cacf9d..84dfd20 100644 --- a/doc/generated/examples/addmethod_ex1_1.xml +++ b/doc/generated/examples/addmethod_ex1_1.xml @@ -1,4 +1,5 @@ -% scons -Q / + +% scons -Q / cc -o hello.o -c hello.c cc -o hello hello.o Install file: "hello" as "/usr/bin/hello" diff --git a/doc/generated/examples/addmethod_ex2_1.xml b/doc/generated/examples/addmethod_ex2_1.xml index 4d0cb44..3930341 100644 --- a/doc/generated/examples/addmethod_ex2_1.xml +++ b/doc/generated/examples/addmethod_ex2_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o test_stuff.o -c test_stuff.c cc -o tests/test_stuff test_stuff.o diff --git a/doc/generated/examples/addmethod_ex2_2.xml b/doc/generated/examples/addmethod_ex2_2.xml index 7ad282f..734da63 100644 --- a/doc/generated/examples/addmethod_ex2_2.xml +++ b/doc/generated/examples/addmethod_ex2_2.xml @@ -1,4 +1,5 @@ -C:\>scons -Q + +C:\>scons -Q rc /nologo /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 diff --git a/doc/generated/examples/alias_ex1_1.xml b/doc/generated/examples/alias_ex1_1.xml index d0db114..3ee3f1b 100644 --- a/doc/generated/examples/alias_ex1_1.xml +++ b/doc/generated/examples/alias_ex1_1.xml @@ -1,4 +1,5 @@ -% scons -Q install + +% scons -Q install cc -o hello.o -c hello.c cc -o hello hello.o Install file: "hello" as "/usr/bin/hello" diff --git a/doc/generated/examples/alias_ex2_1.xml b/doc/generated/examples/alias_ex2_1.xml index 56cc365..3fa7dfd 100644 --- a/doc/generated/examples/alias_ex2_1.xml +++ b/doc/generated/examples/alias_ex2_1.xml @@ -1,4 +1,5 @@ -% scons -Q install-bin + +% scons -Q install-bin cc -o foo.o -c foo.c cc -o foo foo.o Install file: "foo" as "/usr/bin/foo" diff --git a/doc/generated/examples/buildersbuiltin_ex1_1.xml b/doc/generated/examples/buildersbuiltin_ex1_1.xml index 75b365d..74cc779 100644 --- a/doc/generated/examples/buildersbuiltin_ex1_1.xml +++ b/doc/generated/examples/buildersbuiltin_ex1_1.xml @@ -1,4 +1,5 @@ -% scons -Q . + +% scons -Q . tar -c -f out1.tar file1 file2 tar -c -f out2.tar directory diff --git a/doc/generated/examples/buildersbuiltin_ex2_1.xml b/doc/generated/examples/buildersbuiltin_ex2_1.xml index 88abed4..6c66d7b 100644 --- a/doc/generated/examples/buildersbuiltin_ex2_1.xml +++ b/doc/generated/examples/buildersbuiltin_ex2_1.xml @@ -1,3 +1,4 @@ -% scons -Q . + +% scons -Q . tar -c -z -f out.tar.gz directory diff --git a/doc/generated/examples/buildersbuiltin_ex3_1.xml b/doc/generated/examples/buildersbuiltin_ex3_1.xml index 5cb16d1..4d281e5 100644 --- a/doc/generated/examples/buildersbuiltin_ex3_1.xml +++ b/doc/generated/examples/buildersbuiltin_ex3_1.xml @@ -1,3 +1,4 @@ -% scons -Q . + +% scons -Q . tar -c -z -f out.tgz directory diff --git a/doc/generated/examples/buildersbuiltin_ex4_1.xml b/doc/generated/examples/buildersbuiltin_ex4_1.xml index e907422..856f024 100644 --- a/doc/generated/examples/buildersbuiltin_ex4_1.xml +++ b/doc/generated/examples/buildersbuiltin_ex4_1.xml @@ -1,3 +1,4 @@ -% scons -Q . + +% scons -Q . zip(["out.zip"], ["file1", "file2"]) diff --git a/doc/generated/examples/buildersbuiltin_libs_1.xml b/doc/generated/examples/buildersbuiltin_libs_1.xml index 5b7abd9..8e1ee49 100644 --- a/doc/generated/examples/buildersbuiltin_libs_1.xml +++ b/doc/generated/examples/buildersbuiltin_libs_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o goodbye.o -c goodbye.c cc -o hello.o -c hello.c cc -o hello hello.o goodbye.o -L/usr/dir1 -Ldir2 -lfoo1 -lfoo2 diff --git a/doc/generated/examples/buildersbuiltin_libs_2.xml b/doc/generated/examples/buildersbuiltin_libs_2.xml index 31f3a46..41a9c1e 100644 --- a/doc/generated/examples/buildersbuiltin_libs_2.xml +++ b/doc/generated/examples/buildersbuiltin_libs_2.xml @@ -1,4 +1,5 @@ -C:\>scons -Q + +C:\>scons -Q 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 diff --git a/doc/generated/examples/builderscommands_ex1_1.xml b/doc/generated/examples/builderscommands_ex1_1.xml index 470b5a4..8782773 100644 --- a/doc/generated/examples/builderscommands_ex1_1.xml +++ b/doc/generated/examples/builderscommands_ex1_1.xml @@ -1,3 +1,4 @@ -% scons -Q + +% scons -Q sed 's/x/y/' < foo.in > foo.out diff --git a/doc/generated/examples/builderscommands_ex2_1.xml b/doc/generated/examples/builderscommands_ex2_1.xml index 1593352..3fc1dde 100644 --- a/doc/generated/examples/builderscommands_ex2_1.xml +++ b/doc/generated/examples/builderscommands_ex2_1.xml @@ -1,3 +1,4 @@ -% scons -Q + +% scons -Q build(["foo.out"], ["foo.in"]) diff --git a/doc/generated/examples/builderswriting_MY_EMITTER_1.xml b/doc/generated/examples/builderswriting_MY_EMITTER_1.xml index ef831e5..0c17d0e 100644 --- a/doc/generated/examples/builderswriting_MY_EMITTER_1.xml +++ b/doc/generated/examples/builderswriting_MY_EMITTER_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q ./my_command file1.input modify1.in > file1.foo ./my_command file2.input modify2.in > file2.foo diff --git a/doc/generated/examples/builderswriting_ex1_1.xml b/doc/generated/examples/builderswriting_ex1_1.xml index 1c6379a..cefcfa2 100644 --- a/doc/generated/examples/builderswriting_ex1_1.xml +++ b/doc/generated/examples/builderswriting_ex1_1.xml @@ -1,3 +1,4 @@ -% scons -Q + +% scons -Q foobuild < file.input > file.foo diff --git a/doc/generated/examples/builderswriting_ex2_1.xml b/doc/generated/examples/builderswriting_ex2_1.xml index e86ee7b..445dfb0 100644 --- a/doc/generated/examples/builderswriting_ex2_1.xml +++ b/doc/generated/examples/builderswriting_ex2_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q AttributeError: 'SConsEnvironment' object has no attribute 'Program': File "/home/my/project/SConstruct", line 4: env.Program('hello.c') diff --git a/doc/generated/examples/builderswriting_ex3_1.xml b/doc/generated/examples/builderswriting_ex3_1.xml index 8e107c8..2d8bcac 100644 --- a/doc/generated/examples/builderswriting_ex3_1.xml +++ b/doc/generated/examples/builderswriting_ex3_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q foobuild < file.input > file.foo cc -o hello.o -c hello.c cc -o hello hello.o diff --git a/doc/generated/examples/builderswriting_ex4_1.xml b/doc/generated/examples/builderswriting_ex4_1.xml index f3ecd43..cc71b19 100644 --- a/doc/generated/examples/builderswriting_ex4_1.xml +++ b/doc/generated/examples/builderswriting_ex4_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q foobuild < file1.input > file1.foo foobuild < file2.input > file2.foo diff --git a/doc/generated/examples/builderswriting_ex5_1.xml b/doc/generated/examples/builderswriting_ex5_1.xml index e7e9097..d0aa83b 100644 --- a/doc/generated/examples/builderswriting_ex5_1.xml +++ b/doc/generated/examples/builderswriting_ex5_1.xml @@ -1,3 +1,4 @@ -% scons -Q + +% scons -Q build_function(["file.foo"], ["file.input"]) diff --git a/doc/generated/examples/builderswriting_ex6_1.xml b/doc/generated/examples/builderswriting_ex6_1.xml index 1c6379a..cefcfa2 100644 --- a/doc/generated/examples/builderswriting_ex6_1.xml +++ b/doc/generated/examples/builderswriting_ex6_1.xml @@ -1,3 +1,4 @@ -% scons -Q + +% scons -Q foobuild < file.input > file.foo diff --git a/doc/generated/examples/builderswriting_ex7_1.xml b/doc/generated/examples/builderswriting_ex7_1.xml index 88284fe..f14d598 100644 --- a/doc/generated/examples/builderswriting_ex7_1.xml +++ b/doc/generated/examples/builderswriting_ex7_1.xml @@ -1,3 +1,4 @@ -% scons -Q + +% scons -Q foobuild file.foo new_target - file.input new_source diff --git a/doc/generated/examples/caching_ex-random_1.xml b/doc/generated/examples/caching_ex-random_1.xml index 52e7877..1c99727 100644 --- a/doc/generated/examples/caching_ex-random_1.xml +++ b/doc/generated/examples/caching_ex-random_1.xml @@ -1,8 +1,9 @@ -% scons -Q -cc -o f4.o -c f4.c -cc -o f5.o -c f5.c -cc -o f2.o -c f2.c + +% scons -Q cc -o f3.o -c f3.c +cc -o f4.o -c f4.c cc -o f1.o -c f1.c +cc -o f2.o -c f2.c +cc -o f5.o -c f5.c cc -o prog f1.o f2.o f3.o f4.o f5.o diff --git a/doc/generated/examples/caching_ex1_1.xml b/doc/generated/examples/caching_ex1_1.xml index 2d65d46..38eaf82 100644 --- a/doc/generated/examples/caching_ex1_1.xml +++ b/doc/generated/examples/caching_ex1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o hello.o -c hello.c cc -o hello hello.o % scons -Q -c diff --git a/doc/generated/examples/caching_ex1_2.xml b/doc/generated/examples/caching_ex1_2.xml index 1b27272..2f0bcde 100644 --- a/doc/generated/examples/caching_ex1_2.xml +++ b/doc/generated/examples/caching_ex1_2.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o hello.o -c hello.c cc -o hello hello.o % scons -Q -c diff --git a/doc/generated/examples/caching_ex1_4.xml b/doc/generated/examples/caching_ex1_4.xml index c33dd9b..922f1b6 100644 --- a/doc/generated/examples/caching_ex1_4.xml +++ b/doc/generated/examples/caching_ex1_4.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o hello.o -c hello.c cc -o hello hello.o % scons -Q -c diff --git a/doc/generated/examples/caching_ex1_5.xml b/doc/generated/examples/caching_ex1_5.xml index b784319..968727f 100644 --- a/doc/generated/examples/caching_ex1_5.xml +++ b/doc/generated/examples/caching_ex1_5.xml @@ -1,4 +1,5 @@ -% scons -Q --cache-disable + +% scons -Q --cache-disable cc -o hello.o -c hello.c cc -o hello hello.o % scons -Q -c diff --git a/doc/generated/examples/commandline_ARGLIST_1.xml b/doc/generated/examples/commandline_ARGLIST_1.xml index af2d032..e094bc0 100644 --- a/doc/generated/examples/commandline_ARGLIST_1.xml +++ b/doc/generated/examples/commandline_ARGLIST_1.xml @@ -1,4 +1,5 @@ -% scons -Q define=FOO + +% scons -Q define=FOO cc -o prog.o -c -DFOO prog.c % scons -Q define=FOO define=BAR cc -o prog.o -c -DFOO -DBAR prog.c diff --git a/doc/generated/examples/commandline_ARGUMENTS_1.xml b/doc/generated/examples/commandline_ARGUMENTS_1.xml index cd76cfb..6aa4ed2 100644 --- a/doc/generated/examples/commandline_ARGUMENTS_1.xml +++ b/doc/generated/examples/commandline_ARGUMENTS_1.xml @@ -1,4 +1,5 @@ -% scons -Q debug=0 + +% scons -Q debug=0 cc -o prog.o -c prog.c cc -o prog prog.o % scons -Q debug=0 diff --git a/doc/generated/examples/commandline_AddOption_1.xml b/doc/generated/examples/commandline_AddOption_1.xml index 5877f6d..55df25a 100644 --- a/doc/generated/examples/commandline_AddOption_1.xml +++ b/doc/generated/examples/commandline_AddOption_1.xml @@ -1,3 +1,4 @@ -% scons -Q -n + +% scons -Q -n Install file: "foo.in" as "/usr/bin/foo.in" diff --git a/doc/generated/examples/commandline_AddOption_2.xml b/doc/generated/examples/commandline_AddOption_2.xml index 3000a43..7d0b978 100644 --- a/doc/generated/examples/commandline_AddOption_2.xml +++ b/doc/generated/examples/commandline_AddOption_2.xml @@ -1,3 +1,4 @@ -% scons -Q -n --prefix=/tmp/install + +% scons -Q -n --prefix=/tmp/install Install file: "foo.in" as "/tmp/install/usr/bin/foo.in" diff --git a/doc/generated/examples/commandline_BUILD_TARGETS_1_1.xml b/doc/generated/examples/commandline_BUILD_TARGETS_1_1.xml index be22abf..bd51961 100644 --- a/doc/generated/examples/commandline_BUILD_TARGETS_1_1.xml +++ b/doc/generated/examples/commandline_BUILD_TARGETS_1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q BUILD_TARGETS is ['prog1'] cc -o prog1.o -c prog1.c cc -o prog1 prog1.o diff --git a/doc/generated/examples/commandline_BoolVariable_1.xml b/doc/generated/examples/commandline_BoolVariable_1.xml index 481c0a3..e4c1792 100644 --- a/doc/generated/examples/commandline_BoolVariable_1.xml +++ b/doc/generated/examples/commandline_BoolVariable_1.xml @@ -1,3 +1,4 @@ -% scons -Q RELEASE=yes foo.o + +% scons -Q RELEASE=yes foo.o cc -o foo.o -c -DRELEASE_BUILD=True foo.c diff --git a/doc/generated/examples/commandline_BoolVariable_2.xml b/doc/generated/examples/commandline_BoolVariable_2.xml index 69f8155..dc1e068 100644 --- a/doc/generated/examples/commandline_BoolVariable_2.xml +++ b/doc/generated/examples/commandline_BoolVariable_2.xml @@ -1,3 +1,4 @@ -% scons -Q RELEASE=t foo.o + +% scons -Q RELEASE=t foo.o cc -o foo.o -c -DRELEASE_BUILD=True foo.c diff --git a/doc/generated/examples/commandline_BoolVariable_3.xml b/doc/generated/examples/commandline_BoolVariable_3.xml index 8d635f7..0750fb5 100644 --- a/doc/generated/examples/commandline_BoolVariable_3.xml +++ b/doc/generated/examples/commandline_BoolVariable_3.xml @@ -1,3 +1,4 @@ -% scons -Q RELEASE=no foo.o + +% scons -Q RELEASE=no foo.o cc -o foo.o -c -DRELEASE_BUILD=False foo.c diff --git a/doc/generated/examples/commandline_BoolVariable_4.xml b/doc/generated/examples/commandline_BoolVariable_4.xml index c576eee..84e4639 100644 --- a/doc/generated/examples/commandline_BoolVariable_4.xml +++ b/doc/generated/examples/commandline_BoolVariable_4.xml @@ -1,3 +1,4 @@ -% scons -Q RELEASE=f foo.o + +% scons -Q RELEASE=f foo.o cc -o foo.o -c -DRELEASE_BUILD=False foo.c diff --git a/doc/generated/examples/commandline_BoolVariable_5.xml b/doc/generated/examples/commandline_BoolVariable_5.xml index 1384407..81f1d4e 100644 --- a/doc/generated/examples/commandline_BoolVariable_5.xml +++ b/doc/generated/examples/commandline_BoolVariable_5.xml @@ -1,4 +1,5 @@ -% scons -Q RELEASE=bad_value foo.o + +% scons -Q RELEASE=bad_value foo.o scons: *** Error converting option: RELEASE Invalid value for boolean option: bad_value diff --git a/doc/generated/examples/commandline_COMMAND_LINE_TARGETS_1.xml b/doc/generated/examples/commandline_COMMAND_LINE_TARGETS_1.xml index ba270b8..1812f74 100644 --- a/doc/generated/examples/commandline_COMMAND_LINE_TARGETS_1.xml +++ b/doc/generated/examples/commandline_COMMAND_LINE_TARGETS_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o foo.o -c foo.c cc -o foo foo.o % scons -Q bar diff --git a/doc/generated/examples/commandline_DEFAULT_TARGETS_1_1.xml b/doc/generated/examples/commandline_DEFAULT_TARGETS_1_1.xml index 3f9e0fe..f92f160 100644 --- a/doc/generated/examples/commandline_DEFAULT_TARGETS_1_1.xml +++ b/doc/generated/examples/commandline_DEFAULT_TARGETS_1_1.xml @@ -1,4 +1,5 @@ -% scons + +% scons scons: Reading SConscript files ... DEFAULT_TARGETS is ['prog1'] scons: done reading SConscript files. diff --git a/doc/generated/examples/commandline_DEFAULT_TARGETS_2_1.xml b/doc/generated/examples/commandline_DEFAULT_TARGETS_2_1.xml index c51626d..01e953b 100644 --- a/doc/generated/examples/commandline_DEFAULT_TARGETS_2_1.xml +++ b/doc/generated/examples/commandline_DEFAULT_TARGETS_2_1.xml @@ -1,4 +1,5 @@ -% scons + +% scons scons: Reading SConscript files ... DEFAULT_TARGETS is now ['prog1'] DEFAULT_TARGETS is now ['prog1', 'prog2'] diff --git a/doc/generated/examples/commandline_Default1_1.xml b/doc/generated/examples/commandline_Default1_1.xml index 8679e25..18008d8 100644 --- a/doc/generated/examples/commandline_Default1_1.xml +++ b/doc/generated/examples/commandline_Default1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o hello.o -c hello.c cc -o hello hello.o % scons -Q diff --git a/doc/generated/examples/commandline_Default1_2.xml b/doc/generated/examples/commandline_Default1_2.xml index e40c298..0f1a93e 100644 --- a/doc/generated/examples/commandline_Default1_2.xml +++ b/doc/generated/examples/commandline_Default1_2.xml @@ -1,4 +1,5 @@ -% scons -Q . + +% scons -Q . cc -o goodbye.o -c goodbye.c cc -o goodbye goodbye.o cc -o hello.o -c hello.c diff --git a/doc/generated/examples/commandline_Default2_1.xml b/doc/generated/examples/commandline_Default2_1.xml index bb4cd0c..606ed67 100644 --- a/doc/generated/examples/commandline_Default2_1.xml +++ b/doc/generated/examples/commandline_Default2_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o prog1.o -c prog1.c cc -o prog1 prog1.o cc -o prog3.o -c prog3.c diff --git a/doc/generated/examples/commandline_Default3_1.xml b/doc/generated/examples/commandline_Default3_1.xml index de93fb6..d18575c 100644 --- a/doc/generated/examples/commandline_Default3_1.xml +++ b/doc/generated/examples/commandline_Default3_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o prog1/foo.o -c prog1/foo.c cc -o prog1/main.o -c prog1/main.c cc -o prog1/main prog1/main.o prog1/foo.o diff --git a/doc/generated/examples/commandline_Default4_1.xml b/doc/generated/examples/commandline_Default4_1.xml index 3c16091..35e0b10 100644 --- a/doc/generated/examples/commandline_Default4_1.xml +++ b/doc/generated/examples/commandline_Default4_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q scons: *** No targets specified and no Default() targets found. Stop. Found nothing to build % scons -Q . diff --git a/doc/generated/examples/commandline_EnumVariable_1.xml b/doc/generated/examples/commandline_EnumVariable_1.xml index 2178dba..d658f69 100644 --- a/doc/generated/examples/commandline_EnumVariable_1.xml +++ b/doc/generated/examples/commandline_EnumVariable_1.xml @@ -1,4 +1,5 @@ -% scons -Q COLOR=red foo.o + +% scons -Q COLOR=red foo.o cc -o foo.o -c -DCOLOR="red" foo.c % scons -Q COLOR=blue foo.o cc -o foo.o -c -DCOLOR="blue" foo.c diff --git a/doc/generated/examples/commandline_EnumVariable_2.xml b/doc/generated/examples/commandline_EnumVariable_2.xml index c41e679..a8a18df 100644 --- a/doc/generated/examples/commandline_EnumVariable_2.xml +++ b/doc/generated/examples/commandline_EnumVariable_2.xml @@ -1,4 +1,5 @@ -% scons -Q COLOR=magenta foo.o + +% scons -Q COLOR=magenta foo.o scons: *** Invalid value for option COLOR: magenta. Valid values are: ('red', 'green', 'blue') File "/home/my/project/SConstruct", line 5, in <module> diff --git a/doc/generated/examples/commandline_EnumVariable_3.xml b/doc/generated/examples/commandline_EnumVariable_3.xml index 638ddda..bb9a6d5 100644 --- a/doc/generated/examples/commandline_EnumVariable_3.xml +++ b/doc/generated/examples/commandline_EnumVariable_3.xml @@ -1,4 +1,5 @@ -% scons -Q COLOR=Red foo.o + +% scons -Q COLOR=Red foo.o scons: *** Invalid value for option COLOR: Red. Valid values are: ('red', 'green', 'blue') File "/home/my/project/SConstruct", line 5, in <module> diff --git a/doc/generated/examples/commandline_EnumVariable_ic1_1.xml b/doc/generated/examples/commandline_EnumVariable_ic1_1.xml index 33f668d..db786e5 100644 --- a/doc/generated/examples/commandline_EnumVariable_ic1_1.xml +++ b/doc/generated/examples/commandline_EnumVariable_ic1_1.xml @@ -1,4 +1,5 @@ -% scons -Q COLOR=Red foo.o + +% scons -Q COLOR=Red foo.o cc -o foo.o -c -DCOLOR="Red" foo.c % scons -Q COLOR=BLUE foo.o cc -o foo.o -c -DCOLOR="BLUE" foo.c diff --git a/doc/generated/examples/commandline_EnumVariable_ic2_1.xml b/doc/generated/examples/commandline_EnumVariable_ic2_1.xml index ef24936..5596608 100644 --- a/doc/generated/examples/commandline_EnumVariable_ic2_1.xml +++ b/doc/generated/examples/commandline_EnumVariable_ic2_1.xml @@ -1,4 +1,5 @@ -% scons -Q COLOR=Red foo.o + +% scons -Q COLOR=Red foo.o cc -o foo.o -c -DCOLOR="red" foo.c % scons -Q COLOR=nAvY foo.o cc -o foo.o -c -DCOLOR="blue" foo.c diff --git a/doc/generated/examples/commandline_ListVariable_1.xml b/doc/generated/examples/commandline_ListVariable_1.xml index f04d1f3..6e245a3 100644 --- a/doc/generated/examples/commandline_ListVariable_1.xml +++ b/doc/generated/examples/commandline_ListVariable_1.xml @@ -1,4 +1,5 @@ -% scons -Q COLORS=red,blue foo.o + +% scons -Q COLORS=red,blue foo.o cc -o foo.o -c -DCOLORS="red blue" foo.c % scons -Q COLORS=blue,green,red foo.o cc -o foo.o -c -DCOLORS="blue green red" foo.c diff --git a/doc/generated/examples/commandline_ListVariable_2.xml b/doc/generated/examples/commandline_ListVariable_2.xml index 50bc815..b964669 100644 --- a/doc/generated/examples/commandline_ListVariable_2.xml +++ b/doc/generated/examples/commandline_ListVariable_2.xml @@ -1,4 +1,5 @@ -% scons -Q COLORS=all foo.o + +% scons -Q COLORS=all foo.o cc -o foo.o -c -DCOLORS="red green blue" foo.c % scons -Q COLORS=none foo.o cc -o foo.o -c -DCOLORS="" foo.c diff --git a/doc/generated/examples/commandline_ListVariable_3.xml b/doc/generated/examples/commandline_ListVariable_3.xml index f697598..ae13d8b 100644 --- a/doc/generated/examples/commandline_ListVariable_3.xml +++ b/doc/generated/examples/commandline_ListVariable_3.xml @@ -1,4 +1,5 @@ -% scons -Q COLORS=magenta foo.o + +% scons -Q COLORS=magenta foo.o scons: *** Error converting option: COLORS Invalid value(s) for option: magenta diff --git a/doc/generated/examples/commandline_PackageVariable_1.xml b/doc/generated/examples/commandline_PackageVariable_1.xml index daaa696..b83fd80 100644 --- a/doc/generated/examples/commandline_PackageVariable_1.xml +++ b/doc/generated/examples/commandline_PackageVariable_1.xml @@ -1,4 +1,5 @@ -% scons -Q foo.o + +% scons -Q foo.o cc -o foo.o -c -DPACKAGE="/opt/location" foo.c % scons -Q PACKAGE=/usr/local/location foo.o cc -o foo.o -c -DPACKAGE="/usr/local/location" foo.c diff --git a/doc/generated/examples/commandline_PathVariable_1.xml b/doc/generated/examples/commandline_PathVariable_1.xml index e995a69..81693b9 100644 --- a/doc/generated/examples/commandline_PathVariable_1.xml +++ b/doc/generated/examples/commandline_PathVariable_1.xml @@ -1,4 +1,5 @@ -% scons -Q foo.o + +% scons -Q foo.o cc -o foo.o -c -DCONFIG_FILE="/etc/my_config" foo.c % scons -Q CONFIG=/usr/local/etc/other_config foo.o scons: `foo.o' is up to date. diff --git a/doc/generated/examples/commandline_PathVariable_2.xml b/doc/generated/examples/commandline_PathVariable_2.xml index 6d69288..7dde5b1 100644 --- a/doc/generated/examples/commandline_PathVariable_2.xml +++ b/doc/generated/examples/commandline_PathVariable_2.xml @@ -1,4 +1,5 @@ -% scons -Q CONFIG=/does/not/exist foo.o + +% scons -Q CONFIG=/does/not/exist foo.o scons: *** Path for option CONFIG does not exist: /does/not/exist File "/home/my/project/SConstruct", line 6, in <module> diff --git a/doc/generated/examples/commandline_SCONSFLAGS_1.xml b/doc/generated/examples/commandline_SCONSFLAGS_1.xml index fc54357..35e366c 100644 --- a/doc/generated/examples/commandline_SCONSFLAGS_1.xml +++ b/doc/generated/examples/commandline_SCONSFLAGS_1.xml @@ -1,4 +1,5 @@ -% scons + +% scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... diff --git a/doc/generated/examples/commandline_SetOption_1.xml b/doc/generated/examples/commandline_SetOption_1.xml index 4aedc2e..bac0cf4 100644 --- a/doc/generated/examples/commandline_SetOption_1.xml +++ b/doc/generated/examples/commandline_SetOption_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q running with -j 2 scons: `.' is up to date. diff --git a/doc/generated/examples/commandline_SetOption_2.xml b/doc/generated/examples/commandline_SetOption_2.xml index 54e214f..b00e073 100644 --- a/doc/generated/examples/commandline_SetOption_2.xml +++ b/doc/generated/examples/commandline_SetOption_2.xml @@ -1,4 +1,5 @@ -% export NUM_CPU="4" + +% export NUM_CPU="4" % scons -Q running with -j 4 scons: `.' is up to date. diff --git a/doc/generated/examples/commandline_SetOption_3.xml b/doc/generated/examples/commandline_SetOption_3.xml index 2db0d62..df42ff0 100644 --- a/doc/generated/examples/commandline_SetOption_3.xml +++ b/doc/generated/examples/commandline_SetOption_3.xml @@ -1,4 +1,5 @@ -% scons -Q -j 7 + +% scons -Q -j 7 running with -j 7 scons: `.' is up to date. % export NUM_CPU="4" diff --git a/doc/generated/examples/commandline_UnknownVariables_1.xml b/doc/generated/examples/commandline_UnknownVariables_1.xml index ecca75f..272a954 100644 --- a/doc/generated/examples/commandline_UnknownVariables_1.xml +++ b/doc/generated/examples/commandline_UnknownVariables_1.xml @@ -1,3 +1,4 @@ -% scons -Q NOT_KNOWN=foo -Unknown variables: dict_keys(['NOT_KNOWN']) + +% scons -Q NOT_KNOWN=foo +Unknown variables: ['NOT_KNOWN'] diff --git a/doc/generated/examples/commandline_Variables1_1.xml b/doc/generated/examples/commandline_Variables1_1.xml index 2b6ecf8..512ae65 100644 --- a/doc/generated/examples/commandline_Variables1_1.xml +++ b/doc/generated/examples/commandline_Variables1_1.xml @@ -1,4 +1,5 @@ -% scons -Q RELEASE=1 + +% scons -Q RELEASE=1 cc -o bar.o -c -DRELEASE_BUILD=1 bar.c cc -o foo.o -c -DRELEASE_BUILD=1 foo.c cc -o foo foo.o bar.o diff --git a/doc/generated/examples/commandline_Variables_Help_1.xml b/doc/generated/examples/commandline_Variables_Help_1.xml index 9fe588e..db171eb 100644 --- a/doc/generated/examples/commandline_Variables_Help_1.xml +++ b/doc/generated/examples/commandline_Variables_Help_1.xml @@ -1,4 +1,5 @@ -% scons -Q -h + +% scons -Q -h RELEASE: Set to 1 to build for release default: 0 diff --git a/doc/generated/examples/commandline_Variables_custom_py_1_1.xml b/doc/generated/examples/commandline_Variables_custom_py_1_1.xml index bf31267..4ef4d48 100644 --- a/doc/generated/examples/commandline_Variables_custom_py_1_1.xml +++ b/doc/generated/examples/commandline_Variables_custom_py_1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o bar.o -c -DRELEASE_BUILD=1 bar.c cc -o foo.o -c -DRELEASE_BUILD=1 foo.c cc -o foo foo.o bar.o diff --git a/doc/generated/examples/commandline_Variables_custom_py_2_1.xml b/doc/generated/examples/commandline_Variables_custom_py_2_1.xml index fc07260..5961d0a 100644 --- a/doc/generated/examples/commandline_Variables_custom_py_2_1.xml +++ b/doc/generated/examples/commandline_Variables_custom_py_2_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o bar.o -c -DRELEASE_BUILD=0 bar.c cc -o foo.o -c -DRELEASE_BUILD=0 foo.c cc -o foo foo.o bar.o diff --git a/doc/generated/examples/depends_AlwaysBuild_1.xml b/doc/generated/examples/depends_AlwaysBuild_1.xml index e8bafae..86700fe 100644 --- a/doc/generated/examples/depends_AlwaysBuild_1.xml +++ b/doc/generated/examples/depends_AlwaysBuild_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o hello.o -c hello.c cc -o hello hello.o % scons -Q diff --git a/doc/generated/examples/depends_AlwaysBuild_2.xml b/doc/generated/examples/depends_AlwaysBuild_2.xml index 501ffa1..d1bdd6d 100644 --- a/doc/generated/examples/depends_AlwaysBuild_2.xml +++ b/doc/generated/examples/depends_AlwaysBuild_2.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o hello.o -c hello.c cc -o hello hello.o % scons -Q hello.o diff --git a/doc/generated/examples/depends_Requires_1.xml b/doc/generated/examples/depends_Requires_1.xml index 0a07c01..04bfc35 100644 --- a/doc/generated/examples/depends_Requires_1.xml +++ b/doc/generated/examples/depends_Requires_1.xml @@ -1,4 +1,5 @@ -% scons -Q hello + +% scons -Q hello cc -o version.o -c version.c cc -o hello.o -c hello.c cc -o hello version.o hello.o diff --git a/doc/generated/examples/depends_ex1_1.xml b/doc/generated/examples/depends_ex1_1.xml index 1a94afc..25355c9 100644 --- a/doc/generated/examples/depends_ex1_1.xml +++ b/doc/generated/examples/depends_ex1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o hello.o -c hello.c cc -o hello hello.o % scons -Q diff --git a/doc/generated/examples/depends_ex1_2.xml b/doc/generated/examples/depends_ex1_2.xml index 0fd2024..09ecc73 100644 --- a/doc/generated/examples/depends_ex1_2.xml +++ b/doc/generated/examples/depends_ex1_2.xml @@ -1,4 +1,5 @@ -% scons -Q hello + +% scons -Q hello cc -o hello.o -c hello.c cc -o hello hello.o % scons -Q hello diff --git a/doc/generated/examples/depends_ex1_3.xml b/doc/generated/examples/depends_ex1_3.xml index 6bfba52..20062df 100644 --- a/doc/generated/examples/depends_ex1_3.xml +++ b/doc/generated/examples/depends_ex1_3.xml @@ -1,4 +1,5 @@ -% scons -Q hello + +% scons -Q hello cc -o hello.o -c hello.c cc -o hello hello.o % touch hello.c diff --git a/doc/generated/examples/depends_ex1_4.xml b/doc/generated/examples/depends_ex1_4.xml index bae5bd7..31aa5bd 100644 --- a/doc/generated/examples/depends_ex1_4.xml +++ b/doc/generated/examples/depends_ex1_4.xml @@ -1,4 +1,5 @@ -% scons -Q hello + +% scons -Q hello cc -o hello.o -c hello.c cc -o hello hello.o % [CHANGE THE CONTENTS OF hello.c] diff --git a/doc/generated/examples/depends_ex1_5.xml b/doc/generated/examples/depends_ex1_5.xml index 358bf5b..776bda2 100644 --- a/doc/generated/examples/depends_ex1_5.xml +++ b/doc/generated/examples/depends_ex1_5.xml @@ -1,4 +1,5 @@ -% scons -Q hello + +% scons -Q hello cc -o hello.o -c hello.c cc -o hello hello.o % [CHANGE A COMMENT IN hello.c] diff --git a/doc/generated/examples/depends_ex1_6.xml b/doc/generated/examples/depends_ex1_6.xml index 8461234..7493627 100644 --- a/doc/generated/examples/depends_ex1_6.xml +++ b/doc/generated/examples/depends_ex1_6.xml @@ -1,4 +1,5 @@ -% scons -Q --implicit-cache hello + +% scons -Q --implicit-cache hello cc -o hello.o -c hello.c cc -o hello hello.o % scons -Q hello diff --git a/doc/generated/examples/depends_ex1_7.xml b/doc/generated/examples/depends_ex1_7.xml index ea9088a..22b56d3 100644 --- a/doc/generated/examples/depends_ex1_7.xml +++ b/doc/generated/examples/depends_ex1_7.xml @@ -1,4 +1,5 @@ -% scons -Q --implicit-deps-changed hello + +% scons -Q --implicit-deps-changed hello cc -o hello.o -c hello.c cc -o hello hello.o % scons -Q hello diff --git a/doc/generated/examples/depends_ex1_8.xml b/doc/generated/examples/depends_ex1_8.xml index cc4ee6c..d60db97 100644 --- a/doc/generated/examples/depends_ex1_8.xml +++ b/doc/generated/examples/depends_ex1_8.xml @@ -1,4 +1,5 @@ -% scons -Q --implicit-deps-unchanged hello + +% scons -Q --implicit-deps-unchanged hello cc -o hello.o -c hello.c cc -o hello hello.o % scons -Q hello diff --git a/doc/generated/examples/depends_ex5_1.xml b/doc/generated/examples/depends_ex5_1.xml index 37985df..e81cb0c 100644 --- a/doc/generated/examples/depends_ex5_1.xml +++ b/doc/generated/examples/depends_ex5_1.xml @@ -1,4 +1,5 @@ -% scons -Q hello + +% scons -Q hello cc -o hello.o -c -Iinclude -I/home/project/inc hello.c cc -o hello hello.o diff --git a/doc/generated/examples/depends_ex5_2.xml b/doc/generated/examples/depends_ex5_2.xml index 460d135..ea78590 100644 --- a/doc/generated/examples/depends_ex5_2.xml +++ b/doc/generated/examples/depends_ex5_2.xml @@ -1,4 +1,5 @@ -C:\>scons -Q hello.exe + +C:\>scons -Q hello.exe cl /Fohello.obj /c hello.c /nologo /Iinclude /I\home\project\inc link /nologo /OUT:hello.exe hello.obj embedManifestExeCheck(target, source, env) diff --git a/doc/generated/examples/depends_ignore_explicit_1.xml b/doc/generated/examples/depends_ignore_explicit_1.xml index 79ebca2..a45a852 100644 --- a/doc/generated/examples/depends_ignore_explicit_1.xml +++ b/doc/generated/examples/depends_ignore_explicit_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q scons: `.' is up to date. % scons -Q hello cc -o hello.o -c hello.c diff --git a/doc/generated/examples/depends_include_1.xml b/doc/generated/examples/depends_include_1.xml index 987fead..e22bd03 100644 --- a/doc/generated/examples/depends_include_1.xml +++ b/doc/generated/examples/depends_include_1.xml @@ -1,4 +1,5 @@ -% scons -Q hello + +% scons -Q hello cc -o hello.o -c -I. hello.c cc -o hello hello.o % scons -Q hello diff --git a/doc/generated/examples/depends_macroinc_1.xml b/doc/generated/examples/depends_macroinc_1.xml index d15f4ef..95d4e0b 100644 --- a/doc/generated/examples/depends_macroinc_1.xml +++ b/doc/generated/examples/depends_macroinc_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o hello.o -c -I. hello.c cc -o hello hello.o % [CHANGE CONTENTS OF foo.h] diff --git a/doc/generated/examples/depends_match_1.xml b/doc/generated/examples/depends_match_1.xml index cde65ca..7dc3831 100644 --- a/doc/generated/examples/depends_match_1.xml +++ b/doc/generated/examples/depends_match_1.xml @@ -1,4 +1,5 @@ -% scons -Q hello.o + +% scons -Q hello.o cc -o hello.o -c hello.c % touch -t 198901010000 hello.c % scons -Q hello.o diff --git a/doc/generated/examples/depends_mixing_1.xml b/doc/generated/examples/depends_mixing_1.xml index 30d2527..258dc90 100644 --- a/doc/generated/examples/depends_mixing_1.xml +++ b/doc/generated/examples/depends_mixing_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o program1.o -c -I. program1.c cc -o prog-MD5 program1.o cc -o program2.o -c -I. program2.c diff --git a/doc/generated/examples/depends_newer_1.xml b/doc/generated/examples/depends_newer_1.xml index b09d0d6..28cb427 100644 --- a/doc/generated/examples/depends_newer_1.xml +++ b/doc/generated/examples/depends_newer_1.xml @@ -1,4 +1,5 @@ -% scons -Q hello.o + +% scons -Q hello.o cc -o hello.o -c hello.c % touch hello.c % scons -Q hello.o diff --git a/doc/generated/examples/depends_no-Requires_1.xml b/doc/generated/examples/depends_no-Requires_1.xml index 8be3285..8e2729f 100644 --- a/doc/generated/examples/depends_no-Requires_1.xml +++ b/doc/generated/examples/depends_no-Requires_1.xml @@ -1,4 +1,5 @@ -% scons -Q hello + +% scons -Q hello cc -o hello.o -c hello.c cc -o version.o -c version.c cc -o hello hello.o version.o diff --git a/doc/generated/examples/depends_parsedep_1.xml b/doc/generated/examples/depends_parsedep_1.xml index e83eccf..910930b1 100644 --- a/doc/generated/examples/depends_parsedep_1.xml +++ b/doc/generated/examples/depends_parsedep_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o hello.o -c -MD -MF hello.d -I. hello.c cc -o hello hello.o % [CHANGE CONTENTS OF foo.h] diff --git a/doc/generated/examples/environments_Append-nonexistent_1.xml b/doc/generated/examples/environments_Append-nonexistent_1.xml index 43b6834..bb15965 100644 --- a/doc/generated/examples/environments_Append-nonexistent_1.xml +++ b/doc/generated/examples/environments_Append-nonexistent_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q NEW_VARIABLE = added scons: `.' is up to date. diff --git a/doc/generated/examples/environments_Prepend-nonexistent_1.xml b/doc/generated/examples/environments_Prepend-nonexistent_1.xml index 43b6834..bb15965 100644 --- a/doc/generated/examples/environments_Prepend-nonexistent_1.xml +++ b/doc/generated/examples/environments_Prepend-nonexistent_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q NEW_VARIABLE = added scons: `.' is up to date. diff --git a/doc/generated/examples/environments_Replace-nonexistent_1.xml b/doc/generated/examples/environments_Replace-nonexistent_1.xml index 2aba4c8..c4480b5 100644 --- a/doc/generated/examples/environments_Replace-nonexistent_1.xml +++ b/doc/generated/examples/environments_Replace-nonexistent_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q NEW_VARIABLE = xyzzy scons: `.' is up to date. diff --git a/doc/generated/examples/environments_Replace1_1.xml b/doc/generated/examples/environments_Replace1_1.xml index 6fedc45..54f4976 100644 --- a/doc/generated/examples/environments_Replace1_1.xml +++ b/doc/generated/examples/environments_Replace1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o foo.o -c -DDEFINE2 foo.c cc -o foo foo.o diff --git a/doc/generated/examples/environments_Replace2_1.xml b/doc/generated/examples/environments_Replace2_1.xml index 61027c8..9ad257b 100644 --- a/doc/generated/examples/environments_Replace2_1.xml +++ b/doc/generated/examples/environments_Replace2_1.xml @@ -1,4 +1,5 @@ -% scons + +% scons scons: Reading SConscript files ... CCFLAGS = -DDEFINE1 CCFLAGS = -DDEFINE2 diff --git a/doc/generated/examples/environments_ex1_1.xml b/doc/generated/examples/environments_ex1_1.xml index 1c4da07..84d22b8 100644 --- a/doc/generated/examples/environments_ex1_1.xml +++ b/doc/generated/examples/environments_ex1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q gcc -o foo.o -c -O2 foo.c gcc -o foo foo.o diff --git a/doc/generated/examples/environments_ex2_1.xml b/doc/generated/examples/environments_ex2_1.xml index acab07b..eb86c9e 100644 --- a/doc/generated/examples/environments_ex2_1.xml +++ b/doc/generated/examples/environments_ex2_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o bar.o -c -g bar.c cc -o bar bar.o cc -o foo.o -c -O2 foo.c diff --git a/doc/generated/examples/environments_ex3_1.xml b/doc/generated/examples/environments_ex3_1.xml index 1c7bce9..3262302 100644 --- a/doc/generated/examples/environments_ex3_1.xml +++ b/doc/generated/examples/environments_ex3_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q scons: *** Two environments with different actions were specified for the same target: foo.o File "/home/my/project/SConstruct", line 6, in <module> diff --git a/doc/generated/examples/environments_ex4_1.xml b/doc/generated/examples/environments_ex4_1.xml index 4eda402..286f46f 100644 --- a/doc/generated/examples/environments_ex4_1.xml +++ b/doc/generated/examples/environments_ex4_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o foo-dbg.o -c -g foo.c cc -o foo-dbg foo-dbg.o cc -o foo-opt.o -c -O2 foo.c diff --git a/doc/generated/examples/environments_ex5_1.xml b/doc/generated/examples/environments_ex5_1.xml index 7316a6c..d6f0094 100644 --- a/doc/generated/examples/environments_ex5_1.xml +++ b/doc/generated/examples/environments_ex5_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q gcc -o foo.o -c foo.c gcc -o foo foo.o gcc -o foo-dbg.o -c -g foo.c diff --git a/doc/generated/examples/environments_ex6_1.xml b/doc/generated/examples/environments_ex6_1.xml index f6aa4b6..af8667f 100644 --- a/doc/generated/examples/environments_ex6_1.xml +++ b/doc/generated/examples/environments_ex6_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q CC is: cc scons: `.' is up to date. diff --git a/doc/generated/examples/environments_ex6b_1.xml b/doc/generated/examples/environments_ex6b_1.xml index 0da8d90..47a499a 100644 --- a/doc/generated/examples/environments_ex6b_1.xml +++ b/doc/generated/examples/environments_ex6b_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q key = OBJSUFFIX, value = .o key = LIBSUFFIX, value = .a key = PROGSUFFIX, value = diff --git a/doc/generated/examples/environments_ex6b_2.xml b/doc/generated/examples/environments_ex6b_2.xml index d0f20e9..73a6d19 100644 --- a/doc/generated/examples/environments_ex6b_2.xml +++ b/doc/generated/examples/environments_ex6b_2.xml @@ -1,4 +1,5 @@ -C:\>scons -Q + +C:\>scons -Q key = OBJSUFFIX, value = .obj key = LIBSUFFIX, value = .lib key = PROGSUFFIX, value = .exe diff --git a/doc/generated/examples/environments_ex8_1.xml b/doc/generated/examples/environments_ex8_1.xml index fe3b464..68ebac4 100644 --- a/doc/generated/examples/environments_ex8_1.xml +++ b/doc/generated/examples/environments_ex8_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o foo.o -c -DMY_VALUE -DLAST foo.c cc -o foo foo.o diff --git a/doc/generated/examples/environments_ex9_1.xml b/doc/generated/examples/environments_ex9_1.xml index 4d7bfd8..3e31c3f 100644 --- a/doc/generated/examples/environments_ex9_1.xml +++ b/doc/generated/examples/environments_ex9_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o foo.o -c -DFIRST -DMY_VALUE foo.c cc -o foo foo.o diff --git a/doc/generated/examples/environments_missing1_1.xml b/doc/generated/examples/environments_missing1_1.xml index 56b0ff5..edf136f 100644 --- a/doc/generated/examples/environments_missing1_1.xml +++ b/doc/generated/examples/environments_missing1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q value is: -><- scons: `.' is up to date. diff --git a/doc/generated/examples/environments_missing2_1.xml b/doc/generated/examples/environments_missing2_1.xml index 770c7df..ffb308c 100644 --- a/doc/generated/examples/environments_missing2_1.xml +++ b/doc/generated/examples/environments_missing2_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q scons: *** NameError `MISSING' trying to evaluate `$MISSING' File "/home/my/project/SConstruct", line 3, in <module> diff --git a/doc/generated/examples/environments_missing3_1.xml b/doc/generated/examples/environments_missing3_1.xml index 56b0ff5..edf136f 100644 --- a/doc/generated/examples/environments_missing3_1.xml +++ b/doc/generated/examples/environments_missing3_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q value is: -><- scons: `.' is up to date. diff --git a/doc/generated/examples/factories_Chmod_1.xml b/doc/generated/examples/factories_Chmod_1.xml index 04e543c..a324ed4 100644 --- a/doc/generated/examples/factories_Chmod_1.xml +++ b/doc/generated/examples/factories_Chmod_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q Copy("file.out", "file.in") Chmod("file.out", 0755) diff --git a/doc/generated/examples/factories_Copy1_1.xml b/doc/generated/examples/factories_Copy1_1.xml index 02941a2..852412f 100644 --- a/doc/generated/examples/factories_Copy1_1.xml +++ b/doc/generated/examples/factories_Copy1_1.xml @@ -1,3 +1,4 @@ -% scons -Q + +% scons -Q Copy("file.out", "file.in") diff --git a/doc/generated/examples/factories_Copy2_1.xml b/doc/generated/examples/factories_Copy2_1.xml index 02941a2..852412f 100644 --- a/doc/generated/examples/factories_Copy2_1.xml +++ b/doc/generated/examples/factories_Copy2_1.xml @@ -1,3 +1,4 @@ -% scons -Q + +% scons -Q Copy("file.out", "file.in") diff --git a/doc/generated/examples/factories_Copy3_1.xml b/doc/generated/examples/factories_Copy3_1.xml index 224ec79..bcb41ff 100644 --- a/doc/generated/examples/factories_Copy3_1.xml +++ b/doc/generated/examples/factories_Copy3_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q Copy("tempfile", "file.in") modify tempfile Copy("file.out", "tempfile") diff --git a/doc/generated/examples/factories_Delete1_1.xml b/doc/generated/examples/factories_Delete1_1.xml index 22b5070..e9a287e 100644 --- a/doc/generated/examples/factories_Delete1_1.xml +++ b/doc/generated/examples/factories_Delete1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q Delete("tempfile") Copy("tempfile", "file.in") modify tempfile diff --git a/doc/generated/examples/factories_Delete2_1.xml b/doc/generated/examples/factories_Delete2_1.xml index 109ed2c..2be3c3a 100644 --- a/doc/generated/examples/factories_Delete2_1.xml +++ b/doc/generated/examples/factories_Delete2_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q Delete("file.out") Copy("file.out", "file.in") diff --git a/doc/generated/examples/factories_Execute_1.xml b/doc/generated/examples/factories_Execute_1.xml index 0481396..a7ae0c7 100644 --- a/doc/generated/examples/factories_Execute_1.xml +++ b/doc/generated/examples/factories_Execute_1.xml @@ -1,4 +1,5 @@ -% scons + +% scons scons: Reading SConscript files ... Mkdir("/tmp/my_temp_directory") scons: done reading SConscript files. diff --git a/doc/generated/examples/factories_Mkdir_1.xml b/doc/generated/examples/factories_Mkdir_1.xml index 37c601d..ea3d79d 100644 --- a/doc/generated/examples/factories_Mkdir_1.xml +++ b/doc/generated/examples/factories_Mkdir_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q Delete("tempdir") Mkdir("tempdir") Copy("tempdir/file.in", "file.in") diff --git a/doc/generated/examples/factories_Move_1.xml b/doc/generated/examples/factories_Move_1.xml index a49ecef..a5e4ccd 100644 --- a/doc/generated/examples/factories_Move_1.xml +++ b/doc/generated/examples/factories_Move_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q Copy("tempfile", "file.in") modify tempfile Move("file.out", "tempfile") diff --git a/doc/generated/examples/factories_Touch_1.xml b/doc/generated/examples/factories_Touch_1.xml index dbc256a..7417fa4 100644 --- a/doc/generated/examples/factories_Touch_1.xml +++ b/doc/generated/examples/factories_Touch_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q Copy("file.out", "file.in") Touch("file.out") diff --git a/doc/generated/examples/fileremoval_clean-ex1_1.xml b/doc/generated/examples/fileremoval_clean-ex1_1.xml index 0d79060..c76a7e5 100644 --- a/doc/generated/examples/fileremoval_clean-ex1_1.xml +++ b/doc/generated/examples/fileremoval_clean-ex1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q build -o foo.out foo.in % scons -Q -c Removed foo.out diff --git a/doc/generated/examples/fileremoval_noclean-ex1_1.xml b/doc/generated/examples/fileremoval_noclean-ex1_1.xml index bf5e42f..45bd878 100644 --- a/doc/generated/examples/fileremoval_noclean-ex1_1.xml +++ b/doc/generated/examples/fileremoval_noclean-ex1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o f1.o -c f1.c cc -o f2.o -c f2.c cc -o f3.o -c f3.c diff --git a/doc/generated/examples/fileremoval_precious-ex1_1.xml b/doc/generated/examples/fileremoval_precious-ex1_1.xml index 232703f..36e5a25 100644 --- a/doc/generated/examples/fileremoval_precious-ex1_1.xml +++ b/doc/generated/examples/fileremoval_precious-ex1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o f1.o -c f1.c cc -o f2.o -c f2.c cc -o f3.o -c f3.c diff --git a/doc/generated/examples/hierarchy_Return_1.xml b/doc/generated/examples/hierarchy_Return_1.xml index 417780f..e5ab7f7 100644 --- a/doc/generated/examples/hierarchy_Return_1.xml +++ b/doc/generated/examples/hierarchy_Return_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o bar/bar.o -c bar/bar.c cc -o foo/foo.o -c foo/foo.c ar rc libprog.a foo/foo.o bar/bar.o diff --git a/doc/generated/examples/hierarchy_ex1_1.xml b/doc/generated/examples/hierarchy_ex1_1.xml index c043c4b..bb5cc7b 100644 --- a/doc/generated/examples/hierarchy_ex1_1.xml +++ b/doc/generated/examples/hierarchy_ex1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o prog1/foo1.o -c prog1/foo1.c cc -o prog1/foo2.o -c prog1/foo2.c cc -o prog1/main.o -c prog1/main.c diff --git a/doc/generated/examples/hierarchy_ex2_1.xml b/doc/generated/examples/hierarchy_ex2_1.xml index c6c7401..800a921 100644 --- a/doc/generated/examples/hierarchy_ex2_1.xml +++ b/doc/generated/examples/hierarchy_ex2_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o lib/foo1.o -c lib/foo1.c cc -o src/prog/foo2.o -c src/prog/foo2.c cc -o src/prog/main.o -c src/prog/main.c diff --git a/doc/generated/examples/hierarchy_ex3_1.xml b/doc/generated/examples/hierarchy_ex3_1.xml index 8c13ee3..473c9f4 100644 --- a/doc/generated/examples/hierarchy_ex3_1.xml +++ b/doc/generated/examples/hierarchy_ex3_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o src/prog/foo2.o -c src/prog/foo2.c cc -o src/prog/main.o -c src/prog/main.c cc -o /usr/joe/lib/foo1.o -c /usr/joe/lib/foo1.c diff --git a/doc/generated/examples/install_ex1_1.xml b/doc/generated/examples/install_ex1_1.xml index 30613e2..776f7e8 100644 --- a/doc/generated/examples/install_ex1_1.xml +++ b/doc/generated/examples/install_ex1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o hello.o -c hello.c cc -o hello hello.o % scons -Q /usr/bin diff --git a/doc/generated/examples/install_ex2_1.xml b/doc/generated/examples/install_ex2_1.xml index 2354878..98de9c4 100644 --- a/doc/generated/examples/install_ex2_1.xml +++ b/doc/generated/examples/install_ex2_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o hello.o -c hello.c cc -o hello hello.o % scons -Q install diff --git a/doc/generated/examples/install_ex3_1.xml b/doc/generated/examples/install_ex3_1.xml index 0396853..e306111 100644 --- a/doc/generated/examples/install_ex3_1.xml +++ b/doc/generated/examples/install_ex3_1.xml @@ -1,4 +1,5 @@ -% scons -Q install + +% scons -Q install cc -o goodbye.o -c goodbye.c cc -o goodbye goodbye.o Install file: "goodbye" as "/usr/bin/goodbye" diff --git a/doc/generated/examples/install_ex4_1.xml b/doc/generated/examples/install_ex4_1.xml index 1bbbf65..36cd90c 100644 --- a/doc/generated/examples/install_ex4_1.xml +++ b/doc/generated/examples/install_ex4_1.xml @@ -1,4 +1,5 @@ -% scons -Q install + +% scons -Q install cc -o hello.o -c hello.c cc -o hello hello.o Install file: "hello" as "/usr/bin/hello-new" diff --git a/doc/generated/examples/install_ex5_1.xml b/doc/generated/examples/install_ex5_1.xml index 22c6b01..89f7c56 100644 --- a/doc/generated/examples/install_ex5_1.xml +++ b/doc/generated/examples/install_ex5_1.xml @@ -1,4 +1,5 @@ -% scons -Q install + +% scons -Q install cc -o goodbye.o -c goodbye.c cc -o goodbye goodbye.o Install file: "goodbye" as "/usr/bin/goodbye-new" diff --git a/doc/generated/examples/java_JAVACLASSDIR_1.xml b/doc/generated/examples/java_JAVACLASSDIR_1.xml index 75e5f95..5e0709a 100644 --- a/doc/generated/examples/java_JAVACLASSDIR_1.xml +++ b/doc/generated/examples/java_JAVACLASSDIR_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q javac -d classes -sourcepath src/pkg/sub src/pkg/sub/Example1.java src/pkg/sub/Example2.java src/pkg/sub/Example3.java javah -d native -classpath classes pkg.sub.Example1 pkg.sub.Example2 pkg.sub.Example3 diff --git a/doc/generated/examples/java_RMIC_1.xml b/doc/generated/examples/java_RMIC_1.xml index 16297dc..4db895e 100644 --- a/doc/generated/examples/java_RMIC_1.xml +++ b/doc/generated/examples/java_RMIC_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q javac -d classes -sourcepath src/pkg/sub src/pkg/sub/Example1.java src/pkg/sub/Example2.java rmic -d outdir -classpath classes pkg.sub.Example1 pkg.sub.Example2 diff --git a/doc/generated/examples/java_jar1_1.xml b/doc/generated/examples/java_jar1_1.xml index a88c00a..de93227 100644 --- a/doc/generated/examples/java_jar1_1.xml +++ b/doc/generated/examples/java_jar1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q javac -d classes -sourcepath src src/Example1.java src/Example2.java src/Example3.java jar cf test.jar classes diff --git a/doc/generated/examples/java_jar2_1.xml b/doc/generated/examples/java_jar2_1.xml index c696fbd..9e942e2 100644 --- a/doc/generated/examples/java_jar2_1.xml +++ b/doc/generated/examples/java_jar2_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q javac -d classes -sourcepath prog1 prog1/Example1.java prog1/Example2.java javac -d classes -sourcepath prog2 prog2/Example3.java prog2/Example4.java jar cf prog1.jar -C classes Example1.class -C classes Example2.class diff --git a/doc/generated/examples/java_java-classes_1.xml b/doc/generated/examples/java_java-classes_1.xml index ce3c9ef..6f02f5f 100644 --- a/doc/generated/examples/java_java-classes_1.xml +++ b/doc/generated/examples/java_java-classes_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q javac -d classes -sourcepath src src/Example1.java src/Example2.java src/Example3.java % scons -Q classes scons: `classes' is up to date. diff --git a/doc/generated/examples/java_java-classes_2.xml b/doc/generated/examples/java_java-classes_2.xml index b773402..31f6028 100644 --- a/doc/generated/examples/java_java-classes_2.xml +++ b/doc/generated/examples/java_java-classes_2.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q javac -d classes -sourcepath src src/Example1.java src/Example2.java src/Example3.java % scons -Q -c classes Removed classes/Example1.class diff --git a/doc/generated/examples/java_java_1.xml b/doc/generated/examples/java_java_1.xml index 13078eb..551a5d4 100644 --- a/doc/generated/examples/java_java_1.xml +++ b/doc/generated/examples/java_java_1.xml @@ -1,3 +1,4 @@ -% scons -Q + +% scons -Q javac -d classes -sourcepath src src/Example1.java src/Example2.java src/Example3.java diff --git a/doc/generated/examples/java_javah_1.xml b/doc/generated/examples/java_javah_1.xml index 75e5f95..5e0709a 100644 --- a/doc/generated/examples/java_javah_1.xml +++ b/doc/generated/examples/java_javah_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q javac -d classes -sourcepath src/pkg/sub src/pkg/sub/Example1.java src/pkg/sub/Example2.java src/pkg/sub/Example3.java javah -d native -classpath classes pkg.sub.Example1 pkg.sub.Example2 pkg.sub.Example3 diff --git a/doc/generated/examples/java_javah_file_1.xml b/doc/generated/examples/java_javah_file_1.xml index 018a964..163a53d 100644 --- a/doc/generated/examples/java_javah_file_1.xml +++ b/doc/generated/examples/java_javah_file_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q javac -d classes -sourcepath src/pkg/sub src/pkg/sub/Example1.java src/pkg/sub/Example2.java src/pkg/sub/Example3.java javah -o native.h -classpath classes pkg.sub.Example1 pkg.sub.Example2 pkg.sub.Example3 diff --git a/doc/generated/examples/lesssimple_ex2_1.xml b/doc/generated/examples/lesssimple_ex2_1.xml index d643101..6093f0c 100644 --- a/doc/generated/examples/lesssimple_ex2_1.xml +++ b/doc/generated/examples/lesssimple_ex2_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o file1.o -c file1.c cc -o file2.o -c file2.c cc -o prog.o -c prog.c diff --git a/doc/generated/examples/lesssimple_ex3_1.xml b/doc/generated/examples/lesssimple_ex3_1.xml index 5ff2046..b3ac2f0 100644 --- a/doc/generated/examples/lesssimple_ex3_1.xml +++ b/doc/generated/examples/lesssimple_ex3_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o file1.o -c file1.c cc -o file2.o -c file2.c cc -o prog.o -c prog.c diff --git a/doc/generated/examples/lesssimple_ex3_2.xml b/doc/generated/examples/lesssimple_ex3_2.xml index 753bf7f..835f048 100644 --- a/doc/generated/examples/lesssimple_ex3_2.xml +++ b/doc/generated/examples/lesssimple_ex3_2.xml @@ -1,4 +1,5 @@ -C:\>scons -Q + +C:\>scons -Q cl /Fofile1.obj /c file1.c /nologo cl /Fofile2.obj /c file2.c /nologo cl /Foprog.obj /c prog.c /nologo diff --git a/doc/generated/examples/lesssimple_ex4_1.xml b/doc/generated/examples/lesssimple_ex4_1.xml index 26d6167..87af41d 100644 --- a/doc/generated/examples/lesssimple_ex4_1.xml +++ b/doc/generated/examples/lesssimple_ex4_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o bar1.o -c bar1.c cc -o bar2.o -c bar2.c cc -o bar bar1.o bar2.o diff --git a/doc/generated/examples/lesssimple_ex5_1.xml b/doc/generated/examples/lesssimple_ex5_1.xml index ea9e0e5..0043e11 100644 --- a/doc/generated/examples/lesssimple_ex5_1.xml +++ b/doc/generated/examples/lesssimple_ex5_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o bar1.o -c bar1.c cc -o bar2.o -c bar2.c cc -o common1.o -c common1.c diff --git a/doc/generated/examples/lesssimple_target_1.xml b/doc/generated/examples/lesssimple_target_1.xml index 6280522..a958acb 100644 --- a/doc/generated/examples/lesssimple_target_1.xml +++ b/doc/generated/examples/lesssimple_target_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o hello.o -c hello.c cc -o new_hello hello.o diff --git a/doc/generated/examples/lesssimple_target_2.xml b/doc/generated/examples/lesssimple_target_2.xml index a438d35..ef7b241 100644 --- a/doc/generated/examples/lesssimple_target_2.xml +++ b/doc/generated/examples/lesssimple_target_2.xml @@ -1,4 +1,5 @@ -C:\>scons -Q + +C:\>scons -Q cl /Fohello.obj /c hello.c /nologo link /nologo /OUT:new_hello.exe hello.obj embedManifestExeCheck(target, source, env) diff --git a/doc/generated/examples/libraries_SharedLibrary_1.xml b/doc/generated/examples/libraries_SharedLibrary_1.xml index ed11d19..2300891 100644 --- a/doc/generated/examples/libraries_SharedLibrary_1.xml +++ b/doc/generated/examples/libraries_SharedLibrary_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o f1.os -c f1.c cc -o f2.os -c f2.c cc -o f3.os -c f3.c diff --git a/doc/generated/examples/libraries_SharedLibrary_2.xml b/doc/generated/examples/libraries_SharedLibrary_2.xml index 7b752d7..b6b484d 100644 --- a/doc/generated/examples/libraries_SharedLibrary_2.xml +++ b/doc/generated/examples/libraries_SharedLibrary_2.xml @@ -1,4 +1,5 @@ -C:\>scons -Q + +C:\>scons -Q cl /Fof1.obj /c f1.c /nologo cl /Fof2.obj /c f2.c /nologo cl /Fof3.obj /c f3.c /nologo diff --git a/doc/generated/examples/libraries_ex1_1.xml b/doc/generated/examples/libraries_ex1_1.xml index 4a14b5b..bfd69b4 100644 --- a/doc/generated/examples/libraries_ex1_1.xml +++ b/doc/generated/examples/libraries_ex1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o f1.o -c f1.c cc -o f2.o -c f2.c cc -o f3.o -c f3.c diff --git a/doc/generated/examples/libraries_ex1_2.xml b/doc/generated/examples/libraries_ex1_2.xml index 75c4186..912e7ad 100644 --- a/doc/generated/examples/libraries_ex1_2.xml +++ b/doc/generated/examples/libraries_ex1_2.xml @@ -1,4 +1,5 @@ -C:\>scons -Q + +C:\>scons -Q cl /Fof1.obj /c f1.c /nologo cl /Fof2.obj /c f2.c /nologo cl /Fof3.obj /c f3.c /nologo diff --git a/doc/generated/examples/libraries_ex2_1.xml b/doc/generated/examples/libraries_ex2_1.xml index c59edf4..c43f7e9 100644 --- a/doc/generated/examples/libraries_ex2_1.xml +++ b/doc/generated/examples/libraries_ex2_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o f1.o -c f1.c cc -o f2.o -c f2.c cc -o f3.o -c f3.c diff --git a/doc/generated/examples/libraries_ex2_2.xml b/doc/generated/examples/libraries_ex2_2.xml index f590dc8..84b4d75 100644 --- a/doc/generated/examples/libraries_ex2_2.xml +++ b/doc/generated/examples/libraries_ex2_2.xml @@ -1,4 +1,5 @@ -C:\>scons -Q + +C:\>scons -Q cl /Fof1.obj /c f1.c /nologo cl /Fof2.obj /c f2.c /nologo cl /Fof3.obj /c f3.c /nologo diff --git a/doc/generated/examples/libraries_ex3_1.xml b/doc/generated/examples/libraries_ex3_1.xml index f5fd4c8..9dd6ca9 100644 --- a/doc/generated/examples/libraries_ex3_1.xml +++ b/doc/generated/examples/libraries_ex3_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o prog.o -c prog.c cc -o prog prog.o -L/usr/lib -L/usr/local/lib -lm diff --git a/doc/generated/examples/libraries_ex3_2.xml b/doc/generated/examples/libraries_ex3_2.xml index 433f7fb..e5ec4ce 100644 --- a/doc/generated/examples/libraries_ex3_2.xml +++ b/doc/generated/examples/libraries_ex3_2.xml @@ -1,4 +1,5 @@ -C:\>scons -Q + +C:\>scons -Q 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) diff --git a/doc/generated/examples/libraries_objects_1.xml b/doc/generated/examples/libraries_objects_1.xml index db5d88c..5d732da 100644 --- a/doc/generated/examples/libraries_objects_1.xml +++ b/doc/generated/examples/libraries_objects_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o f1.o -c f1.c cc -o f3.o -c f3.c ar rc libfoo.a f1.o f2.o f3.o f4.o diff --git a/doc/generated/examples/mergeflags_MergeFlags1_1.xml b/doc/generated/examples/mergeflags_MergeFlags1_1.xml index fafefd4..8f18fd8 100644 --- a/doc/generated/examples/mergeflags_MergeFlags1_1.xml +++ b/doc/generated/examples/mergeflags_MergeFlags1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q ['-option', '-O1', '-whatever', '-O3'] scons: `.' is up to date. diff --git a/doc/generated/examples/mergeflags_MergeFlags2_1.xml b/doc/generated/examples/mergeflags_MergeFlags2_1.xml index 017158a..8cae827 100644 --- a/doc/generated/examples/mergeflags_MergeFlags2_1.xml +++ b/doc/generated/examples/mergeflags_MergeFlags2_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q ['/include', '/usr/local/include', '/usr/include', '/usr/opt/include'] scons: `.' is up to date. diff --git a/doc/generated/examples/mergeflags_MergeFlags3_1.xml b/doc/generated/examples/mergeflags_MergeFlags3_1.xml index 2173cf3..d4f23d4 100644 --- a/doc/generated/examples/mergeflags_MergeFlags3_1.xml +++ b/doc/generated/examples/mergeflags_MergeFlags3_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q ['-option', '-O1', '-whatever', '-O3'] ['/include', '/usr/local/include', '/usr/include', '/usr/opt/include'] scons: `.' is up to date. diff --git a/doc/generated/examples/misc_Exit_1.xml b/doc/generated/examples/misc_Exit_1.xml index 5a5e411..6af378f 100644 --- a/doc/generated/examples/misc_Exit_1.xml +++ b/doc/generated/examples/misc_Exit_1.xml @@ -1,4 +1,5 @@ -% scons -Q FUTURE=1 + +% scons -Q FUTURE=1 The FUTURE option is not supported yet! % scons -Q cc -o hello.o -c hello.c diff --git a/doc/generated/examples/misc_FindFile1a_1.xml b/doc/generated/examples/misc_FindFile1a_1.xml index efa6b7c..eca0328 100644 --- a/doc/generated/examples/misc_FindFile1a_1.xml +++ b/doc/generated/examples/misc_FindFile1a_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q None <class 'SCons.Node.FS.File'> exists scons: `.' is up to date. diff --git a/doc/generated/examples/misc_FindFile1b_1.xml b/doc/generated/examples/misc_FindFile1b_1.xml index 2ab6acb..4b194ce 100644 --- a/doc/generated/examples/misc_FindFile1b_1.xml +++ b/doc/generated/examples/misc_FindFile1b_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q nonesuch.h : None config.h : config.h private.h : src/include/private.h diff --git a/doc/generated/examples/misc_FindFile1d_1.xml b/doc/generated/examples/misc_FindFile1d_1.xml index 3312c42..5ab499f 100644 --- a/doc/generated/examples/misc_FindFile1d_1.xml +++ b/doc/generated/examples/misc_FindFile1d_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q sub1/multiple sub2/multiple sub3/multiple diff --git a/doc/generated/examples/misc_FindFile2_1.xml b/doc/generated/examples/misc_FindFile2_1.xml index 7302968..149c5d5 100644 --- a/doc/generated/examples/misc_FindFile2_1.xml +++ b/doc/generated/examples/misc_FindFile2_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q leaf derived cat > derived leaf diff --git a/doc/generated/examples/misc_FindFile2_2.xml b/doc/generated/examples/misc_FindFile2_2.xml index 7302968..149c5d5 100644 --- a/doc/generated/examples/misc_FindFile2_2.xml +++ b/doc/generated/examples/misc_FindFile2_2.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q leaf derived cat > derived leaf diff --git a/doc/generated/examples/misc_FindFile3_1.xml b/doc/generated/examples/misc_FindFile3_1.xml index 69cfacf..2c09fed 100644 --- a/doc/generated/examples/misc_FindFile3_1.xml +++ b/doc/generated/examples/misc_FindFile3_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q build/leaf scons: `.' is up to date. diff --git a/doc/generated/examples/misc_Flatten1_1.xml b/doc/generated/examples/misc_Flatten1_1.xml index db574ed..54720bb 100644 --- a/doc/generated/examples/misc_Flatten1_1.xml +++ b/doc/generated/examples/misc_Flatten1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o prog1.o -c prog1.c cc -o prog2.o -c -DFOO prog2.c cc -o prog1 prog1.o prog2.o diff --git a/doc/generated/examples/misc_Flatten2_1.xml b/doc/generated/examples/misc_Flatten2_1.xml index 06b99c3..66161ec 100644 --- a/doc/generated/examples/misc_Flatten2_1.xml +++ b/doc/generated/examples/misc_Flatten2_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q AttributeError: 'NodeList' object has no attribute 'abspath': File "/home/my/project/SConstruct", line 8: print(object_file.abspath) diff --git a/doc/generated/examples/nodes_GetBuildPath_1.xml b/doc/generated/examples/nodes_GetBuildPath_1.xml index 50543ab..376f65e 100644 --- a/doc/generated/examples/nodes_GetBuildPath_1.xml +++ b/doc/generated/examples/nodes_GetBuildPath_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q ['foo.c', 'sub/dir/value'] scons: `.' is up to date. diff --git a/doc/generated/examples/nodes_ex1_1.xml b/doc/generated/examples/nodes_ex1_1.xml index f05281f..e7eb8c4 100644 --- a/doc/generated/examples/nodes_ex1_1.xml +++ b/doc/generated/examples/nodes_ex1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o goodbye.o -c -DGOODBYE goodbye.c cc -o hello.o -c -DHELLO hello.c cc -o hello hello.o goodbye.o diff --git a/doc/generated/examples/nodes_ex1_2.xml b/doc/generated/examples/nodes_ex1_2.xml index 3648775..a1ed1fb 100644 --- a/doc/generated/examples/nodes_ex1_2.xml +++ b/doc/generated/examples/nodes_ex1_2.xml @@ -1,4 +1,5 @@ -C:\>scons -Q + +C:\>scons -Q cl /Fogoodbye.obj /c goodbye.c -DGOODBYE cl /Fohello.obj /c hello.c -DHELLO link /nologo /OUT:hello.exe hello.obj goodbye.obj diff --git a/doc/generated/examples/nodes_exists_1.xml b/doc/generated/examples/nodes_exists_1.xml index f9abc43..a290b1c 100644 --- a/doc/generated/examples/nodes_exists_1.xml +++ b/doc/generated/examples/nodes_exists_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q hello does not exist! cc -o hello.o -c hello.c cc -o hello hello.o diff --git a/doc/generated/examples/nodes_print_1.xml b/doc/generated/examples/nodes_print_1.xml index 0d07e97..11a3f45 100644 --- a/doc/generated/examples/nodes_print_1.xml +++ b/doc/generated/examples/nodes_print_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q The object file is: hello.o The program file is: hello cc -o hello.o -c hello.c diff --git a/doc/generated/examples/nodes_print_2.xml b/doc/generated/examples/nodes_print_2.xml index 3c66573..a62b522 100644 --- a/doc/generated/examples/nodes_print_2.xml +++ b/doc/generated/examples/nodes_print_2.xml @@ -1,4 +1,5 @@ -C:\>scons -Q + +C:\>scons -Q The object file is: hello.obj The program file is: hello.exe cl /Fohello.obj /c hello.c /nologo diff --git a/doc/generated/examples/output_Progress-TARGET_1.xml b/doc/generated/examples/output_Progress-TARGET_1.xml index 3408cdc..b233c6e 100644 --- a/doc/generated/examples/output_Progress-TARGET_1.xml +++ b/doc/generated/examples/output_Progress-TARGET_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q Evaluating SConstruct Evaluating f1.c Evaluating f1.o diff --git a/doc/generated/examples/output_ex1_1.xml b/doc/generated/examples/output_ex1_1.xml index bff25da..535960b 100644 --- a/doc/generated/examples/output_ex1_1.xml +++ b/doc/generated/examples/output_ex1_1.xml @@ -1,4 +1,5 @@ -% scons -h + +% scons -h scons: Reading SConscript files ... scons: done reading SConscript files. diff --git a/doc/generated/examples/output_ex2_1.xml b/doc/generated/examples/output_ex2_1.xml index 5d02707..e951c3a 100644 --- a/doc/generated/examples/output_ex2_1.xml +++ b/doc/generated/examples/output_ex2_1.xml @@ -1,4 +1,5 @@ -C:\>scons -h + +C:\>scons -h scons: Reading SConscript files ... scons: done reading SConscript files. diff --git a/doc/generated/examples/output_ex2_2.xml b/doc/generated/examples/output_ex2_2.xml index 5a25472..8dca6c3 100644 --- a/doc/generated/examples/output_ex2_2.xml +++ b/doc/generated/examples/output_ex2_2.xml @@ -1,4 +1,5 @@ -% scons -h + +% scons -h scons: Reading SConscript files ... scons: done reading SConscript files. diff --git a/doc/generated/examples/output_gbf2_1.xml b/doc/generated/examples/output_gbf2_1.xml index 267035e..c31b41a 100644 --- a/doc/generated/examples/output_gbf2_1.xml +++ b/doc/generated/examples/output_gbf2_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q scons: `.' is up to date. Build succeeded. % scons -Q fail=1 diff --git a/doc/generated/examples/parseflags_ex1_1.xml b/doc/generated/examples/parseflags_ex1_1.xml index bfa731f..d6e4d96 100644 --- a/doc/generated/examples/parseflags_ex1_1.xml +++ b/doc/generated/examples/parseflags_ex1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q CPPPATH ['/opt/include'] LIBPATH ['/opt/lib'] LIBS ['foo'] diff --git a/doc/generated/examples/parseflags_ex1_2.xml b/doc/generated/examples/parseflags_ex1_2.xml index d9f00a5..4c115d0 100644 --- a/doc/generated/examples/parseflags_ex1_2.xml +++ b/doc/generated/examples/parseflags_ex1_2.xml @@ -1,4 +1,5 @@ -C:\>scons -Q + +C:\>scons -Q CPPPATH ['/opt/include'] LIBPATH ['/opt/lib'] LIBS ['foo'] diff --git a/doc/generated/examples/parseflags_ex2_1.xml b/doc/generated/examples/parseflags_ex2_1.xml index 0a35925..da84ee3 100644 --- a/doc/generated/examples/parseflags_ex2_1.xml +++ b/doc/generated/examples/parseflags_ex2_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q CCFLAGS -whatever cc -o f1.o -c -whatever f1.c cc -o f1 f1.o diff --git a/doc/generated/examples/parseflags_ex3_1.xml b/doc/generated/examples/parseflags_ex3_1.xml index bfa731f..d6e4d96 100644 --- a/doc/generated/examples/parseflags_ex3_1.xml +++ b/doc/generated/examples/parseflags_ex3_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q CPPPATH ['/opt/include'] LIBPATH ['/opt/lib'] LIBS ['foo'] diff --git a/doc/generated/examples/parseflags_ex4_1.xml b/doc/generated/examples/parseflags_ex4_1.xml index bfa731f..d6e4d96 100644 --- a/doc/generated/examples/parseflags_ex4_1.xml +++ b/doc/generated/examples/parseflags_ex4_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q CPPPATH ['/opt/include'] LIBPATH ['/opt/lib'] LIBS ['foo'] diff --git a/doc/generated/examples/repositories_CPPPATH3_1.xml b/doc/generated/examples/repositories_CPPPATH3_1.xml index f983d96..d53ffdb 100644 --- a/doc/generated/examples/repositories_CPPPATH3_1.xml +++ b/doc/generated/examples/repositories_CPPPATH3_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o hello.o -c -Idir1 -I/r1/dir1 -I/r2/dir1 -Idir2 -I/r1/dir2 -I/r2/dir2 -Idir3 -I/r1/dir3 -I/r2/dir3 hello.c cc -o hello hello.o diff --git a/doc/generated/examples/repositories_CPPPATH_1.xml b/doc/generated/examples/repositories_CPPPATH_1.xml index 30b5d75..6c5a2d1 100644 --- a/doc/generated/examples/repositories_CPPPATH_1.xml +++ b/doc/generated/examples/repositories_CPPPATH_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o hello.o -c -I. -I/usr/repository1 hello.c cc -o hello hello.o diff --git a/doc/generated/examples/repositories_ex1_1.xml b/doc/generated/examples/repositories_ex1_1.xml index efc6d5a..a21fdc8 100644 --- a/doc/generated/examples/repositories_ex1_1.xml +++ b/doc/generated/examples/repositories_ex1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o hello.o -c hello.c cc -o hello hello.o diff --git a/doc/generated/examples/repositories_ex2_1.xml b/doc/generated/examples/repositories_ex2_1.xml index e773a8d..819c936 100644 --- a/doc/generated/examples/repositories_ex2_1.xml +++ b/doc/generated/examples/repositories_ex2_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o hello.o -c /usr/repository1/hello.c cc -o hello hello.o diff --git a/doc/generated/examples/repositories_ex3_1.xml b/doc/generated/examples/repositories_ex3_1.xml index c437bb7..76d69cd 100644 --- a/doc/generated/examples/repositories_ex3_1.xml +++ b/doc/generated/examples/repositories_ex3_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o hello.o -c /usr/repository2/hello.c cc -o hello hello.o diff --git a/doc/generated/examples/repositories_ex4_1.xml b/doc/generated/examples/repositories_ex4_1.xml index 47d9923..8911683 100644 --- a/doc/generated/examples/repositories_ex4_1.xml +++ b/doc/generated/examples/repositories_ex4_1.xml @@ -1,4 +1,5 @@ -% cd /usr/repository1 + +% cd /usr/repository1 % scons -Q cc -o file1.o -c file1.c cc -o file2.o -c file2.c diff --git a/doc/generated/examples/repositories_quote1_1.xml b/doc/generated/examples/repositories_quote1_1.xml index c503900..d2ba624 100644 --- a/doc/generated/examples/repositories_quote1_1.xml +++ b/doc/generated/examples/repositories_quote1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o hello.o -c -I. -I/usr/repository1 /usr/repository1/hello.c cc -o hello hello.o diff --git a/doc/generated/examples/separate_builddir_1.xml b/doc/generated/examples/separate_builddir_1.xml index 36d4383..a763172 100644 --- a/doc/generated/examples/separate_builddir_1.xml +++ b/doc/generated/examples/separate_builddir_1.xml @@ -1,4 +1,5 @@ -% ls src + +% ls src hello.c % scons -Q cc -o build/hello.o -c build/hello.c diff --git a/doc/generated/examples/separate_builddir_sconscript_1.xml b/doc/generated/examples/separate_builddir_sconscript_1.xml index d719829..5694a56 100644 --- a/doc/generated/examples/separate_builddir_sconscript_1.xml +++ b/doc/generated/examples/separate_builddir_sconscript_1.xml @@ -1,4 +1,5 @@ -% ls src + +% ls src SConscript hello.c % scons -Q cc -o build/hello.o -c build/hello.c diff --git a/doc/generated/examples/separate_duplicate0_1.xml b/doc/generated/examples/separate_duplicate0_1.xml index 3c8b642..207c5d7 100644 --- a/doc/generated/examples/separate_duplicate0_1.xml +++ b/doc/generated/examples/separate_duplicate0_1.xml @@ -1,4 +1,5 @@ -% ls src + +% ls src hello.c % scons -Q cc -o build/hello.o -c src/hello.c diff --git a/doc/generated/examples/separate_ex1_1.xml b/doc/generated/examples/separate_ex1_1.xml index d719829..5694a56 100644 --- a/doc/generated/examples/separate_ex1_1.xml +++ b/doc/generated/examples/separate_ex1_1.xml @@ -1,4 +1,5 @@ -% ls src + +% ls src SConscript hello.c % scons -Q cc -o build/hello.o -c build/hello.c diff --git a/doc/generated/examples/separate_glob_builddir_sconscript_1.xml b/doc/generated/examples/separate_glob_builddir_sconscript_1.xml index 4ff49d5..7cdb420 100644 --- a/doc/generated/examples/separate_glob_builddir_sconscript_1.xml +++ b/doc/generated/examples/separate_glob_builddir_sconscript_1.xml @@ -1,4 +1,5 @@ -% ls src + +% ls src SConscript f1.c f2.c f2.h % scons -Q cc -o build/f1.o -c build/f1.c diff --git a/doc/generated/examples/sideeffect_parallel_1.xml b/doc/generated/examples/sideeffect_parallel_1.xml index 0152803..9478c52 100644 --- a/doc/generated/examples/sideeffect_parallel_1.xml +++ b/doc/generated/examples/sideeffect_parallel_1.xml @@ -1,4 +1,5 @@ -% scons -Q --jobs=2 + +% scons -Q --jobs=2 echo > file1.out data1 echo > file2.out data2 diff --git a/doc/generated/examples/sideeffect_shared_1.xml b/doc/generated/examples/sideeffect_shared_1.xml index 355578a..2abb806 100644 --- a/doc/generated/examples/sideeffect_shared_1.xml +++ b/doc/generated/examples/sideeffect_shared_1.xml @@ -1,4 +1,5 @@ -% scons -Q --jobs=2 + +% scons -Q --jobs=2 ./build --log logfile.txt file1.in file1.out ./build --log logfile.txt file2.in file2.out diff --git a/doc/generated/examples/sideeffect_simple_1.xml b/doc/generated/examples/sideeffect_simple_1.xml index ed97594..e88630c 100644 --- a/doc/generated/examples/sideeffect_simple_1.xml +++ b/doc/generated/examples/sideeffect_simple_1.xml @@ -1,4 +1,5 @@ -% scons -Q --jobs=2 + +% scons -Q --jobs=2 File "/home/my/project/SConstruct", line 4 'echo >$TARGET data1; echo >log updated file1')) diff --git a/doc/generated/examples/simple_Object_1.xml b/doc/generated/examples/simple_Object_1.xml index 0dfb85a..6d5c80d 100644 --- a/doc/generated/examples/simple_Object_1.xml +++ b/doc/generated/examples/simple_Object_1.xml @@ -1,4 +1,5 @@ -% scons + +% scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... diff --git a/doc/generated/examples/simple_Object_2.xml b/doc/generated/examples/simple_Object_2.xml index b7dea0c..3686006 100644 --- a/doc/generated/examples/simple_Object_2.xml +++ b/doc/generated/examples/simple_Object_2.xml @@ -1,4 +1,5 @@ -C:\>scons + +C:\>scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... diff --git a/doc/generated/examples/simple_clean_1.xml b/doc/generated/examples/simple_clean_1.xml index c15ec25..21adbe7 100644 --- a/doc/generated/examples/simple_clean_1.xml +++ b/doc/generated/examples/simple_clean_1.xml @@ -1,4 +1,5 @@ -% scons + +% scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... diff --git a/doc/generated/examples/simple_clean_2.xml b/doc/generated/examples/simple_clean_2.xml index 7e3d564..26f3c37 100644 --- a/doc/generated/examples/simple_clean_2.xml +++ b/doc/generated/examples/simple_clean_2.xml @@ -1,4 +1,5 @@ -C:\>scons + +C:\>scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... diff --git a/doc/generated/examples/simple_declarative_1.xml b/doc/generated/examples/simple_declarative_1.xml index da29097..01061cf 100644 --- a/doc/generated/examples/simple_declarative_1.xml +++ b/doc/generated/examples/simple_declarative_1.xml @@ -1,4 +1,5 @@ -% scons + +% scons scons: Reading SConscript files ... Calling Program('hello.c') Calling Program('goodbye.c') diff --git a/doc/generated/examples/simple_ex1_1.xml b/doc/generated/examples/simple_ex1_1.xml index f645a2a..5833ede 100644 --- a/doc/generated/examples/simple_ex1_1.xml +++ b/doc/generated/examples/simple_ex1_1.xml @@ -1,4 +1,5 @@ -% scons + +% scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... diff --git a/doc/generated/examples/simple_ex1_2.xml b/doc/generated/examples/simple_ex1_2.xml index 518b437..f0e07a1 100644 --- a/doc/generated/examples/simple_ex1_2.xml +++ b/doc/generated/examples/simple_ex1_2.xml @@ -1,4 +1,5 @@ -C:\>scons + +C:\>scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... diff --git a/doc/generated/examples/simple_ex1_3.xml b/doc/generated/examples/simple_ex1_3.xml index 518b437..f0e07a1 100644 --- a/doc/generated/examples/simple_ex1_3.xml +++ b/doc/generated/examples/simple_ex1_3.xml @@ -1,4 +1,5 @@ -C:\>scons + +C:\>scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... diff --git a/doc/generated/examples/simple_ex1_4.xml b/doc/generated/examples/simple_ex1_4.xml index eb10a06..80c7b63 100644 --- a/doc/generated/examples/simple_ex1_4.xml +++ b/doc/generated/examples/simple_ex1_4.xml @@ -1,4 +1,5 @@ -C:\>scons -Q + +C:\>scons -Q cl /Fohello.obj /c hello.c /nologo link /nologo /OUT:hello.exe hello.obj embedManifestExeCheck(target, source, env) diff --git a/doc/generated/examples/simple_java_1.xml b/doc/generated/examples/simple_java_1.xml index decf1b5..75cc6cc 100644 --- a/doc/generated/examples/simple_java_1.xml +++ b/doc/generated/examples/simple_java_1.xml @@ -1,4 +1,5 @@ -% scons + +% scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... diff --git a/doc/generated/examples/sourcecode_bitkeeper_1.xml b/doc/generated/examples/sourcecode_bitkeeper_1.xml index 6ff49fb..41af3a2 100644 --- a/doc/generated/examples/sourcecode_bitkeeper_1.xml +++ b/doc/generated/examples/sourcecode_bitkeeper_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q AttributeError: 'SConsEnvironment' object has no attribute 'BitKeeper': File "/home/my/project/SConstruct", line 2: env.SourceCode('.', env.BitKeeper()) diff --git a/doc/generated/examples/sourcecode_cvs_1.xml b/doc/generated/examples/sourcecode_cvs_1.xml index f813346..01ddb6b 100644 --- a/doc/generated/examples/sourcecode_cvs_1.xml +++ b/doc/generated/examples/sourcecode_cvs_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q AttributeError: 'SConsEnvironment' object has no attribute 'CVS': File "/home/my/project/SConstruct", line 2: env.SourceCode('.', env.CVS('/usr/local/CVS')) diff --git a/doc/generated/examples/sourcecode_rcs_1.xml b/doc/generated/examples/sourcecode_rcs_1.xml index 0a84b0a..e6b36dd 100644 --- a/doc/generated/examples/sourcecode_rcs_1.xml +++ b/doc/generated/examples/sourcecode_rcs_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q AttributeError: 'SConsEnvironment' object has no attribute 'RCS': File "/home/my/project/SConstruct", line 2: env.SourceCode('.', env.RCS()) diff --git a/doc/generated/examples/sourcecode_sccs_1.xml b/doc/generated/examples/sourcecode_sccs_1.xml index a1bad0d..e0699d1 100644 --- a/doc/generated/examples/sourcecode_sccs_1.xml +++ b/doc/generated/examples/sourcecode_sccs_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q AttributeError: 'SConsEnvironment' object has no attribute 'SCCS': File "/home/my/project/SConstruct", line 2: env.SourceCode('.', env.SCCS()) diff --git a/doc/generated/examples/tasks_ex1_1.xml b/doc/generated/examples/tasks_ex1_1.xml index 0bbbae1..4885fde 100644 --- a/doc/generated/examples/tasks_ex1_1.xml +++ b/doc/generated/examples/tasks_ex1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cat < test.bar > test.h cc -o app main.cpp cat < foo.bar2 > foo.cpp diff --git a/doc/generated/examples/troubleshoot_Dump_1.xml b/doc/generated/examples/troubleshoot_Dump_1.xml index 513babe..1f6f250 100644 --- a/doc/generated/examples/troubleshoot_Dump_1.xml +++ b/doc/generated/examples/troubleshoot_Dump_1.xml @@ -1,8 +1,7 @@ -% scons + +% scons scons: Reading SConscript files ... -{ 'BUILDERS': { '_InternalInstall': <function InstallBuilderWrapper at 0x700000>, - '_InternalInstallAs': <function InstallAsBuilderWrapper at 0x700000>, - '_InternalInstallVersionedLib': <function InstallVersionedBuilderWrapper at 0x700000>}, +{ 'BUILDERS': {'_InternalInstall': <function InstallBuilderWrapper at 0x700000>, '_InternalInstallVersionedLib': <function InstallVersionedBuilderWrapper at 0x700000>, '_InternalInstallAs': <function InstallAsBuilderWrapper at 0x700000>}, 'CONFIGUREDIR': '#/.sconf_temp', 'CONFIGURELOG': '#/config.log', 'CPPSUFFIXES': [ '.c', @@ -28,7 +27,7 @@ scons: Reading SConscript files ... 'DSUFFIXES': ['.d'], 'Dir': <SCons.Defaults.Variable_Method_Caller object at 0x700000>, 'Dirs': <SCons.Defaults.Variable_Method_Caller object at 0x700000>, - 'ENV': {'PATH': '/usr/local/bin:/opt/bin:/bin:/usr/bin'}, + 'ENV': { 'PATH': '/usr/local/bin:/opt/bin:/bin:/usr/bin'}, 'ESCAPE': <function escape at 0x700000>, 'File': <SCons.Defaults.Variable_Method_Caller object at 0x700000>, 'HOST_ARCH': None, @@ -61,12 +60,9 @@ scons: Reading SConscript files ... 'TEMPFILEARGJOIN': ' ', 'TEMPFILEPREFIX': '@', 'TOOLS': ['install', 'install'], - '_CPPDEFFLAGS': '${_defines(CPPDEFPREFIX, CPPDEFINES, CPPDEFSUFFIX, ' - '__env__)}', - '_CPPINCFLAGS': '$( ${_concat(INCPREFIX, CPPPATH, INCSUFFIX, __env__, RDirs, ' - 'TARGET, SOURCE)} $)', - '_LIBDIRFLAGS': '$( ${_concat(LIBDIRPREFIX, LIBPATH, LIBDIRSUFFIX, __env__, ' - 'RDirs, TARGET, SOURCE)} $)', + '_CPPDEFFLAGS': '${_defines(CPPDEFPREFIX, CPPDEFINES, CPPDEFSUFFIX, __env__)}', + '_CPPINCFLAGS': '$( ${_concat(INCPREFIX, CPPPATH, INCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)', + '_LIBDIRFLAGS': '$( ${_concat(LIBDIRPREFIX, LIBPATH, LIBDIRSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)', '_LIBFLAGS': '${_concat(LIBLINKPREFIX, LIBS, LIBLINKSUFFIX, __env__)}', '__DRPATH': '$_DRPATH', '__DSHLIBVERSIONFLAGS': '${__libversionflags(__env__,"DSHLIBVERSION","_DSHLIBVERSIONFLAGS")}', diff --git a/doc/generated/examples/troubleshoot_Dump_2.xml b/doc/generated/examples/troubleshoot_Dump_2.xml index 39cf4f6..4b8aa0b 100644 --- a/doc/generated/examples/troubleshoot_Dump_2.xml +++ b/doc/generated/examples/troubleshoot_Dump_2.xml @@ -1,18 +1,11 @@ -C:\>scons + +C:\>scons scons: Reading SConscript files ... -{ 'BUILDERS': { 'Object': <SCons.Builder.CompositeBuilder object at 0x700000>, - 'PCH': <SCons.Builder.BuilderBase object at 0x700000>, - 'RES': <SCons.Builder.BuilderBase object at 0x700000>, - 'SharedObject': <SCons.Builder.CompositeBuilder object at 0x700000>, - 'StaticObject': <SCons.Builder.CompositeBuilder object at 0x700000>, - '_InternalInstall': <function InstallBuilderWrapper at 0x700000>, - '_InternalInstallAs': <function InstallAsBuilderWrapper at 0x700000>, - '_InternalInstallVersionedLib': <function InstallVersionedBuilderWrapper at 0x700000>}, +{ 'BUILDERS': {'_InternalInstallVersionedLib': <function InstallVersionedBuilderWrapper at 0x700000>, '_InternalInstall': <function InstallBuilderWrapper at 0x700000>, 'Object': <SCons.Builder.CompositeBuilder object at 0x700000>, 'PCH': <SCons.Builder.BuilderBase object at 0x700000>, 'RES': <SCons.Builder.BuilderBase object at 0x700000>, 'SharedObject': <SCons.Builder.CompositeBuilder object at 0x700000>, 'StaticObject': <SCons.Builder.CompositeBuilder object at 0x700000>, '_InternalInstallAs': <function InstallAsBuilderWrapper at 0x700000>}, 'CC': 'cl', 'CCCOM': <SCons.Action.FunctionAction object at 0x700000>, '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': [], @@ -41,8 +34,7 @@ scons: Reading SConscript files ... '.SPP', '.sx'], 'CXX': '$CC', - 'CXXCOM': '${TEMPFILE("$CXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CXXFLAGS ' - '$CCFLAGS $_CCCOMCOM","$CXXCOMSTR")}', + 'CXXCOM': '${TEMPFILE("$CXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CXXFLAGS $CCFLAGS $_CCCOMCOM","$CXXCOMSTR")}', 'CXXFILESUFFIX': '.cc', 'CXXFLAGS': ['$(', '/TP', '$)'], 'DSUFFIXES': ['.d'], @@ -69,9 +61,7 @@ scons: Reading SConscript files ... 'MSVC_SETUP_RUN': True, 'OBJPREFIX': '', 'OBJSUFFIX': '.obj', - 'PCHCOM': '$CXX /Fo${TARGETS[1]} $CXXFLAGS $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS ' - '$_CPPINCFLAGS /c $SOURCES /Yc$PCHSTOP /Fp${TARGETS[0]} ' - '$CCPDBFLAGS $PCHPDBFLAGS', + 'PCHCOM': '$CXX /Fo${TARGETS[1]} $CXXFLAGS $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS /c $SOURCES /Yc$PCHSTOP /Fp${TARGETS[0]} $CCPDBFLAGS $PCHPDBFLAGS', 'PCHPDBFLAGS': ['${(PDB and "/Yd") or ""}'], 'PLATFORM': 'win32', 'PROGPREFIX': '', @@ -88,8 +78,7 @@ scons: Reading SConscript files ... 'SHCCFLAGS': ['$CCFLAGS'], 'SHCFLAGS': ['$CFLAGS'], 'SHCXX': '$CXX', - 'SHCXXCOM': '${TEMPFILE("$SHCXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES ' - '$SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM","$SHCXXCOMSTR")}', + 'SHCXXCOM': '${TEMPFILE("$SHCXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM","$SHCXXCOMSTR")}', 'SHCXXFLAGS': ['$CXXFLAGS'], 'SHELL': None, 'SHLIBPREFIX': '', @@ -105,12 +94,9 @@ scons: Reading SConscript files ... 'TEMPFILEPREFIX': '@', 'TOOLS': ['msvc', 'install', 'install'], '_CCCOMCOM': '$CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS $CCPCHFLAGS $CCPDBFLAGS', - '_CPPDEFFLAGS': '${_defines(CPPDEFPREFIX, CPPDEFINES, CPPDEFSUFFIX, ' - '__env__)}', - '_CPPINCFLAGS': '$( ${_concat(INCPREFIX, CPPPATH, INCSUFFIX, __env__, RDirs, ' - 'TARGET, SOURCE)} $)', - '_LIBDIRFLAGS': '$( ${_concat(LIBDIRPREFIX, LIBPATH, LIBDIRSUFFIX, __env__, ' - 'RDirs, TARGET, SOURCE)} $)', + '_CPPDEFFLAGS': '${_defines(CPPDEFPREFIX, CPPDEFINES, CPPDEFSUFFIX, __env__)}', + '_CPPINCFLAGS': '$( ${_concat(INCPREFIX, CPPPATH, INCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)', + '_LIBDIRFLAGS': '$( ${_concat(LIBDIRPREFIX, LIBPATH, LIBDIRSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)', '_LIBFLAGS': '${_concat(LIBLINKPREFIX, LIBS, LIBLINKSUFFIX, __env__)}', '_MSVC_OUTPUT_FLAG': <function msvc_output_flag at 0x700000>, '__DSHLIBVERSIONFLAGS': '${__libversionflags(__env__,"DSHLIBVERSION","_DSHLIBVERSIONFLAGS")}', diff --git a/doc/generated/examples/troubleshoot_Dump_ENV_1.xml b/doc/generated/examples/troubleshoot_Dump_ENV_1.xml index 7ed4d86..786491f 100644 --- a/doc/generated/examples/troubleshoot_Dump_ENV_1.xml +++ b/doc/generated/examples/troubleshoot_Dump_ENV_1.xml @@ -1,6 +1,7 @@ -% scons + +% scons scons: Reading SConscript files ... -{'PATH': '/usr/local/bin:/opt/bin:/bin:/usr/bin'} +{ 'PATH': '/usr/local/bin:/opt/bin:/bin:/usr/bin'} scons: done reading SConscript files. scons: Building targets ... scons: `.' is up to date. diff --git a/doc/generated/examples/troubleshoot_Dump_ENV_2.xml b/doc/generated/examples/troubleshoot_Dump_ENV_2.xml index e421f6a..b91c31c 100644 --- a/doc/generated/examples/troubleshoot_Dump_ENV_2.xml +++ b/doc/generated/examples/troubleshoot_Dump_ENV_2.xml @@ -1,4 +1,5 @@ -C:\>scons + +C:\>scons scons: Reading SConscript files ... { 'PATH': 'C:\\WINDOWS\\System32:/usr/bin', 'PATHEXT': '.COM;.EXE;.BAT;.CMD', diff --git a/doc/generated/examples/troubleshoot_explain1_1.xml b/doc/generated/examples/troubleshoot_explain1_1.xml index c73e5ac..2a9547d 100644 --- a/doc/generated/examples/troubleshoot_explain1_1.xml +++ b/doc/generated/examples/troubleshoot_explain1_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cp file.in file.oout % scons -Q cp file.in file.oout diff --git a/doc/generated/examples/troubleshoot_explain1_2.xml b/doc/generated/examples/troubleshoot_explain1_2.xml index 77eb88b..9864cd7 100644 --- a/doc/generated/examples/troubleshoot_explain1_2.xml +++ b/doc/generated/examples/troubleshoot_explain1_2.xml @@ -1,4 +1,5 @@ -% scons -Q --debug=explain + +% scons -Q --debug=explain scons: building `file.out' because it doesn't exist cp file.in file.oout diff --git a/doc/generated/examples/troubleshoot_explain1_3.xml b/doc/generated/examples/troubleshoot_explain1_3.xml index 4e7d5f8..ebc13f8 100644 --- a/doc/generated/examples/troubleshoot_explain1_3.xml +++ b/doc/generated/examples/troubleshoot_explain1_3.xml @@ -1,6 +1,7 @@ -% scons -Q --warn=target-not-built + +% scons -Q --warn=target-not-built cp file.in file.oout scons: warning: Cannot find target file.out after building -File "/Users/bdbaddog/devel/scons/git/scons/src/script/scons.py", line 204, in <module> +File "/home/bdeegan/devel/scons/git/as_scons/src/script/scons.py", line 204, in <module> diff --git a/doc/generated/examples/troubleshoot_explain2_1.xml b/doc/generated/examples/troubleshoot_explain2_1.xml index 80fefda..cd95a44 100644 --- a/doc/generated/examples/troubleshoot_explain2_1.xml +++ b/doc/generated/examples/troubleshoot_explain2_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o file1.o -c file1.c cc -o file2.o -c file2.c cc -o file3.o -c file3.c diff --git a/doc/generated/examples/troubleshoot_explain3_1.xml b/doc/generated/examples/troubleshoot_explain3_1.xml index 4fde5ac..bacb7e8 100644 --- a/doc/generated/examples/troubleshoot_explain3_1.xml +++ b/doc/generated/examples/troubleshoot_explain3_1.xml @@ -1,4 +1,5 @@ -% scons -Q + +% scons -Q cc -o file1.o -c -I. file1.c cc -o file2.o -c -I. file2.c cc -o file3.o -c -I. file3.c diff --git a/doc/generated/examples/troubleshoot_findlibs_1.xml b/doc/generated/examples/troubleshoot_findlibs_1.xml index 9fddc2b..8fc4e5f 100644 --- a/doc/generated/examples/troubleshoot_findlibs_1.xml +++ b/doc/generated/examples/troubleshoot_findlibs_1.xml @@ -1,4 +1,5 @@ -% scons -Q --debug=findlibs + +% scons -Q --debug=findlibs findlibs: looking for 'libfoo.a' in 'libs1' ... findlibs: ... FOUND 'libfoo.a' in 'libs1' findlibs: looking for 'libfoo.so' in 'libs1' ... diff --git a/doc/generated/examples/troubleshoot_stacktrace_1.xml b/doc/generated/examples/troubleshoot_stacktrace_1.xml index 464eca5..cc3ca7b 100644 --- a/doc/generated/examples/troubleshoot_stacktrace_1.xml +++ b/doc/generated/examples/troubleshoot_stacktrace_1.xml @@ -1,3 +1,4 @@ -% scons -Q + +% scons -Q scons: *** [prog.o] Source `prog.c' not found, needed by target `prog.o'. diff --git a/doc/generated/examples/troubleshoot_stacktrace_2.xml b/doc/generated/examples/troubleshoot_stacktrace_2.xml index a1f4872..70a429d 100644 --- a/doc/generated/examples/troubleshoot_stacktrace_2.xml +++ b/doc/generated/examples/troubleshoot_stacktrace_2.xml @@ -1,4 +1,5 @@ -% scons -Q --debug=stacktrace + +% scons -Q --debug=stacktrace scons: *** [prog.o] Source `prog.c' not found, needed by target `prog.o'. scons: internal stack trace: File "bootstrap/src/engine/SCons/Job.py", line 199, in start diff --git a/doc/generated/examples/troubleshoot_taskmastertrace_1.xml b/doc/generated/examples/troubleshoot_taskmastertrace_1.xml index cfa2c8b..578951d 100644 --- a/doc/generated/examples/troubleshoot_taskmastertrace_1.xml +++ b/doc/generated/examples/troubleshoot_taskmastertrace_1.xml @@ -1,4 +1,5 @@ -% scons -Q --taskmastertrace=- prog + +% scons -Q --taskmastertrace=- prog Taskmaster: Looking for a node to evaluate Taskmaster: Considering node <no_state 0 'prog'> and its children: diff --git a/doc/generated/examples/troubleshoot_tree1_1.xml b/doc/generated/examples/troubleshoot_tree1_1.xml index 0f3c3c8..4ccadc6 100644 --- a/doc/generated/examples/troubleshoot_tree1_1.xml +++ b/doc/generated/examples/troubleshoot_tree1_1.xml @@ -1,4 +1,5 @@ -% scons -Q --tree=all + +% scons -Q --tree=all cc -o f1.o -c -I. f1.c cc -o f2.o -c -I. f2.c cc -o f3.o -c -I. f3.c diff --git a/doc/generated/examples/troubleshoot_tree1_2.xml b/doc/generated/examples/troubleshoot_tree1_2.xml index 7f3789f..0bd4874 100644 --- a/doc/generated/examples/troubleshoot_tree1_2.xml +++ b/doc/generated/examples/troubleshoot_tree1_2.xml @@ -1,4 +1,5 @@ -% scons -Q --tree=all f2.o + +% scons -Q --tree=all f2.o cc -o f2.o -c -I. f2.c +-f2.o +-f2.c diff --git a/doc/generated/examples/troubleshoot_tree1_3.xml b/doc/generated/examples/troubleshoot_tree1_3.xml index bc0dbac..75fa841 100644 --- a/doc/generated/examples/troubleshoot_tree1_3.xml +++ b/doc/generated/examples/troubleshoot_tree1_3.xml @@ -1,4 +1,5 @@ -% scons -Q --tree=all f1.o f3.o + +% scons -Q --tree=all f1.o f3.o cc -o f1.o -c -I. f1.c +-f1.o +-f1.c diff --git a/doc/generated/examples/troubleshoot_tree1_4.xml b/doc/generated/examples/troubleshoot_tree1_4.xml index 687b1ba..409bce9 100644 --- a/doc/generated/examples/troubleshoot_tree1_4.xml +++ b/doc/generated/examples/troubleshoot_tree1_4.xml @@ -1,4 +1,5 @@ -% scons -Q --tree=status + +% scons -Q --tree=status cc -o f1.o -c -I. f1.c cc -o f2.o -c -I. f2.c cc -o f3.o -c -I. f3.c diff --git a/doc/generated/examples/troubleshoot_tree1_5.xml b/doc/generated/examples/troubleshoot_tree1_5.xml index 00b05ac..b852ab0 100644 --- a/doc/generated/examples/troubleshoot_tree1_5.xml +++ b/doc/generated/examples/troubleshoot_tree1_5.xml @@ -1,4 +1,5 @@ -% scons -Q --tree=derived + +% scons -Q --tree=derived cc -o f1.o -c -I. f1.c cc -o f2.o -c -I. f2.c cc -o f3.o -c -I. f3.c diff --git a/doc/generated/examples/troubleshoot_tree1_6.xml b/doc/generated/examples/troubleshoot_tree1_6.xml index 2b16556..a0d42d7 100644 --- a/doc/generated/examples/troubleshoot_tree1_6.xml +++ b/doc/generated/examples/troubleshoot_tree1_6.xml @@ -1,4 +1,5 @@ -% scons -Q --tree=derived,status + +% scons -Q --tree=derived,status cc -o f1.o -c -I. f1.c cc -o f2.o -c -I. f2.c cc -o f3.o -c -I. f3.c diff --git a/doc/generated/examples/troubleshoot_tree2_1.xml b/doc/generated/examples/troubleshoot_tree2_1.xml index e7e2d5d..85febf5 100644 --- a/doc/generated/examples/troubleshoot_tree2_1.xml +++ b/doc/generated/examples/troubleshoot_tree2_1.xml @@ -1,4 +1,5 @@ -% scons -Q --tree=all + +% scons -Q --tree=all cc -o f1.o -c -I. f1.c cc -o f2.o -c -I. f2.c cc -o f3.o -c -I. f3.c diff --git a/doc/generated/examples/troubleshoot_tree2_2.xml b/doc/generated/examples/troubleshoot_tree2_2.xml index c2f0e64..5380fad 100644 --- a/doc/generated/examples/troubleshoot_tree2_2.xml +++ b/doc/generated/examples/troubleshoot_tree2_2.xml @@ -1,4 +1,5 @@ -% scons -Q --tree=prune + +% scons -Q --tree=prune cc -o f1.o -c -I. f1.c cc -o f2.o -c -I. f2.c cc -o f3.o -c -I. f3.c diff --git a/doc/generated/examples/variants_ex_1.xml b/doc/generated/examples/variants_ex_1.xml index b51655c..12a14d6 100644 --- a/doc/generated/examples/variants_ex_1.xml +++ b/doc/generated/examples/variants_ex_1.xml @@ -1,4 +1,5 @@ -% scons -Q OS=linux + +% scons -Q OS=linux Install file: "build/linux/world/world.h" as "export/linux/include/world.h" cc -o build/linux/hello/hello.o -c -Iexport/linux/include build/linux/hello/hello.c cc -o build/linux/world/world.o -c -Iexport/linux/include build/linux/world/world.c diff --git a/doc/generated/examples/variants_ex_2.xml b/doc/generated/examples/variants_ex_2.xml index 22385e3..c129cc4 100644 --- a/doc/generated/examples/variants_ex_2.xml +++ b/doc/generated/examples/variants_ex_2.xml @@ -1,4 +1,5 @@ -C:\>scons -Q OS=windows + +C:\>scons -Q OS=windows Install file: "build/windows/world/world.h" as "export/windows/include/world.h" cl /Fobuild\windows\hello\hello.obj /c build\windows\hello\hello.c /nologo /Iexport\windows\include cl /Fobuild\windows\world\world.obj /c build\windows\world\world.c /nologo /Iexport\windows\include diff --git a/doc/generated/functions.gen b/doc/generated/functions.gen index 28160ba..d71387e 100644 --- a/doc/generated/functions.gen +++ b/doc/generated/functions.gen @@ -1,3 +1,4 @@ + %scons; @@ -11,7 +12,7 @@ %variables-mod; ]> - + Action(action, [cmd/str/fun, [var, ...]] [option=value, ...]) @@ -19,7 +20,8 @@ env.Action(action, [cmd/str/fun, [var, ...]] [option=value, ...]) - + + Creates an Action object for the specified action. @@ -27,7 +29,7 @@ See the manpage section "Action Objects" for a complete explanation of the arguments and behavior. - + Note that the env.Action() form of the invocation will expand @@ -54,7 +56,8 @@ until the Action object is actually used. env.AddMethod(function, [name]) - + + When called with the AddMethod() form, @@ -83,11 +86,11 @@ specified itself is used for the method name. - + Examples: - + # 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 @@ -113,24 +116,25 @@ env.other_method_name('another arg') AddOption(arguments) - + + This function adds a new command-line option to be recognized. The specified arguments -are the same as supported by the standard Python -optparse.add_option() -method (with a few additional capabilities noted below); +are the same as supported by the add_option +method in the standard Python library module optparse, +with a few additional capabilities noted below; see the documentation for -optparse +optparse for a thorough discussion of its option-processing capabities. - + In addition to the arguments and values supported by the optparse.add_option() method, the SCons -AddOption +AddOption function allows you to set the nargs keyword value to @@ -142,7 +146,7 @@ argument. When nargs = '?' is passed to the -AddOption +AddOption function, the const keyword argument @@ -152,36 +156,49 @@ option is specified on the command line without an explicit argument. - + If no default= keyword argument is supplied when calling -AddOption, +AddOption, the option will have a default value of None. - + +Unlike regular optparse, option names +added via AddOption must be matched +exactly, the automatic matching of abbreviations on the +command line for long options is not supported. +To allow specific abbreviations, +include them in the AddOption call. + + + Once a new command-line option has been added with -AddOption, +AddOption, the option value may be accessed using -GetOption +GetOption or env.GetOption(). + +SetOption is not currently supported for +options added with AddOption. - + Any specified help= strings for the new option(s) @@ -193,22 +210,22 @@ options (the latter only if no other help text is specified in the SConscript files). The help text for the local options specified by -AddOption +AddOption will appear below the SCons options themselves, under a separate Local Options heading. The options will appear in the help text in the order in which the -AddOption +AddOption calls occur. - + Example: - + AddOption('--prefix', dest='prefix', nargs=1, type='string', @@ -221,11 +238,12 @@ env = Environment(PREFIX = GetOption('prefix')) While AddOption behaves like -optparse.add_option, +add_option, +from the optparse module, the behavior of options added by AddOption which take arguments is underfined in scons if whitespace -(rather than = sign) is used as +(rather than an = sign) is used as the separator on the command line when the option is invoked. Such usage should be avoided. @@ -241,7 +259,8 @@ Such usage should be avoided. env.AddPostAction(target, action) - + + Arranges for the specified action to be performed @@ -255,7 +274,7 @@ See the manpage section "Action Objects" for a complete explanation. - + When multiple targets are supplied, the action may be called multiple times, once after each action that generates @@ -270,7 +289,8 @@ one or more targets in the list. env.AddPreAction(target, action) - + + Arranges for the specified action to be performed @@ -284,14 +304,14 @@ See the manpage section "Action Objects" for a complete explanation. - + 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 @@ -302,16 +322,16 @@ from a specified source file via an intermediate object file: - + foo = Program('foo.c') AddPreAction(foo, 'pre_action') - + The specified pre_action would be executed before -scons +scons calls the link command that actually generates the executable program binary foo, @@ -328,7 +348,8 @@ file into an object file. env.Alias(alias, [targets, [action]]) - + + Creates one or more phony targets that expand to one or more other targets. An optional @@ -342,17 +363,17 @@ 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. -Alias +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: - + Alias('install') Alias('install', '/usr/bin') Alias(['install', 'install-lib'], '/usr/local/lib') @@ -368,7 +389,8 @@ env.Alias('update', ['file1', 'file2'], "update_database $SOURCES") AllowSubstExceptions([exception, ...]) - + + Specifies the exceptions that will be allowed when expanding construction variables. By default, @@ -384,19 +406,19 @@ will generate an error message and terminate processing. - + If -AllowSubstExceptions +AllowSubstExceptions is called multiple times, each call completely overwrites the previous list of allowed exceptions. - + 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.) @@ -415,13 +437,14 @@ AllowSubstExceptions(IndexError, NameError, ZeroDivisionError) env.AlwaysBuild(target, ...) - + + Marks each given target so that it is always assumed to be out of date, and will always be rebuilt if needed. Note, however, that -AlwaysBuild +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, @@ -430,7 +453,7 @@ they will always be built if so specified. Multiple targets can be passed in to a single call to -AlwaysBuild. +AlwaysBuild. @@ -438,7 +461,8 @@ Multiple targets can be passed in to a single call to env.Append(key=val, [...]) - + + Appends the specified keyword arguments to the end of construction variables in the environment. If the Environment does not have @@ -454,11 +478,11 @@ and the lists are added together. (See also the Prepend method). - + Example: - + env.Append(CCFLAGS = ' -g', FOO = ['foo.yyy']) @@ -467,7 +491,8 @@ env.Append(CCFLAGS = ' -g', FOO = ['foo.yyy']) env.AppendENVPath(name, newpath, [envname, sep, delete_existing]) - + + This appends new path elements to the given path in the specified external environment (ENV @@ -485,18 +510,18 @@ 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 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: - + print 'before:',env['ENV']['INCLUDE'] include_path = '/foo/bar:/foo' env.AppendENVPath('INCLUDE', include_path) @@ -512,7 +537,8 @@ after: /biz:/foo/bar:/foo 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 @@ -528,38 +554,15 @@ existing matching values are removed first, so existing values in the arg list move to the end of the list. - + Example: - + env.AppendUnique(CCFLAGS = '-g', FOO = ['foo.yyy']) - - - BuildDir(build_dir, src_dir, [duplicate]) - - - env.BuildDir(build_dir, src_dir, [duplicate]) - - -Deprecated synonyms for -VariantDir -and -env.VariantDir(). -The -build_dir -argument becomes the -variant_dir -argument of -VariantDir -or -env.VariantDir(). - - - Builder(action, [arguments]) @@ -567,7 +570,8 @@ or env.Builder(action, [arguments]) - + + Creates a Builder object for the specified action. @@ -575,7 +579,7 @@ See the manpage section "Builder Objects" for a complete explanation of the arguments and behavior. - + Note that the env.Builder() form of the invocation will expand @@ -590,7 +594,7 @@ construction environment through which env.Builder() was called. The -Builder +Builder form delays all variable expansion until after the Builder object is actually called. @@ -603,14 +607,15 @@ until after the Builder object is actually called. env.CacheDir(cache_dir) - + + Specifies that -scons +scons will maintain a cache of derived files in cache_dir. The derived files in the cache will be shared among all the builds using the same -CacheDir +CacheDir call. Specifying a cache_dir @@ -619,13 +624,13 @@ of disables derived file caching. - + Calling env.CacheDir() will only affect targets built through the specified construction environment. Calling -CacheDir +CacheDir sets a global default that will be used by all targets built through construction environments @@ -636,21 +641,21 @@ have an specified. - + When a CacheDir() is being used and -scons +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 +scons will retrieve the file from the cache. If the derived file is not present in the cache, -scons +scons will rebuild it and then place a copy of the built file in the cache (identified by its MD5 build signature), @@ -659,20 +664,20 @@ builds that need to build the same derived file from identical inputs. - + Use of a specified -CacheDir +CacheDir may be disabled for any invocation by using the option. - + If the option is used, -scons +scons will place a copy of all derived files in the cache, @@ -680,17 +685,17 @@ even if they already existed and were not built by this invocation. This is useful to populate a cache the first time -CacheDir +CacheDir is added to a build, or after using the option. - + When using -CacheDir, -scons +CacheDir, +scons will report, "Retrieved `file' from cache," unless the @@ -699,7 +704,7 @@ option is being used. When the option is used, -scons +scons will print the action that would have been used to build the file, @@ -711,9 +716,9 @@ a given derived file has been built in-place or retrieved from the cache. - + The -NoCache +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. @@ -727,7 +732,8 @@ predict or prohibitively large. 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 @@ -735,28 +741,28 @@ command line option. The specified targets may be a list or an individual target. Multiple calls to -Clean +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 -Clean +Clean method, or as a list. -Clean +Clean will also accept the return value of any of the construction environment Builder methods. Examples: - + The related -NoClean +NoClean function overrides calling -Clean +Clean for the same target, and any targets passed to both functions will not @@ -765,23 +771,23 @@ be removed by the option. - + Examples: - + Clean('foo', ['bar', 'baz']) Clean('dist', env.Program('hello', 'hello.c')) Clean(['foo', 'bar'], 'something_else_to_clean') - + 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. - + Clean(docdir, os.path.join(docdir, projectname)) @@ -790,7 +796,8 @@ Clean(docdir, os.path.join(docdir, projectname)) env.Clone([key=val, ...]) - + + Returns a separate copy of a construction environment. If there are any keyword arguments specified, they are added to the returned copy, @@ -798,34 +805,34 @@ overwriting any existing values for the keywords. - + Example: - + env2 = env.Clone() env3 = env.Clone(CCFLAGS = '-g') - + Additionally, a list of tools and a toolpath may be specified, as in the Environment constructor: - + def MyTool(env): env['FOO'] = 'bar' env4 = env.Clone(tools = ['msvc', MyTool]) - + The parse_flags keyword argument is also recognized to allow merging command-line style arguments into the appropriate construction -variables (see env.MergeFlags). +variables (see env.MergeFlags). - + # create an environment for compiling programs that use wxWidgets wx_env = env.Clone(parse_flags='!wx-config --cflags --cxxflags') @@ -838,7 +845,8 @@ wx_env = env.Clone(parse_flags='!wx-config --cflags --cxxflags') env.Command(target, source, action, [key=val, ...]) - + + Executes a specific action (or list of actions) to build a target file or files. @@ -847,28 +855,38 @@ than defining a separate Builder object for a single special-case build. - -As a special case, the -source_scanner -keyword argument can + +Command builder accepts +source_scanner, +target_scanner, +source_factory, and +target_factory +keyword arguments. The *_scanner args can be used to specify a Scanner object -that will be used to scan the sources. -(The global +that will be used to apply a custom +scanner for a source or target. +For example, the global 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.) +already specified in other Builder of function calls. +The *_factory args take a factory function that the +Command will use to turn any sources or targets +specified as strings into SCons Nodes. +See the sections "Builder Objects" +below, for more information about how these +args work in a Builder. - + 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; @@ -885,11 +903,11 @@ or by a to ignore the exit status of the external command. - + Examples: - + env.Command('foo.out', 'foo.in', "$FOO_BUILD < $SOURCES > $TARGET") @@ -907,9 +925,9 @@ env.Command('baz.out', 'baz.in', rename]) - + Note that the -Command +Command function will usually assume, by default, that the specified targets and/or sources are Files, if no other part of the configuration @@ -918,24 +936,23 @@ If necessary, you can explicitly specify that targets or source nodes should be treated as directories by using the -Dir +Dir or env.Dir functions. - + Examples: - + env.Command('ddd.list', Dir('ddd'), 'ls -l $SOURCE > $TARGET') env['DISTDIR'] = 'destination/directory' env.Command(env.Dir('$DISTDIR')), None, make_distdir) - Also note that SCons will usually automatically create any directory necessary to hold a target file, @@ -950,7 +967,8 @@ so you normally don't need to create directories by hand. env.Configure([custom_tests, conf_dir, log_file, config_h]) - + + Creates a Configure object for integrated functionality similar to GNU autoconf. See the manpage section "Configure Contexts" @@ -962,7 +980,8 @@ for a complete explanation of the arguments and behavior. env.Copy([key=val, ...]) - + + A now-deprecated synonym for env.Clone(). @@ -975,7 +994,8 @@ A now-deprecated synonym for env.Decider(function) - + + Specifies that all up-to-date decisions for targets built through this construction environment will be handled by the specified @@ -987,7 +1007,7 @@ that specify the type of decision function to be performed: - + timestamp-newer @@ -1070,11 +1090,11 @@ all within a single second. - + Examples: - + # Use exact timestamp matches by default. Decider('timestamp-match') @@ -1083,7 +1103,7 @@ Decider('timestamp-match') env.Decider('content') - + In addition to the above already-available functions, the function @@ -1091,7 +1111,7 @@ argument may be an actual Python function that takes the following three arguments: - + dependency @@ -1150,7 +1170,7 @@ Use this node instead of the one specified by - + The function should return a @@ -1178,11 +1198,11 @@ Ignoring some or all of the function arguments is perfectly normal. - + Example: - + def my_decider(dependency, target, prev_ni, repo_node=None): return not os.path.exists(str(target)) @@ -1197,13 +1217,14 @@ env.Decider(my_decider) env.Default(targets) - + + This specifies a list of default targets, which will be built by -scons +scons if no explicit targets are given on the command line. Multiple calls to -Default +Default are legal, and add to the list of default targets. As noted above, both forms of this call affect the @@ -1212,43 +1233,43 @@ construction environment method applies construction variable expansion to the targets. - + Multiple targets should be specified as separate arguments to the -Default +Default method, or as a list. -Default +Default will also accept the Node returned by any of a construction environment's builder methods. - + Examples: - + Default('foo', 'bar', 'baz') env.Default(['a', 'b', 'c']) hello = env.Program('hello', 'hello.c') env.Default(hello) - + An argument to -Default +Default of None will clear all default targets. Later calls to -Default +Default will add to the (now empty) default-target list like normal. - + The current list of targets added using the -Default +Default function or method is available in the DEFAULT_TARGETS list; @@ -1258,14 +1279,21 @@ see below. - DefaultEnvironment([args]) + DefaultEnvironment([**kwargs]) - -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 + + +Creates and returns the default construction environment object. +The default construction environment is used internally by SCons +in order to execute many of the global functions in this list +(i.e. those not called as methods of a specific +construction environment), and to fetch source files transparently from source code management systems. +The default environment is a singleton, so the keyword +arguments affect it only on the first call, on subsequent +calls the already-constructed object is returned. +The default environment can be modified in the same way +as any construction environment. @@ -1276,7 +1304,8 @@ from source code management systems. env.Depends(target, dependency) - + + Specifies an explicit dependency; the target @@ -1299,11 +1328,11 @@ is not caught by a Scanner for the file. - + Example: - + env.Depends('foo', 'other-input-file-for-foo') mylib = env.Library('mylib.c') @@ -1324,20 +1353,21 @@ env.Depends(bar, installed_lib) env.Dictionary([vars]) - + + Returns a dictionary object -containing the construction variables in the construction environment. +containing the construction variables in the construction environment. If there are any arguments specified, -the values of the specified construction variables +the values of the specified construction variables are returned as a string (if one argument) or as a list of strings. - + Example: - + cvars = env.Dictionary() cc_values = env.Dictionary('CC', 'CCFLAGS', 'CCCOM') @@ -1350,7 +1380,8 @@ cc_values = env.Dictionary('CC', 'CCFLAGS', 'CCCOM') env.Dir(name, [directory]) - + + This returns a Directory Node, an object that represents the specified directory name. @@ -1363,7 +1394,7 @@ If no is specified, the current script's directory is used as the parent. - + If name is a list, SCons returns a list of Dir nodes. @@ -1371,7 +1402,7 @@ Construction variables are expanded in name. - + Directory Nodes can be used anywhere you would supply a string as a directory name to a Builder method or function. @@ -1386,7 +1417,8 @@ for more information. env.Dump([key]) - + + Returns a pretty printable representation of the environment. key, if not @@ -1394,36 +1426,36 @@ if not should be a string containing the name of the variable of interest. - + This SConstruct: - + env=Environment() print(env.Dump('CCCOM')) - + will print: - + '$CC -c -o $TARGET $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS $SOURCES' - + While this SConstruct: - + env=Environment() print(env.Dump()) - + will print: - + { 'AR': 'ar', 'ARCOM': '$AR $ARFLAGS $TARGET $SOURCES\n$RANLIB $RANLIBFLAGS $TARGET', 'ARFLAGS': ['r'], @@ -1441,7 +1473,8 @@ will print: env.EnsurePythonVersion(major, minor) - + + Ensure that the Python version is at least major.minor. This function will @@ -1449,11 +1482,11 @@ print out an error message and exit SCons with a non-zero exit code if the actual Python version is not late enough. - + Example: - + EnsurePythonVersion(2,2) @@ -1465,7 +1498,8 @@ EnsurePythonVersion(2,2) env.EnsureSConsVersion(major, minor, [revision]) - + + Ensure that the SCons version is at least major.minor, or @@ -1478,11 +1512,11 @@ print out an error message and exit SCons with a non-zero exit code if the actual SCons version is not late enough. - + Examples: - + EnsureSConsVersion(0,14) EnsureSConsVersion(0,96,90) @@ -1496,7 +1530,8 @@ EnsureSConsVersion(0,96,90) env.Environment([key=value, ...]) - + + Return a new construction environment initialized with the specified key=value @@ -1511,7 +1546,8 @@ pairs. env.Execute(action, [strfunction, varlist]) - + + Executes an Action object. The specified action @@ -1529,14 +1565,14 @@ or return value of the Python function will be returned. - + Note that -scons +scons will print an error message if the executed action fails--that is, exits with or returns a non-zero value. -scons +scons will not, however, @@ -1545,12 +1581,12 @@ if the specified action fails. If you want the build to stop in response to a failed -Execute +Execute call, you must explicitly check for a non-zero return value: - + Execute(Copy('file.out', 'file.in')) if Execute("mkdir sub/dir/ectory"): @@ -1566,9 +1602,10 @@ if Execute("mkdir sub/dir/ectory"): env.Exit([value]) - + + This tells -scons +scons to exit immediately with the specified value. @@ -1586,28 +1623,29 @@ is used if no value is specified. env.Export(vars) - + + This tells -scons +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 -Export +Export will over-write previous exports that have the same name. Multiple variable names can be passed to -Export +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: - + env = Environment() # Make env available for all SConscript files to Import(). Export("env") @@ -1626,15 +1664,15 @@ Export(debug = env) Export({"debug":env}) - + Note that the -SConscript +SConscript function supports an 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 -SConscript +SConscript function, below. @@ -1646,7 +1684,8 @@ function, below. env.File(name, [directory]) - + + This returns a File Node, an object that represents the specified file @@ -1657,7 +1696,7 @@ can be a relative or absolute path. is an optional directory that will be used as the parent directory. - + If name is a list, SCons returns a list of File nodes. @@ -1665,7 +1704,7 @@ Construction variables are expanded in name. - + File Nodes can be used anywhere you would supply a string as a file name to a Builder method or function. @@ -1683,7 +1722,8 @@ for more information. env.FindFile(file, dirs) - + + Search for file in the path specified by @@ -1695,11 +1735,11 @@ this function also searches for derived files that have not yet been built. - + Example: - + foo = env.FindFile('foo', ['dir1', 'dir2']) @@ -1711,24 +1751,25 @@ foo = env.FindFile('foo', ['dir1', 'dir2']) env.FindInstalledFiles() - + + Returns the list of targets set up by the -Install +Install or -InstallAs +InstallAs builders. - + This function serves as a convenient method to select the contents of a binary package. - + Example: - + Install( '/bin', [ 'executable_a', 'executable_b' ] ) # will return the file node list @@ -1747,7 +1788,8 @@ FindInstalledFiles() FindPathDirs(variable) - + + Returns a function (actually a callable Python object) intended to be used as the @@ -1759,14 +1801,14 @@ in a construction environment and treat the construction variable's value as a list of directory paths that should be searched (like -$CPPPATH, -$LIBPATH, +$CPPPATH, +$LIBPATH, etc.). - + Note that use of -FindPathDirs +FindPathDirs is generally preferable to writing your own path_function @@ -1774,11 +1816,11 @@ for the following reasons: 1) The returned list will contain all appropriate directories found in source trees (when -VariantDir +VariantDir is used) or in code repositories (when -Repository +Repository or the option are used). @@ -1790,11 +1832,11 @@ and avoid re-scanning the directories for files, when possible. - + Example: - + def my_scan(node, env, path, arg): # Code to scan file contents goes here... return include_files @@ -1812,7 +1854,8 @@ scanner = Scanner(name = 'myscanner', 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 @@ -1822,16 +1865,16 @@ which defaults to the '"."'-node. It will then return all leaves of These are all children which have no further children. - + This function is a convenient method to select the contents of a Source Package. - + Example: - + Program( 'src/main_a.c' ) Program( 'src/main_b.c' ) Program( 'main_c.c' ) @@ -1843,7 +1886,7 @@ FindSourceFiles() FindSourceFiles( 'src' ) - + As you can see build support files (SConstruct in the above example) will also be returned by this function. @@ -1856,7 +1899,8 @@ will also be returned by this function. env.Flatten(sequence) - + + Takes a sequence (that is, a Python list or tuple) that may contain nested sequences and returns a flattened list containing @@ -1869,11 +1913,11 @@ but direct Python manipulation of these lists does not. - + Examples: - + foo = Object('foo.c') bar = Object('bar.c') @@ -1896,7 +1940,8 @@ for object in Flatten(objects): GetBuildFailures() - + + Returns a list of exceptions for the actions that failed while attempting to build targets. @@ -1908,13 +1953,13 @@ that record various aspects of the build failure: - + .node The node that was being built when the build failure occurred. - + .status The numeric exit status returned by the command or Python function @@ -1922,7 +1967,7 @@ that failed when trying to build the specified Node. - + .errstr The SCons error string describing the build failure. @@ -1932,7 +1977,7 @@ to indicate that an executed command exited with a status of 2.) - + .filename The name of the file or directory that actually caused the failure. @@ -1955,7 +2000,7 @@ attribute will be sub/dir. - + .executor The SCons Executor object for the target Node @@ -1965,7 +2010,7 @@ the construction environment used for the failed action. - + .action The actual SCons Action object that failed. This will be one specific action @@ -1974,26 +2019,26 @@ actions that would have been executed to build the target. - + .command The actual expanded command that was executed and failed, after expansion of -$TARGET, -$SOURCE, +$TARGET, +$SOURCE, and other construction variables. - + Note that the -GetBuildFailures +GetBuildFailures function will always return an empty list until any build failure has occurred, which means that -GetBuildFailures +GetBuildFailures will always return an empty list while the -SConscript +SConscript files are being read. Its primary intended use is for functions that will be @@ -2005,7 +2050,7 @@ function. Example: - + import atexit def print_build_failures(): @@ -2024,9 +2069,10 @@ atexit.register(print_build_failures) env.GetBuildPath(file, [...]) - + + Returns the -scons +scons path name (or names) for the specified file (or files). @@ -2034,7 +2080,7 @@ The specified file or files may be -scons +scons Nodes or strings representing path names. @@ -2046,9 +2092,10 @@ Nodes or strings representing path names. env.GetLaunchDir() - + + Returns the absolute path name of the directory from which -scons +scons was initially invoked. This can be useful when using the , @@ -2057,7 +2104,7 @@ or options, which internally change to the directory in which the -SConstruct +SConstruct file is found. @@ -2069,16 +2116,17 @@ file is found. env.GetOption(name) - + + This function provides a way to query the value of SCons options set on scons command line (or set using the -SetOption +SetOption function). The options supported are: - + cache_debug @@ -2323,7 +2371,7 @@ which corresponds to --warn and --warning. - + See the documentation for the corresponding command line object for information about each specific option. @@ -2337,11 +2385,12 @@ option. env.Glob(pattern, [ondisk, source, strings, exclude]) - + + Returns Nodes (or strings) that match the specified pattern, relative to the directory of the current -SConscript +SConscript file. The env.Glob() @@ -2351,20 +2400,20 @@ and returns whatever matches the resulting expanded pattern. - + The specified pattern uses Unix shell style metacharacters for matching: - + * matches everything ? matches any single character [seq] matches any character in seq [!seq] matches any char not in seq - + If the first character of a filename is a dot, it must be matched explicitly. Character matches do @@ -2372,17 +2421,17 @@ Character matches do span directory separators. - + The -Glob +Glob knows about repositories (see the -Repository +Repository function) and source directories (see the -VariantDir +VariantDir function) and returns a Node (or string, if so configured) @@ -2392,7 +2441,7 @@ anywhere in a corresponding repository or source directory. - + The ondisk argument may be set to @@ -2406,7 +2455,7 @@ return corresponding Nodes for any on-disk matches found. - + The source argument may be set to @@ -2414,20 +2463,20 @@ argument may be set to (or any equivalent value) to specify that, when the local directory is a -VariantDir, +VariantDir, the returned Nodes should be from the corresponding source directory, not the local directory. - + The strings argument may be set to True (or any equivalent value) to have the -Glob +Glob function return strings, not Nodes, that represent the matched files or directories. The returned strings will be relative to @@ -2436,18 +2485,18 @@ the local (SConscript) directory. arbitrary manipulation of file names, but if the returned strings are passed to a different -SConscript +SConscript file, any Node translation will be relative to the other -SConscript +SConscript directory, not the original -SConscript +SConscript directory.) - + The exclude argument may be set to a pattern or a list of patterns @@ -2457,11 +2506,11 @@ Elements matching a least one pattern of this list will be excluded. - + Examples: - + Program('foo', Glob('*.c')) Zip('/tmp/everything', Glob('.??*') + Glob('*')) sources = Glob('*.cpp', exclude=['os_*_specific_*.cpp']) + Glob('os_%s_specific_*.cpp'%currentOS) @@ -2475,19 +2524,20 @@ sources = Glob('*.cpp', exclude=['os_*_specific_*.cpp']) + Glob('os_%s_specific_ env.Help(text, append=False) - + + This specifies help text to be printed if the argument is given to -scons. +scons. If -Help +Help is called multiple times, the text is appended together in the order that -Help +Help is called. With append set to False, any -Help +Help text generated with -AddOption +AddOption is clobbered. If append is True, the AddOption help is prepended to the help string, thus preserving the @@ -2502,33 +2552,34 @@ message. 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 -Ignore +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: - + env.Ignore('foo', 'foo.c') env.Ignore('bar', ['bar1.h', 'bar2.h']) env.Ignore('.','foobar.obj') @@ -2543,30 +2594,31 @@ env.Ignore('bar','bar/foobar.obj') env.Import(vars) - + + This tells -scons +scons to import a list of variables into the current SConscript file. This will import variables that were exported with -Export +Export or in the exports argument to -SConscript. +SConscript. Variables exported by -SConscript +SConscript have precedence. Multiple variable names can be passed to -Import +Import as separate arguments or as a list. The variable "*" can be used to import all variables. - + Examples: - + Import("env") Import("env", "variable") Import(["env", "variable"]) @@ -2581,7 +2633,8 @@ Import("*") env.Literal(string) - + + The specified string will be preserved as-is @@ -2596,7 +2649,8 @@ and not have construction variables expanded. env.Local(targets) - + + The specified targets will have copies made in the local tree, @@ -2610,7 +2664,8 @@ Returns a list of the target Node or Nodes. env.MergeFlags(arg, [unique]) - + + Merges the specified arg values to the construction environment's construction variables. @@ -2618,7 +2673,7 @@ If the arg argument is not a dictionary, it is converted to one by calling -env.ParseFlags +env.ParseFlags on the argument before the values are merged. Note that @@ -2627,10 +2682,10 @@ must be a single value, so multiple strings must be passed in as a list, not as separate arguments to -env.MergeFlags. +env.MergeFlags. - + By default, duplicate values are eliminated; you can, however, specify @@ -2646,11 +2701,11 @@ All other construction variables keep the right-most unique value. - + Examples: - + # Add an optimization flag to $CCFLAGS. env.MergeFlags('-O3') @@ -2673,38 +2728,39 @@ env.MergeFlags(['-O3', env.NoCache(target, ...) - + + Specifies a list of files which should not be cached whenever the -CacheDir +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 -NoCache +NoCache method, or as a list. -NoCache +NoCache will also accept the return value of any of the construction environment Builder methods. - + Calling -NoCache +NoCache on directories and other non-File Node types has no effect because only File Nodes are cached. - + Examples: - + NoCache('foo.elf') NoCache(env.Program('hello', 'hello.c')) @@ -2717,7 +2773,8 @@ NoCache(env.Program('hello', 'hello.c')) env.NoClean(target, ...) - + + Specifies a list of files or directories which should not be removed whenever the targets (or their dependencies) @@ -2727,7 +2784,7 @@ command line option. The specified targets may be a list or an individual target. Multiple calls to -NoClean +NoClean are legal, and prevent each specified target from being removed by calls to the @@ -2735,21 +2792,21 @@ from being removed by calls to the option. - + Multiple files or directories should be specified either as separate arguments to the -NoClean +NoClean method, or as a list. -NoClean +NoClean will also accept the return value of any of the construction environment Builder methods. - + Calling -NoClean +NoClean for a target overrides calling -Clean +Clean for the same target, and any targets passed to both functions will not @@ -2758,11 +2815,11 @@ be removed by the option. - + Examples: - + NoClean('foo.elf') NoClean(env.Program('hello', 'hello.c')) @@ -2772,7 +2829,8 @@ NoClean(env.Program('hello', 'hello.c')) env.ParseConfig(command, [function, unique]) - + + Calls the specified function to modify the environment as specified by the output of @@ -2780,7 +2838,7 @@ to modify the environment as specified by the output of The default function is -env.MergeFlags, +env.MergeFlags, which expects the output of a typical *-config command @@ -2797,11 +2855,11 @@ to allow duplicate values to be added. - + Interpreted options and the construction variables they affect are as specified for the -env.ParseFlags +env.ParseFlags method (which this method calls). See that method's description for a table of options and construction variables. @@ -2815,17 +2873,18 @@ for a table of options and construction variables. env.ParseDepends(filename, [must_exist, only_one]) - + + Parses the contents of the specified filename as a list of dependencies in the style of -Make +Make or mkdep, and explicitly establishes all of the listed dependencies. - + By default, it is not an error if the specified @@ -2841,7 +2900,7 @@ generate an error if the file does not exist, or is otherwise inaccessible. - + The optional only_one argument may be set to a non-zero @@ -2863,15 +2922,15 @@ one output file into a corresponding file. - + The filename and all of the files listed therein will be interpreted relative to the directory of the -SConscript +SConscript file which calls the -ParseDepends +ParseDepends function. @@ -2880,25 +2939,26 @@ function. 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 -env.MergeFlags +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 -env.MergeFlags +env.MergeFlags will call this method if its argument is not a dictionary, so it is usually not necessary to call -env.ParseFlags +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, @@ -2907,12 +2967,12 @@ 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: - + -arch CCFLAGS, LINKFLAGS -D CPPDEFINES -framework FRAMEWORKS @@ -2943,19 +3003,19 @@ and added to the following construction variables: + CCFLAGS, LINKFLAGS - + Any other strings not associated with options are assumed to be the names of libraries and added to the -$LIBS +$LIBS construction variable. - + Examples (all of which produce the same result): - + dict = env.ParseFlags('-O2 -Dfoo -Dbar=1') dict = env.ParseFlags('-O2', '-Dfoo', '-Dbar=1') dict = env.ParseFlags(['-O2', '-Dfoo -Dbar=1']) @@ -2967,38 +3027,39 @@ dict = env.ParseFlags('-O2', '!echo -Dfoo -Dbar=1') Platform(string) - + + The -Platform +Platform form returns a callable object that can be used to initialize a construction environment using the platform keyword of the -Environment +Environment function. - + Example: - + env = Environment(platform = Platform('win32')) - + The -env.Platform +env.Platform form applies the callable object for the specified platform string to the environment through which the method was called. - + env.Platform('posix') - + Note that the win32 platform adds the @@ -3007,7 +3068,7 @@ and SystemRoot variables from the user's external environment to the construction environment's -$ENV +$ENV dictionary. This is so that any executed commands that use sockets to connect with other systems @@ -3025,14 +3086,15 @@ will work on Windows systems. env.Precious(target, ...) - + + Marks each given target as precious so it is not deleted before it is rebuilt. Normally -scons +scons deletes a target before building it. Multiple targets can be passed in to a single call to -Precious. +Precious. @@ -3040,7 +3102,8 @@ Multiple targets can be passed in to a single call to env.Prepend(key=val, [...]) - + + Appends the specified keyword arguments to the beginning of construction variables in the environment. If the Environment does not have @@ -3056,11 +3119,11 @@ and the lists are added together. (See also the Append method, above.) - + Example: - + env.Prepend(CCFLAGS = '-g ', FOO = ['foo.yyy']) @@ -3069,10 +3132,11 @@ env.Prepend(CCFLAGS = '-g ', FOO = ['foo.yyy']) env.PrependENVPath(name, newpath, [envname, sep, delete_existing]) - + + This appends new path elements to the given path in the specified external environment -($ENV +($ENV by default). This will only add any particular path once (leaving the first one it encounters and @@ -3087,7 +3151,7 @@ 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 delete_existing is 0, then adding a path that already exists @@ -3095,22 +3159,22 @@ will not move it to the beginning; it will stay where it is in the list. - + Example: - + print 'before:',env['ENV']['INCLUDE'] include_path = '/foo/bar:/foo' env.PrependENVPath('INCLUDE', include_path) print 'after:',env['ENV']['INCLUDE'] - + The above example will print: - + before: /biz:/foo after: /foo/bar:/foo:/biz @@ -3120,7 +3184,8 @@ after: /foo/bar:/foo:/biz 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 @@ -3136,11 +3201,11 @@ existing matching values are removed first, so existing values in the arg list move to the front of the list. - + Example: - + env.PrependUnique(CCFLAGS = '-g', FOO = ['foo.yyy']) @@ -3155,13 +3220,14 @@ env.PrependUnique(CCFLAGS = '-g', FOO = ['foo.yyy']) 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 __call__() @@ -3183,19 +3249,19 @@ 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: - + def my_progress_function(node, *args, **kw): print('Evaluating node %s!' % node) Progress(my_progress_function, interval=10) - + A more complicated example of a custom progress display object that prints a string containing a count every 100 evaluated Nodes. @@ -3206,7 +3272,7 @@ at the end so that the string will overwrite itself on a display: - + import sys class ProgressCounter(object): count = 0 @@ -3216,9 +3282,9 @@ class ProgressCounter(object): Progress(ProgressCounter(), interval=100) - + If the first argument -Progress +Progress is a string, the string will be displayed every @@ -3234,14 +3300,14 @@ on the error output, one dot for every 100 evaluated Nodes: - + import sys Progress('.', interval=100, file=sys.stderr) - + If the string contains the verbatim substring -$TARGET, +$TARGET, it will be replaced with the Node. Note that, for performance reasons, this is not @@ -3259,14 +3325,14 @@ keyword argument to make sure the previously-printed file name is overwritten with blank spaces: - + import sys Progress('$TARGET\r', overwrite=True) - + If the first argument to -Progress +Progress is a list of strings, then each string in the list will be displayed in rotating fashion every @@ -3276,7 +3342,7 @@ This can be used to implement a "spinner" on the user's screen as follows: - + Progress(['-\r', '\\\r', '|\r', '/\r'], interval=5) @@ -3288,17 +3354,18 @@ Progress(['-\r', '\\\r', '|\r', '/\r'], interval=5) env.Pseudo(target, ...) - + + This indicates that each given target should not be created by the build rule, and if the target is created, an error will be generated. This is similar to the gnu make .PHONY target. However, in the vast majority of cases, an -Alias +Alias is more appropriate. Multiple targets can be passed in to a single call to -Pseudo. +Pseudo. @@ -3309,7 +3376,8 @@ Multiple targets can be passed in to a single call to env.PyPackageDir(modulename) - + + This returns a Directory Node similar to Dir. The python module / package is looked up and if located the directory is returned for the location. @@ -3317,7 +3385,7 @@ the directory is returned for the location. Is a named python package / module to lookup the directory for it's location. - + If modulename is a list, SCons returns a list of Dir nodes. @@ -3330,16 +3398,17 @@ Construction variables are expanded in env.Replace(key=val, [...]) - + + Replaces construction variables in the Environment with the specified keyword arguments. - + Example: - + env.Replace(CCFLAGS = '-g', FOO = 'foo.xxx') @@ -3351,20 +3420,21 @@ env.Replace(CCFLAGS = '-g', FOO = 'foo.xxx') env.Repository(directory) - + + Specifies that directory is a repository to be searched for files. Multiple calls to -Repository +Repository are legal, and each one adds to the list of repositories that will be searched. - + To -scons, +scons, a repository is a copy of the source tree, from the top-level directory on down, which may contain @@ -3375,26 +3445,26 @@ 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, +scons, so that the repository contains the necessary signature information to allow -scons +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 +scons will not make a copy in the local directory tree. In order to guarantee that a local copy will be made, use the -Local +Local method. @@ -3406,7 +3476,8 @@ method. env.Requires(target, prerequisite) - + + Specifies an order-only relationship between the specified target file(s) and the specified prerequisite file(s). @@ -3420,11 +3491,11 @@ and will not be rebuilt simply because the prerequisite file(s) change. - + Example: - + env.Requires('foo', 'file-that-must-be-built-before-foo') @@ -3433,7 +3504,8 @@ env.Requires('foo', 'file-that-must-be-built-before-foo') Return([vars..., stop=]) - + + By default, this stops processing the current SConscript file and returns to the calling SConscript file @@ -3441,32 +3513,32 @@ the values of the variables named in the vars string arguments. Multiple strings contaning variable names may be passed to -Return. +Return. Any strings that contain white space - + The optional stop= keyword argument may be set to a false value to continue processing the rest of the SConscript file after the -Return +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 vars at the point -Return +Return is called. - + Examples: - + # Returns without returning a value. Return() @@ -3488,7 +3560,8 @@ Return('val1 val2') env.Scanner(function, [argument, keys, path_function, node_class, node_factory, scan_check, recursive]) - + + Creates a Scanner object for the specified function. @@ -3510,23 +3583,24 @@ for a complete explanation of the arguments and behavior. env.SConscript(dirs=subdirs, [name=script, exports, variant_dir, duplicate, must_exist]) - + + This tells -scons +scons to execute one or more subsidiary SConscript (configuration) files. Any variables returned by a called script using -Return +Return will be returned by the call to -SConscript. +SConscript. There are two ways to call the -SConscript +SConscript function. - + The first way you can call -SConscript +SConscript is to explicitly specify one or more scripts as the first argument. @@ -3534,45 +3608,45 @@ 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 -Split). +Split). Examples: - + 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') - + The second way you can call -SConscript +SConscript is to specify a list of (sub)directory names as a dirs=subdirs keyword argument. In this case, -scons +scons will, by default, execute a subsidiary configuration file named -SConscript +SConscript in each of the specified directories. You may specify a name other than -SConscript +SConscript by supplying an optional name=script keyword argument. The first three examples below have the same effect as the first three examples above: - + 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') - + The optional exports argument provides a list of variable names or a dictionary of @@ -3581,28 +3655,28 @@ named values to export to the These variables are locally exported only to the specified script(s), and do not affect the global pool of variables used by the -Export +Export function. The subsidiary script(s) must use the -Import +Import function to import the variables. Examples: - + 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') - + If the optional variant_dir argument is present, it causes an effect equivalent to the -VariantDir +VariantDir method described below. (If variant_dir @@ -3619,14 +3693,14 @@ and arguments are interpreted relative to the directory of the calling --> argument is interpreted relative to the directory of the calling -SConscript +SConscript file. See the description of the -VariantDir +VariantDir function below for additional details and restrictions. - + If variant_dir is present, @@ -3636,46 +3710,46 @@ but is not, --> the source directory is the directory in which the -SConscript +SConscript file resides and the -SConscript +SConscript file is evaluated as if it were in the variant_dir directory: - + SConscript('src/SConscript', variant_dir = 'build') - + is equivalent to - + VariantDir('build', 'src') SConscript('build/SConscript') - + This later paradigm is often used when the sources are in the same directory as the -SConstruct: +SConstruct: - + SConscript('SConscript', variant_dir = 'build') - + is equivalent to - + VariantDir('build', '.') SConscript('build/SConscript') - + - + The optional must_exist argument, if true, causes an exception to be raised if a requested -SConscript file is not found. The current default is false, +SConscript file is not found. The current default is false, causing only a warning to be omitted, but this behavior is deprecated. For scripts which truly intend to be optional, transition to explicty supplying must_exist=False to the call. - + Here are some composite examples: - + # 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') - + # 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) - + # build debugging and production versions. SConscript # is passed flags to use. opts = { 'CPPDEFINES' : ['DEBUG'], 'CCFLAGS' : '-pgdb' } @@ -3746,7 +3820,7 @@ opts = { 'CPPDEFINES' : ['NODEBUG'], 'CCFLAGS' : '-O' } SConscript('SConscript', variant_dir='prod', duplicate=0, exports=opts) - + # 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) @@ -3761,9 +3835,10 @@ SConscript('src/SConscript', variant_dir='build/ppc', duplicate=0) env.SConscriptChdir(value) - + + By default, -scons +scons changes its working directory to the directory in which each subsidiary SConscript file lives. @@ -3771,14 +3846,14 @@ This behavior may be disabled by specifying either: - + SConscriptChdir(0) env.SConscriptChdir(0) - + in which case -scons +scons will stay in the top-level directory while reading all SConscript files. (This may be necessary when building from repositories, @@ -3790,11 +3865,11 @@ SConscriptChdir() multiple times. - + Example: - + env = Environment() SConscriptChdir(0) SConscript('foo/SConscript') # will not chdir to foo @@ -3810,9 +3885,10 @@ SConscript('bar/SConscript') # will chdir to bar env.SConsignFile([file, dbm_module]) - + + This tells -scons +scons to store all file signatures in the specified database file. @@ -3829,17 +3905,17 @@ If file is not an absolute path name, the file is placed in the same directory as the top-level -SConstruct +SConstruct file. - + If file is None, then -scons +scons will store file signatures in a separate .sconsign @@ -3849,7 +3925,7 @@ not in one global database file. prior to SCons 0.96.91 and 0.97.) - + The optional dbm_module argument can be used to specify @@ -3861,11 +3937,11 @@ Python data structures, and which works on all Python versions. - + Examples: - + # Explicitly stores signatures in ".sconsign.dblite" # in the top-level SConstruct directory (the # default behavior). @@ -3888,13 +3964,14 @@ SConsignFile(None) 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: - + env.SetDefault(FOO = 'foo') if 'FOO' not in env: env['FOO'] = 'foo' @@ -3908,12 +3985,13 @@ if 'FOO' not in env: env['FOO'] = 'foo' 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: - + clean @@ -3998,17 +4076,17 @@ which corresponds to --stack-size. - + See the documentation for the corresponding command line object for information about each specific option. - + Example: - + SetOption('max_drift', 1) @@ -4020,7 +4098,8 @@ SetOption('max_drift', 1) env.SideEffect(side_effect, target) - + + Declares side_effect as a side effect of building @@ -4038,7 +4117,7 @@ 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 +scons will ensure that only one set of commands is executed at a time. Consequently, you only need to use this method @@ -4046,7 +4125,7 @@ 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 @@ -4070,9 +4149,9 @@ is cleaned whenever a specific is cleaned, you must specify this explicitly with the -Clean +Clean or -env.Clean +env.Clean function. @@ -4084,16 +4163,17 @@ function. env.SourceCode(entries, builder) - + + This function and its associate factory functions are deprecated. There is no replacement. The intended use was to keep a local tree in sync with an archive, but in actuality the function only causes the archive to be fetched on the first run. -Synchronizing with the archive is best done external to SCons. +Synchronizing with the archive is best done external to SCons. - + Arrange for non-existent source files to be fetched from a source code management system using the specified @@ -4106,30 +4186,30 @@ source files or directories in which source files can be found. - + For any non-existent source files, -scons +scons will search up the directory tree and use the first -SourceCode +SourceCode builder it finds. The specified builder may be None, in which case -scons +scons will not use a builder to fetch source files for the specified entries, even if a -SourceCode +SourceCode builder has been specified for a directory higher up the tree. - -scons + +scons will, by default, fetch files from SCCS or RCS subdirectories without explicit configuration. @@ -4141,11 +4221,11 @@ and speed up your build a little by disabling these searches as follows: - + env.SourceCode('.', None) - + Note that if the specified builder is one you create by hand, @@ -4154,8 +4234,8 @@ construction environment to use when fetching a source file. - -scons + +scons provides a set of canned factory functions that return appropriate Builders for various popular @@ -4163,14 +4243,14 @@ source code management systems. Canonical examples of invocation include: - + 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) - + @@ -4182,7 +4262,8 @@ env.SourceCode('no_source.c', None) 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 @@ -4195,11 +4276,11 @@ it will be returned as a list containing just the object. - + Example: - + files = Split("f1.c f2.c f3.c") files = env.Split("f4.c f5.c f6.c") files = Split(""" @@ -4214,13 +4295,14 @@ files = Split(""" env.subst(input, [raw, target, source, conv]) - + + Performs construction variable interpolation on the specified string or sequence argument input. - + By default, leading or trailing white space will be removed from the result. @@ -4252,7 +4334,7 @@ pairs (as is done for signature calculation). - + If the input is a sequence (list or tuple), the individual elements of @@ -4260,7 +4342,7 @@ the sequence will be expanded, and the results will be returned as a list. - + The optional target and @@ -4269,20 +4351,20 @@ keyword arguments must be set to lists of target and source nodes, respectively, if you want the -$TARGET, -$TARGETS, -$SOURCE +$TARGET, +$TARGETS, +$SOURCE and -$SOURCES +$SOURCES to be available for expansion. This is usually necessary if you are calling -env.subst +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 @@ -4300,11 +4382,11 @@ idiom to pass in an unnamed function that simply returns its unconverted argument. - + Example: - + print(env.subst("The C compiler is: $CC")) def compile(target, source, env): @@ -4321,19 +4403,20 @@ source_nodes = env.subst('$EXPAND_TO_NODELIST', Tag(node, tags) - + + Annotates file or directory Nodes with information about how the -Package +Package Builder should package those files or directories. All tags are optional. - + Examples: - + # makes sure the built library will be installed with 0o644 file # access mode Tag( Library( 'lib.c' ), UNIX_ATTR="0o644" ) @@ -4350,9 +4433,10 @@ Tag( 'file2.txt', DOC ) env.Tool(string, [toolpath, **kw]) - + + The -Tool +Tool form of the function returns a callable object that can be used to initialize @@ -4364,21 +4448,21 @@ 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 -$TOOLS +$TOOLS construction variable. - + Additional keyword arguments are passed to the tool's generate() method. - + Examples: - + env = Environment(tools = [ Tool('msvc') ]) env = Environment() @@ -4388,22 +4472,22 @@ u = Tool('opengl', toolpath = ['tools']) u(env) # adds 'opengl' to the TOOLS variable - + The -env.Tool +env.Tool form of the function applies the callable object for the specified tool string to the environment through which the method was called. - + Additional keyword arguments are passed to the tool's generate() method. - + env.Tool('gcc') env.Tool('opengl', toolpath = ['build/tools']) @@ -4416,7 +4500,8 @@ env.Tool('opengl', toolpath = ['build/tools']) 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 @@ -4430,7 +4515,7 @@ 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 write() method that can be used to "build" a Value Node @@ -4446,11 +4531,11 @@ There is a corresponding method that will return the built value of the Node. - + Examples: - + env = Environment() def create(target, source, env): @@ -4492,9 +4577,10 @@ env.UpdateValue(target = Value(output), source = Value(input)) env.VariantDir(variant_dir, src_dir, [duplicate]) - + + Use the -VariantDir +VariantDir function to create a copy of your sources in another location: if a name under variant_dir @@ -4507,8 +4593,8 @@ than the original sources by simply refering to the sources (and targets) within the variant tree. - -VariantDir + +VariantDir can be called multiple times with the same src_dir to set up multiple builds with different options @@ -4526,9 +4612,9 @@ TODO: src_dir = '.' works fine with a build dir under it. --> - + The default behavior is for -scons +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 @@ -4539,7 +4625,7 @@ 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 @@ -4550,14 +4636,14 @@ files and directories that are not used are not present in variant_dir. - + Duplicating the source tree may be disabled by setting the duplicate argument to 0 (zero). This will cause -scons +scons to invoke Builders using the path names of source files in src_dir and the path names of derived files within @@ -4568,9 +4654,9 @@ and is usually safe for most builds (but see above for cases that may cause problems). - + Note that -VariantDir +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 @@ -4578,11 +4664,11 @@ not in the source directory, but in the regardless of the value of duplicate. This is how you tell -scons +scons which variant of a source tree to build: - + # run src/SConscript in two variant directories VariantDir('build/variant1', 'src') SConscript('build/variant1/SConscript') @@ -4590,31 +4676,31 @@ VariantDir('build/variant2', 'src') SConscript('build/variant2/SConscript') - + See also the -SConscript +SConscript function, described above, for another way to specify a variant directory in conjunction with calling a subsidiary SConscript file. - + Examples: - + # use names in the build directory, not the source directory VariantDir('build', 'src', duplicate=0) Program('build/prog', 'build/source.c') - + # this builds both the source and docs in a separate subtree VariantDir('build', '.', duplicate=0) SConscript(dirs=['build/src','build/doc']) - + # 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) @@ -4628,7 +4714,8 @@ SConscript(dirs='doc', variant_dir='build/doc', duplicate=0) env.WhereIs(program, [path, pathext, reject]) - + + Searches for the specified executable program, returning the full path name to the program diff --git a/doc/generated/functions.mod b/doc/generated/functions.mod index 91710a3..3d49229 100644 --- a/doc/generated/functions.mod +++ b/doc/generated/functions.mod @@ -19,7 +19,6 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. Append"> AppendENVPath"> AppendUnique"> -BuildDir"> Builder"> CacheDir"> Clean"> @@ -101,7 +100,6 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. env.Append"> env.AppendENVPath"> env.AppendUnique"> -env.BuildDir"> env.Builder"> env.CacheDir"> env.Clean"> @@ -193,7 +191,6 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. Append"> AppendENVPath"> AppendUnique"> -BuildDir"> Builder"> CacheDir"> Clean"> @@ -275,7 +272,6 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. env.Append"> env.AppendENVPath"> env.AppendUnique"> -env.BuildDir"> env.Builder"> env.CacheDir"> env.Clean"> diff --git a/doc/generated/tools.gen b/doc/generated/tools.gen index bf6381c..0d30f6f 100644 --- a/doc/generated/tools.gen +++ b/doc/generated/tools.gen @@ -1,3 +1,4 @@ + %scons; @@ -11,137 +12,153 @@ %variables-mod; ]> - + 386asm - + + Sets construction variables for the 386ASM assembler for the Phar Lap ETS embedded operating system. -Sets: &cv-link-AS;, &cv-link-ASCOM;, &cv-link-ASFLAGS;, &cv-link-ASPPCOM;, &cv-link-ASPPFLAGS;.Uses: &cv-link-CC;, &cv-link-CPPFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. +Sets: &cv-link-AS;, &cv-link-ASCOM;, &cv-link-ASFLAGS;, &cv-link-ASPPCOM;, &cv-link-ASPPFLAGS;.Uses: &cv-link-CC;, &cv-link-CPPFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. aixc++ - + + Sets construction variables for the IMB xlc / Visual Age C++ compiler. -Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXX;, &cv-link-SHOBJSUFFIX;. +Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXX;, &cv-link-SHOBJSUFFIX;. aixcc - + + Sets construction variables for the IBM xlc / Visual Age C compiler. -Sets: &cv-link-CC;, &cv-link-CCVERSION;, &cv-link-SHCC;. +Sets: &cv-link-CC;, &cv-link-CCVERSION;, &cv-link-SHCC;. aixf77 - + + Sets construction variables for the IBM Visual Age f77 Fortran compiler. -Sets: &cv-link-F77;, &cv-link-SHF77;. +Sets: &cv-link-F77;, &cv-link-SHF77;. aixlink - + + Sets construction variables for the IBM Visual Age linker. -Sets: &cv-link-LINKFLAGS;, &cv-link-SHLIBSUFFIX;, &cv-link-SHLINKFLAGS;. +Sets: &cv-link-LINKFLAGS;, &cv-link-SHLIBSUFFIX;, &cv-link-SHLINKFLAGS;. applelink - + + Sets construction variables for the Apple linker (similar to the GNU linker). - Sets: &cv-link-APPLELINK_COMPATIBILITY_VERSION;, &cv-link-APPLELINK_CURRENT_VERSION;, &cv-link-APPLELINK_NO_COMPATIBILITY_VERSION;, &cv-link-APPLELINK_NO_CURRENT_VERSION;, &cv-link-FRAMEWORKPATHPREFIX;, &cv-link-LDMODULECOM;, &cv-link-LDMODULEFLAGS;, &cv-link-LDMODULEPREFIX;, &cv-link-LDMODULESUFFIX;, &cv-link-LINKCOM;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-_APPLELINK_COMPATIBILITY_VERSION;, &cv-link-_APPLELINK_CURRENT_VERSION;, &cv-link-_FRAMEWORKPATH;, &cv-link-_FRAMEWORKS;.Uses: &cv-link-FRAMEWORKSFLAGS;. + Sets: &cv-link-APPLELINK_COMPATIBILITY_VERSION;, &cv-link-APPLELINK_CURRENT_VERSION;, &cv-link-APPLELINK_NO_COMPATIBILITY_VERSION;, &cv-link-APPLELINK_NO_CURRENT_VERSION;, &cv-link-FRAMEWORKPATHPREFIX;, &cv-link-LDMODULECOM;, &cv-link-LDMODULEFLAGS;, &cv-link-LDMODULEPREFIX;, &cv-link-LDMODULESUFFIX;, &cv-link-LINKCOM;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-_APPLELINK_COMPATIBILITY_VERSION;, &cv-link-_APPLELINK_CURRENT_VERSION;, &cv-link-_FRAMEWORKPATH;, &cv-link-_FRAMEWORKS;.Uses: &cv-link-FRAMEWORKSFLAGS;. ar - -Sets construction variables for the ar library archiver. + + +Sets construction variables for the ar library archiver. -Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;, &cv-link-RANLIB;, &cv-link-RANLIBCOM;, &cv-link-RANLIBFLAGS;. +Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;, &cv-link-RANLIB;, &cv-link-RANLIBCOM;, &cv-link-RANLIBFLAGS;. as - -Sets construction variables for the as assembler. + + +Sets construction variables for the as assembler. -Sets: &cv-link-AS;, &cv-link-ASCOM;, &cv-link-ASFLAGS;, &cv-link-ASPPCOM;, &cv-link-ASPPFLAGS;.Uses: &cv-link-CC;, &cv-link-CPPFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. +Sets: &cv-link-AS;, &cv-link-ASCOM;, &cv-link-ASFLAGS;, &cv-link-ASPPCOM;, &cv-link-ASPPFLAGS;.Uses: &cv-link-CC;, &cv-link-CPPFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. bcc32 - + + Sets construction variables for the bcc32 compiler. -Sets: &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CCFLAGS;, &cv-link-CFILESUFFIX;, &cv-link-CFLAGS;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-SHCC;, &cv-link-SHCCCOM;, &cv-link-SHCCFLAGS;, &cv-link-SHCFLAGS;, &cv-link-SHOBJSUFFIX;.Uses: &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. +Sets: &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CCFLAGS;, &cv-link-CFILESUFFIX;, &cv-link-CFLAGS;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-SHCC;, &cv-link-SHCCCOM;, &cv-link-SHCCFLAGS;, &cv-link-SHCFLAGS;, &cv-link-SHOBJSUFFIX;.Uses: &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. cc - + + Sets construction variables for generic POSIX C compilers. -Sets: &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CCFLAGS;, &cv-link-CFILESUFFIX;, &cv-link-CFLAGS;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-FRAMEWORKPATH;, &cv-link-FRAMEWORKS;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-SHCC;, &cv-link-SHCCCOM;, &cv-link-SHCCFLAGS;, &cv-link-SHCFLAGS;, &cv-link-SHOBJSUFFIX;.Uses: &cv-link-PLATFORM;. +Sets: &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CCFLAGS;, &cv-link-CFILESUFFIX;, &cv-link-CFLAGS;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-FRAMEWORKPATH;, &cv-link-FRAMEWORKS;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-SHCC;, &cv-link-SHCCCOM;, &cv-link-SHCCFLAGS;, &cv-link-SHCFLAGS;, &cv-link-SHOBJSUFFIX;.Uses: &cv-link-PLATFORM;. clang - + + Set construction variables for the Clang C compiler. -Sets: &cv-link-CC;, &cv-link-CCVERSION;, &cv-link-SHCCFLAGS;. +Sets: &cv-link-CC;, &cv-link-CCVERSION;, &cv-link-SHCCFLAGS;. clangxx - + + Set construction variables for the Clang C++ compiler. -Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJSUFFIX;, &cv-link-STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME;. +Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJSUFFIX;, &cv-link-STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME;. cvf - + + Sets construction variables for the Compaq Visual Fortran compiler. -Sets: &cv-link-FORTRAN;, &cv-link-FORTRANCOM;, &cv-link-FORTRANMODDIR;, &cv-link-FORTRANMODDIRPREFIX;, &cv-link-FORTRANMODDIRSUFFIX;, &cv-link-FORTRANPPCOM;, &cv-link-OBJSUFFIX;, &cv-link-SHFORTRANCOM;, &cv-link-SHFORTRANPPCOM;.Uses: &cv-link-CPPFLAGS;, &cv-link-FORTRANFLAGS;, &cv-link-SHFORTRANFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_FORTRANINCFLAGS;, &cv-link-_FORTRANMODFLAG;. +Sets: &cv-link-FORTRAN;, &cv-link-FORTRANCOM;, &cv-link-FORTRANMODDIR;, &cv-link-FORTRANMODDIRPREFIX;, &cv-link-FORTRANMODDIRSUFFIX;, &cv-link-FORTRANPPCOM;, &cv-link-OBJSUFFIX;, &cv-link-SHFORTRANCOM;, &cv-link-SHFORTRANPPCOM;.Uses: &cv-link-CPPFLAGS;, &cv-link-FORTRANFLAGS;, &cv-link-SHFORTRANFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_FORTRANINCFLAGS;, &cv-link-_FORTRANMODFLAG;. cXX - + + Sets construction variables for generic POSIX C++ compilers. -Sets: &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-CXX;, &cv-link-CXXCOM;, &cv-link-CXXFILESUFFIX;, &cv-link-CXXFLAGS;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-OBJSUFFIX;, &cv-link-SHCXX;, &cv-link-SHCXXCOM;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJSUFFIX;.Uses: &cv-link-CXXCOMSTR;. +Sets: &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-CXX;, &cv-link-CXXCOM;, &cv-link-CXXFILESUFFIX;, &cv-link-CXXFLAGS;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-OBJSUFFIX;, &cv-link-SHCXX;, &cv-link-SHCXXCOM;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJSUFFIX;.Uses: &cv-link-CXXCOMSTR;. cyglink - + + Set construction variables for cygwin linker/loader. -Sets: &cv-link-IMPLIBPREFIX;, &cv-link-IMPLIBSUFFIX;, &cv-link-LDMODULEVERSIONFLAGS;, &cv-link-LINKFLAGS;, &cv-link-RPATHPREFIX;, &cv-link-RPATHSUFFIX;, &cv-link-SHLIBPREFIX;, &cv-link-SHLIBSUFFIX;, &cv-link-SHLIBVERSIONFLAGS;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-_LDMODULEVERSIONFLAGS;, &cv-link-_SHLIBVERSIONFLAGS;. +Sets: &cv-link-IMPLIBPREFIX;, &cv-link-IMPLIBSUFFIX;, &cv-link-LDMODULEVERSIONFLAGS;, &cv-link-LINKFLAGS;, &cv-link-RPATHPREFIX;, &cv-link-RPATHSUFFIX;, &cv-link-SHLIBPREFIX;, &cv-link-SHLIBSUFFIX;, &cv-link-SHLIBVERSIONFLAGS;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-_LDMODULEVERSIONFLAGS;, &cv-link-_SHLIBVERSIONFLAGS;. default - -Sets construction variables for a default list of Tool modules. + + +Sets construction variables for a default list of Tool modules. Use default in the tools list to retain the original defaults, since the tools parameter is treated as a literal statement of the tools -to be made available in that construction environment, not an addition. +to be made available in that construction environment, not an addition. - + The list of tools selected by default is not static, but is dependent both on the platform and on the software installed on the platform. Some tools will not initialize if an underlying command is not found, and some tools are selected from a list of choices on a first-found basis. The finished tool list can be -examined by inspecting the TOOLS construction variable -in the construction environment. +examined by inspecting the TOOLS construction variable +in the construction environment. - + On all platforms, all tools from the following list are selected whose respective conditions are met: filesystem, wix, lex, yacc, rpcgen, swig, @@ -149,7 +166,7 @@ jar, javac, javah, rmic, dvipdf, dvips, gs, tex, latex, pdflatex, pdftex, tar, zip, textfile. - + On Linux systems, the default tools list selects (first-found): a C compiler from gcc, intelc, icc, cc; @@ -166,7 +183,7 @@ It also selects all found from the list m4, rpm. - + On Windows systems, the default tools list selects (first-found): a C compiler from msvc, mingw, gcc, intelc, icl, icc, cc, bcc32; @@ -184,7 +201,7 @@ It also selects all found from the list msvs, midl. - + On MacOS systems, the default tools list selects (first-found): a C compiler from gcc, cc; @@ -200,9 +217,9 @@ It also selects all found from the list m4, rpm. - + Default lists for other platforms can be found by -examining the scons +examining the scons source code (see SCons/Tool/__init__.py). @@ -211,14 +228,16 @@ source code (see dmd - + + Sets construction variables for D language compiler DMD. -Sets: &cv-link-DC;, &cv-link-DCOM;, &cv-link-DDEBUG;, &cv-link-DDEBUGPREFIX;, &cv-link-DDEBUGSUFFIX;, &cv-link-DFILESUFFIX;, &cv-link-DFLAGPREFIX;, &cv-link-DFLAGS;, &cv-link-DFLAGSUFFIX;, &cv-link-DINCPREFIX;, &cv-link-DINCSUFFIX;, &cv-link-DLIB;, &cv-link-DLIBCOM;, &cv-link-DLIBDIRPREFIX;, &cv-link-DLIBDIRSUFFIX;, &cv-link-DLIBFLAGPREFIX;, &cv-link-DLIBFLAGSUFFIX;, &cv-link-DLIBLINKPREFIX;, &cv-link-DLIBLINKSUFFIX;, &cv-link-DLINK;, &cv-link-DLINKCOM;, &cv-link-DLINKFLAGPREFIX;, &cv-link-DLINKFLAGS;, &cv-link-DLINKFLAGSUFFIX;, &cv-link-DPATH;, &cv-link-DRPATHPREFIX;, &cv-link-DRPATHSUFFIX;, &cv-link-DShLibSonameGenerator;, &cv-link-DVERPREFIX;, &cv-link-DVERSIONS;, &cv-link-DVERSUFFIX;, &cv-link-SHDC;, &cv-link-SHDCOM;, &cv-link-SHDLIBVERSION;, &cv-link-SHDLIBVERSIONFLAGS;, &cv-link-SHDLINK;, &cv-link-SHDLINKCOM;, &cv-link-SHDLINKFLAGS;. +Sets: &cv-link-DC;, &cv-link-DCOM;, &cv-link-DDEBUG;, &cv-link-DDEBUGPREFIX;, &cv-link-DDEBUGSUFFIX;, &cv-link-DFILESUFFIX;, &cv-link-DFLAGPREFIX;, &cv-link-DFLAGS;, &cv-link-DFLAGSUFFIX;, &cv-link-DINCPREFIX;, &cv-link-DINCSUFFIX;, &cv-link-DLIB;, &cv-link-DLIBCOM;, &cv-link-DLIBDIRPREFIX;, &cv-link-DLIBDIRSUFFIX;, &cv-link-DLIBFLAGPREFIX;, &cv-link-DLIBFLAGSUFFIX;, &cv-link-DLIBLINKPREFIX;, &cv-link-DLIBLINKSUFFIX;, &cv-link-DLINK;, &cv-link-DLINKCOM;, &cv-link-DLINKFLAGPREFIX;, &cv-link-DLINKFLAGS;, &cv-link-DLINKFLAGSUFFIX;, &cv-link-DPATH;, &cv-link-DRPATHPREFIX;, &cv-link-DRPATHSUFFIX;, &cv-link-DShLibSonameGenerator;, &cv-link-DVERPREFIX;, &cv-link-DVERSIONS;, &cv-link-DVERSUFFIX;, &cv-link-SHDC;, &cv-link-SHDCOM;, &cv-link-SHDLIBVERSION;, &cv-link-SHDLIBVERSIONFLAGS;, &cv-link-SHDLINK;, &cv-link-SHDLINKCOM;, &cv-link-SHDLINKFLAGS;. docbook - This tool tries to make working with Docbook in SCons a little easier. + +This tool tries to make working with Docbook in SCons a little easier. It provides several toolchains for creating different output formats, like HTML or PDF. Contained in the package is a distribution of the Docbook XSL stylesheets as of version 1.76.1. @@ -226,27 +245,27 @@ As long as you don't specify your own stylesheets for customization, these official versions are picked as default...which should reduce the inevitable setup hassles for you. -Implicit dependencies to images and XIncludes are detected automatically +Implicit dependencies to images and XIncludes are detected automatically if you meet the HTML requirements. The additional stylesheet utils/xmldepend.xsl by Paul DuBois is used for this purpose. -Note, that there is no support for XML catalog resolving offered! This tool calls +Note, that there is no support for XML catalog resolving offered! This tool calls the XSLT processors and PDF renderers with the stylesheets you specified, that's it. The rest lies in your hands and you still have to know what you're doing when resolving names via a catalog. -For activating the tool "docbook", you have to add its name to the Environment constructor, +For activating the tool "docbook", you have to add its name to the Environment constructor, like this -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) -On its startup, the Docbook tool tries to find a required xsltproc processor, and +On its startup, the Docbook tool tries to find a required xsltproc processor, and a PDF renderer, e.g. fop. So make sure that these are added to your system's environment PATH and can be called directly, without specifying their full path. -For the most basic processing of Docbook to HTML, you need to have installed +For the most basic processing of Docbook to HTML, you need to have installed -the Python lxml binding to libxml2, or +the Python lxml binding to libxml2, or the direct Python bindings for libxml2/libxslt, or @@ -257,49 +276,49 @@ and xalan. -Rendering to PDF requires you to have one of the applications +Rendering to PDF requires you to have one of the applications fop or xep installed. -Creating a HTML or PDF document is very simple and straightforward. Say +Creating a HTML or PDF document is very simple and straightforward. Say -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookHtml('manual.html', 'manual.xml') env.DocbookPdf('manual.pdf', 'manual.xml') -to get both outputs from your XML source manual.xml. As a shortcut, you can +to get both outputs from your XML source manual.xml. As a shortcut, you can give the stem of the filenames alone, like this: -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookHtml('manual') env.DocbookPdf('manual') -and get the same result. Target and source lists are also supported: +and get the same result. Target and source lists are also supported: -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookHtml(['manual.html','reference.html'], ['manual.xml','reference.xml']) -or even +or even -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookHtml(['manual','reference']) -Whenever you leave out the list of sources, you may not specify a file extension! The +Whenever you leave out the list of sources, you may not specify a file extension! The Tool uses the given names as file stems, and adds the suffixes for target and source files accordingly. -The rules given above are valid for the Builders DocbookHtml, -DocbookPdf, DocbookEpub, DocbookSlidesPdf and DocbookXInclude. For the -DocbookMan transformation you +The rules given above are valid for the Builders DocbookHtml, +DocbookPdf, DocbookEpub, DocbookSlidesPdf and DocbookXInclude. For the +DocbookMan transformation you can specify a target name, but the actual output names are automatically set from the refname entries in your XML source. -The Builders DocbookHtmlChunked, DocbookHtmlhelp and -DocbookSlidesHtml are special, in that: +The Builders DocbookHtmlChunked, DocbookHtmlhelp and +DocbookSlidesHtml are special, in that: -they create a large set of files, where the exact names and their number depend +they create a large set of files, where the exact names and their number depend on the content of the source file, and @@ -308,24 +327,24 @@ XSL transformation is not picked up by the stylesheets. -As a result, there is simply no use in specifying a target HTML name. +As a result, there is simply no use in specifying a target HTML name. So the basic syntax for these builders is always: -env = Environment(tools=['docbook']) +env = Environment(tools=['docbook']) env.DocbookHtmlhelp('manual') -If you want to use a specific XSL file, you can set the +If you want to use a specific XSL file, you can set the additional xsl parameter to your Builder call as follows: -env.DocbookHtml('other.html', 'manual.xml', xsl='html.xsl') +env.DocbookHtml('other.html', 'manual.xml', xsl='html.xsl') -Since this may get tedious if you always use the same local naming for your customized XSL files, +Since this may get tedious if you always use the same local naming for your customized XSL files, e.g. html.xsl for HTML and pdf.xsl for PDF output, a set of variables for setting the default XSL name is provided. These are: -DOCBOOK_DEFAULT_XSL_HTML +DOCBOOK_DEFAULT_XSL_HTML DOCBOOK_DEFAULT_XSL_HTMLCHUNKED DOCBOOK_DEFAULT_XSL_HTMLHELP DOCBOOK_DEFAULT_XSL_PDF @@ -334,656 +353,735 @@ DOCBOOK_DEFAULT_XSL_MAN DOCBOOK_DEFAULT_XSL_SLIDESPDF DOCBOOK_DEFAULT_XSL_SLIDESHTML -and you can set them when constructing your environment: +and you can set them when constructing your environment: -env = Environment(tools=['docbook'], +env = Environment(tools=['docbook'], DOCBOOK_DEFAULT_XSL_HTML='html.xsl', DOCBOOK_DEFAULT_XSL_PDF='pdf.xsl') env.DocbookHtml('manual') # now uses html.xsl -Sets: &cv-link-DOCBOOK_DEFAULT_XSL_EPUB;, &cv-link-DOCBOOK_DEFAULT_XSL_HTML;, &cv-link-DOCBOOK_DEFAULT_XSL_HTMLCHUNKED;, &cv-link-DOCBOOK_DEFAULT_XSL_HTMLHELP;, &cv-link-DOCBOOK_DEFAULT_XSL_MAN;, &cv-link-DOCBOOK_DEFAULT_XSL_PDF;, &cv-link-DOCBOOK_DEFAULT_XSL_SLIDESHTML;, &cv-link-DOCBOOK_DEFAULT_XSL_SLIDESPDF;, &cv-link-DOCBOOK_FOP;, &cv-link-DOCBOOK_FOPCOM;, &cv-link-DOCBOOK_FOPFLAGS;, &cv-link-DOCBOOK_XMLLINT;, &cv-link-DOCBOOK_XMLLINTCOM;, &cv-link-DOCBOOK_XMLLINTFLAGS;, &cv-link-DOCBOOK_XSLTPROC;, &cv-link-DOCBOOK_XSLTPROCCOM;, &cv-link-DOCBOOK_XSLTPROCFLAGS;, &cv-link-DOCBOOK_XSLTPROCPARAMS;.Uses: &cv-link-DOCBOOK_FOPCOMSTR;, &cv-link-DOCBOOK_XMLLINTCOMSTR;, &cv-link-DOCBOOK_XSLTPROCCOMSTR;. +Sets: &cv-link-DOCBOOK_DEFAULT_XSL_EPUB;, &cv-link-DOCBOOK_DEFAULT_XSL_HTML;, &cv-link-DOCBOOK_DEFAULT_XSL_HTMLCHUNKED;, &cv-link-DOCBOOK_DEFAULT_XSL_HTMLHELP;, &cv-link-DOCBOOK_DEFAULT_XSL_MAN;, &cv-link-DOCBOOK_DEFAULT_XSL_PDF;, &cv-link-DOCBOOK_DEFAULT_XSL_SLIDESHTML;, &cv-link-DOCBOOK_DEFAULT_XSL_SLIDESPDF;, &cv-link-DOCBOOK_FOP;, &cv-link-DOCBOOK_FOPCOM;, &cv-link-DOCBOOK_FOPFLAGS;, &cv-link-DOCBOOK_XMLLINT;, &cv-link-DOCBOOK_XMLLINTCOM;, &cv-link-DOCBOOK_XMLLINTFLAGS;, &cv-link-DOCBOOK_XSLTPROC;, &cv-link-DOCBOOK_XSLTPROCCOM;, &cv-link-DOCBOOK_XSLTPROCFLAGS;, &cv-link-DOCBOOK_XSLTPROCPARAMS;.Uses: &cv-link-DOCBOOK_FOPCOMSTR;, &cv-link-DOCBOOK_XMLLINTCOMSTR;, &cv-link-DOCBOOK_XSLTPROCCOMSTR;. dvi - -Attaches the DVI builder to the + + +Attaches the DVI builder to the construction environment. dvipdf - + + Sets construction variables for the dvipdf utility. -Sets: &cv-link-DVIPDF;, &cv-link-DVIPDFCOM;, &cv-link-DVIPDFFLAGS;.Uses: &cv-link-DVIPDFCOMSTR;. +Sets: &cv-link-DVIPDF;, &cv-link-DVIPDFCOM;, &cv-link-DVIPDFFLAGS;.Uses: &cv-link-DVIPDFCOMSTR;. dvips - + + Sets construction variables for the dvips utility. -Sets: &cv-link-DVIPS;, &cv-link-DVIPSFLAGS;, &cv-link-PSCOM;, &cv-link-PSPREFIX;, &cv-link-PSSUFFIX;.Uses: &cv-link-PSCOMSTR;. +Sets: &cv-link-DVIPS;, &cv-link-DVIPSFLAGS;, &cv-link-PSCOM;, &cv-link-PSPREFIX;, &cv-link-PSSUFFIX;.Uses: &cv-link-PSCOMSTR;. f03 - + + Set construction variables for generic POSIX Fortran 03 compilers. -Sets: &cv-link-F03;, &cv-link-F03COM;, &cv-link-F03FLAGS;, &cv-link-F03PPCOM;, &cv-link-SHF03;, &cv-link-SHF03COM;, &cv-link-SHF03FLAGS;, &cv-link-SHF03PPCOM;, &cv-link-_F03INCFLAGS;.Uses: &cv-link-F03COMSTR;, &cv-link-F03PPCOMSTR;, &cv-link-SHF03COMSTR;, &cv-link-SHF03PPCOMSTR;. +Sets: &cv-link-F03;, &cv-link-F03COM;, &cv-link-F03FLAGS;, &cv-link-F03PPCOM;, &cv-link-SHF03;, &cv-link-SHF03COM;, &cv-link-SHF03FLAGS;, &cv-link-SHF03PPCOM;, &cv-link-_F03INCFLAGS;.Uses: &cv-link-F03COMSTR;, &cv-link-F03PPCOMSTR;, &cv-link-SHF03COMSTR;, &cv-link-SHF03PPCOMSTR;. f08 - + + Set construction variables for generic POSIX Fortran 08 compilers. -Sets: &cv-link-F08;, &cv-link-F08COM;, &cv-link-F08FLAGS;, &cv-link-F08PPCOM;, &cv-link-SHF08;, &cv-link-SHF08COM;, &cv-link-SHF08FLAGS;, &cv-link-SHF08PPCOM;, &cv-link-_F08INCFLAGS;.Uses: &cv-link-F08COMSTR;, &cv-link-F08PPCOMSTR;, &cv-link-SHF08COMSTR;, &cv-link-SHF08PPCOMSTR;. +Sets: &cv-link-F08;, &cv-link-F08COM;, &cv-link-F08FLAGS;, &cv-link-F08PPCOM;, &cv-link-SHF08;, &cv-link-SHF08COM;, &cv-link-SHF08FLAGS;, &cv-link-SHF08PPCOM;, &cv-link-_F08INCFLAGS;.Uses: &cv-link-F08COMSTR;, &cv-link-F08PPCOMSTR;, &cv-link-SHF08COMSTR;, &cv-link-SHF08PPCOMSTR;. f77 - + + Set construction variables for generic POSIX Fortran 77 compilers. -Sets: &cv-link-F77;, &cv-link-F77COM;, &cv-link-F77FILESUFFIXES;, &cv-link-F77FLAGS;, &cv-link-F77PPCOM;, &cv-link-F77PPFILESUFFIXES;, &cv-link-FORTRAN;, &cv-link-FORTRANCOM;, &cv-link-FORTRANFLAGS;, &cv-link-SHF77;, &cv-link-SHF77COM;, &cv-link-SHF77FLAGS;, &cv-link-SHF77PPCOM;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANCOM;, &cv-link-SHFORTRANFLAGS;, &cv-link-SHFORTRANPPCOM;, &cv-link-_F77INCFLAGS;.Uses: &cv-link-F77COMSTR;, &cv-link-F77PPCOMSTR;, &cv-link-FORTRANCOMSTR;, &cv-link-FORTRANPPCOMSTR;, &cv-link-SHF77COMSTR;, &cv-link-SHF77PPCOMSTR;, &cv-link-SHFORTRANCOMSTR;, &cv-link-SHFORTRANPPCOMSTR;. +Sets: &cv-link-F77;, &cv-link-F77COM;, &cv-link-F77FILESUFFIXES;, &cv-link-F77FLAGS;, &cv-link-F77PPCOM;, &cv-link-F77PPFILESUFFIXES;, &cv-link-FORTRAN;, &cv-link-FORTRANCOM;, &cv-link-FORTRANFLAGS;, &cv-link-SHF77;, &cv-link-SHF77COM;, &cv-link-SHF77FLAGS;, &cv-link-SHF77PPCOM;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANCOM;, &cv-link-SHFORTRANFLAGS;, &cv-link-SHFORTRANPPCOM;, &cv-link-_F77INCFLAGS;.Uses: &cv-link-F77COMSTR;, &cv-link-F77PPCOMSTR;, &cv-link-FORTRANCOMSTR;, &cv-link-FORTRANPPCOMSTR;, &cv-link-SHF77COMSTR;, &cv-link-SHF77PPCOMSTR;, &cv-link-SHFORTRANCOMSTR;, &cv-link-SHFORTRANPPCOMSTR;. f90 - + + Set construction variables for generic POSIX Fortran 90 compilers. -Sets: &cv-link-F90;, &cv-link-F90COM;, &cv-link-F90FLAGS;, &cv-link-F90PPCOM;, &cv-link-SHF90;, &cv-link-SHF90COM;, &cv-link-SHF90FLAGS;, &cv-link-SHF90PPCOM;, &cv-link-_F90INCFLAGS;.Uses: &cv-link-F90COMSTR;, &cv-link-F90PPCOMSTR;, &cv-link-SHF90COMSTR;, &cv-link-SHF90PPCOMSTR;. +Sets: &cv-link-F90;, &cv-link-F90COM;, &cv-link-F90FLAGS;, &cv-link-F90PPCOM;, &cv-link-SHF90;, &cv-link-SHF90COM;, &cv-link-SHF90FLAGS;, &cv-link-SHF90PPCOM;, &cv-link-_F90INCFLAGS;.Uses: &cv-link-F90COMSTR;, &cv-link-F90PPCOMSTR;, &cv-link-SHF90COMSTR;, &cv-link-SHF90PPCOMSTR;. f95 - + + Set construction variables for generic POSIX Fortran 95 compilers. -Sets: &cv-link-F95;, &cv-link-F95COM;, &cv-link-F95FLAGS;, &cv-link-F95PPCOM;, &cv-link-SHF95;, &cv-link-SHF95COM;, &cv-link-SHF95FLAGS;, &cv-link-SHF95PPCOM;, &cv-link-_F95INCFLAGS;.Uses: &cv-link-F95COMSTR;, &cv-link-F95PPCOMSTR;, &cv-link-SHF95COMSTR;, &cv-link-SHF95PPCOMSTR;. +Sets: &cv-link-F95;, &cv-link-F95COM;, &cv-link-F95FLAGS;, &cv-link-F95PPCOM;, &cv-link-SHF95;, &cv-link-SHF95COM;, &cv-link-SHF95FLAGS;, &cv-link-SHF95PPCOM;, &cv-link-_F95INCFLAGS;.Uses: &cv-link-F95COMSTR;, &cv-link-F95PPCOMSTR;, &cv-link-SHF95COMSTR;, &cv-link-SHF95PPCOMSTR;. fortran - + + Set construction variables for generic POSIX Fortran compilers. -Sets: &cv-link-FORTRAN;, &cv-link-FORTRANCOM;, &cv-link-FORTRANFLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANCOM;, &cv-link-SHFORTRANFLAGS;, &cv-link-SHFORTRANPPCOM;.Uses: &cv-link-FORTRANCOMSTR;, &cv-link-FORTRANPPCOMSTR;, &cv-link-SHFORTRANCOMSTR;, &cv-link-SHFORTRANPPCOMSTR;. +Sets: &cv-link-FORTRAN;, &cv-link-FORTRANCOM;, &cv-link-FORTRANFLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANCOM;, &cv-link-SHFORTRANFLAGS;, &cv-link-SHFORTRANPPCOM;.Uses: &cv-link-FORTRANCOMSTR;, &cv-link-FORTRANPPCOMSTR;, &cv-link-SHFORTRANCOMSTR;, &cv-link-SHFORTRANPPCOMSTR;. g++ - -Set construction variables for the gXX C++ compiler. + + +Set construction variables for the gXX C++ compiler. -Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJSUFFIX;. +Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJSUFFIX;. g77 - -Set construction variables for the g77 Fortran compiler. -Calls the f77 Tool module + + +Set construction variables for the g77 Fortran compiler. +Calls the f77 Tool module to set variables. gas - -Sets construction variables for the gas assembler. -Calls the as module. + + +Sets construction variables for the gas assembler. +Calls the as module. -Sets: &cv-link-AS;. +Sets: &cv-link-AS;. gcc - -Set construction variables for the gcc C compiler. + + +Set construction variables for the gcc C compiler. -Sets: &cv-link-CC;, &cv-link-CCVERSION;, &cv-link-SHCCFLAGS;. +Sets: &cv-link-CC;, &cv-link-CCVERSION;, &cv-link-SHCCFLAGS;. gdc - + + Sets construction variables for the D language compiler GDC. -Sets: &cv-link-DC;, &cv-link-DCOM;, &cv-link-DDEBUG;, &cv-link-DDEBUGPREFIX;, &cv-link-DDEBUGSUFFIX;, &cv-link-DFILESUFFIX;, &cv-link-DFLAGPREFIX;, &cv-link-DFLAGS;, &cv-link-DFLAGSUFFIX;, &cv-link-DINCPREFIX;, &cv-link-DINCSUFFIX;, &cv-link-DLIB;, &cv-link-DLIBCOM;, &cv-link-DLIBDIRPREFIX;, &cv-link-DLIBDIRSUFFIX;, &cv-link-DLIBFLAGPREFIX;, &cv-link-DLIBFLAGSUFFIX;, &cv-link-DLIBLINKPREFIX;, &cv-link-DLIBLINKSUFFIX;, &cv-link-DLINK;, &cv-link-DLINKCOM;, &cv-link-DLINKFLAGPREFIX;, &cv-link-DLINKFLAGS;, &cv-link-DLINKFLAGSUFFIX;, &cv-link-DPATH;, &cv-link-DRPATHPREFIX;, &cv-link-DRPATHSUFFIX;, &cv-link-DShLibSonameGenerator;, &cv-link-DVERPREFIX;, &cv-link-DVERSIONS;, &cv-link-DVERSUFFIX;, &cv-link-SHDC;, &cv-link-SHDCOM;, &cv-link-SHDLIBVERSION;, &cv-link-SHDLIBVERSIONFLAGS;, &cv-link-SHDLINK;, &cv-link-SHDLINKCOM;, &cv-link-SHDLINKFLAGS;. +Sets: &cv-link-DC;, &cv-link-DCOM;, &cv-link-DDEBUG;, &cv-link-DDEBUGPREFIX;, &cv-link-DDEBUGSUFFIX;, &cv-link-DFILESUFFIX;, &cv-link-DFLAGPREFIX;, &cv-link-DFLAGS;, &cv-link-DFLAGSUFFIX;, &cv-link-DINCPREFIX;, &cv-link-DINCSUFFIX;, &cv-link-DLIB;, &cv-link-DLIBCOM;, &cv-link-DLIBDIRPREFIX;, &cv-link-DLIBDIRSUFFIX;, &cv-link-DLIBFLAGPREFIX;, &cv-link-DLIBFLAGSUFFIX;, &cv-link-DLIBLINKPREFIX;, &cv-link-DLIBLINKSUFFIX;, &cv-link-DLINK;, &cv-link-DLINKCOM;, &cv-link-DLINKFLAGPREFIX;, &cv-link-DLINKFLAGS;, &cv-link-DLINKFLAGSUFFIX;, &cv-link-DPATH;, &cv-link-DRPATHPREFIX;, &cv-link-DRPATHSUFFIX;, &cv-link-DShLibSonameGenerator;, &cv-link-DVERPREFIX;, &cv-link-DVERSIONS;, &cv-link-DVERSUFFIX;, &cv-link-SHDC;, &cv-link-SHDCOM;, &cv-link-SHDLIBVERSION;, &cv-link-SHDLIBVERSIONFLAGS;, &cv-link-SHDLINK;, &cv-link-SHDLINKCOM;, &cv-link-SHDLINKFLAGS;. gettext - + + This is actually a toolset, which supports internationalization and localization of software being constructed with SCons. The toolset loads following tools: - + - xgettext - to extract internationalized messages from source code to + xgettext - to extract internationalized messages from source code to POT file(s), - msginit - may be optionally used to initialize PO + msginit - may be optionally used to initialize PO files, - msgmerge - to update PO files, that already contain + msgmerge - to update PO files, that already contain translated messages, - msgfmt - to compile textual PO file to binary + msgfmt - to compile textual PO file to binary installable MO file. - -When you enable gettext, it internally loads all abovementioned tools, + +When you enable gettext, it internally loads all abovementioned tools, so you're encouraged to see their individual documentation. - + Each of the above tools provides its own builder(s) which may be used to perform particular activities related to software internationalization. You may be however interested in top-level builder -Translate described few paragraphs later. +Translate described few paragraphs later. - -To use gettext tools add 'gettext' tool to your + +To use gettext tools add 'gettext' tool to your environment: - + env = Environment( tools = ['default', 'gettext'] ) gfortran - + + Sets construction variables for the GNU F95/F2003 GNU compiler. -Sets: &cv-link-F77;, &cv-link-F90;, &cv-link-F95;, &cv-link-FORTRAN;, &cv-link-SHF77;, &cv-link-SHF77FLAGS;, &cv-link-SHF90;, &cv-link-SHF90FLAGS;, &cv-link-SHF95;, &cv-link-SHF95FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. +Sets: &cv-link-F77;, &cv-link-F90;, &cv-link-F95;, &cv-link-FORTRAN;, &cv-link-SHF77;, &cv-link-SHF77FLAGS;, &cv-link-SHF90;, &cv-link-SHF90FLAGS;, &cv-link-SHF95;, &cv-link-SHF95FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. gnulink - + + Set construction variables for GNU linker/loader. -Sets: &cv-link-LDMODULEVERSIONFLAGS;, &cv-link-RPATHPREFIX;, &cv-link-RPATHSUFFIX;, &cv-link-SHLIBVERSIONFLAGS;, &cv-link-SHLINKFLAGS;, &cv-link-_LDMODULESONAME;, &cv-link-_SHLIBSONAME;. +Sets: &cv-link-LDMODULEVERSIONFLAGS;, &cv-link-RPATHPREFIX;, &cv-link-RPATHSUFFIX;, &cv-link-SHLIBVERSIONFLAGS;, &cv-link-SHLINKFLAGS;, &cv-link-_LDMODULESONAME;, &cv-link-_SHLIBSONAME;. gs - + + This Tool sets the required construction variables for working with the Ghostscript command. It also registers an appropriate Action -with the PDF Builder (PDF), such that the conversion from +with the PDF Builder (PDF), such that the conversion from PS/EPS to PDF happens automatically for the TeX/LaTeX toolchain. -Finally, it adds an explicit Ghostscript Builder (Gs) to the +Finally, it adds an explicit Ghostscript Builder (Gs) to the environment. -Sets: &cv-link-GS;, &cv-link-GSCOM;, &cv-link-GSFLAGS;.Uses: &cv-link-GSCOMSTR;. +Sets: &cv-link-GS;, &cv-link-GSCOM;, &cv-link-GSFLAGS;.Uses: &cv-link-GSCOMSTR;. hpc++ - + + Set construction variables for the compilers aCC on HP/UX systems. hpcc - + + Set construction variables for the aCC on HP/UX systems. -Calls the cXX tool for additional variables. +Calls the cXX tool for additional variables. -Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXXFLAGS;. +Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXXFLAGS;. hplink - + + Sets construction variables for the linker on HP/UX systems. -Sets: &cv-link-LINKFLAGS;, &cv-link-SHLIBSUFFIX;, &cv-link-SHLINKFLAGS;. +Sets: &cv-link-LINKFLAGS;, &cv-link-SHLIBSUFFIX;, &cv-link-SHLINKFLAGS;. icc - + + Sets construction variables for the icc compiler on OS/2 systems. -Sets: &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CFILESUFFIX;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-CXXCOM;, &cv-link-CXXFILESUFFIX;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;.Uses: &cv-link-CCFLAGS;, &cv-link-CFLAGS;, &cv-link-CPPFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. +Sets: &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CFILESUFFIX;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-CXXCOM;, &cv-link-CXXFILESUFFIX;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;.Uses: &cv-link-CCFLAGS;, &cv-link-CFLAGS;, &cv-link-CPPFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. icl - + + Sets construction variables for the Intel C/C++ compiler. -Calls the intelc Tool module to set its variables. +Calls the intelc Tool module to set its variables. ifl - + + Sets construction variables for the Intel Fortran compiler. -Sets: &cv-link-FORTRAN;, &cv-link-FORTRANCOM;, &cv-link-FORTRANPPCOM;, &cv-link-SHFORTRANCOM;, &cv-link-SHFORTRANPPCOM;.Uses: &cv-link-CPPFLAGS;, &cv-link-FORTRANFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_FORTRANINCFLAGS;. +Sets: &cv-link-FORTRAN;, &cv-link-FORTRANCOM;, &cv-link-FORTRANPPCOM;, &cv-link-SHFORTRANCOM;, &cv-link-SHFORTRANPPCOM;.Uses: &cv-link-CPPFLAGS;, &cv-link-FORTRANFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_FORTRANINCFLAGS;. ifort - + + Sets construction variables for newer versions of the Intel Fortran compiler for Linux. -Sets: &cv-link-F77;, &cv-link-F90;, &cv-link-F95;, &cv-link-FORTRAN;, &cv-link-SHF77;, &cv-link-SHF77FLAGS;, &cv-link-SHF90;, &cv-link-SHF90FLAGS;, &cv-link-SHF95;, &cv-link-SHF95FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. +Sets: &cv-link-F77;, &cv-link-F90;, &cv-link-F95;, &cv-link-FORTRAN;, &cv-link-SHF77;, &cv-link-SHF77FLAGS;, &cv-link-SHF90;, &cv-link-SHF90FLAGS;, &cv-link-SHF95;, &cv-link-SHF95FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. ilink - + + Sets construction variables for the ilink linker on OS/2 systems. -Sets: &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;. +Sets: &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;. ilink32 - + + Sets construction variables for the Borland ilink32 linker. -Sets: &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;. +Sets: &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;. install - + + Sets construction variables for file and directory installation. -Sets: &cv-link-INSTALL;, &cv-link-INSTALLSTR;. +Sets: &cv-link-INSTALL;, &cv-link-INSTALLSTR;. intelc - + + Sets construction variables for the Intel C/C++ compiler (Linux and Windows, version 7 and later). -Calls the gcc or msvc +Calls the gcc or msvc (on Linux and Windows, respectively) to set underlying variables. -Sets: &cv-link-AR;, &cv-link-CC;, &cv-link-CXX;, &cv-link-INTEL_C_COMPILER_VERSION;, &cv-link-LINK;. +Sets: &cv-link-AR;, &cv-link-CC;, &cv-link-CXX;, &cv-link-INTEL_C_COMPILER_VERSION;, &cv-link-LINK;. jar - -Sets construction variables for the jar utility. + + +Sets construction variables for the jar utility. -Sets: &cv-link-JAR;, &cv-link-JARCOM;, &cv-link-JARFLAGS;, &cv-link-JARSUFFIX;.Uses: &cv-link-JARCOMSTR;. +Sets: &cv-link-JAR;, &cv-link-JARCOM;, &cv-link-JARFLAGS;, &cv-link-JARSUFFIX;.Uses: &cv-link-JARCOMSTR;. javac - - Sets construction variables for the javac compiler. + + + Sets construction variables for the javac compiler. - Sets: &cv-link-JAVABOOTCLASSPATH;, &cv-link-JAVAC;, &cv-link-JAVACCOM;, &cv-link-JAVACFLAGS;, &cv-link-JAVACLASSPATH;, &cv-link-JAVACLASSSUFFIX;, &cv-link-JAVAINCLUDES;, &cv-link-JAVASOURCEPATH;, &cv-link-JAVASUFFIX;.Uses: &cv-link-JAVACCOMSTR;. + Sets: &cv-link-JAVABOOTCLASSPATH;, &cv-link-JAVAC;, &cv-link-JAVACCOM;, &cv-link-JAVACFLAGS;, &cv-link-JAVACLASSPATH;, &cv-link-JAVACLASSSUFFIX;, &cv-link-JAVAINCLUDES;, &cv-link-JAVASOURCEPATH;, &cv-link-JAVASUFFIX;.Uses: &cv-link-JAVACCOMSTR;. javah - -Sets construction variables for the javah tool. + + +Sets construction variables for the javah tool. -Sets: &cv-link-JAVACLASSSUFFIX;, &cv-link-JAVAH;, &cv-link-JAVAHCOM;, &cv-link-JAVAHFLAGS;.Uses: &cv-link-JAVACLASSPATH;, &cv-link-JAVAHCOMSTR;. +Sets: &cv-link-JAVACLASSSUFFIX;, &cv-link-JAVAH;, &cv-link-JAVAHCOM;, &cv-link-JAVAHFLAGS;.Uses: &cv-link-JAVACLASSPATH;, &cv-link-JAVAHCOMSTR;. latex - -Sets construction variables for the latex utility. + + +Sets construction variables for the latex utility. -Sets: &cv-link-LATEX;, &cv-link-LATEXCOM;, &cv-link-LATEXFLAGS;.Uses: &cv-link-LATEXCOMSTR;. +Sets: &cv-link-LATEX;, &cv-link-LATEXCOM;, &cv-link-LATEXFLAGS;.Uses: &cv-link-LATEXCOMSTR;. ldc - + + Sets construction variables for the D language compiler LDC2. -Sets: &cv-link-DC;, &cv-link-DCOM;, &cv-link-DDEBUG;, &cv-link-DDEBUGPREFIX;, &cv-link-DDEBUGSUFFIX;, &cv-link-DFILESUFFIX;, &cv-link-DFLAGPREFIX;, &cv-link-DFLAGS;, &cv-link-DFLAGSUFFIX;, &cv-link-DINCPREFIX;, &cv-link-DINCSUFFIX;, &cv-link-DLIB;, &cv-link-DLIBCOM;, &cv-link-DLIBDIRPREFIX;, &cv-link-DLIBDIRSUFFIX;, &cv-link-DLIBFLAGPREFIX;, &cv-link-DLIBFLAGSUFFIX;, &cv-link-DLIBLINKPREFIX;, &cv-link-DLIBLINKSUFFIX;, &cv-link-DLINK;, &cv-link-DLINKCOM;, &cv-link-DLINKFLAGPREFIX;, &cv-link-DLINKFLAGS;, &cv-link-DLINKFLAGSUFFIX;, &cv-link-DPATH;, &cv-link-DRPATHPREFIX;, &cv-link-DRPATHSUFFIX;, &cv-link-DShLibSonameGenerator;, &cv-link-DVERPREFIX;, &cv-link-DVERSIONS;, &cv-link-DVERSUFFIX;, &cv-link-SHDC;, &cv-link-SHDCOM;, &cv-link-SHDLIBVERSION;, &cv-link-SHDLIBVERSIONFLAGS;, &cv-link-SHDLINK;, &cv-link-SHDLINKCOM;, &cv-link-SHDLINKFLAGS;. +Sets: &cv-link-DC;, &cv-link-DCOM;, &cv-link-DDEBUG;, &cv-link-DDEBUGPREFIX;, &cv-link-DDEBUGSUFFIX;, &cv-link-DFILESUFFIX;, &cv-link-DFLAGPREFIX;, &cv-link-DFLAGS;, &cv-link-DFLAGSUFFIX;, &cv-link-DINCPREFIX;, &cv-link-DINCSUFFIX;, &cv-link-DLIB;, &cv-link-DLIBCOM;, &cv-link-DLIBDIRPREFIX;, &cv-link-DLIBDIRSUFFIX;, &cv-link-DLIBFLAGPREFIX;, &cv-link-DLIBFLAGSUFFIX;, &cv-link-DLIBLINKPREFIX;, &cv-link-DLIBLINKSUFFIX;, &cv-link-DLINK;, &cv-link-DLINKCOM;, &cv-link-DLINKFLAGPREFIX;, &cv-link-DLINKFLAGS;, &cv-link-DLINKFLAGSUFFIX;, &cv-link-DPATH;, &cv-link-DRPATHPREFIX;, &cv-link-DRPATHSUFFIX;, &cv-link-DShLibSonameGenerator;, &cv-link-DVERPREFIX;, &cv-link-DVERSIONS;, &cv-link-DVERSUFFIX;, &cv-link-SHDC;, &cv-link-SHDCOM;, &cv-link-SHDLIBVERSION;, &cv-link-SHDLIBVERSIONFLAGS;, &cv-link-SHDLINK;, &cv-link-SHDLINKCOM;, &cv-link-SHDLINKFLAGS;. lex - -Sets construction variables for the lex lexical analyser. + + +Sets construction variables for the lex lexical analyser. -Sets: &cv-link-LEX;, &cv-link-LEXCOM;, &cv-link-LEXFLAGS;, &cv-link-LEXUNISTD;.Uses: &cv-link-LEXCOMSTR;. +Sets: &cv-link-LEX;, &cv-link-LEXCOM;, &cv-link-LEXFLAGS;, &cv-link-LEXUNISTD;.Uses: &cv-link-LEXCOMSTR;. link - + + Sets construction variables for generic POSIX linkers. This is a "smart" linker tool which selects a compiler to complete the linking based on the types of source files. -Sets: &cv-link-LDMODULE;, &cv-link-LDMODULECOM;, &cv-link-LDMODULEFLAGS;, &cv-link-LDMODULENOVERSIONSYMLINKS;, &cv-link-LDMODULEPREFIX;, &cv-link-LDMODULESUFFIX;, &cv-link-LDMODULEVERSION;, &cv-link-LDMODULEVERSIONFLAGS;, &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;, &cv-link-SHLIBSUFFIX;, &cv-link-SHLINK;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-__LDMODULEVERSIONFLAGS;, &cv-link-__SHLIBVERSIONFLAGS;.Uses: &cv-link-LDMODULECOMSTR;, &cv-link-LINKCOMSTR;, &cv-link-SHLINKCOMSTR;. +Sets: &cv-link-LDMODULE;, &cv-link-LDMODULECOM;, &cv-link-LDMODULEFLAGS;, &cv-link-LDMODULENOVERSIONSYMLINKS;, &cv-link-LDMODULEPREFIX;, &cv-link-LDMODULESUFFIX;, &cv-link-LDMODULEVERSION;, &cv-link-LDMODULEVERSIONFLAGS;, &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;, &cv-link-SHLIBSUFFIX;, &cv-link-SHLINK;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-__LDMODULEVERSIONFLAGS;, &cv-link-__SHLIBVERSIONFLAGS;.Uses: &cv-link-LDMODULECOMSTR;, &cv-link-LINKCOMSTR;, &cv-link-SHLINKCOMSTR;. linkloc - + + Sets construction variables for the LinkLoc linker for the Phar Lap ETS embedded operating system. -Sets: &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;, &cv-link-SHLINK;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;.Uses: &cv-link-LINKCOMSTR;, &cv-link-SHLINKCOMSTR;. +Sets: &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;, &cv-link-SHLINK;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;.Uses: &cv-link-LINKCOMSTR;, &cv-link-SHLINKCOMSTR;. m4 - -Sets construction variables for the m4 macro processor. + + +Sets construction variables for the m4 macro processor. -Sets: &cv-link-M4;, &cv-link-M4COM;, &cv-link-M4FLAGS;.Uses: &cv-link-M4COMSTR;. +Sets: &cv-link-M4;, &cv-link-M4COM;, &cv-link-M4FLAGS;.Uses: &cv-link-M4COMSTR;. masm - + + Sets construction variables for the Microsoft assembler. -Sets: &cv-link-AS;, &cv-link-ASCOM;, &cv-link-ASFLAGS;, &cv-link-ASPPCOM;, &cv-link-ASPPFLAGS;.Uses: &cv-link-ASCOMSTR;, &cv-link-ASPPCOMSTR;, &cv-link-CPPFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. +Sets: &cv-link-AS;, &cv-link-ASCOM;, &cv-link-ASFLAGS;, &cv-link-ASPPCOM;, &cv-link-ASPPFLAGS;.Uses: &cv-link-ASCOMSTR;, &cv-link-ASPPCOMSTR;, &cv-link-CPPFLAGS;, &cv-link-_CPPDEFFLAGS;, &cv-link-_CPPINCFLAGS;. midl - + + Sets construction variables for the Microsoft IDL compiler. -Sets: &cv-link-MIDL;, &cv-link-MIDLCOM;, &cv-link-MIDLFLAGS;.Uses: &cv-link-MIDLCOMSTR;. +Sets: &cv-link-MIDL;, &cv-link-MIDLCOM;, &cv-link-MIDLFLAGS;.Uses: &cv-link-MIDLCOMSTR;. mingw - + + Sets construction variables for MinGW (Minimal Gnu on Windows). -Sets: &cv-link-AS;, &cv-link-CC;, &cv-link-CXX;, &cv-link-LDMODULECOM;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;, &cv-link-OBJSUFFIX;, &cv-link-RC;, &cv-link-RCCOM;, &cv-link-RCFLAGS;, &cv-link-RCINCFLAGS;, &cv-link-RCINCPREFIX;, &cv-link-RCINCSUFFIX;, &cv-link-SHCCFLAGS;, &cv-link-SHCXXFLAGS;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-SHOBJSUFFIX;, &cv-link-WINDOWSDEFPREFIX;, &cv-link-WINDOWSDEFSUFFIX;.Uses: &cv-link-RCCOMSTR;, &cv-link-SHLINKCOMSTR;. +Sets: &cv-link-AS;, &cv-link-CC;, &cv-link-CXX;, &cv-link-LDMODULECOM;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;, &cv-link-OBJSUFFIX;, &cv-link-RC;, &cv-link-RCCOM;, &cv-link-RCFLAGS;, &cv-link-RCINCFLAGS;, &cv-link-RCINCPREFIX;, &cv-link-RCINCSUFFIX;, &cv-link-SHCCFLAGS;, &cv-link-SHCXXFLAGS;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-SHOBJSUFFIX;, &cv-link-WINDOWSDEFPREFIX;, &cv-link-WINDOWSDEFSUFFIX;.Uses: &cv-link-RCCOMSTR;, &cv-link-SHLINKCOMSTR;. msgfmt - -This scons tool is a part of scons gettext toolset. It provides scons + + +This scons tool is a part of scons gettext toolset. It provides scons interface to msgfmt(1) command, which generates binary message catalog (MO) from a textual translation description (PO). -Sets: &cv-link-MOSUFFIX;, &cv-link-MSGFMT;, &cv-link-MSGFMTCOM;, &cv-link-MSGFMTCOMSTR;, &cv-link-MSGFMTFLAGS;, &cv-link-POSUFFIX;.Uses: &cv-link-LINGUAS_FILE;. +Sets: &cv-link-MOSUFFIX;, &cv-link-MSGFMT;, &cv-link-MSGFMTCOM;, &cv-link-MSGFMTCOMSTR;, &cv-link-MSGFMTFLAGS;, &cv-link-POSUFFIX;.Uses: &cv-link-LINGUAS_FILE;. msginit - -This scons tool is a part of scons gettext toolset. It provides + + +This scons tool is a part of scons gettext toolset. It provides scons interface to msginit(1) program, which creates new PO file, initializing the meta information with values from user's environment (or options). -Sets: &cv-link-MSGINIT;, &cv-link-MSGINITCOM;, &cv-link-MSGINITCOMSTR;, &cv-link-MSGINITFLAGS;, &cv-link-POAUTOINIT;, &cv-link-POCREATE_ALIAS;, &cv-link-POSUFFIX;, &cv-link-POTSUFFIX;, &cv-link-_MSGINITLOCALE;.Uses: &cv-link-LINGUAS_FILE;, &cv-link-POAUTOINIT;, &cv-link-POTDOMAIN;. +Sets: &cv-link-MSGINIT;, &cv-link-MSGINITCOM;, &cv-link-MSGINITCOMSTR;, &cv-link-MSGINITFLAGS;, &cv-link-POAUTOINIT;, &cv-link-POCREATE_ALIAS;, &cv-link-POSUFFIX;, &cv-link-POTSUFFIX;, &cv-link-_MSGINITLOCALE;.Uses: &cv-link-LINGUAS_FILE;, &cv-link-POAUTOINIT;, &cv-link-POTDOMAIN;. msgmerge - -This scons tool is a part of scons gettext toolset. It provides + + +This scons tool is a part of scons gettext toolset. It provides scons interface to msgmerge(1) command, which merges two Uniform style .po files together. -Sets: &cv-link-MSGMERGE;, &cv-link-MSGMERGECOM;, &cv-link-MSGMERGECOMSTR;, &cv-link-MSGMERGEFLAGS;, &cv-link-POSUFFIX;, &cv-link-POTSUFFIX;, &cv-link-POUPDATE_ALIAS;.Uses: &cv-link-LINGUAS_FILE;, &cv-link-POAUTOINIT;, &cv-link-POTDOMAIN;. +Sets: &cv-link-MSGMERGE;, &cv-link-MSGMERGECOM;, &cv-link-MSGMERGECOMSTR;, &cv-link-MSGMERGEFLAGS;, &cv-link-POSUFFIX;, &cv-link-POTSUFFIX;, &cv-link-POUPDATE_ALIAS;.Uses: &cv-link-LINGUAS_FILE;, &cv-link-POAUTOINIT;, &cv-link-POTDOMAIN;. mslib - + + Sets construction variables for the Microsoft mslib library archiver. -Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;.Uses: &cv-link-ARCOMSTR;. +Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;.Uses: &cv-link-ARCOMSTR;. mslink - + + Sets construction variables for the Microsoft linker. -Sets: &cv-link-LDMODULE;, &cv-link-LDMODULECOM;, &cv-link-LDMODULEFLAGS;, &cv-link-LDMODULEPREFIX;, &cv-link-LDMODULESUFFIX;, &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;, &cv-link-REGSVR;, &cv-link-REGSVRCOM;, &cv-link-REGSVRFLAGS;, &cv-link-SHLINK;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-WIN32DEFPREFIX;, &cv-link-WIN32DEFSUFFIX;, &cv-link-WIN32EXPPREFIX;, &cv-link-WIN32EXPSUFFIX;, &cv-link-WINDOWSDEFPREFIX;, &cv-link-WINDOWSDEFSUFFIX;, &cv-link-WINDOWSEXPPREFIX;, &cv-link-WINDOWSEXPSUFFIX;, &cv-link-WINDOWSPROGMANIFESTPREFIX;, &cv-link-WINDOWSPROGMANIFESTSUFFIX;, &cv-link-WINDOWSSHLIBMANIFESTPREFIX;, &cv-link-WINDOWSSHLIBMANIFESTSUFFIX;, &cv-link-WINDOWS_INSERT_DEF;.Uses: &cv-link-LDMODULECOMSTR;, &cv-link-LINKCOMSTR;, &cv-link-REGSVRCOMSTR;, &cv-link-SHLINKCOMSTR;. +Sets: &cv-link-LDMODULE;, &cv-link-LDMODULECOM;, &cv-link-LDMODULEFLAGS;, &cv-link-LDMODULEPREFIX;, &cv-link-LDMODULESUFFIX;, &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-LINKFLAGS;, &cv-link-REGSVR;, &cv-link-REGSVRCOM;, &cv-link-REGSVRFLAGS;, &cv-link-SHLINK;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;, &cv-link-WIN32DEFPREFIX;, &cv-link-WIN32DEFSUFFIX;, &cv-link-WIN32EXPPREFIX;, &cv-link-WIN32EXPSUFFIX;, &cv-link-WINDOWSDEFPREFIX;, &cv-link-WINDOWSDEFSUFFIX;, &cv-link-WINDOWSEXPPREFIX;, &cv-link-WINDOWSEXPSUFFIX;, &cv-link-WINDOWSPROGMANIFESTPREFIX;, &cv-link-WINDOWSPROGMANIFESTSUFFIX;, &cv-link-WINDOWSSHLIBMANIFESTPREFIX;, &cv-link-WINDOWSSHLIBMANIFESTSUFFIX;, &cv-link-WINDOWS_INSERT_DEF;.Uses: &cv-link-LDMODULECOMSTR;, &cv-link-LINKCOMSTR;, &cv-link-REGSVRCOMSTR;, &cv-link-SHLINKCOMSTR;. mssdk - + + Sets variables for Microsoft Platform SDK and/or Windows SDK. Note that unlike most other Tool modules, mssdk does not set construction variables, but sets the environment variables -in the environment SCons uses to execute +in the environment SCons uses to execute the Microsoft toolchain: %INCLUDE%, %LIB%, %LIBPATH% and %PATH%. -Uses: &cv-link-MSSDK_DIR;, &cv-link-MSSDK_VERSION;, &cv-link-MSVS_VERSION;. +Uses: &cv-link-MSSDK_DIR;, &cv-link-MSSDK_VERSION;, &cv-link-MSVS_VERSION;. msvc - + + Sets construction variables for the Microsoft Visual C/C++ compiler. -Sets: &cv-link-BUILDERS;, &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CCFLAGS;, &cv-link-CCPCHFLAGS;, &cv-link-CCPDBFLAGS;, &cv-link-CFILESUFFIX;, &cv-link-CFLAGS;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-CXX;, &cv-link-CXXCOM;, &cv-link-CXXFILESUFFIX;, &cv-link-CXXFLAGS;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-OBJPREFIX;, &cv-link-OBJSUFFIX;, &cv-link-PCHCOM;, &cv-link-PCHPDBFLAGS;, &cv-link-RC;, &cv-link-RCCOM;, &cv-link-RCFLAGS;, &cv-link-SHCC;, &cv-link-SHCCCOM;, &cv-link-SHCCFLAGS;, &cv-link-SHCFLAGS;, &cv-link-SHCXX;, &cv-link-SHCXXCOM;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJPREFIX;, &cv-link-SHOBJSUFFIX;.Uses: &cv-link-CCCOMSTR;, &cv-link-CXXCOMSTR;, &cv-link-PCH;, &cv-link-PCHSTOP;, &cv-link-PDB;, &cv-link-SHCCCOMSTR;, &cv-link-SHCXXCOMSTR;. +Sets: &cv-link-BUILDERS;, &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CCFLAGS;, &cv-link-CCPCHFLAGS;, &cv-link-CCPDBFLAGS;, &cv-link-CFILESUFFIX;, &cv-link-CFLAGS;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-CXX;, &cv-link-CXXCOM;, &cv-link-CXXFILESUFFIX;, &cv-link-CXXFLAGS;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-OBJPREFIX;, &cv-link-OBJSUFFIX;, &cv-link-PCHCOM;, &cv-link-PCHPDBFLAGS;, &cv-link-RC;, &cv-link-RCCOM;, &cv-link-RCFLAGS;, &cv-link-SHCC;, &cv-link-SHCCCOM;, &cv-link-SHCCFLAGS;, &cv-link-SHCFLAGS;, &cv-link-SHCXX;, &cv-link-SHCXXCOM;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJPREFIX;, &cv-link-SHOBJSUFFIX;.Uses: &cv-link-CCCOMSTR;, &cv-link-CXXCOMSTR;, &cv-link-PCH;, &cv-link-PCHSTOP;, &cv-link-PDB;, &cv-link-SHCCCOMSTR;, &cv-link-SHCXXCOMSTR;. msvs - Sets construction variables for Microsoft Visual Studio. - Sets: &cv-link-MSVSBUILDCOM;, &cv-link-MSVSCLEANCOM;, &cv-link-MSVSENCODING;, &cv-link-MSVSPROJECTCOM;, &cv-link-MSVSREBUILDCOM;, &cv-link-MSVSSCONS;, &cv-link-MSVSSCONSCOM;, &cv-link-MSVSSCONSCRIPT;, &cv-link-MSVSSCONSFLAGS;, &cv-link-MSVSSOLUTIONCOM;. + + Sets construction variables for Microsoft Visual Studio. + Sets: &cv-link-MSVSBUILDCOM;, &cv-link-MSVSCLEANCOM;, &cv-link-MSVSENCODING;, &cv-link-MSVSPROJECTCOM;, &cv-link-MSVSREBUILDCOM;, &cv-link-MSVSSCONS;, &cv-link-MSVSSCONSCOM;, &cv-link-MSVSSCONSCRIPT;, &cv-link-MSVSSCONSFLAGS;, &cv-link-MSVSSOLUTIONCOM;. mwcc - + + Sets construction variables for the Metrowerks CodeWarrior compiler. -Sets: &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CFILESUFFIX;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-CXX;, &cv-link-CXXCOM;, &cv-link-CXXFILESUFFIX;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-MWCW_VERSION;, &cv-link-MWCW_VERSIONS;, &cv-link-SHCC;, &cv-link-SHCCCOM;, &cv-link-SHCCFLAGS;, &cv-link-SHCFLAGS;, &cv-link-SHCXX;, &cv-link-SHCXXCOM;, &cv-link-SHCXXFLAGS;.Uses: &cv-link-CCCOMSTR;, &cv-link-CXXCOMSTR;, &cv-link-SHCCCOMSTR;, &cv-link-SHCXXCOMSTR;. +Sets: &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CFILESUFFIX;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-CXX;, &cv-link-CXXCOM;, &cv-link-CXXFILESUFFIX;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-MWCW_VERSION;, &cv-link-MWCW_VERSIONS;, &cv-link-SHCC;, &cv-link-SHCCCOM;, &cv-link-SHCCFLAGS;, &cv-link-SHCFLAGS;, &cv-link-SHCXX;, &cv-link-SHCXXCOM;, &cv-link-SHCXXFLAGS;.Uses: &cv-link-CCCOMSTR;, &cv-link-CXXCOMSTR;, &cv-link-SHCCCOMSTR;, &cv-link-SHCXXCOMSTR;. mwld - + + Sets construction variables for the Metrowerks CodeWarrior linker. -Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-SHLINK;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;. +Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-LIBDIRPREFIX;, &cv-link-LIBDIRSUFFIX;, &cv-link-LIBLINKPREFIX;, &cv-link-LIBLINKSUFFIX;, &cv-link-LINK;, &cv-link-LINKCOM;, &cv-link-SHLINK;, &cv-link-SHLINKCOM;, &cv-link-SHLINKFLAGS;. nasm - + + Sets construction variables for the nasm Netwide Assembler. -Sets: &cv-link-AS;, &cv-link-ASCOM;, &cv-link-ASFLAGS;, &cv-link-ASPPCOM;, &cv-link-ASPPFLAGS;.Uses: &cv-link-ASCOMSTR;, &cv-link-ASPPCOMSTR;. +Sets: &cv-link-AS;, &cv-link-ASCOM;, &cv-link-ASFLAGS;, &cv-link-ASPPCOM;, &cv-link-ASPPFLAGS;.Uses: &cv-link-ASCOMSTR;, &cv-link-ASPPCOMSTR;. - - packaging - -A framework for building binary and source packages. + + Packaging + + +Sets construction variables for the Package Builder. - - Packaging - -Sets construction variables for the Package Builder. + + packaging + + +A framework for building binary and source packages. pdf - + + Sets construction variables for the Portable Document Format builder. -Sets: &cv-link-PDFPREFIX;, &cv-link-PDFSUFFIX;. +Sets: &cv-link-PDFPREFIX;, &cv-link-PDFSUFFIX;. pdflatex - -Sets construction variables for the pdflatex utility. + + +Sets construction variables for the pdflatex utility. -Sets: &cv-link-LATEXRETRIES;, &cv-link-PDFLATEX;, &cv-link-PDFLATEXCOM;, &cv-link-PDFLATEXFLAGS;.Uses: &cv-link-PDFLATEXCOMSTR;. +Sets: &cv-link-LATEXRETRIES;, &cv-link-PDFLATEX;, &cv-link-PDFLATEXCOM;, &cv-link-PDFLATEXFLAGS;.Uses: &cv-link-PDFLATEXCOMSTR;. pdftex - -Sets construction variables for the pdftex utility. + + +Sets construction variables for the pdftex utility. -Sets: &cv-link-LATEXRETRIES;, &cv-link-PDFLATEX;, &cv-link-PDFLATEXCOM;, &cv-link-PDFLATEXFLAGS;, &cv-link-PDFTEX;, &cv-link-PDFTEXCOM;, &cv-link-PDFTEXFLAGS;.Uses: &cv-link-PDFLATEXCOMSTR;, &cv-link-PDFTEXCOMSTR;. +Sets: &cv-link-LATEXRETRIES;, &cv-link-PDFLATEX;, &cv-link-PDFLATEXCOM;, &cv-link-PDFLATEXFLAGS;, &cv-link-PDFTEX;, &cv-link-PDFTEXCOM;, &cv-link-PDFTEXFLAGS;.Uses: &cv-link-PDFLATEXCOMSTR;, &cv-link-PDFTEXCOMSTR;. qt - + + Sets construction variables for building Qt applications. -Sets: &cv-link-QTDIR;, &cv-link-QT_AUTOSCAN;, &cv-link-QT_BINPATH;, &cv-link-QT_CPPPATH;, &cv-link-QT_LIB;, &cv-link-QT_LIBPATH;, &cv-link-QT_MOC;, &cv-link-QT_MOCCXXPREFIX;, &cv-link-QT_MOCCXXSUFFIX;, &cv-link-QT_MOCFROMCXXCOM;, &cv-link-QT_MOCFROMCXXFLAGS;, &cv-link-QT_MOCFROMHCOM;, &cv-link-QT_MOCFROMHFLAGS;, &cv-link-QT_MOCHPREFIX;, &cv-link-QT_MOCHSUFFIX;, &cv-link-QT_UIC;, &cv-link-QT_UICCOM;, &cv-link-QT_UICDECLFLAGS;, &cv-link-QT_UICDECLPREFIX;, &cv-link-QT_UICDECLSUFFIX;, &cv-link-QT_UICIMPLFLAGS;, &cv-link-QT_UICIMPLPREFIX;, &cv-link-QT_UICIMPLSUFFIX;, &cv-link-QT_UISUFFIX;. +Sets: &cv-link-QTDIR;, &cv-link-QT_AUTOSCAN;, &cv-link-QT_BINPATH;, &cv-link-QT_CPPPATH;, &cv-link-QT_LIB;, &cv-link-QT_LIBPATH;, &cv-link-QT_MOC;, &cv-link-QT_MOCCXXPREFIX;, &cv-link-QT_MOCCXXSUFFIX;, &cv-link-QT_MOCFROMCXXCOM;, &cv-link-QT_MOCFROMCXXFLAGS;, &cv-link-QT_MOCFROMHCOM;, &cv-link-QT_MOCFROMHFLAGS;, &cv-link-QT_MOCHPREFIX;, &cv-link-QT_MOCHSUFFIX;, &cv-link-QT_UIC;, &cv-link-QT_UICCOM;, &cv-link-QT_UICDECLFLAGS;, &cv-link-QT_UICDECLPREFIX;, &cv-link-QT_UICDECLSUFFIX;, &cv-link-QT_UICIMPLFLAGS;, &cv-link-QT_UICIMPLPREFIX;, &cv-link-QT_UICIMPLSUFFIX;, &cv-link-QT_UISUFFIX;. rmic - -Sets construction variables for the rmic utility. + + +Sets construction variables for the rmic utility. -Sets: &cv-link-JAVACLASSSUFFIX;, &cv-link-RMIC;, &cv-link-RMICCOM;, &cv-link-RMICFLAGS;.Uses: &cv-link-RMICCOMSTR;. +Sets: &cv-link-JAVACLASSSUFFIX;, &cv-link-RMIC;, &cv-link-RMICCOM;, &cv-link-RMICFLAGS;.Uses: &cv-link-RMICCOMSTR;. rpcgen - + + Sets construction variables for building with RPCGEN. -Sets: &cv-link-RPCGEN;, &cv-link-RPCGENCLIENTFLAGS;, &cv-link-RPCGENFLAGS;, &cv-link-RPCGENHEADERFLAGS;, &cv-link-RPCGENSERVICEFLAGS;, &cv-link-RPCGENXDRFLAGS;. +Sets: &cv-link-RPCGEN;, &cv-link-RPCGENCLIENTFLAGS;, &cv-link-RPCGENFLAGS;, &cv-link-RPCGENHEADERFLAGS;, &cv-link-RPCGENSERVICEFLAGS;, &cv-link-RPCGENXDRFLAGS;. sgiar - + + Sets construction variables for the SGI library archiver. -Sets: &cv-link-AR;, &cv-link-ARCOMSTR;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;, &cv-link-SHLINK;, &cv-link-SHLINKFLAGS;.Uses: &cv-link-ARCOMSTR;, &cv-link-SHLINKCOMSTR;. +Sets: &cv-link-AR;, &cv-link-ARCOMSTR;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;, &cv-link-SHLINK;, &cv-link-SHLINKFLAGS;.Uses: &cv-link-ARCOMSTR;, &cv-link-SHLINKCOMSTR;. sgic++ - + + Sets construction variables for the SGI C++ compiler. -Sets: &cv-link-CXX;, &cv-link-CXXFLAGS;, &cv-link-SHCXX;, &cv-link-SHOBJSUFFIX;. +Sets: &cv-link-CXX;, &cv-link-CXXFLAGS;, &cv-link-SHCXX;, &cv-link-SHOBJSUFFIX;. sgicc - + + Sets construction variables for the SGI C compiler. -Sets: &cv-link-CXX;, &cv-link-SHOBJSUFFIX;. +Sets: &cv-link-CXX;, &cv-link-SHOBJSUFFIX;. sgilink - + + Sets construction variables for the SGI linker. -Sets: &cv-link-LINK;, &cv-link-RPATHPREFIX;, &cv-link-RPATHSUFFIX;, &cv-link-SHLINKFLAGS;. +Sets: &cv-link-LINK;, &cv-link-RPATHPREFIX;, &cv-link-RPATHSUFFIX;, &cv-link-SHLINKFLAGS;. sunar - + + Sets construction variables for the Sun library archiver. -Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;.Uses: &cv-link-ARCOMSTR;. +Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;.Uses: &cv-link-ARCOMSTR;. sunc++ - + + Sets construction variables for the Sun C++ compiler. -Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXX;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJPREFIX;, &cv-link-SHOBJSUFFIX;. +Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXX;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJPREFIX;, &cv-link-SHOBJSUFFIX;. suncc - + + Sets construction variables for the Sun C compiler. -Sets: &cv-link-CXX;, &cv-link-SHCCFLAGS;, &cv-link-SHOBJPREFIX;, &cv-link-SHOBJSUFFIX;. +Sets: &cv-link-CXX;, &cv-link-SHCCFLAGS;, &cv-link-SHOBJPREFIX;, &cv-link-SHOBJSUFFIX;. sunf77 - -Set construction variables for the Sun f77 Fortran compiler. + + +Set construction variables for the Sun f77 Fortran compiler. -Sets: &cv-link-F77;, &cv-link-FORTRAN;, &cv-link-SHF77;, &cv-link-SHF77FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. +Sets: &cv-link-F77;, &cv-link-FORTRAN;, &cv-link-SHF77;, &cv-link-SHF77FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. sunf90 - -Set construction variables for the Sun f90 Fortran compiler. + + +Set construction variables for the Sun f90 Fortran compiler. -Sets: &cv-link-F90;, &cv-link-FORTRAN;, &cv-link-SHF90;, &cv-link-SHF90FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. +Sets: &cv-link-F90;, &cv-link-FORTRAN;, &cv-link-SHF90;, &cv-link-SHF90FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. sunf95 - -Set construction variables for the Sun f95 Fortran compiler. + + +Set construction variables for the Sun f95 Fortran compiler. -Sets: &cv-link-F95;, &cv-link-FORTRAN;, &cv-link-SHF95;, &cv-link-SHF95FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. +Sets: &cv-link-F95;, &cv-link-FORTRAN;, &cv-link-SHF95;, &cv-link-SHF95FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;. sunlink - + + Sets construction variables for the Sun linker. -Sets: &cv-link-RPATHPREFIX;, &cv-link-RPATHSUFFIX;, &cv-link-SHLINKFLAGS;. +Sets: &cv-link-RPATHPREFIX;, &cv-link-RPATHSUFFIX;, &cv-link-SHLINKFLAGS;. swig - + + Sets construction variables for the SWIG interface generator. -Sets: &cv-link-SWIG;, &cv-link-SWIGCFILESUFFIX;, &cv-link-SWIGCOM;, &cv-link-SWIGCXXFILESUFFIX;, &cv-link-SWIGDIRECTORSUFFIX;, &cv-link-SWIGFLAGS;, &cv-link-SWIGINCPREFIX;, &cv-link-SWIGINCSUFFIX;, &cv-link-SWIGPATH;, &cv-link-SWIGVERSION;, &cv-link-_SWIGINCFLAGS;.Uses: &cv-link-SWIGCOMSTR;. +Sets: &cv-link-SWIG;, &cv-link-SWIGCFILESUFFIX;, &cv-link-SWIGCOM;, &cv-link-SWIGCXXFILESUFFIX;, &cv-link-SWIGDIRECTORSUFFIX;, &cv-link-SWIGFLAGS;, &cv-link-SWIGINCPREFIX;, &cv-link-SWIGINCSUFFIX;, &cv-link-SWIGPATH;, &cv-link-SWIGVERSION;, &cv-link-_SWIGINCFLAGS;.Uses: &cv-link-SWIGCOMSTR;. tar - -Sets construction variables for the tar archiver. + + +Sets construction variables for the tar archiver. -Sets: &cv-link-TAR;, &cv-link-TARCOM;, &cv-link-TARFLAGS;, &cv-link-TARSUFFIX;.Uses: &cv-link-TARCOMSTR;. +Sets: &cv-link-TAR;, &cv-link-TARCOM;, &cv-link-TARFLAGS;, &cv-link-TARSUFFIX;.Uses: &cv-link-TARCOMSTR;. tex - + + Sets construction variables for the TeX formatter and typesetter. -Sets: &cv-link-BIBTEX;, &cv-link-BIBTEXCOM;, &cv-link-BIBTEXFLAGS;, &cv-link-LATEX;, &cv-link-LATEXCOM;, &cv-link-LATEXFLAGS;, &cv-link-MAKEINDEX;, &cv-link-MAKEINDEXCOM;, &cv-link-MAKEINDEXFLAGS;, &cv-link-TEX;, &cv-link-TEXCOM;, &cv-link-TEXFLAGS;.Uses: &cv-link-BIBTEXCOMSTR;, &cv-link-LATEXCOMSTR;, &cv-link-MAKEINDEXCOMSTR;, &cv-link-TEXCOMSTR;. +Sets: &cv-link-BIBTEX;, &cv-link-BIBTEXCOM;, &cv-link-BIBTEXFLAGS;, &cv-link-LATEX;, &cv-link-LATEXCOM;, &cv-link-LATEXFLAGS;, &cv-link-MAKEINDEX;, &cv-link-MAKEINDEXCOM;, &cv-link-MAKEINDEXFLAGS;, &cv-link-TEX;, &cv-link-TEXCOM;, &cv-link-TEXFLAGS;.Uses: &cv-link-BIBTEXCOMSTR;, &cv-link-LATEXCOMSTR;, &cv-link-MAKEINDEXCOMSTR;, &cv-link-TEXCOMSTR;. textfile - -Set construction variables for the Textfile and Substfile builders. + + +Set construction variables for the Textfile and Substfile builders. -Sets: &cv-link-LINESEPARATOR;, &cv-link-SUBSTFILEPREFIX;, &cv-link-SUBSTFILESUFFIX;, &cv-link-TEXTFILEPREFIX;, &cv-link-TEXTFILESUFFIX;.Uses: &cv-link-SUBST_DICT;. +Sets: &cv-link-LINESEPARATOR;, &cv-link-SUBSTFILEPREFIX;, &cv-link-SUBSTFILESUFFIX;, &cv-link-TEXTFILEPREFIX;, &cv-link-TEXTFILESUFFIX;.Uses: &cv-link-SUBST_DICT;. tlib - + + Sets construction variables for the Borlan tib library archiver. -Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;.Uses: &cv-link-ARCOMSTR;. +Sets: &cv-link-AR;, &cv-link-ARCOM;, &cv-link-ARFLAGS;, &cv-link-LIBPREFIX;, &cv-link-LIBSUFFIX;.Uses: &cv-link-ARCOMSTR;. xgettext - -This scons tool is a part of scons gettext toolset. It provides + + +This scons tool is a part of scons gettext toolset. It provides scons interface to xgettext(1) program, which extracts internationalized messages from source code. The tool -provides POTUpdate builder to make PO +provides POTUpdate builder to make PO Template files. -Sets: &cv-link-POTSUFFIX;, &cv-link-POTUPDATE_ALIAS;, &cv-link-XGETTEXTCOM;, &cv-link-XGETTEXTCOMSTR;, &cv-link-XGETTEXTFLAGS;, &cv-link-XGETTEXTFROM;, &cv-link-XGETTEXTFROMPREFIX;, &cv-link-XGETTEXTFROMSUFFIX;, &cv-link-XGETTEXTPATH;, &cv-link-XGETTEXTPATHPREFIX;, &cv-link-XGETTEXTPATHSUFFIX;, &cv-link-_XGETTEXTDOMAIN;, &cv-link-_XGETTEXTFROMFLAGS;, &cv-link-_XGETTEXTPATHFLAGS;.Uses: &cv-link-POTDOMAIN;. +Sets: &cv-link-POTSUFFIX;, &cv-link-POTUPDATE_ALIAS;, &cv-link-XGETTEXTCOM;, &cv-link-XGETTEXTCOMSTR;, &cv-link-XGETTEXTFLAGS;, &cv-link-XGETTEXTFROM;, &cv-link-XGETTEXTFROMPREFIX;, &cv-link-XGETTEXTFROMSUFFIX;, &cv-link-XGETTEXTPATH;, &cv-link-XGETTEXTPATHPREFIX;, &cv-link-XGETTEXTPATHSUFFIX;, &cv-link-_XGETTEXTDOMAIN;, &cv-link-_XGETTEXTFROMFLAGS;, &cv-link-_XGETTEXTPATHFLAGS;.Uses: &cv-link-POTDOMAIN;. yacc - -Sets construction variables for the yacc parse generator. + + +Sets construction variables for the yacc parse generator. -Sets: &cv-link-YACC;, &cv-link-YACCCOM;, &cv-link-YACCFLAGS;, &cv-link-YACCHFILESUFFIX;, &cv-link-YACCHXXFILESUFFIX;, &cv-link-YACCVCGFILESUFFIX;.Uses: &cv-link-YACCCOMSTR;. +Sets: &cv-link-YACC;, &cv-link-YACCCOM;, &cv-link-YACCFLAGS;, &cv-link-YACCHFILESUFFIX;, &cv-link-YACCHXXFILESUFFIX;, &cv-link-YACCVCGFILESUFFIX;.Uses: &cv-link-YACCCOMSTR;. zip - -Sets construction variables for the zip archiver. + + +Sets construction variables for the zip archiver. -Sets: &cv-link-ZIP;, &cv-link-ZIPCOM;, &cv-link-ZIPCOMPRESSION;, &cv-link-ZIPFLAGS;, &cv-link-ZIPSUFFIX;.Uses: &cv-link-ZIPCOMSTR;. +Sets: &cv-link-ZIP;, &cv-link-ZIPCOM;, &cv-link-ZIPCOMPRESSION;, &cv-link-ZIPFLAGS;, &cv-link-ZIPSUFFIX;.Uses: &cv-link-ZIPCOMSTR;. diff --git a/doc/generated/tools.mod b/doc/generated/tools.mod index f9bc1d7..1209d74 100644 --- a/doc/generated/tools.mod +++ b/doc/generated/tools.mod @@ -78,8 +78,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. mwcc"> mwld"> nasm"> -packaging"> Packaging"> +packaging"> pdf"> pdflatex"> pdftex"> @@ -186,8 +186,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. mwcc"> mwld"> nasm"> -packaging"> Packaging"> +packaging"> pdf"> pdflatex"> pdftex"> diff --git a/doc/generated/variables.gen b/doc/generated/variables.gen index 705bf5b..9050832 100644 --- a/doc/generated/variables.gen +++ b/doc/generated/variables.gen @@ -1,3 +1,4 @@ + %scons; @@ -11,115 +12,125 @@ %variables-mod; ]> - + __LDMODULEVERSIONFLAGS - -This construction variable automatically introduces $_LDMODULEVERSIONFLAGS -if $LDMODULEVERSION is set. Othervise it evaluates to an empty string. + + +This construction variable automatically introduces $_LDMODULEVERSIONFLAGS +if $LDMODULEVERSION is set. Othervise it evaluates to an empty string. __SHLIBVERSIONFLAGS - -This construction variable automatically introduces $_SHLIBVERSIONFLAGS -if $SHLIBVERSION is set. Othervise it evaluates to an empty string. + + +This construction variable automatically introduces $_SHLIBVERSIONFLAGS +if $SHLIBVERSION is set. Othervise it evaluates to an empty string. + + _APPLELINK_COMPATIBILITY_VERSION + + + A macro (by default a generator function) used to create the linker flags to specify + apple's linker's -compatibility_version flag. + The default generator uses $APPLELINK_COMPATIBILITY_VERSION + and $APPLELINK_NO_COMPATIBILITY_VERSION and $SHLIBVERSION + to determine the correct flag. + + + APPLELINK_COMPATIBILITY_VERSION - + + On Mac OS X this is used to set the linker flag: -compatibility_version - + The value is specified as X[.Y[.Z]] where X is between 1 and 65535, Y can be omitted or between 1 and - 255, Z can be omitted or between 1 and 255. This value will be derived from $SHLIBVERSION if + 255, Z can be omitted or between 1 and 255. This value will be derived from $SHLIBVERSION if not specified. The lowest digit will be dropped and replaced by a 0. - - If the $APPLELINK_NO_COMPATIBILITY_VERSION is set then no -compatibility_version will be + + If the $APPLELINK_NO_COMPATIBILITY_VERSION is set then no -compatibility_version will be output. - See MacOS's ld manpage for more details + See MacOS's ld manpage for more details - - _APPLELINK_COMPATIBILITY_VERSION - - A macro (by default a generator function) used to create the linker flags to specify - apple's linker's -compatibility_version flag. - The default generator uses $APPLELINK_COMPATIBILITY_VERSION - and $APPLELINK_NO_COMPATIBILITY_VERSION and $SHLIBVERSION - to determine the correct flag. + + _APPLELINK_CURRENT_VERSION + + + A macro (by default a generator function) used to create the linker flags to specify apple's linker's + -current_version flag. The default generator uses $APPLELINK_CURRENT_VERSION and + $APPLELINK_NO_CURRENT_VERSION and $SHLIBVERSION to determine the correct flag. APPLELINK_CURRENT_VERSION - + + On Mac OS X this is used to set the linker flag: -current_version - + The value is specified as X[.Y[.Z]] where X is between 1 and 65535, Y can be omitted or between 1 and - 255, Z can be omitted or between 1 and 255. This value will be set to $SHLIBVERSION if not + 255, Z can be omitted or between 1 and 255. This value will be set to $SHLIBVERSION if not specified. - - If the $APPLELINK_NO_CURRENT_VERSION is set then no -current_version will be + + If the $APPLELINK_NO_CURRENT_VERSION is set then no -current_version will be output. - See MacOS's ld manpage for more details + See MacOS's ld manpage for more details - - _APPLELINK_CURRENT_VERSION - - A macro (by default a generator function) used to create the linker flags to specify apple's linker's - -current_version flag. The default generator uses $APPLELINK_CURRENT_VERSION and - $APPLELINK_NO_CURRENT_VERSION and $SHLIBVERSION to determine the correct flag. - - - APPLELINK_NO_COMPATIBILITY_VERSION - + + Set this to any True (1|True|non-empty string) value to disable adding -compatibility_version flag when generating versioned shared libraries. - - This overrides $APPLELINK_COMPATIBILITY_VERSION. + + This overrides $APPLELINK_COMPATIBILITY_VERSION. APPLELINK_NO_CURRENT_VERSION - + + Set this to any True (1|True|non-empty string) value to disable adding -current_version flag when generating versioned shared libraries. - - This overrides $APPLELINK_CURRENT_VERSION. + + This overrides $APPLELINK_CURRENT_VERSION. AR - + + The static library archiver. ARCHITECTURE - + + Specifies the system architecture for which the package is being built. The default is the system architecture @@ -136,41 +147,46 @@ as well as forming part of the name of a generated RPM package file. ARCOM - + + The command line used to generate a static library from object files. ARCOMSTR - + + The string displayed when an object file is generated from an assembly-language source file. -If this is not set, then $ARCOM (the command line) is displayed. +If this is not set, then $ARCOM (the command line) is displayed. - + env = Environment(ARCOMSTR = "Archiving $TARGET") ARFLAGS - + + General options passed to the static library archiver. AS - + + The assembler. ASCOM - + + The command line used to generate an object file from an assembly-language source file. @@ -178,63 +194,69 @@ from an assembly-language source file. ASCOMSTR - + + The string displayed when an object file is generated from an assembly-language source file. -If this is not set, then $ASCOM (the command line) is displayed. +If this is not set, then $ASCOM (the command line) is displayed. - + env = Environment(ASCOMSTR = "Assembling $TARGET") ASFLAGS - + + General options passed to the assembler. ASPPCOM - + + The command line used to assemble an assembly-language source file into an object file after first running the file through the C preprocessor. Any options specified -in the $ASFLAGS and $CPPFLAGS construction variables +in the $ASFLAGS and $CPPFLAGS construction variables are included on this command line. ASPPCOMSTR - + + The string displayed when an object file is generated from an assembly-language source file after first running the file through the C preprocessor. -If this is not set, then $ASPPCOM (the command line) is displayed. +If this is not set, then $ASPPCOM (the command line) is displayed. - + env = Environment(ASPPCOMSTR = "Assembling $TARGET") ASPPFLAGS - + + General options when an assembling an assembly-language source file into an object file after first running the file through the C preprocessor. -The default is to use the value of $ASFLAGS. +The default is to use the value of $ASFLAGS. BIBTEX - + + The bibliography generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter. @@ -242,7 +264,8 @@ LaTeX structured formatter and typesetter. BIBTEXCOM - + + The command line used to call the bibliography generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter. @@ -251,20 +274,22 @@ typesetter. BIBTEXCOMSTR - + + The string displayed when generating a bibliography for TeX or LaTeX. -If this is not set, then $BIBTEXCOM (the command line) is displayed. +If this is not set, then $BIBTEXCOM (the command line) is displayed. - + env = Environment(BIBTEXCOMSTR = "Generating bibliography $TARGET") BIBTEXFLAGS - + + General options passed to the bibliography generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter. @@ -272,7 +297,8 @@ and typesetter and the LaTeX structured formatter and typesetter. BUILDERS - + + A dictionary mapping the names of the builders available through this environment to underlying Builder objects. @@ -283,26 +309,26 @@ If you initialize this variable when an Environment is created: - + env = Environment(BUILDERS = {'NewBuilder' : foo}) - + the default Builders will no longer be available. To use a new Builder object in addition to the default Builders, add your new Builder object like this: - + env = Environment() env.Append(BUILDERS = {'NewBuilder' : foo}) - + or this: - + env = Environment() env['BUILDERS']['NewBuilder'] = foo @@ -310,64 +336,70 @@ env['BUILDERS']['NewBuilder'] = foo CC - + + The C compiler. CCCOM - + + The command line used to compile a C source file to a (static) object -file. Any options specified in the $CFLAGS, $CCFLAGS and -$CPPFLAGS construction variables are included on this command +file. Any options specified in the $CFLAGS, $CCFLAGS and +$CPPFLAGS construction variables are included on this command line. CCCOMSTR - + + The string displayed when a C source file is compiled to a (static) object file. -If this is not set, then $CCCOM (the command line) is displayed. +If this is not set, then $CCCOM (the command line) is displayed. - + env = Environment(CCCOMSTR = "Compiling static object $TARGET") CCFLAGS - + + General options that are passed to the C and C++ compilers. CCPCHFLAGS - + + Options added to the compiler command line to support building with precompiled headers. The default value expands expands to the appropriate Microsoft Visual C++ command-line options -when the $PCH construction variable is set. +when the $PCH construction variable is set. CCPDBFLAGS - + + Options added to the compiler command line to support storing debugging information in a Microsoft Visual C++ PDB file. The default value expands expands to appropriate Microsoft Visual C++ command-line options -when the $PDB construction variable is set. +when the $PDB construction variable is set. - + The Visual C++ compiler option that SCons uses by default to generate PDB information is . This works correctly with parallel () builds @@ -380,30 +412,31 @@ link-time performance, although parallel builds will no longer work. - + You can generate PDB files with the -switch by overriding the default $CCPDBFLAGS variable as follows: +switch by overriding the default $CCPDBFLAGS variable as follows: - + env['CCPDBFLAGS'] = ['${(PDB and "/Zi /Fd%s" % File(PDB)) or ""}'] - + An alternative would be to use the to put the debugging information in a separate .pdb file for each object file by overriding -the $CCPDBFLAGS variable as follows: +the $CCPDBFLAGS variable as follows: - + env['CCPDBFLAGS'] = '/Zi /Fd${TARGET}.pdb' CCVERSION - + + The version number of the C compiler. This may or may not be set, depending on the specific C compiler being used. @@ -412,7 +445,8 @@ depending on the specific C compiler being used. CFILESUFFIX - + + The suffix for C source files. This is used by the internal CFile builder when generating C files from Lex (.l) or YACC (.y) input files. @@ -429,14 +463,16 @@ as C files. CFLAGS - + + General options that are passed to the C compiler (C only; not C++). CHANGE_SPECFILE - + + A hook for modifying the file that controls the packaging build (the .spec for RPM, the control for Ipkg, @@ -448,7 +484,8 @@ after the SCons template for the file has been written. CHANGED_SOURCES - + + A reserved variable name that may not be set or used in a construction environment. (See the manpage section "Variable Substitution" @@ -458,7 +495,8 @@ for more information). CHANGED_TARGETS - + + A reserved variable name that may not be set or used in a construction environment. (See the manpage section "Variable Substitution" @@ -468,7 +506,8 @@ for more information). CHANGELOG - + + The name of a file containing the change log text to be included in the package. This is included as the @@ -480,8 +519,9 @@ section of the RPM _concat - -A function used to produce variables like $_CPPINCFLAGS. It takes + + +A function used to produce variables like $_CPPINCFLAGS. It takes four or five arguments: a prefix to concatenate onto each element, a list of elements, a suffix to concatenate onto each element, an environment @@ -489,14 +529,15 @@ for variable interpolation, and an optional function that will be called to transform the list before concatenation. - + env['_CPPINCFLAGS'] = '$( ${_concat(INCPREFIX, CPPPATH, INCSUFFIX, __env__, RDirs)} $)', CONFIGUREDIR - + + The name of the directory in which Configure context test files are written. The default is @@ -510,7 +551,8 @@ file. CONFIGURELOG - + + The name of the Configure context log file. The default is config.log @@ -523,48 +565,50 @@ file. _CPPDEFFLAGS - + + An automatically-generated construction variable containing the C preprocessor command-line options to define values. -The value of $_CPPDEFFLAGS is created +The value of $_CPPDEFFLAGS is created by respectively prepending and appending -$CPPDEFPREFIX and $CPPDEFSUFFIX +$CPPDEFPREFIX and $CPPDEFSUFFIX to the beginning and end -of each definition in $CPPDEFINES. +of each definition in $CPPDEFINES. CPPDEFINES - + + A platform independent specification of C preprocessor definitions. The definitions will be added to command lines through the automatically-generated -$_CPPDEFFLAGS construction variable (see above), +$_CPPDEFFLAGS construction variable (see above), which is constructed according to -the type of value of $CPPDEFINES: +the type of value of $CPPDEFINES: - -If $CPPDEFINES is a string, + +If $CPPDEFINES is a string, the values of the -$CPPDEFPREFIX and $CPPDEFSUFFIX +$CPPDEFPREFIX and $CPPDEFSUFFIX construction variables will be respectively prepended and appended to the beginning and end -of each definition in $CPPDEFINES. +of each definition in $CPPDEFINES. - + # Will add -Dxyz to POSIX compiler command lines, # and /Dxyz to Microsoft Visual C++ command lines. env = Environment(CPPDEFINES='xyz') - -If $CPPDEFINES is a list, + +If $CPPDEFINES is a list, the values of the -$CPPDEFPREFIX and $CPPDEFSUFFIX +$CPPDEFPREFIX and $CPPDEFSUFFIX construction variables will be respectively prepended and appended to the beginning and end of each element in the list. @@ -573,16 +617,16 @@ then the first item is the name being defined and the second item is its value: - + # Will add -DB=2 -DA to POSIX compiler command lines, # and /DB=2 /DA to Microsoft Visual C++ command lines. env = Environment(CPPDEFINES=[('B', 2), 'A']) - -If $CPPDEFINES is a dictionary, + +If $CPPDEFINES is a dictionary, the values of the -$CPPDEFPREFIX and $CPPDEFSUFFIX +$CPPDEFPREFIX and $CPPDEFSUFFIX construction variables will be respectively prepended and appended to the beginning and end of each item from the dictionary. @@ -595,11 +639,11 @@ then the name is defined without an explicit value. Note that the resulting flags are sorted by keyword to ensure that the order of the options on the command line is consistent each time -scons +scons is run. - + # Will add -DA -DB=2 to POSIX compiler command lines, # and /DA /DB=2 to Microsoft Visual C++ command lines. env = Environment(CPPDEFINES={'B':2, 'A':None}) @@ -608,42 +652,45 @@ env = Environment(CPPDEFINES={'B':2, 'A':None}) CPPDEFPREFIX - + + The prefix used to specify preprocessor definitions on the C compiler command line. This will be prepended to the beginning of each definition -in the $CPPDEFINES construction variable -when the $_CPPDEFFLAGS variable is automatically generated. +in the $CPPDEFINES construction variable +when the $_CPPDEFFLAGS variable is automatically generated. CPPDEFSUFFIX - + + The suffix used to specify preprocessor definitions on the C compiler command line. This will be appended to the end of each definition -in the $CPPDEFINES construction variable -when the $_CPPDEFFLAGS variable is automatically generated. +in the $CPPDEFINES construction variable +when the $_CPPDEFFLAGS variable is automatically generated. CPPFLAGS - + + User-specified C preprocessor options. These will be included in any command that uses the C preprocessor, including not just compilation of C and C++ source files -via the $CCCOM, -$SHCCCOM, -$CXXCOM and -$SHCXXCOM command lines, -but also the $FORTRANPPCOM, -$SHFORTRANPPCOM, -$F77PPCOM and -$SHF77PPCOM command lines +via the $CCCOM, +$SHCCCOM, +$CXXCOM and +$SHCXXCOM command lines, +but also the $FORTRANPPCOM, +$SHFORTRANPPCOM, +$F77PPCOM and +$SHF77PPCOM command lines used to compile a Fortran source file, -and the $ASPPCOM command line +and the $ASPPCOM command line used to assemble an assembly language source file, after first running each file through the C preprocessor. Note that this variable does @@ -651,28 +698,30 @@ Note that this variable does contain (or similar) include search path options -that scons generates automatically from $CPPPATH. -See $_CPPINCFLAGS, below, +that scons generates automatically from $CPPPATH. +See $_CPPINCFLAGS, below, for the variable that expands to those options. _CPPINCFLAGS - + + An automatically-generated construction variable containing the C preprocessor command-line options for specifying directories to be searched for include files. -The value of $_CPPINCFLAGS is created -by respectively prepending and appending $INCPREFIX and $INCSUFFIX +The value of $_CPPINCFLAGS is created +by respectively prepending and appending $INCPREFIX and $INCSUFFIX to the beginning and end -of each directory in $CPPPATH. +of each directory in $CPPPATH. CPPPATH - + + The list of directories that the C preprocessor will search for include directories. The C/C++ implicit dependency scanner will search these directories for include files. Don't explicitly put include directory @@ -680,56 +729,57 @@ arguments in CCFLAGS or CXXFLAGS because the result will be non-portable and the directories will not be searched by the dependency scanner. Note: directory names in CPPPATH will be looked-up relative to the SConscript directory when they are used in a command. To force -scons +scons to look-up a directory relative to the root of the source tree use #: - + env = Environment(CPPPATH='#/include') - + The directory look-up can also be forced using the -Dir() +Dir() function: - + include = Dir('include') env = Environment(CPPPATH=include) - + The directory list will be added to command lines through the automatically-generated -$_CPPINCFLAGS +$_CPPINCFLAGS construction variable, which is constructed by respectively prepending and appending the value of the -$INCPREFIX and $INCSUFFIX +$INCPREFIX and $INCSUFFIX construction variables to the beginning and end -of each directory in $CPPPATH. +of each directory in $CPPPATH. Any command lines you define that need the CPPPATH directory list should -include $_CPPINCFLAGS: +include $_CPPINCFLAGS: - + env = Environment(CCCOM="my_compiler $_CPPINCFLAGS -c -o $TARGET $SOURCE") CPPSUFFIXES - + + The list of suffixes of files that will be scanned for C preprocessor implicit dependencies (#include lines). The default list is: - + [".c", ".C", ".cxx", ".cpp", ".c++", ".cc", ".h", ".H", ".hxx", ".hpp", ".hh", ".F", ".fpp", ".FPP", @@ -740,37 +790,41 @@ The default list is: CXX - + + The C++ compiler. CXXCOM - + + The command line used to compile a C++ source file to an object file. -Any options specified in the $CXXFLAGS and -$CPPFLAGS construction variables +Any options specified in the $CXXFLAGS and +$CPPFLAGS construction variables are included on this command line. CXXCOMSTR - + + The string displayed when a C++ source file is compiled to a (static) object file. -If this is not set, then $CXXCOM (the command line) is displayed. +If this is not set, then $CXXCOM (the command line) is displayed. - + env = Environment(CXXCOMSTR = "Compiling static object $TARGET") CXXFILESUFFIX - + + The suffix for C++ source files. This is used by the internal CXXFile builder when generating C++ files from Lex (.ll) or YACC (.yy) input files. @@ -796,18 +850,20 @@ as C++ files. CXXFLAGS - + + General options that are passed to the C++ compiler. -By default, this includes the value of $CCFLAGS, -so that setting $CCFLAGS affects both C and C++ compilation. +By default, this includes the value of $CCFLAGS, +so that setting $CCFLAGS affects both C and C++ compilation. If you want to add C++-specific flags, -you must set or override the value of $CXXFLAGS. +you must set or override the value of $CXXFLAGS. CXXVERSION - + + The version number of the C++ compiler. This may or may not be set, depending on the specific C++ compiler being used. @@ -816,44 +872,50 @@ depending on the specific C++ compiler being used. DC - + + The D compiler to use. DCOM - + + The command line used to compile a D file to an object file. -Any options specified in the $DFLAGS construction variable +Any options specified in the $DFLAGS construction variable is included on this command line. DDEBUG - + + List of debug tags to enable when compiling. DDEBUGPREFIX - + + DDEBUGPREFIX. DDEBUGSUFFIX - + + DDEBUGSUFFIX. DESCRIPTION - + + A long description of the project being packaged. This is included in the relevant section of the file that controls the packaging build. @@ -862,7 +924,8 @@ of the file that controls the packaging build. DESCRIPTION_lang - + + A language-specific long description for the specified lang. This is used to populate a @@ -874,53 +937,61 @@ section of an RPM DFILESUFFIX - + + DFILESUFFIX. DFLAGPREFIX - + + DFLAGPREFIX. DFLAGS - + + General options that are passed to the D compiler. DFLAGSUFFIX - + + DFLAGSUFFIX. DINCPREFIX - + + DINCPREFIX. DINCSUFFIX - + + DLIBFLAGSUFFIX. Dir - + + A function that converts a string into a Dir instance relative to the target being built. - + + A function that converts a string into a Dir instance relative to the target being built. @@ -928,7 +999,8 @@ into a Dir instance relative to the target being built. Dirs - + + A function that converts a list of strings into a list of Dir instances relative to the target being built. @@ -936,162 +1008,184 @@ into a list of Dir instances relative to the target being built. DLIB - + + Name of the lib tool to use for D codes. DLIBCOM - + + The command line to use when creating libraries. DLIBDIRPREFIX - + + DLIBLINKPREFIX. DLIBDIRSUFFIX - + + DLIBLINKSUFFIX. DLIBFLAGPREFIX - + + DLIBFLAGPREFIX. DLIBFLAGSUFFIX - + + DLIBFLAGSUFFIX. DLIBLINKPREFIX - + + DLIBLINKPREFIX. DLIBLINKSUFFIX - + + DLIBLINKSUFFIX. DLINK - + + Name of the linker to use for linking systems including D sources. DLINKCOM - + + The command line to use when linking systems including D sources. DLINKFLAGPREFIX - + + DLINKFLAGPREFIX. DLINKFLAGS - + + List of linker flags. DLINKFLAGSUFFIX - + + DLINKFLAGSUFFIX. DOCBOOK_DEFAULT_XSL_EPUB - -The default XSLT file for the DocbookEpub builder within the + + +The default XSLT file for the DocbookEpub builder within the current environment, if no other XSLT gets specified via keyword. DOCBOOK_DEFAULT_XSL_HTML - -The default XSLT file for the DocbookHtml builder within the + + +The default XSLT file for the DocbookHtml builder within the current environment, if no other XSLT gets specified via keyword. DOCBOOK_DEFAULT_XSL_HTMLCHUNKED - -The default XSLT file for the DocbookHtmlChunked builder within the + + +The default XSLT file for the DocbookHtmlChunked builder within the current environment, if no other XSLT gets specified via keyword. DOCBOOK_DEFAULT_XSL_HTMLHELP - -The default XSLT file for the DocbookHtmlhelp builder within the + + +The default XSLT file for the DocbookHtmlhelp builder within the current environment, if no other XSLT gets specified via keyword. DOCBOOK_DEFAULT_XSL_MAN - -The default XSLT file for the DocbookMan builder within the + + +The default XSLT file for the DocbookMan builder within the current environment, if no other XSLT gets specified via keyword. DOCBOOK_DEFAULT_XSL_PDF - -The default XSLT file for the DocbookPdf builder within the + + +The default XSLT file for the DocbookPdf builder within the current environment, if no other XSLT gets specified via keyword. DOCBOOK_DEFAULT_XSL_SLIDESHTML - -The default XSLT file for the DocbookSlidesHtml builder within the + + +The default XSLT file for the DocbookSlidesHtml builder within the current environment, if no other XSLT gets specified via keyword. DOCBOOK_DEFAULT_XSL_SLIDESPDF - -The default XSLT file for the DocbookSlidesPdf builder within the + + +The default XSLT file for the DocbookSlidesPdf builder within the current environment, if no other XSLT gets specified via keyword. DOCBOOK_FOP - + + The path to the PDF renderer fop or xep, if one of them is installed (fop gets checked first). @@ -1099,7 +1193,8 @@ if one of them is installed (fop gets checked first). DOCBOOK_FOPCOM - + + The full command-line for the PDF renderer fop or xep. @@ -1107,7 +1202,8 @@ PDF renderer fop or xep. DOCBOOK_FOPCOMSTR - + + The string displayed when a renderer like fop or xep is used to create PDF output from an XML file. @@ -1115,7 +1211,8 @@ The string displayed when a renderer like fop or DOCBOOK_FOPFLAGS - + + Additonal command-line flags for the PDF renderer fop or xep. @@ -1123,7 +1220,8 @@ PDF renderer fop or xep. DOCBOOK_XMLLINT - + + The path to the external executable xmllint, if it's installed. Note, that this is only used as last fallback for resolving XIncludes, if no libxml2 or lxml Python binding can be imported @@ -1133,7 +1231,8 @@ in the current system. DOCBOOK_XMLLINTCOM - + + The full command-line for the external executable xmllint. @@ -1141,7 +1240,8 @@ The full command-line for the external executable DOCBOOK_XMLLINTCOMSTR - + + The string displayed when xmllint is used to resolve XIncludes for a given XML file. @@ -1149,7 +1249,8 @@ XIncludes for a given XML file. DOCBOOK_XMLLINTFLAGS - + + Additonal command-line flags for the external executable xmllint. @@ -1157,7 +1258,8 @@ Additonal command-line flags for the external executable DOCBOOK_XSLTPROC - + + The path to the external executable xsltproc (or saxon, xalan), if one of them is installed. @@ -1168,7 +1270,8 @@ no libxml2 or lxml Python binding can be imported in the current system. DOCBOOK_XSLTPROCCOM - + + The full command-line for the external executable xsltproc (or saxon, xalan). @@ -1177,15 +1280,17 @@ The full command-line for the external executable DOCBOOK_XSLTPROCCOMSTR - -The string displayed when xsltproc is used to transform + + +The string displayed when xsltproc is used to transform an XML file via a given XSLT stylesheet. DOCBOOK_XSLTPROCFLAGS - + + Additonal command-line flags for the external executable xsltproc (or saxon, xalan). @@ -1194,7 +1299,8 @@ Additonal command-line flags for the external executable DOCBOOK_XSLTPROCPARAMS - + + Additonal parameters that are not intended for the XSLT processor executable, but the XSL processing itself. By default, they get appended at the end of the command line for saxon and saxon-xslt, respectively. @@ -1203,134 +1309,149 @@ for saxon and saxon-xslt, respectively. DPATH - + + List of paths to search for import modules. DRPATHPREFIX - + + DRPATHPREFIX. DRPATHSUFFIX - + + DRPATHSUFFIX. DShLibSonameGenerator - + + DShLibSonameGenerator. DSUFFIXES - + + The list of suffixes of files that will be scanned for imported D package files. The default list is: - + ['.d'] DVERPREFIX - + + DVERPREFIX. DVERSIONS - + + List of version tags to enable when compiling. DVERSUFFIX - + + DVERSUFFIX. DVIPDF - + + The TeX DVI file to PDF file converter. DVIPDFCOM - + + The command line used to convert TeX DVI files into a PDF file. DVIPDFCOMSTR - + + The string displayed when a TeX DVI file is converted into a PDF file. -If this is not set, then $DVIPDFCOM (the command line) is displayed. +If this is not set, then $DVIPDFCOM (the command line) is displayed. DVIPDFFLAGS - + + General options passed to the TeX DVI file to PDF file converter. DVIPS - + + The TeX DVI file to PostScript converter. DVIPSFLAGS - + + General options passed to the TeX DVI file to PostScript converter. ENV - + + A dictionary of environment variables to use when invoking commands. When -$ENV is used in a command all list +$ENV is used in a command all list values will be joined using the path separator and any other non-string values will simply be coerced to a string. Note that, by default, -scons +scons does not propagate the environment in force when you execute -scons +scons to the commands used to build target files. This is so that builds will be guaranteed repeatable regardless of the environment variables set at the time -scons +scons is invoked. - + If you want to propagate your environment variables to the commands executed @@ -1338,12 +1459,12 @@ to build target files, you must do so explicitly: - + import os env = Environment(ENV = os.environ) - + Note that you can choose only to propagate certain environment variables. A common example is @@ -1351,12 +1472,12 @@ the system PATH environment variable, so that -scons +scons uses the same utilities as the invoking shell (or other process): - + import os env = Environment(ENV = {'PATH' : os.environ['PATH']}) @@ -1364,7 +1485,8 @@ env = Environment(ENV = {'PATH' : os.environ['PATH']}) ESCAPE - + + A function that will be called to escape shell special characters in command lines. The function should take one argument: the command line string to escape; and should return the escaped command line. @@ -1373,23 +1495,25 @@ string to escape; and should return the escaped command line. F03 - + + The Fortran 03 compiler. -You should normally set the $FORTRAN variable, +You should normally set the $FORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $F03 if you need to use a specific compiler +You only need to set $F03 if you need to use a specific compiler or compiler version for Fortran 03 files. F03COM - + + The command line used to compile a Fortran 03 source file to an object file. -You only need to set $F03COM if you need to use a specific +You only need to set $F03COM if you need to use a specific command line for Fortran 03 files. -You should normally set the $FORTRANCOM variable, +You should normally set the $FORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -1397,17 +1521,19 @@ for all Fortran versions. F03COMSTR - + + The string displayed when a Fortran 03 source file is compiled to an object file. -If this is not set, then $F03COM or $FORTRANCOM +If this is not set, then $F03COM or $FORTRANCOM (the command line) is displayed. F03FILESUFFIXES - + + The list of file extensions for which the F03 dialect will be used. By default, this is ['.f03'] @@ -1415,21 +1541,22 @@ default, this is ['.f03'] F03FLAGS - + + General user-specified options that are passed to the Fortran 03 compiler. Note that this variable does not contain (or similar) include search path options -that scons generates automatically from $F03PATH. +that scons generates automatically from $F03PATH. See -$_F03INCFLAGS +$_F03INCFLAGS below, for the variable that expands to those options. -You only need to set $F03FLAGS if you need to define specific +You only need to set $F03FLAGS if you need to define specific user options for Fortran 03 files. -You should normally set the $FORTRANFLAGS variable, +You should normally set the $FORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -1438,83 +1565,86 @@ for all Fortran versions. _F03INCFLAGS - + + 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 $_F03INCFLAGS is created -by appending $INCPREFIX and $INCSUFFIX +The value of $_F03INCFLAGS is created +by appending $INCPREFIX and $INCSUFFIX to the beginning and end -of each directory in $F03PATH. +of each directory in $F03PATH. F03PATH - + + 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 $F03FLAGS because the result will be non-portable +arguments in $F03FLAGS because the result will be non-portable and the directories will not be searched by the dependency scanner. Note: -directory names in $F03PATH will be looked-up relative to the SConscript +directory names in $F03PATH will be looked-up relative to the SConscript directory when they are used in a command. To force -scons +scons to look-up a directory relative to the root of the source tree use #: -You only need to set $F03PATH if you need to define a specific +You only need to set $F03PATH if you need to define a specific include path for Fortran 03 files. -You should normally set the $FORTRANPATH variable, +You should normally set the $FORTRANPATH variable, which specifies the include path for the default Fortran compiler for all Fortran versions. - + env = Environment(F03PATH='#/include') - + The directory look-up can also be forced using the -Dir() +Dir() function: - + include = Dir('include') env = Environment(F03PATH=include) - + The directory list will be added to command lines through the automatically-generated -$_F03INCFLAGS +$_F03INCFLAGS construction variable, which is constructed by appending the values of the -$INCPREFIX and $INCSUFFIX +$INCPREFIX and $INCSUFFIX construction variables to the beginning and end -of each directory in $F03PATH. +of each directory in $F03PATH. Any command lines you define that need the F03PATH directory list should -include $_F03INCFLAGS: +include $_F03INCFLAGS: - + env = Environment(F03COM="my_compiler $_F03INCFLAGS -c -o $TARGET $SOURCE") F03PPCOM - + + 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 $F03FLAGS and $CPPFLAGS construction variables +Any options specified in the $F03FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $F03PPCOM if you need to use a specific +You only need to set $F03PPCOM if you need to use a specific C-preprocessor command line for Fortran 03 files. -You should normally set the $FORTRANPPCOM variable, +You should normally set the $FORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -1522,18 +1652,20 @@ for all Fortran versions. F03PPCOMSTR - + + 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 $F03PPCOM or $FORTRANPPCOM +If this is not set, then $F03PPCOM or $FORTRANPPCOM (the command line) is displayed. F03PPFILESUFFIXES - + + The list of file extensions for which the compilation + preprocessor pass for F03 dialect will be used. By default, this is empty @@ -1541,23 +1673,25 @@ F03 dialect will be used. By default, this is empty F08 - + + The Fortran 08 compiler. -You should normally set the $FORTRAN variable, +You should normally set the $FORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $F08 if you need to use a specific compiler +You only need to set $F08 if you need to use a specific compiler or compiler version for Fortran 08 files. F08COM - + + The command line used to compile a Fortran 08 source file to an object file. -You only need to set $F08COM if you need to use a specific +You only need to set $F08COM if you need to use a specific command line for Fortran 08 files. -You should normally set the $FORTRANCOM variable, +You should normally set the $FORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -1565,17 +1699,19 @@ for all Fortran versions. F08COMSTR - + + The string displayed when a Fortran 08 source file is compiled to an object file. -If this is not set, then $F08COM or $FORTRANCOM +If this is not set, then $F08COM or $FORTRANCOM (the command line) is displayed. F08FILESUFFIXES - + + The list of file extensions for which the F08 dialect will be used. By default, this is ['.f08'] @@ -1583,21 +1719,22 @@ default, this is ['.f08'] F08FLAGS - + + General user-specified options that are passed to the Fortran 08 compiler. Note that this variable does not contain (or similar) include search path options -that scons generates automatically from $F08PATH. +that scons generates automatically from $F08PATH. See -$_F08INCFLAGS +$_F08INCFLAGS below, for the variable that expands to those options. -You only need to set $F08FLAGS if you need to define specific +You only need to set $F08FLAGS if you need to define specific user options for Fortran 08 files. -You should normally set the $FORTRANFLAGS variable, +You should normally set the $FORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -1606,83 +1743,86 @@ for all Fortran versions. _F08INCFLAGS - + + An automatically-generated construction variable containing the Fortran 08 compiler command-line options for specifying directories to be searched for include files. -The value of $_F08INCFLAGS is created -by appending $INCPREFIX and $INCSUFFIX +The value of $_F08INCFLAGS is created +by appending $INCPREFIX and $INCSUFFIX to the beginning and end -of each directory in $F08PATH. +of each directory in $F08PATH. F08PATH - + + The list of directories that the Fortran 08 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 $F08FLAGS because the result will be non-portable +arguments in $F08FLAGS because the result will be non-portable and the directories will not be searched by the dependency scanner. Note: -directory names in $F08PATH will be looked-up relative to the SConscript +directory names in $F08PATH will be looked-up relative to the SConscript directory when they are used in a command. To force -scons +scons to look-up a directory relative to the root of the source tree use #: -You only need to set $F08PATH if you need to define a specific +You only need to set $F08PATH if you need to define a specific include path for Fortran 08 files. -You should normally set the $FORTRANPATH variable, +You should normally set the $FORTRANPATH variable, which specifies the include path for the default Fortran compiler for all Fortran versions. - + env = Environment(F08PATH='#/include') - + The directory look-up can also be forced using the -Dir() +Dir() function: - + include = Dir('include') env = Environment(F08PATH=include) - + The directory list will be added to command lines through the automatically-generated -$_F08INCFLAGS +$_F08INCFLAGS construction variable, which is constructed by appending the values of the -$INCPREFIX and $INCSUFFIX +$INCPREFIX and $INCSUFFIX construction variables to the beginning and end -of each directory in $F08PATH. +of each directory in $F08PATH. Any command lines you define that need the F08PATH directory list should -include $_F08INCFLAGS: +include $_F08INCFLAGS: - + env = Environment(F08COM="my_compiler $_F08INCFLAGS -c -o $TARGET $SOURCE") F08PPCOM - + + The command line used to compile a Fortran 08 source file to an object file after first running the file through the C preprocessor. -Any options specified in the $F08FLAGS and $CPPFLAGS construction variables +Any options specified in the $F08FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $F08PPCOM if you need to use a specific +You only need to set $F08PPCOM if you need to use a specific C-preprocessor command line for Fortran 08 files. -You should normally set the $FORTRANPPCOM variable, +You should normally set the $FORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -1690,18 +1830,20 @@ for all Fortran versions. F08PPCOMSTR - + + The string displayed when a Fortran 08 source file is compiled to an object file after first running the file through the C preprocessor. -If this is not set, then $F08PPCOM or $FORTRANPPCOM +If this is not set, then $F08PPCOM or $FORTRANPPCOM (the command line) is displayed. F08PPFILESUFFIXES - + + The list of file extensions for which the compilation + preprocessor pass for F08 dialect will be used. By default, this is empty @@ -1709,23 +1851,25 @@ F08 dialect will be used. By default, this is empty F77 - + + The Fortran 77 compiler. -You should normally set the $FORTRAN variable, +You should normally set the $FORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $F77 if you need to use a specific compiler +You only need to set $F77 if you need to use a specific compiler or compiler version for Fortran 77 files. F77COM - + + The command line used to compile a Fortran 77 source file to an object file. -You only need to set $F77COM if you need to use a specific +You only need to set $F77COM if you need to use a specific command line for Fortran 77 files. -You should normally set the $FORTRANCOM variable, +You should normally set the $FORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -1733,17 +1877,19 @@ for all Fortran versions. F77COMSTR - + + The string displayed when a Fortran 77 source file is compiled to an object file. -If this is not set, then $F77COM or $FORTRANCOM +If this is not set, then $F77COM or $FORTRANCOM (the command line) is displayed. F77FILESUFFIXES - + + The list of file extensions for which the F77 dialect will be used. By default, this is ['.f77'] @@ -1751,21 +1897,22 @@ default, this is ['.f77'] F77FLAGS - + + General user-specified options that are passed to the Fortran 77 compiler. Note that this variable does not contain (or similar) include search path options -that scons generates automatically from $F77PATH. +that scons generates automatically from $F77PATH. See -$_F77INCFLAGS +$_F77INCFLAGS below, for the variable that expands to those options. -You only need to set $F77FLAGS if you need to define specific +You only need to set $F77FLAGS if you need to define specific user options for Fortran 77 files. -You should normally set the $FORTRANFLAGS variable, +You should normally set the $FORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -1774,83 +1921,86 @@ for all Fortran versions. _F77INCFLAGS - + + An automatically-generated construction variable containing the Fortran 77 compiler command-line options for specifying directories to be searched for include files. -The value of $_F77INCFLAGS is created -by appending $INCPREFIX and $INCSUFFIX +The value of $_F77INCFLAGS is created +by appending $INCPREFIX and $INCSUFFIX to the beginning and end -of each directory in $F77PATH. +of each directory in $F77PATH. F77PATH - + + The list of directories that the Fortran 77 compiler will search for include directories. The implicit dependency scanner will search these directories for include files. Don't explicitly put include directory -arguments in $F77FLAGS because the result will be non-portable +arguments in $F77FLAGS because the result will be non-portable and the directories will not be searched by the dependency scanner. Note: -directory names in $F77PATH will be looked-up relative to the SConscript +directory names in $F77PATH will be looked-up relative to the SConscript directory when they are used in a command. To force -scons +scons to look-up a directory relative to the root of the source tree use #: -You only need to set $F77PATH if you need to define a specific +You only need to set $F77PATH if you need to define a specific include path for Fortran 77 files. -You should normally set the $FORTRANPATH variable, +You should normally set the $FORTRANPATH variable, which specifies the include path for the default Fortran compiler for all Fortran versions. - + env = Environment(F77PATH='#/include') - + The directory look-up can also be forced using the -Dir() +Dir() function: - + include = Dir('include') env = Environment(F77PATH=include) - + The directory list will be added to command lines through the automatically-generated -$_F77INCFLAGS +$_F77INCFLAGS construction variable, which is constructed by appending the values of the -$INCPREFIX and $INCSUFFIX +$INCPREFIX and $INCSUFFIX construction variables to the beginning and end -of each directory in $F77PATH. +of each directory in $F77PATH. Any command lines you define that need the F77PATH directory list should -include $_F77INCFLAGS: +include $_F77INCFLAGS: - + env = Environment(F77COM="my_compiler $_F77INCFLAGS -c -o $TARGET $SOURCE") F77PPCOM - + + The command line used to compile a Fortran 77 source file to an object file after first running the file through the C preprocessor. -Any options specified in the $F77FLAGS and $CPPFLAGS construction variables +Any options specified in the $F77FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $F77PPCOM if you need to use a specific +You only need to set $F77PPCOM if you need to use a specific C-preprocessor command line for Fortran 77 files. -You should normally set the $FORTRANPPCOM variable, +You should normally set the $FORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -1858,18 +2008,20 @@ for all Fortran versions. F77PPCOMSTR - + + The string displayed when a Fortran 77 source file is compiled to an object file after first running the file through the C preprocessor. -If this is not set, then $F77PPCOM or $FORTRANPPCOM +If this is not set, then $F77PPCOM or $FORTRANPPCOM (the command line) is displayed. F77PPFILESUFFIXES - + + The list of file extensions for which the compilation + preprocessor pass for F77 dialect will be used. By default, this is empty @@ -1877,23 +2029,25 @@ F77 dialect will be used. By default, this is empty F90 - + + The Fortran 90 compiler. -You should normally set the $FORTRAN variable, +You should normally set the $FORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $F90 if you need to use a specific compiler +You only need to set $F90 if you need to use a specific compiler or compiler version for Fortran 90 files. F90COM - + + The command line used to compile a Fortran 90 source file to an object file. -You only need to set $F90COM if you need to use a specific +You only need to set $F90COM if you need to use a specific command line for Fortran 90 files. -You should normally set the $FORTRANCOM variable, +You should normally set the $FORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -1901,17 +2055,19 @@ for all Fortran versions. F90COMSTR - + + The string displayed when a Fortran 90 source file is compiled to an object file. -If this is not set, then $F90COM or $FORTRANCOM +If this is not set, then $F90COM or $FORTRANCOM (the command line) is displayed. F90FILESUFFIXES - + + The list of file extensions for which the F90 dialect will be used. By default, this is ['.f90'] @@ -1919,21 +2075,22 @@ default, this is ['.f90'] F90FLAGS - + + General user-specified options that are passed to the Fortran 90 compiler. Note that this variable does not contain (or similar) include search path options -that scons generates automatically from $F90PATH. +that scons generates automatically from $F90PATH. See -$_F90INCFLAGS +$_F90INCFLAGS below, for the variable that expands to those options. -You only need to set $F90FLAGS if you need to define specific +You only need to set $F90FLAGS if you need to define specific user options for Fortran 90 files. -You should normally set the $FORTRANFLAGS variable, +You should normally set the $FORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -1942,83 +2099,86 @@ for all Fortran versions. _F90INCFLAGS - + + An automatically-generated construction variable containing the Fortran 90 compiler command-line options for specifying directories to be searched for include files. -The value of $_F90INCFLAGS is created -by appending $INCPREFIX and $INCSUFFIX +The value of $_F90INCFLAGS is created +by appending $INCPREFIX and $INCSUFFIX to the beginning and end -of each directory in $F90PATH. +of each directory in $F90PATH. F90PATH - + + The list of directories that the Fortran 90 compiler will search for include directories. The implicit dependency scanner will search these directories for include files. Don't explicitly put include directory -arguments in $F90FLAGS because the result will be non-portable +arguments in $F90FLAGS because the result will be non-portable and the directories will not be searched by the dependency scanner. Note: -directory names in $F90PATH will be looked-up relative to the SConscript +directory names in $F90PATH will be looked-up relative to the SConscript directory when they are used in a command. To force -scons +scons to look-up a directory relative to the root of the source tree use #: -You only need to set $F90PATH if you need to define a specific +You only need to set $F90PATH if you need to define a specific include path for Fortran 90 files. -You should normally set the $FORTRANPATH variable, +You should normally set the $FORTRANPATH variable, which specifies the include path for the default Fortran compiler for all Fortran versions. - + env = Environment(F90PATH='#/include') - + The directory look-up can also be forced using the -Dir() +Dir() function: - + include = Dir('include') env = Environment(F90PATH=include) - + The directory list will be added to command lines through the automatically-generated -$_F90INCFLAGS +$_F90INCFLAGS construction variable, which is constructed by appending the values of the -$INCPREFIX and $INCSUFFIX +$INCPREFIX and $INCSUFFIX construction variables to the beginning and end -of each directory in $F90PATH. +of each directory in $F90PATH. Any command lines you define that need the F90PATH directory list should -include $_F90INCFLAGS: +include $_F90INCFLAGS: - + env = Environment(F90COM="my_compiler $_F90INCFLAGS -c -o $TARGET $SOURCE") F90PPCOM - + + The command line used to compile a Fortran 90 source file to an object file after first running the file through the C preprocessor. -Any options specified in the $F90FLAGS and $CPPFLAGS construction variables +Any options specified in the $F90FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $F90PPCOM if you need to use a specific +You only need to set $F90PPCOM if you need to use a specific C-preprocessor command line for Fortran 90 files. -You should normally set the $FORTRANPPCOM variable, +You should normally set the $FORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -2026,17 +2186,19 @@ for all Fortran versions. F90PPCOMSTR - + + The string displayed when a Fortran 90 source file is compiled after first running the file through the C preprocessor. -If this is not set, then $F90PPCOM or $FORTRANPPCOM +If this is not set, then $F90PPCOM or $FORTRANPPCOM (the command line) is displayed. F90PPFILESUFFIXES - + + The list of file extensions for which the compilation + preprocessor pass for F90 dialect will be used. By default, this is empty @@ -2044,23 +2206,25 @@ F90 dialect will be used. By default, this is empty F95 - + + The Fortran 95 compiler. -You should normally set the $FORTRAN variable, +You should normally set the $FORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $F95 if you need to use a specific compiler +You only need to set $F95 if you need to use a specific compiler or compiler version for Fortran 95 files. F95COM - + + The command line used to compile a Fortran 95 source file to an object file. -You only need to set $F95COM if you need to use a specific +You only need to set $F95COM if you need to use a specific command line for Fortran 95 files. -You should normally set the $FORTRANCOM variable, +You should normally set the $FORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -2068,17 +2232,19 @@ for all Fortran versions. F95COMSTR - + + The string displayed when a Fortran 95 source file is compiled to an object file. -If this is not set, then $F95COM or $FORTRANCOM +If this is not set, then $F95COM or $FORTRANCOM (the command line) is displayed. F95FILESUFFIXES - + + The list of file extensions for which the F95 dialect will be used. By default, this is ['.f95'] @@ -2086,21 +2252,22 @@ default, this is ['.f95'] F95FLAGS - + + General user-specified options that are passed to the Fortran 95 compiler. Note that this variable does not contain (or similar) include search path options -that scons generates automatically from $F95PATH. +that scons generates automatically from $F95PATH. See -$_F95INCFLAGS +$_F95INCFLAGS below, for the variable that expands to those options. -You only need to set $F95FLAGS if you need to define specific +You only need to set $F95FLAGS if you need to define specific user options for Fortran 95 files. -You should normally set the $FORTRANFLAGS variable, +You should normally set the $FORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -2109,83 +2276,86 @@ for all Fortran versions. _F95INCFLAGS - + + An automatically-generated construction variable containing the Fortran 95 compiler command-line options for specifying directories to be searched for include files. -The value of $_F95INCFLAGS is created -by appending $INCPREFIX and $INCSUFFIX +The value of $_F95INCFLAGS is created +by appending $INCPREFIX and $INCSUFFIX to the beginning and end -of each directory in $F95PATH. +of each directory in $F95PATH. F95PATH - + + The list of directories that the Fortran 95 compiler will search for include directories. The implicit dependency scanner will search these directories for include files. Don't explicitly put include directory -arguments in $F95FLAGS because the result will be non-portable +arguments in $F95FLAGS because the result will be non-portable and the directories will not be searched by the dependency scanner. Note: -directory names in $F95PATH will be looked-up relative to the SConscript +directory names in $F95PATH will be looked-up relative to the SConscript directory when they are used in a command. To force -scons +scons to look-up a directory relative to the root of the source tree use #: -You only need to set $F95PATH if you need to define a specific +You only need to set $F95PATH if you need to define a specific include path for Fortran 95 files. -You should normally set the $FORTRANPATH variable, +You should normally set the $FORTRANPATH variable, which specifies the include path for the default Fortran compiler for all Fortran versions. - + env = Environment(F95PATH='#/include') - + The directory look-up can also be forced using the -Dir() +Dir() function: - + include = Dir('include') env = Environment(F95PATH=include) - + The directory list will be added to command lines through the automatically-generated -$_F95INCFLAGS +$_F95INCFLAGS construction variable, which is constructed by appending the values of the -$INCPREFIX and $INCSUFFIX +$INCPREFIX and $INCSUFFIX construction variables to the beginning and end -of each directory in $F95PATH. +of each directory in $F95PATH. Any command lines you define that need the F95PATH directory list should -include $_F95INCFLAGS: +include $_F95INCFLAGS: - + env = Environment(F95COM="my_compiler $_F95INCFLAGS -c -o $TARGET $SOURCE") F95PPCOM - + + The command line used to compile a Fortran 95 source file to an object file after first running the file through the C preprocessor. -Any options specified in the $F95FLAGS and $CPPFLAGS construction variables +Any options specified in the $F95FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $F95PPCOM if you need to use a specific +You only need to set $F95PPCOM if you need to use a specific C-preprocessor command line for Fortran 95 files. -You should normally set the $FORTRANPPCOM variable, +You should normally set the $FORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -2193,18 +2363,20 @@ for all Fortran versions. F95PPCOMSTR - + + The string displayed when a Fortran 95 source file is compiled to an object file after first running the file through the C preprocessor. -If this is not set, then $F95PPCOM or $FORTRANPPCOM +If this is not set, then $F95PPCOM or $FORTRANPPCOM (the command line) is displayed. F95PPFILESUFFIXES - + + The list of file extensions for which the compilation + preprocessor pass for F95 dialect will be used. By default, this is empty @@ -2212,11 +2384,13 @@ F95 dialect will be used. By default, this is empty File - + + A function that converts a string into a File instance relative to the target being built. - + + A function that converts a string into a File instance relative to the target being built. @@ -2224,7 +2398,8 @@ target being built. FORTRAN - + + The default Fortran compiler for all versions of Fortran. @@ -2232,31 +2407,34 @@ for all versions of Fortran. FORTRANCOM - + + The command line used to compile a Fortran source file to an object file. By default, any options specified -in the $FORTRANFLAGS, -$CPPFLAGS, -$_CPPDEFFLAGS, -$_FORTRANMODFLAG, and -$_FORTRANINCFLAGS construction variables +in the $FORTRANFLAGS, +$CPPFLAGS, +$_CPPDEFFLAGS, +$_FORTRANMODFLAG, and +$_FORTRANINCFLAGS construction variables are included on this command line. FORTRANCOMSTR - + + The string displayed when a Fortran source file is compiled to an object file. -If this is not set, then $FORTRANCOM +If this is not set, then $FORTRANCOM (the command line) is displayed. FORTRANFILESUFFIXES - + + The list of file extensions for which the FORTRAN dialect will be used. By default, this is ['.f', '.for', '.ftn'] @@ -2264,16 +2442,17 @@ default, this is ['.f', '.for', '.ftn'] FORTRANFLAGS - + + General user-specified options that are passed to the Fortran compiler. Note that this variable does not contain (or similar) include or module search path options -that scons generates automatically from $FORTRANPATH. +that scons generates automatically from $FORTRANPATH. See -$_FORTRANINCFLAGS and $_FORTRANMODFLAG, +$_FORTRANINCFLAGS and $_FORTRANMODFLAG, below, for the variables that expand those options. @@ -2281,22 +2460,24 @@ for the variables that expand those options. _FORTRANINCFLAGS - + + An automatically-generated construction variable containing the Fortran compiler command-line options for specifying directories to be searched for include files and module files. -The value of $_FORTRANINCFLAGS is created +The value of $_FORTRANINCFLAGS is created by respectively prepending and appending -$INCPREFIX and $INCSUFFIX +$INCPREFIX and $INCSUFFIX to the beginning and end -of each directory in $FORTRANPATH. +of each directory in $FORTRANPATH. FORTRANMODDIR - + + Directory location where the Fortran compiler should place any module files it generates. This variable is empty, by default. Some Fortran compilers will internally append this directory in the search path @@ -2306,44 +2487,48 @@ for module files, as well. FORTRANMODDIRPREFIX - + + The prefix used to specify a module directory on the Fortran compiler command line. This will be prepended to the beginning of the directory -in the $FORTRANMODDIR construction variables -when the $_FORTRANMODFLAG variables is automatically generated. +in the $FORTRANMODDIR construction variables +when the $_FORTRANMODFLAG variables is automatically generated. FORTRANMODDIRSUFFIX - + + The suffix used to specify a module directory on the Fortran compiler command line. This will be appended to the end of the directory -in the $FORTRANMODDIR construction variables -when the $_FORTRANMODFLAG variables is automatically generated. +in the $FORTRANMODDIR construction variables +when the $_FORTRANMODFLAG variables is automatically generated. _FORTRANMODFLAG - + + An automatically-generated construction variable containing the Fortran compiler command-line option for specifying the directory location where the Fortran compiler should place any module files that happen to get generated during compilation. -The value of $_FORTRANMODFLAG is created +The value of $_FORTRANMODFLAG is created by respectively prepending and appending -$FORTRANMODDIRPREFIX and $FORTRANMODDIRSUFFIX -to the beginning and end of the directory in $FORTRANMODDIR. +$FORTRANMODDIRPREFIX and $FORTRANMODDIRSUFFIX +to the beginning and end of the directory in $FORTRANMODDIR. FORTRANMODPREFIX - + + The module file prefix used by the Fortran compiler. SCons assumes that the Fortran compiler follows the quasi-standard naming convention for module files of @@ -2357,7 +2542,8 @@ module file name as scons attempts to resolve dependencies. FORTRANMODSUFFIX - + + The module file suffix used by the Fortran compiler. SCons assumes that the Fortran compiler follows the quasi-standard naming convention for module files of @@ -2371,7 +2557,8 @@ module file name as scons attempts to resolve dependencies. FORTRANPATH - + + The list of directories that the Fortran compiler will search for include files and (for some compilers) module files. The Fortran implicit dependency scanner will search these directories for include files (but @@ -2381,74 +2568,77 @@ include directory arguments in FORTRANFLAGS because the result will be non-portable and the directories will not be searched by the dependency scanner. Note: directory names in FORTRANPATH will be looked-up relative to the SConscript directory when they are used in a command. To force -scons +scons to look-up a directory relative to the root of the source tree use #: - + env = Environment(FORTRANPATH='#/include') - + The directory look-up can also be forced using the -Dir() +Dir() function: - + include = Dir('include') env = Environment(FORTRANPATH=include) - + The directory list will be added to command lines through the automatically-generated -$_FORTRANINCFLAGS +$_FORTRANINCFLAGS construction variable, which is constructed by respectively prepending and appending the values of the -$INCPREFIX and $INCSUFFIX +$INCPREFIX and $INCSUFFIX construction variables to the beginning and end -of each directory in $FORTRANPATH. +of each directory in $FORTRANPATH. Any command lines you define that need the FORTRANPATH directory list should -include $_FORTRANINCFLAGS: +include $_FORTRANINCFLAGS: - + env = Environment(FORTRANCOM="my_compiler $_FORTRANINCFLAGS -c -o $TARGET $SOURCE") FORTRANPPCOM - + + The command line used to compile a Fortran source file to an object file after first running the file through the C preprocessor. -By default, any options specified in the $FORTRANFLAGS, -$CPPFLAGS, -$_CPPDEFFLAGS, -$_FORTRANMODFLAG, and -$_FORTRANINCFLAGS +By default, any options specified in the $FORTRANFLAGS, +$CPPFLAGS, +$_CPPDEFFLAGS, +$_FORTRANMODFLAG, and +$_FORTRANINCFLAGS construction variables are included on this command line. FORTRANPPCOMSTR - + + The string displayed when a Fortran source file is compiled to an object file after first running the file through the C preprocessor. -If this is not set, then $FORTRANPPCOM +If this is not set, then $FORTRANPPCOM (the command line) is displayed. FORTRANPPFILESUFFIXES - + + The list of file extensions for which the compilation + preprocessor pass for FORTRAN dialect will be used. By default, this is ['.fpp', '.FPP'] @@ -2456,14 +2646,15 @@ FORTRAN dialect will be used. By default, this is ['.fpp', '.FPP'] FORTRANSUFFIXES - + + The list of suffixes of files that will be scanned for Fortran implicit dependencies (INCLUDE lines and USE statements). The default list is: - + [".f", ".F", ".for", ".FOR", ".ftn", ".FTN", ".fpp", ".FPP", ".f77", ".F77", ".f90", ".F90", ".f95", ".F95"] @@ -2471,47 +2662,50 @@ The default list is: FRAMEWORKPATH - + + On Mac OS X with gcc, a list containing the paths to search for frameworks. Used by the compiler to find framework-style includes like #include <Fmwk/Header.h>. Used by the linker to find user-specified frameworks when linking (see - $FRAMEWORKS). + $FRAMEWORKS). For example: - + env.AppendUnique(FRAMEWORKPATH='#myframeworkdir') - + will add - + ... -Fmyframeworkdir - + to the compiler and linker command lines. _FRAMEWORKPATH - + + On Mac OS X with gcc, an automatically-generated construction variable containing the linker command-line options corresponding to - $FRAMEWORKPATH. + $FRAMEWORKPATH. FRAMEWORKPATHPREFIX - + + On Mac OS X with gcc, the prefix to be used for the FRAMEWORKPATH entries. - (see $FRAMEWORKPATH). + (see $FRAMEWORKPATH). The default value is . @@ -2519,64 +2713,70 @@ The default list is: FRAMEWORKPREFIX - + + On Mac OS X with gcc, the prefix to be used for linking in frameworks - (see $FRAMEWORKS). + (see $FRAMEWORKS). The default value is . + + _FRAMEWORKS + + + On Mac OS X with gcc, + an automatically-generated construction variable + containing the linker command-line options + for linking with FRAMEWORKS. + + + FRAMEWORKS - + + On Mac OS X with gcc, a list of the framework names to be linked into a program or shared library or bundle. The default value is the empty list. For example: - + env.AppendUnique(FRAMEWORKS=Split('System Cocoa SystemConfiguration')) - - _FRAMEWORKS - - On Mac OS X with gcc, - an automatically-generated construction variable - containing the linker command-line options - for linking with FRAMEWORKS. - - - FRAMEWORKSFLAGS - + + On Mac OS X with gcc, general user-supplied frameworks options to be added at the end of a command line building a loadable module. (This has been largely superseded by - the $FRAMEWORKPATH, $FRAMEWORKPATHPREFIX, - $FRAMEWORKPREFIX and $FRAMEWORKS variables + the $FRAMEWORKPATH, $FRAMEWORKPATHPREFIX, + $FRAMEWORKPREFIX and $FRAMEWORKS variables described above.) GS - + + The Ghostscript program used, e.g. to convert PostScript to PDF files. GSCOM - + + The full Ghostscript command line used for the conversion process. Its default value is $GS $GSFLAGS -sOutputFile=$TARGET $SOURCES. @@ -2584,16 +2784,18 @@ value is $GS $GSFLAGS -sOutputFile=$TARGET $SOURCES GSCOMSTR - + + The string displayed when Ghostscript is called for the conversion process. -If this is not set (the default), then $GSCOM (the command line) is displayed. +If this is not set (the default), then $GSCOM (the command line) is displayed. GSFLAGS - + + General options passed to the Ghostscript program, when converting PostScript to PDF files for example. Its default value is -dNOPAUSE -dBATCH -sDEVICE=pdfwrite @@ -2604,6 +2806,15 @@ is -dNOPAUSE -dBATCH -sDEVICE=pdfwrite HOST_ARCH + The name of the host hardware architecture used to create the Environment. + If a platform is specified when creating the Environment, then + that Platform's logic will handle setting this value. + This value is immutable, and should not be changed by the user after + the Environment is initialized. + Currently only set for Win32. + + + Sets the host architecture for Visual Studio compiler. If not set, default to the detected host architecture: note that this may depend on the python you are using. @@ -2611,28 +2822,20 @@ This variable must be passed as an argument to the Environment() constructor; setting it later has no effect. - -Valid values are the same as for $TARGET_ARCH. + +Valid values are the same as for $TARGET_ARCH. - + This is currently only used on Windows, but in the future it will be used on other OSes as well. - - - The name of the host hardware architecture used to create the Environment. - If a platform is specified when creating the Environment, then - that Platform's logic will handle setting this value. - This value is immutable, and should not be changed by the user after - the Environment is initialized. - Currently only set for Win32. - - + HOST_OS - + + The name of the host operating system used to create the Environment. If a platform is specified when creating the Environment, then that Platform's logic will handle setting this value. @@ -2644,54 +2847,59 @@ used on other OSes as well. IDLSUFFIXES - + + The list of suffixes of files that will be scanned for IDL implicit dependencies (#include or import lines). The default list is: - + [".idl", ".IDL"] IMPLIBNOVERSIONSYMLINKS - -Used to override $SHLIBNOVERSIONSYMLINKS/$LDMODULENOVERSIONSYMLINKS when + + +Used to override $SHLIBNOVERSIONSYMLINKS/$LDMODULENOVERSIONSYMLINKS when creating versioned import library for a shared library/loadable module. If not defined, -then $SHLIBNOVERSIONSYMLINKS/$LDMODULENOVERSIONSYMLINKS is used to determine +then $SHLIBNOVERSIONSYMLINKS/$LDMODULENOVERSIONSYMLINKS is used to determine whether to disable symlink generation or not. IMPLIBPREFIX - + + The prefix used for import library names. For example, cygwin uses import libraries (libfoo.dll.a) in pair with dynamic libraries -(cygfoo.dll). The cyglink linker sets -$IMPLIBPREFIX to 'lib' and $SHLIBPREFIX +(cygfoo.dll). The cyglink linker sets +$IMPLIBPREFIX to 'lib' and $SHLIBPREFIX to 'cyg'. IMPLIBSUFFIX - + + The suffix used for import library names. For example, cygwin uses import libraries (libfoo.dll.a) in pair with dynamic libraries -(cygfoo.dll). The cyglink linker sets -$IMPLIBSUFFIX to '.dll.a' and $SHLIBSUFFIX +(cygfoo.dll). The cyglink linker sets +$IMPLIBSUFFIX to '.dll.a' and $SHLIBSUFFIX to '.dll'. IMPLIBVERSION - -Used to override $SHLIBVERSION/$LDMODULEVERSION when + + +Used to override $SHLIBVERSION/$LDMODULEVERSION when generating versioned import library for a shared library/loadable module. If undefined, the $SHLIBVERSION/$LDMODULEVERSION is used to determine the version of versioned import library. @@ -2700,13 +2908,14 @@ determine the version of versioned import library. IMPLICIT_COMMAND_DEPENDENCIES - + + Controls whether or not SCons will add implicit dependencies for the commands executed to build targets. - + By default, SCons will add to each target an implicit dependency on the command @@ -2720,9 +2929,9 @@ variable in the environment used to execute the command. - + If the construction variable -$IMPLICIT_COMMAND_DEPENDENCIES +$IMPLICIT_COMMAND_DEPENDENCIES is set to a false value (None, False, @@ -2733,38 +2942,41 @@ not be added to the targets built with that construction environment. - + env = Environment(IMPLICIT_COMMAND_DEPENDENCIES = 0) INCPREFIX - + + The prefix used to specify an include directory on the C compiler command line. This will be prepended to the beginning of each directory -in the $CPPPATH and $FORTRANPATH construction variables -when the $_CPPINCFLAGS and $_FORTRANINCFLAGS +in the $CPPPATH and $FORTRANPATH construction variables +when the $_CPPINCFLAGS and $_FORTRANINCFLAGS variables are automatically generated. INCSUFFIX - + + The suffix used to specify an include directory on the C compiler command line. This will be appended to the end of each directory -in the $CPPPATH and $FORTRANPATH construction variables -when the $_CPPINCFLAGS and $_FORTRANINCFLAGS +in the $CPPPATH and $FORTRANPATH construction variables +when the $_CPPINCFLAGS and $_FORTRANINCFLAGS variables are automatically generated. INSTALL - + + A function to be called to install a file into a destination file name. The default function copies the file into the destination @@ -2773,11 +2985,11 @@ to match the source file's). The function takes the following arguments: - + def install(dest, source, env): - + dest is the path name of the destination file. source @@ -2791,19 +3003,21 @@ in force for this file installation. INSTALLSTR - + + The string displayed when a file is installed into a destination file name. The default is: - + Install file: "$SOURCE" as "$TARGET" INTEL_C_COMPILER_VERSION - + + Set by the "intelc" Tool to the major version number of the Intel C compiler selected for use. @@ -2812,23 +3026,27 @@ selected for use. JAR - + + The Java archive tool. - + + The Java archive tool. JARCHDIR - + + The directory to which the Java archive tool should change (using the option). - + + The directory to which the Java archive tool should change (using the @@ -2838,39 +3056,44 @@ option). JARCOM - + + The command line used to call the Java archive tool. - + + The command line used to call the Java archive tool. JARCOMSTR - + + The string displayed when the Java archive tool is called If this is not set, then $JARCOM (the command line) is displayed. - + env = Environment(JARCOMSTR = "JARchiving $SOURCES into $TARGET") - + + The string displayed when the Java archive tool is called If this is not set, then $JARCOM (the command line) is displayed. - + env = Environment(JARCOMSTR = "JARchiving $SOURCES into $TARGET") JARFLAGS - + + General options passed to the Java archive tool. By default this is set to @@ -2878,7 +3101,8 @@ to create the necessary jar file. - + + General options passed to the Java archive tool. By default this is set to @@ -2890,12 +3114,14 @@ file. JARSUFFIX - + + The suffix for Java archives: .jar by default. - + + The suffix for Java archives: .jar by default. @@ -2904,10 +3130,11 @@ by default. JAVABOOTCLASSPATH - + + Specifies the list of directories that will be added to the - javac command line + javac command line via the option. The individual directory names will be separated by the operating system's path separate character @@ -2919,46 +3146,51 @@ by default. JAVAC - + + The Java compiler. JAVACCOM - + + The command line used to compile a directory tree containing Java source files to corresponding Java class files. - Any options specified in the $JAVACFLAGS construction variable + Any options specified in the $JAVACFLAGS construction variable are included on this command line. JAVACCOMSTR - + + The string displayed when compiling a directory tree of Java source files to corresponding Java class files. - If this is not set, then $JAVACCOM (the command line) is displayed. + If this is not set, then $JAVACCOM (the command line) is displayed. - + env = Environment(JAVACCOMSTR = "Compiling class files $TARGETS from $SOURCES") JAVACFLAGS - + + General options that are passed to the Java compiler. JAVACLASSDIR - + + The directory in which Java class files may be found. This is stripped from the beginning of any Java .class file names supplied to the @@ -2969,13 +3201,14 @@ by default. JAVACLASSPATH - + + Specifies the list of directories that will be searched for Java .class file. The directories in this list will be added to the - javac and javah command lines + javac and javah command lines via the option. The individual directory names will be separated by the operating system's path separate character @@ -2984,11 +3217,11 @@ by default. on Windows). - + Note that this currently just adds the specified directory via the option. - SCons does not currently search the - $JAVACLASSPATH directories for dependency + SCons does not currently search the + $JAVACLASSPATH directories for dependency .class files. @@ -2996,7 +3229,8 @@ by default. JAVACLASSSUFFIX - + + The suffix for Java class files; .class by default. @@ -3005,37 +3239,41 @@ by default. JAVAH - + + The Java generator for C header and stub files. JAVAHCOM - + + The command line used to generate C header and stub files from Java classes. -Any options specified in the $JAVAHFLAGS construction variable +Any options specified in the $JAVAHFLAGS construction variable are included on this command line. JAVAHCOMSTR - + + The string displayed when C header and stub files are generated from Java classes. -If this is not set, then $JAVAHCOM (the command line) is displayed. +If this is not set, then $JAVAHCOM (the command line) is displayed. - + env = Environment(JAVAHCOMSTR = "Generating header/stub file(s) $TARGETS from $SOURCES") JAVAHFLAGS - + + General options passed to the C header and stub file generator for Java classes. @@ -3043,20 +3281,22 @@ for Java classes. JAVAINCLUDES - + + Include path for Java header files (such as jni.h) JAVASOURCEPATH - + + Specifies the list of directories that will be searched for input .java file. The directories in this list will be added to the - javac command line + javac command line via the option. The individual directory names will be separated by the operating system's path separate character @@ -3065,11 +3305,11 @@ for Java classes. on Windows). - + Note that this currently just adds the specified directory via the option. - SCons does not currently search the - $JAVASOURCEPATH directories for dependency + SCons does not currently search the + $JAVASOURCEPATH directories for dependency .java files. @@ -3077,7 +3317,8 @@ for Java classes. JAVASUFFIX - + + The suffix for Java files; .java by default. @@ -3086,70 +3327,76 @@ for Java classes. JAVAVERSION - - Specifies the Java version being used by the Java builder. + + + Specifies the Java version being used by the Java builder. This is not currently used to select one version of the Java compiler vs. another. Instead, you should set this to specify the version of Java - supported by your javac compiler. + supported by your javac compiler. The default is 1.4. - + This is sometimes necessary because Java 1.5 changed the file names that are created for nested anonymous inner classes, which can cause a mismatch with the files - that SCons expects will be generated by the javac compiler. - Setting $JAVAVERSION to + that SCons expects will be generated by the javac compiler. + Setting $JAVAVERSION to 1.5 (or 1.6, as appropriate) - can make SCons realize that a Java 1.5 or 1.6 + can make SCons realize that a Java 1.5 or 1.6 build is actually up to date. LATEX - + + The LaTeX structured formatter and typesetter. LATEXCOM - + + The command line used to call the LaTeX structured formatter and typesetter. LATEXCOMSTR - + + The string displayed when calling the LaTeX structured formatter and typesetter. -If this is not set, then $LATEXCOM (the command line) is displayed. +If this is not set, then $LATEXCOM (the command line) is displayed. - + env = Environment(LATEXCOMSTR = "Building $TARGET from LaTeX input $SOURCES") LATEXFLAGS - + + General options passed to the LaTeX structured formatter and typesetter. LATEXRETRIES - + + The maximum number of times that LaTeX will be re-run if the .log -generated by the $LATEXCOM command +generated by the $LATEXCOM command indicates that there are undefined references. The default is to try to resolve undefined references by re-running LaTeX up to three times. @@ -3158,52 +3405,46 @@ by re-running LaTeX up to three times. LATEXSUFFIXES - + + The list of suffixes of files that will be scanned for LaTeX implicit dependencies (\include or \import files). The default list is: - + [".tex", ".ltx", ".latex"] LDMODULE - + + The linker for building loadable modules. -By default, this is the same as $SHLINK. +By default, this is the same as $SHLINK. LDMODULECOM - + + The command line for building loadable modules. -On Mac OS X, this uses the $LDMODULE, -$LDMODULEFLAGS and -$FRAMEWORKSFLAGS variables. -On other systems, this is the same as $SHLINK. +On Mac OS X, this uses the $LDMODULE, +$LDMODULEFLAGS and +$FRAMEWORKSFLAGS variables. +On other systems, this is the same as $SHLINK. LDMODULECOMSTR - + + The string displayed when building loadable modules. -If this is not set, then $LDMODULECOM (the command line) is displayed. - - - - - LDMODULEEMITTER - -Contains the emitter specification for the -LoadableModule builder. -The manpage section "Builder Objects" contains -general information on specifying emitters. +If this is not set, then $LDMODULECOM (the command line) is displayed. @@ -3220,41 +3461,46 @@ general information on specifying emitters. LDMODULEFLAGS - + + General user options passed to the linker for building loadable modules. LDMODULENOVERSIONSYMLINKS - -Instructs the LoadableModule builder to not automatically create symlinks + + +Instructs the LoadableModule builder to not automatically create symlinks for versioned modules. Defaults to $SHLIBNOVERSIONSYMLINKS LDMODULEPREFIX - + + The prefix used for loadable module file names. On Mac OS X, this is null; on other systems, this is -the same as $SHLIBPREFIX. +the same as $SHLIBPREFIX. _LDMODULESONAME - + + A macro that automatically generates loadable module's SONAME based on $TARGET, -$LDMODULEVERSION and $LDMODULESUFFIX. Used by LoadableModule builder -when the linker tool supports SONAME (e.g. gnulink). +$LDMODULEVERSION and $LDMODULESUFFIX. Used by LoadableModule builder +when the linker tool supports SONAME (e.g. gnulink). LDMODULESUFFIX - + + The suffix used for loadable module file names. On Mac OS X, this is null; on other systems, this is @@ -3264,47 +3510,52 @@ the same as $SHLIBSUFFIX. LDMODULEVERSION - + + When this construction variable is defined, a versioned loadable module -is created by LoadableModule builder. This activates the -$_LDMODULEVERSIONFLAGS and thus modifies the $LDMODULECOM as +is created by LoadableModule builder. This activates the +$_LDMODULEVERSIONFLAGS and thus modifies the $LDMODULECOM as required, adds the version number to the library name, and creates the symlinks -that are needed. $LDMODULEVERSION versions should exist in the same -format as $SHLIBVERSION. +that are needed. $LDMODULEVERSION versions should exist in the same +format as $SHLIBVERSION. + + + + + LDMODULEVERSIONFLAGS + + +Extra flags added to $LDMODULECOM when building versioned +LoadableModule. These flags are only used when $LDMODULEVERSION is +set. _LDMODULEVERSIONFLAGS - -This macro automatically introduces extra flags to $LDMODULECOM when -building versioned LoadableModule (that is when -$LDMODULEVERSION is set). _LDMODULEVERSIONFLAGS -usually adds $SHLIBVERSIONFLAGS and some extra dynamically generated + + +This macro automatically introduces extra flags to $LDMODULECOM when +building versioned LoadableModule (that is when +$LDMODULEVERSION is set). _LDMODULEVERSIONFLAGS +usually adds $SHLIBVERSIONFLAGS and some extra dynamically generated options (such as -Wl,-soname=$_LDMODULESONAME). It is unused by plain (unversioned) loadable modules. - - LDMODULEVERSIONFLAGS - -Extra flags added to $LDMODULECOM when building versioned -LoadableModule. These flags are only used when $LDMODULEVERSION is -set. - - - LEX - + + The lexical analyzer generator. LEXCOM - + + The command line used to call the lexical analyzer generator to generate a source file. @@ -3312,61 +3563,67 @@ to generate a source file. LEXCOMSTR - + + The string displayed when generating a source file using the lexical analyzer generator. -If this is not set, then $LEXCOM (the command line) is displayed. +If this is not set, then $LEXCOM (the command line) is displayed. - + env = Environment(LEXCOMSTR = "Lex'ing $TARGET from $SOURCES") LEXFLAGS - + + General options passed to the lexical analyzer generator. LEXUNISTD - + + Used only on windows environments to set a lex flag to prevent 'unistd.h' from being included. The default value is '--nounistd'. _LIBDIRFLAGS - + + An automatically-generated construction variable containing the linker command-line options for specifying directories to be searched for library. -The value of $_LIBDIRFLAGS is created -by respectively prepending and appending $LIBDIRPREFIX and $LIBDIRSUFFIX +The value of $_LIBDIRFLAGS is created +by respectively prepending and appending $LIBDIRPREFIX and $LIBDIRSUFFIX to the beginning and end -of each directory in $LIBPATH. +of each directory in $LIBPATH. LIBDIRPREFIX - + + The prefix used to specify a library directory on the linker command line. This will be prepended to the beginning of each directory -in the $LIBPATH construction variable -when the $_LIBDIRFLAGS variable is automatically generated. +in the $LIBPATH construction variable +when the $_LIBDIRFLAGS variable is automatically generated. LIBDIRSUFFIX - + + The suffix used to specify a library directory on the linker command line. This will be appended to the end of each directory -in the $LIBPATH construction variable -when the $_LIBDIRFLAGS variable is automatically generated. +in the $LIBPATH construction variable +when the $_LIBDIRFLAGS variable is automatically generated. @@ -3383,91 +3640,96 @@ general information on specifying emitters. _LIBFLAGS - + + An automatically-generated construction variable containing the linker command-line options for specifying libraries to be linked with the resulting target. -The value of $_LIBFLAGS is created -by respectively prepending and appending $LIBLINKPREFIX and $LIBLINKSUFFIX +The value of $_LIBFLAGS is created +by respectively prepending and appending $LIBLINKPREFIX and $LIBLINKSUFFIX to the beginning and end -of each filename in $LIBS. +of each filename in $LIBS. LIBLINKPREFIX - + + The prefix used to specify a library to link on the linker command line. This will be prepended to the beginning of each library -in the $LIBS construction variable -when the $_LIBFLAGS variable is automatically generated. +in the $LIBS construction variable +when the $_LIBFLAGS variable is automatically generated. LIBLINKSUFFIX - + + The suffix used to specify a library to link on the linker command line. This will be appended to the end of each library -in the $LIBS construction variable -when the $_LIBFLAGS variable is automatically generated. +in the $LIBS construction variable +when the $_LIBFLAGS variable is automatically generated. LIBPATH - + + The list of directories that will be searched for libraries. The implicit dependency scanner will search these directories for include files. Don't explicitly put include directory -arguments in $LINKFLAGS or $SHLINKFLAGS +arguments in $LINKFLAGS or $SHLINKFLAGS because the result will be non-portable and the directories will not be searched by the dependency scanner. Note: directory names in LIBPATH will be looked-up relative to the SConscript directory when they are used in a command. To force -scons +scons to look-up a directory relative to the root of the source tree use #: - + env = Environment(LIBPATH='#/libs') - + The directory look-up can also be forced using the -Dir() +Dir() function: - + libs = Dir('libs') env = Environment(LIBPATH=libs) - + The directory list will be added to command lines through the automatically-generated -$_LIBDIRFLAGS +$_LIBDIRFLAGS construction variable, which is constructed by respectively prepending and appending the values of the -$LIBDIRPREFIX and $LIBDIRSUFFIX +$LIBDIRPREFIX and $LIBDIRSUFFIX construction variables to the beginning and end -of each directory in $LIBPATH. +of each directory in $LIBPATH. Any command lines you define that need the LIBPATH directory list should -include $_LIBDIRFLAGS: +include $_LIBDIRFLAGS: - + env = Environment(LINKCOM="my_linker $_LIBDIRFLAGS $_LIBFLAGS -o $TARGET $SOURCE") LIBPREFIX - + + The prefix used for (static) library file names. A default value is set for each platform (posix, win32, os2, etc.), @@ -3479,63 +3741,65 @@ to reflect the names of the libraries they create. LIBPREFIXES - + + A list of all legal prefixes for library file names. When searching for library dependencies, SCons will look for files with these prefixes, the base library name, -and suffixes in the $LIBSUFFIXES list. +and suffixes in the $LIBSUFFIXES list. LIBS - + + A list of one or more libraries that will be linked with any executable programs created by this environment. - + The library list will be added to command lines through the automatically-generated -$_LIBFLAGS +$_LIBFLAGS construction variable, which is constructed by respectively prepending and appending the values of the -$LIBLINKPREFIX and $LIBLINKSUFFIX +$LIBLINKPREFIX and $LIBLINKSUFFIX construction variables to the beginning and end -of each filename in $LIBS. +of each filename in $LIBS. Any command lines you define that need the LIBS library list should -include $_LIBFLAGS: +include $_LIBFLAGS: - + env = Environment(LINKCOM="my_linker $_LIBDIRFLAGS $_LIBFLAGS -o $TARGET $SOURCE") - + If you add a File object to the -$LIBS +$LIBS list, the name of that file will be added to -$_LIBFLAGS, +$_LIBFLAGS, and thus the link line, as is, without -$LIBLINKPREFIX +$LIBLINKPREFIX or -$LIBLINKSUFFIX. +$LIBLINKSUFFIX. For example: - + env.Append(LIBS=File('/tmp/mylib.so')) - + In all cases, scons will add dependencies from the executable program to all the libraries in this list. @@ -3543,7 +3807,8 @@ all the libraries in this list. LIBSUFFIX - + + The suffix used for (static) library file names. A default value is set for each platform (posix, win32, os2, etc.), @@ -3555,10 +3820,11 @@ to reflect the names of the libraries they create. LIBSUFFIXES - + + A list of all legal suffixes for library file names. When searching for library dependencies, -SCons will look for files with prefixes, in the $LIBPREFIXES list, +SCons will look for files with prefixes, in the $LIBPREFIXES list, the base library name, and these suffixes. @@ -3566,7 +3832,8 @@ and these suffixes. LICENSE - + + The abbreviated name, preferably the SPDX code, of the license under which this project is released (GPL-3.0, LGPL-2.1, BSD-2-Clause etc.). See http://www.opensource.org/licenses/alphabetical @@ -3576,8 +3843,9 @@ for a list of license names and SPDX codes. LINESEPARATOR - -The separator used by the Substfile and Textfile builders. + + +The separator used by the Substfile and Textfile builders. This value is used between sources when constructing the target. It defaults to the current system line separator. @@ -3585,12 +3853,13 @@ It defaults to the current system line separator. LINGUAS_FILE - -The $LINGUAS_FILE defines file(s) containing list of additional linguas -to be processed by POInit, POUpdate or MOFiles -builders. It also affects Translate builder. If the variable contains -a string, it defines name of the list file. The $LINGUAS_FILE may be a -list of file names as well. If $LINGUAS_FILE is set to + + +The $LINGUAS_FILE defines file(s) containing list of additional linguas +to be processed by POInit, POUpdate or MOFiles +builders. It also affects Translate builder. If the variable contains +a string, it defines name of the list file. The $LINGUAS_FILE may be a +list of file names as well. If $LINGUAS_FILE is set to True (or non-zero numeric value), the list will be read from default file named LINGUAS. @@ -3600,50 +3869,54 @@ default file named LINK - + + The linker. LINKCOM - + + The command line used to link object files into an executable. LINKCOMSTR - + + The string displayed when object files are linked into an executable. -If this is not set, then $LINKCOM (the command line) is displayed. +If this is not set, then $LINKCOM (the command line) is displayed. - + env = Environment(LINKCOMSTR = "Linking $TARGET") LINKFLAGS - + + General user options passed to the linker. Note that this variable should not contain -(or similar) options for linking with the libraries listed in $LIBS, +(or similar) options for linking with the libraries listed in $LIBS, nor (or similar) library search path options -that scons generates automatically from $LIBPATH. +that scons generates automatically from $LIBPATH. See -$_LIBFLAGS +$_LIBFLAGS above, for the variable that expands to library-link options, and -$_LIBDIRFLAGS +$_LIBDIRFLAGS above, for the variable that expands to library search path options. @@ -3651,37 +3924,42 @@ for the variable that expands to library search path options. M4 - + + The M4 macro preprocessor. M4COM - + + The command line used to pass files through the M4 macro preprocessor. M4COMSTR - + + The string displayed when a file is passed through the M4 macro preprocessor. -If this is not set, then $M4COM (the command line) is displayed. +If this is not set, then $M4COM (the command line) is displayed. M4FLAGS - + + General options passed to the M4 macro preprocessor. MAKEINDEX - + + The makeindex generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter. @@ -3689,7 +3967,8 @@ LaTeX structured formatter and typesetter. MAKEINDEXCOM - + + The command line used to call the makeindex generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter. @@ -3698,17 +3977,19 @@ typesetter. MAKEINDEXCOMSTR - + + The string displayed when calling the makeindex generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter. -If this is not set, then $MAKEINDEXCOM (the command line) is displayed. +If this is not set, then $MAKEINDEXCOM (the command line) is displayed. MAKEINDEXFLAGS - + + General options passed to the makeindex generator for the TeX formatter and typesetter and the LaTeX structured formatter and typesetter. @@ -3716,7 +3997,8 @@ and typesetter and the LaTeX structured formatter and typesetter. MAXLINELENGTH - + + The maximum number of characters allowed on an external command line. On Win32 systems, link lines longer than this many characters @@ -3726,159 +4008,178 @@ are linked via a temporary file name. MIDL - + + The Microsoft IDL compiler. MIDLCOM - + + The command line used to pass files to the Microsoft IDL compiler. MIDLCOMSTR - + + The string displayed when the Microsoft IDL compiler is called. -If this is not set, then $MIDLCOM (the command line) is displayed. +If this is not set, then $MIDLCOM (the command line) is displayed. MIDLFLAGS - + + General options passed to the Microsoft IDL compiler. MOSUFFIX - + + Suffix used for MO files (default: '.mo'). -See msgfmt tool and MOFiles builder. +See msgfmt tool and MOFiles builder. MSGFMT - + + Absolute path to msgfmt(1) binary, found by Detect(). -See msgfmt tool and MOFiles builder. +See msgfmt tool and MOFiles builder. MSGFMTCOM - + + Complete command line to run msgfmt(1) program. -See msgfmt tool and MOFiles builder. +See msgfmt tool and MOFiles builder. MSGFMTCOMSTR - + + String to display when msgfmt(1) is invoked -(default: '', which means ``print $MSGFMTCOM''). -See msgfmt tool and MOFiles builder. +(default: '', which means ``print $MSGFMTCOM''). +See msgfmt tool and MOFiles builder. MSGFMTFLAGS - + + Additional flags to msgfmt(1). -See msgfmt tool and MOFiles builder. +See msgfmt tool and MOFiles builder. MSGINIT - + + Path to msginit(1) program (found via Detect()). -See msginit tool and POInit builder. +See msginit tool and POInit builder. MSGINITCOM - + + Complete command line to run msginit(1) program. -See msginit tool and POInit builder. +See msginit tool and POInit builder. MSGINITCOMSTR - + + String to display when msginit(1) is invoked -(default: '', which means ``print $MSGINITCOM''). -See msginit tool and POInit builder. +(default: '', which means ``print $MSGINITCOM''). +See msginit tool and POInit builder. MSGINITFLAGS - + + List of additional flags to msginit(1) (default: []). -See msginit tool and POInit builder. +See msginit tool and POInit builder. _MSGINITLOCALE - + + Internal ``macro''. Computes locale (language) name based on target filename (default: '${TARGET.filebase}' ). - -See msginit tool and POInit builder. + +See msginit tool and POInit builder. MSGMERGE - + + Absolute path to msgmerge(1) binary as found by Detect(). -See msgmerge tool and POUpdate builder. +See msgmerge tool and POUpdate builder. MSGMERGECOM - + + Complete command line to run msgmerge(1) command. -See msgmerge tool and POUpdate builder. +See msgmerge tool and POUpdate builder. MSGMERGECOMSTR - + + String to be displayed when msgmerge(1) is invoked -(default: '', which means ``print $MSGMERGECOM''). -See msgmerge tool and POUpdate builder. +(default: '', which means ``print $MSGMERGECOM''). +See msgmerge tool and POUpdate builder. MSGMERGEFLAGS - + + Additional flags to msgmerge(1) command. -See msgmerge tool and POUpdate builder. +See msgmerge tool and POUpdate builder. MSSDK_DIR - + + The directory containing the Microsoft SDK (either Platform SDK or Windows SDK) to be used for compilation. @@ -3887,7 +4188,8 @@ to be used for compilation. MSSDK_VERSION - + + The version string of the Microsoft SDK (either Platform SDK or Windows SDK) to be used for compilation. @@ -3903,7 +4205,8 @@ and MSVC_BATCH - + + When set to any true value, specifies that SCons should batch compilation of object files @@ -3914,7 +4217,7 @@ and were configured in SCons using the same construction environment will be built in a single call to the compiler. Only source files that have changed since their object files were built will be passed to each compiler invocation -(via the $CHANGED_SOURCES construction variable). +(via the $CHANGED_SOURCES construction variable). Any compilations where the object (target) file base name (minus the .obj) does not match the source file base name @@ -3924,12 +4227,13 @@ will be compiled separately. MSVC_USE_SCRIPT - + + Use a batch script to set up Microsoft Visual Studio compiler - -$MSVC_USE_SCRIPT overrides $MSVC_VERSION and $TARGET_ARCH. + +$MSVC_USE_SCRIPT overrides $MSVC_VERSION and $TARGET_ARCH. If set to the name of a Visual Studio .bat file (e.g. vcvars.bat), SCons will run that bat file and extract the relevant variables from the result (typically %INCLUDE%, %LIB%, and %PATH%). Setting @@ -3941,12 +4245,13 @@ window and importing the shell's environment variables. MSVC_UWP_APP - + + Build libraries for a Universal Windows Platform (UWP) Application. - -If $MSVC_UWP_APP is set, the Visual Studio environment will be set up to point + +If $MSVC_UWP_APP is set, the Visual Studio environment will be set up to point to the Windows Store compatible libraries and Visual Studio runtimes. In doing so, any libraries that are built will be able to be used in a UWP App and published to the Windows Store. @@ -3955,7 +4260,7 @@ This variable must be passed as an argument to the Environment() constructor; setting it later has no effect. - + Valid values are '1' or '0' @@ -3963,19 +4268,20 @@ Valid values are '1' or '0' MSVC_VERSION - + + Sets the preferred version of Microsoft Visual C/C++ to use. - -If $MSVC_VERSION is not set, SCons will (by default) select the + +If $MSVC_VERSION is not set, SCons will (by default) select the latest version of Visual C/C++ installed on your system. If the specified version isn't installed, tool initialization will fail. This variable must be passed as an argument to the Environment() constructor; setting it later has no effect. - + Valid values for Windows are 14.2, 14.1, @@ -4002,15 +4308,16 @@ Versions ending in Exp refer to "Express" or MSVS - + + When the Microsoft Visual Studio tools are initialized, they set up this dictionary with the following keys: - + VERSION the version of MSVS being used (can be set via - $MSVS_VERSION) + $MSVS_VERSION) VERSIONS @@ -4066,19 +4373,20 @@ Versions ending in Exp refer to "Express" or - If a value is not set, it was not available in the registry. + If a value is not set, it was not available in the registry. MSVS_ARCH - Sets the architecture for which the generated project(s) should build. - + + Sets the architecture for which the generated project(s) should build. + The default value is x86. - amd64 is also supported by SCons for + amd64 is also supported by SCons for most Visual Studio versions. Since Visual Studio 2015 arm is supported, and since Visual Studio 2017 arm64 is supported. - Trying to set $MSVS_ARCH + Trying to set $MSVS_ARCH to an architecture that's not supported for a given Visual Studio version will generate an error. @@ -4086,7 +4394,8 @@ Versions ending in Exp refer to "Express" or MSVS_PROJECT_GUID - + + The string placed in a generated Microsoft Visual Studio project file as the value of the ProjectGUID attribute. There is no default @@ -4098,7 +4407,8 @@ defined, a new GUID is generated. MSVS_SCC_AUX_PATH - + + The path name placed in a generated Microsoft Visual Studio project file as the value of the SccAuxPath attribute if the @@ -4111,7 +4421,8 @@ no default value. MSVS_SCC_CONNECTION_ROOT - + + The root path of projects in your SCC workspace, i.e the path under which all project and solution files will be generated. It is used as a reference path from which the @@ -4135,7 +4446,8 @@ no default value. MSVS_SCC_PROJECT_NAME - + + The project name placed in a generated Microsoft Visual Studio project file as the value of the SccProjectName attribute if the @@ -4150,7 +4462,8 @@ no default value. MSVS_SCC_PROVIDER - + + The string placed in a generated Microsoft Visual Studio project file as the value of the SccProvider attribute. The string is @@ -4163,9 +4476,10 @@ no default value. MSVS_VERSION - Sets the preferred version of Microsoft Visual Studio to use. - - If $MSVS_VERSION is not set, SCons will (by default) + + Sets the preferred version of Microsoft Visual Studio to use. + + If $MSVS_VERSION is not set, SCons will (by default) select the latest version of Visual Studio installed on your system. So, if you have version 6 and version 7 (MSVS .NET) installed, it will prefer version 7. You can override this by @@ -4174,18 +4488,19 @@ no default value. version ('6.0' or '7.0', for example). If the specified version isn't installed, tool initialization will fail. - - This is obsolete: use $MSVC_VERSION instead. If - $MSVS_VERSION is set and $MSVC_VERSION is - not, $MSVC_VERSION will be set automatically to - $MSVS_VERSION. If both are set to different values, + + This is obsolete: use $MSVC_VERSION instead. If + $MSVS_VERSION is set and $MSVC_VERSION is + not, $MSVC_VERSION will be set automatically to + $MSVS_VERSION. If both are set to different values, scons will raise an error. MSVSBUILDCOM - + + The build command line placed in a generated Microsoft Visual Studio project file. The default is to have Visual Studio invoke SCons with any specified build targets. @@ -4194,7 +4509,8 @@ no default value. MSVSCLEANCOM - + + The clean command line placed in a generated Microsoft Visual Studio project file. The default is to have Visual Studio invoke SCons with the -c option to remove any specified @@ -4204,7 +4520,8 @@ no default value. MSVSENCODING - + + The encoding string placed in a generated Microsoft Visual Studio project file. The default is encoding Windows-1252. @@ -4213,12 +4530,14 @@ no default value. MSVSPROJECTCOM - The action used to generate Microsoft Visual Studio project files. + + The action used to generate Microsoft Visual Studio project files. MSVSPROJECTSUFFIX - + + The suffix used for Microsoft Visual Studio project (DSP) files. The default value is .vcproj when using Visual Studio version 7.x (.NET) or later version, @@ -4229,7 +4548,8 @@ no default value. MSVSREBUILDCOM - + + The rebuild command line placed in a generated Microsoft Visual Studio project file. The default is to have Visual Studio invoke SCons with any specified rebuild targets. @@ -4239,7 +4559,8 @@ no default value. MSVSSCONS - + + The SCons used in generated Microsoft Visual Studio project files. The default is the version of SCons being used to generate the project file. @@ -4248,7 +4569,8 @@ no default value. MSVSSCONSCOM - + + The default SCons command used in generated Microsoft Visual Studio project files. @@ -4256,30 +4578,34 @@ no default value. MSVSSCONSCRIPT - - The sconscript file (that is, SConstruct or SConscript + + + The sconscript file (that is, SConstruct or SConscript file) that will be invoked by Visual Studio project files - (through the $MSVSSCONSCOM variable). The default + (through the $MSVSSCONSCOM variable). The default is the same sconscript file that contains the call to - MSVSProject to build the project file. + MSVSProject to build the project file. MSVSSCONSFLAGS - + + The SCons flags used in generated Microsoft Visual Studio project files. MSVSSOLUTIONCOM - The action used to generate Microsoft Visual Studio solution files. + + The action used to generate Microsoft Visual Studio solution files. MSVSSOLUTIONSUFFIX - + + The suffix used for Microsoft Visual Studio solution (DSW) files. The default value is .sln when using Visual Studio version 7.x (.NET), and @@ -4290,38 +4616,43 @@ no default value. MT - + + The program used on Windows systems to embed manifests into DLLs and EXEs. -See also $WINDOWS_EMBED_MANIFEST. +See also $WINDOWS_EMBED_MANIFEST. MTEXECOM - + + The Windows command line used to embed manifests into executables. -See also $MTSHLIBCOM. +See also $MTSHLIBCOM. MTFLAGS - -Flags passed to the $MT manifest embedding program (Windows only). + + +Flags passed to the $MT manifest embedding program (Windows only). MTSHLIBCOM - + + The Windows command line used to embed manifests into shared libraries (DLLs). -See also $MTEXECOM. +See also $MTEXECOM. MWCW_VERSION - + + The version number of the MetroWerks CodeWarrior C compiler to be used. @@ -4329,7 +4660,8 @@ to be used. MWCW_VERSIONS - + + A list of installed versions of the MetroWerks CodeWarrior C compiler on this system. @@ -4337,14 +4669,16 @@ on this system. NAME - + + Specfies the name of the project to package. no_import_lib - + + When set to non-zero, suppresses creation of a corresponding Windows static import lib by the SharedLibrary @@ -4358,21 +4692,24 @@ when using Microsoft Visual Studio. OBJPREFIX - + + The prefix used for (static) object file names. OBJSUFFIX - + + The suffix used for (static) object file names. PACKAGEROOT - + + Specifies the directory where all files in resulting archive will be placed if applicable. The default value is "$NAME-$VERSION". @@ -4380,11 +4717,12 @@ placed if applicable. The default value is "$NAME-$VERSION". PACKAGETYPE - + + Selects the package type to build. Currently these are available: - + * msi - Microsoft Installer * rpm - Redhat Package Manger * ipkg - Itsy Package Management System @@ -4396,14 +4734,15 @@ Selects the package type to build. Currently these are available: * src_zip - zip file source - + This may be overridden with the "package_type" command line option. PACKAGEVERSION - + + The version of the package (not the underlying project). This is currently only used by the rpm packager and should reflect changes in the packaging, @@ -4413,7 +4752,8 @@ not the underlying project code itself. PCH - + + The Microsoft Visual C++ precompiled header that will be used when compiling object files. This variable is ignored by tools other than Microsoft Visual C++. When this variable is @@ -4423,40 +4763,44 @@ dependencies for the PCH file. Example: - + env['PCH'] = 'StdAfx.pch' PCHCOM - + + The command line used by the -PCH +PCH builder to generated a precompiled header. PCHCOMSTR - + + The string displayed when generating a precompiled header. -If this is not set, then $PCHCOM (the command line) is displayed. +If this is not set, then $PCHCOM (the command line) is displayed. PCHPDBFLAGS - + + A construction variable that, when expanded, adds the /yD flag to the command line -only if the $PDB construction variable is set. +only if the $PDB construction variable is set. PCHSTOP - + + This variable specifies how much of a source file is precompiled. This variable is ignored by tools other than Microsoft Visual C++, or when the PCH variable is not being used. When this variable is define it @@ -4465,14 +4809,15 @@ is included at the end of the precompiled portion of the source files, or the empty string if the "#pragma hrdstop" construct is being used: - + env['PCHSTOP'] = 'StdAfx.h' PDB - + + The Microsoft Visual C++ PDB file that will store debugging information for object files, shared libraries, and programs. This variable is ignored by tools other than Microsoft Visual C++. @@ -4483,11 +4828,11 @@ dependencies for the PDB file. Example: - + env['PDB'] = 'hello.pdb' - + The Visual C++ compiler switch that SCons uses by default to generate PDB information is . This works correctly with parallel () builds @@ -4499,104 +4844,116 @@ Using the instead may yield improved link-time performance, although parallel builds will no longer work. You can generate PDB files with the -switch by overriding the default $CCPDBFLAGS variable; +switch by overriding the default $CCPDBFLAGS variable; see the entry for that variable for specific examples. PDFCOM - -A deprecated synonym for $DVIPDFCOM. + + +A deprecated synonym for $DVIPDFCOM. PDFLATEX - -The pdflatex utility. + + +The pdflatex utility. PDFLATEXCOM - -The command line used to call the pdflatex utility. + + +The command line used to call the pdflatex utility. PDFLATEXCOMSTR - -The string displayed when calling the pdflatex utility. -If this is not set, then $PDFLATEXCOM (the command line) is displayed. + + +The string displayed when calling the pdflatex utility. +If this is not set, then $PDFLATEXCOM (the command line) is displayed. - + env = Environment(PDFLATEX;COMSTR = "Building $TARGET from LaTeX input $SOURCES") PDFLATEXFLAGS - -General options passed to the pdflatex utility. + + +General options passed to the pdflatex utility. PDFPREFIX - + + The prefix used for PDF file names. PDFSUFFIX - + + The suffix used for PDF file names. PDFTEX - -The pdftex utility. + + +The pdftex utility. PDFTEXCOM - -The command line used to call the pdftex utility. + + +The command line used to call the pdftex utility. PDFTEXCOMSTR - -The string displayed when calling the pdftex utility. -If this is not set, then $PDFTEXCOM (the command line) is displayed. + + +The string displayed when calling the pdftex utility. +If this is not set, then $PDFTEXCOM (the command line) is displayed. - + env = Environment(PDFTEXCOMSTR = "Building $TARGET from TeX input $SOURCES") PDFTEXFLAGS - -General options passed to the pdftex utility. + + +General options passed to the pdftex utility. PKGCHK - + + On Solaris systems, the package-checking program that will -be used (along with $PKGINFO) +be used (along with $PKGINFO) to look for installed versions of the Sun PRO C++ compiler. The default is @@ -4606,10 +4963,11 @@ The default is PKGINFO - + + On Solaris systems, the package information program that will -be used (along with $PKGCHK) +be used (along with $PKGCHK) to look for installed versions of the Sun PRO C++ compiler. The default is @@ -4619,14 +4977,15 @@ The default is PLATFORM - + + The name of the platform used to create the Environment. If no platform is specified when the Environment is created, -scons +scons autodetects the platform. - + env = Environment(tools = []) if env['PLATFORM'] == 'cygwin': Tool('mingw')(env) @@ -4637,41 +4996,45 @@ else: POAUTOINIT - -The $POAUTOINIT variable, if set to True (on non-zero -numeric value), let the msginit tool to automatically initialize + + +The $POAUTOINIT variable, if set to True (on non-zero +numeric value), let the msginit tool to automatically initialize missing PO files with msginit(1). This applies to both, -POInit and POUpdate builders (and others that use any of +POInit and POUpdate builders (and others that use any of them). POCREATE_ALIAS - -Common alias for all PO files created with POInit + + +Common alias for all PO files created with POInit builder (default: 'po-create'). -See msginit tool and POInit builder. +See msginit tool and POInit builder. POSUFFIX - + + Suffix used for PO files (default: '.po') -See msginit tool and POInit builder. +See msginit tool and POInit builder. POTDOMAIN - -The $POTDOMAIN defines default domain, used to generate -POT filename as $POTDOMAIN.pot when + + +The $POTDOMAIN defines default domain, used to generate +POT filename as $POTDOMAIN.pot when no POT file name is provided by the user. This applies to -POTUpdate, POInit and POUpdate builders (and -builders, that use them, e.g. Translate). Normally (if $POTDOMAIN is +POTUpdate, POInit and POUpdate builders (and +builders, that use them, e.g. Translate). Normally (if $POTDOMAIN is not defined), the builders use messages.pot as default POT file name. @@ -4679,33 +5042,37 @@ not defined), the builders use messages.pot as default POTSUFFIX - + + Suffix used for PO Template files (default: '.pot'). -See xgettext tool and POTUpdate builder. +See xgettext tool and POTUpdate builder. POTUPDATE_ALIAS - + + Name of the common phony target for all PO Templates created with -POUpdate (default: 'pot-update'). -See xgettext tool and POTUpdate builder. +POUpdate (default: 'pot-update'). +See xgettext tool and POTUpdate builder. POUPDATE_ALIAS - + + Common alias for all PO files being defined with -POUpdate builder (default: 'po-update'). -See msgmerge tool and POUpdate builder. +POUpdate builder (default: 'po-update'). +See msgmerge tool and POUpdate builder. PRINT_CMD_LINE_FUNC - + + A Python function used to print the command lines as they are executed (assuming command printing is not disabled by the @@ -4723,20 +5090,20 @@ the source(s) used (file node, list, or string name(s)), and the environment being used. - + The function must do the printing itself. The default implementation, used if this variable is not set or is None, is: - + def print_cmd_line(s, target, source, env): sys.stdout.write(s + "\n") - + Here's an example of a more interesting function: - + def print_cmd_line(s, target, source, env): sys.stdout.write("Building %s -> %s...\n" % (' and '.join([str(x) for x in source]), @@ -4745,7 +5112,7 @@ env=Environment(PRINT_CMD_LINE_FUNC=print_cmd_line) env.Program('foo', 'foo.c') - + This just prints "Building targetname from sourcename..." instead of the actual commands. Such a function could also log the actual commands to a log file, @@ -4766,51 +5133,58 @@ general information on specifying emitters. PROGPREFIX - + + The prefix used for executable file names. PROGSUFFIX - + + The suffix used for executable file names. PSCOM - + + The command line used to convert TeX DVI files into a PostScript file. PSCOMSTR - + + The string displayed when a TeX DVI file is converted into a PostScript file. -If this is not set, then $PSCOM (the command line) is displayed. +If this is not set, then $PSCOM (the command line) is displayed. PSPREFIX - + + The prefix used for PostScript file names. PSSUFFIX - + + The prefix used for PostScript file names. QT_AUTOSCAN - + + Turn off scanning for mocable files. Use the Moc Builder to explicitly specify files to run moc on. @@ -4818,66 +5192,74 @@ specify files to run moc on. QT_BINPATH - + + The path where the qt binaries are installed. -The default value is '$QTDIR/bin'. +The default value is '$QTDIR/bin'. QT_CPPPATH - + + The path where the qt header files are installed. -The default value is '$QTDIR/include'. +The default value is '$QTDIR/include'. Note: If you set this variable to None, -the tool won't change the $CPPPATH +the tool won't change the $CPPPATH construction variable. QT_DEBUG - + + Prints lots of debugging information while scanning for moc files. QT_LIB - + + Default value is 'qt'. You may want to set this to 'qt-mt'. Note: If you set -this variable to None, the tool won't change the $LIBS variable. +this variable to None, the tool won't change the $LIBS variable. QT_LIBPATH - + + The path where the qt libraries are installed. -The default value is '$QTDIR/lib'. +The default value is '$QTDIR/lib'. Note: If you set this variable to None, -the tool won't change the $LIBPATH +the tool won't change the $LIBPATH construction variable. QT_MOC - -Default value is '$QT_BINPATH/moc'. + + +Default value is '$QT_BINPATH/moc'. QT_MOCCXXPREFIX - + + Default value is ''. Prefix for moc output files, when source is a cxx file. QT_MOCCXXSUFFIX - + + Default value is '.moc'. Suffix for moc output files, when source is a cxx file. @@ -4885,22 +5267,25 @@ file. QT_MOCFROMCXXCOM - + + Command to generate a moc file from a cpp file. QT_MOCFROMCXXCOMSTR - + + The string displayed when generating a moc file from a cpp file. -If this is not set, then $QT_MOCFROMCXXCOM (the command line) is displayed. +If this is not set, then $QT_MOCFROMCXXCOM (the command line) is displayed. QT_MOCFROMCXXFLAGS - + + Default value is '-i'. These flags are passed to moc, when moccing a C++ file. @@ -4908,22 +5293,25 @@ C++ file. QT_MOCFROMHCOM - + + Command to generate a moc file from a header. QT_MOCFROMHCOMSTR - + + The string displayed when generating a moc file from a cpp file. -If this is not set, then $QT_MOCFROMHCOM (the command line) is displayed. +If this is not set, then $QT_MOCFROMHCOM (the command line) is displayed. QT_MOCFROMHFLAGS - + + Default value is ''. These flags are passed to moc, when moccing a header file. @@ -4931,44 +5319,50 @@ file. QT_MOCHPREFIX - + + Default value is 'moc_'. Prefix for moc output files, when source is a header. QT_MOCHSUFFIX - -Default value is '$CXXFILESUFFIX'. Suffix for moc output files, when source is + + +Default value is '$CXXFILESUFFIX'. Suffix for moc output files, when source is a header. QT_UIC - -Default value is '$QT_BINPATH/uic'. + + +Default value is '$QT_BINPATH/uic'. QT_UICCOM - + + Command to generate header files from .ui files. QT_UICCOMSTR - + + The string displayed when generating header files from .ui files. -If this is not set, then $QT_UICCOM (the command line) is displayed. +If this is not set, then $QT_UICCOM (the command line) is displayed. QT_UICDECLFLAGS - + + Default value is ''. These flags are passed to uic, when creating a a h file from a .ui file. @@ -4976,21 +5370,24 @@ file from a .ui file. QT_UICDECLPREFIX - + + Default value is ''. Prefix for uic generated header files. QT_UICDECLSUFFIX - + + Default value is '.h'. Suffix for uic generated header files. QT_UICIMPLFLAGS - + + Default value is ''. These flags are passed to uic, when creating a cxx file from a .ui file. @@ -4998,29 +5395,33 @@ file from a .ui file. QT_UICIMPLPREFIX - + + Default value is 'uic_'. Prefix for uic generated implementation files. QT_UICIMPLSUFFIX - -Default value is '$CXXFILESUFFIX'. Suffix for uic generated implementation + + +Default value is '$CXXFILESUFFIX'. Suffix for uic generated implementation files. QT_UISUFFIX - + + Default value is '.ui'. Suffix of designer input files. QTDIR - + + The qt tool tries to take this from os.environ. It also initializes all QT_* construction variables listed below. @@ -5029,24 +5430,24 @@ with python's os.path.join() method, but are listed here with the '/' separator for easier reading.) In addition, the construction environment -variables $CPPPATH, -$LIBPATH and -$LIBS may be modified +variables $CPPPATH, +$LIBPATH and +$LIBS may be modified and the variables -$PROGEMITTER, $SHLIBEMITTER and $LIBEMITTER +$PROGEMITTER, $SHLIBEMITTER and $LIBEMITTER are modified. Because the build-performance is affected when using this tool, you have to explicitly specify it at Environment creation: - + Environment(tools=['default','qt']) - + The qt tool supports the following operations: - + Automatic moc file generation from header files. You do not have to specify moc files explicitly, the tool does it for you. However, there are a few preconditions to do so: Your header file must have @@ -5054,11 +5455,11 @@ 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 -Moc() +Moc() builder method. - + Automatic moc file generation from cxx files. As stated in the qt documentation, include the moc file at the end of the cxx file. Note that you have to include the file, which is generated @@ -5067,11 +5468,11 @@ by the transformation ${QT_MOCCXXPREFIX}<basename>${QT_MOCCXXSUFFIX}, by d do not include the correct file. If you are using VariantDir, you may need to specify duplicate=1. You can turn off automatic moc file generation by setting QT_AUTOSCAN to 0. See also the corresponding -Moc +Moc builder method. - + Automatic handling of .ui files. The implementation files generated from .ui files are handled much the same as yacc or lex files. Each .ui file given as a source of Program, Library or @@ -5079,47 +5480,52 @@ SharedLibrary will generate three files, the declaration file, the implementation file and a moc file. Because there are also generated headers, you may need to specify duplicate=1 in calls to VariantDir. See also the corresponding -Uic +Uic builder method. RANLIB - + + The archive indexer. RANLIBCOM - + + The command line used to index a static library archive. RANLIBCOMSTR - + + The string displayed when a static library archive is indexed. -If this is not set, then $RANLIBCOM (the command line) is displayed. +If this is not set, then $RANLIBCOM (the command line) is displayed. - + env = Environment(RANLIBCOMSTR = "Indexing $TARGET") RANLIBFLAGS - + + General options passed to the archive indexer. RC - + + The resource compiler used to build a Microsoft Visual C++ resource file. @@ -5127,7 +5533,8 @@ a Microsoft Visual C++ resource file. RCCOM - + + The command line used to build a Microsoft Visual C++ resource file. @@ -5135,60 +5542,66 @@ a Microsoft Visual C++ resource file. RCCOMSTR - + + The string displayed when invoking the resource compiler to build a Microsoft Visual C++ resource file. -If this is not set, then $RCCOM (the command line) is displayed. +If this is not set, then $RCCOM (the command line) is displayed. RCFLAGS - + + The flags passed to the resource compiler by the RES builder. RCINCFLAGS - + + An automatically-generated construction variable containing the command-line options for specifying directories to be searched by the resource compiler. -The value of $RCINCFLAGS is created +The value of $RCINCFLAGS is created by respectively prepending and appending -$RCINCPREFIX and $RCINCSUFFIX +$RCINCPREFIX and $RCINCSUFFIX to the beginning and end -of each directory in $CPPPATH. +of each directory in $CPPPATH. RCINCPREFIX - + + The prefix (flag) used to specify an include directory on the resource compiler command line. This will be prepended to the beginning of each directory -in the $CPPPATH construction variable -when the $RCINCFLAGS variable is expanded. +in the $CPPPATH construction variable +when the $RCINCFLAGS variable is expanded. RCINCSUFFIX - + + The suffix used to specify an include directory on the resource compiler command line. This will be appended to the end of each directory -in the $CPPPATH construction variable -when the $RCINCFLAGS variable is expanded. +in the $CPPPATH construction variable +when the $RCINCFLAGS variable is expanded. RDirs - + + A function that converts a string into a list of Dir instances by searching the repositories. @@ -5196,35 +5609,39 @@ searching the repositories. REGSVR - + + The program used on Windows systems to register a newly-built DLL library -whenever the SharedLibrary builder +whenever the SharedLibrary builder is passed a keyword argument of register=1. REGSVRCOM - + + The command line used on Windows systems to register a newly-built DLL library -whenever the SharedLibrary builder +whenever the SharedLibrary builder is passed a keyword argument of register=1. REGSVRCOMSTR - + + The string displayed when registering a newly-built DLL file. -If this is not set, then $REGSVRCOM (the command line) is displayed. +If this is not set, then $REGSVRCOM (the command line) is displayed. REGSVRFLAGS - + + Flags passed to the DLL registration program on Windows systems when a newly-built DLL library is registered. By default, @@ -5236,154 +5653,169 @@ and requiring user attention. RMIC - + + The Java RMI stub compiler. RMICCOM - + + The command line used to compile stub and skeleton class files from Java classes that contain RMI implementations. -Any options specified in the $RMICFLAGS construction variable +Any options specified in the $RMICFLAGS construction variable are included on this command line. RMICCOMSTR - + + The string displayed when compiling stub and skeleton class files from Java classes that contain RMI implementations. -If this is not set, then $RMICCOM (the command line) is displayed. +If this is not set, then $RMICCOM (the command line) is displayed. - + env = Environment(RMICCOMSTR = "Generating stub/skeleton class files $TARGETS from $SOURCES") RMICFLAGS - + + General options passed to the Java RMI stub compiler. + + _RPATH + + +An automatically-generated construction variable +containing the rpath flags to be used when linking +a program with shared libraries. +The value of $_RPATH is created +by respectively prepending $RPATHPREFIX and appending $RPATHSUFFIX +to the beginning and end +of each directory in $RPATH. + + + RPATH - + + A list of paths to search for shared libraries when running programs. Currently only used in the GNU (gnulink), IRIX (sgilink) and Sun (sunlink) linkers. Ignored on platforms and toolchains that don't support it. Note that the paths added to RPATH are not transformed by -scons +scons in any way: if you want an absolute path, you must make it absolute yourself. - - _RPATH - -An automatically-generated construction variable -containing the rpath flags to be used when linking -a program with shared libraries. -The value of $_RPATH is created -by respectively prepending $RPATHPREFIX and appending $RPATHSUFFIX -to the beginning and end -of each directory in $RPATH. - - - RPATHPREFIX - + + The prefix used to specify a directory to be searched for shared libraries when running programs. This will be prepended to the beginning of each directory -in the $RPATH construction variable -when the $_RPATH variable is automatically generated. +in the $RPATH construction variable +when the $_RPATH variable is automatically generated. RPATHSUFFIX - + + The suffix used to specify a directory to be searched for shared libraries when running programs. This will be appended to the end of each directory -in the $RPATH construction variable -when the $_RPATH variable is automatically generated. +in the $RPATH construction variable +when the $_RPATH variable is automatically generated. RPCGEN - + + The RPC protocol compiler. RPCGENCLIENTFLAGS - + + Options passed to the RPC protocol compiler when generating client side stubs. These are in addition to any flags specified in the -$RPCGENFLAGS +$RPCGENFLAGS construction variable. RPCGENFLAGS - + + General options passed to the RPC protocol compiler. RPCGENHEADERFLAGS - + + Options passed to the RPC protocol compiler when generating a header file. These are in addition to any flags specified in the -$RPCGENFLAGS +$RPCGENFLAGS construction variable. RPCGENSERVICEFLAGS - + + Options passed to the RPC protocol compiler when generating server side stubs. These are in addition to any flags specified in the -$RPCGENFLAGS +$RPCGENFLAGS construction variable. RPCGENXDRFLAGS - + + Options passed to the RPC protocol compiler when generating XDR routines. These are in addition to any flags specified in the -$RPCGENFLAGS +$RPCGENFLAGS construction variable. SCANNERS - + + A list of the available implicit dependency scanners. New file scanners may be added by appending to this list, @@ -5398,50 +5830,55 @@ for more information. SCONS_HOME - + + The (optional) path to the SCons library directory, initialized from the external environment. If set, this is used to construct a shorter and more efficient search path in - the $MSVSSCONS command line executed from Microsoft + the $MSVSSCONS command line executed from Microsoft Visual Studio project files. SHCC - + + The C compiler used for generating shared-library objects. SHCCCOM - + + The command line used to compile a C source file to a shared-library object file. -Any options specified in the $SHCFLAGS, -$SHCCFLAGS and -$CPPFLAGS construction variables +Any options specified in the $SHCFLAGS, +$SHCCFLAGS and +$CPPFLAGS construction variables are included on this command line. SHCCCOMSTR - + + The string displayed when a C source file is compiled to a shared object file. -If this is not set, then $SHCCCOM (the command line) is displayed. +If this is not set, then $SHCCCOM (the command line) is displayed. - + env = Environment(SHCCCOMSTR = "Compiling shared object $TARGET") SHCCFLAGS - + + Options that are passed to the C and C++ compilers to generate shared-library objects. @@ -5449,7 +5886,8 @@ to generate shared-library objects. SHCFLAGS - + + Options that are passed to the C compiler (only; not C++) to generate shared-library objects. @@ -5457,38 +5895,42 @@ to generate shared-library objects. SHCXX - + + The C++ compiler used for generating shared-library objects. SHCXXCOM - + + The command line used to compile a C++ source file to a shared-library object file. -Any options specified in the $SHCXXFLAGS and -$CPPFLAGS construction variables +Any options specified in the $SHCXXFLAGS and +$CPPFLAGS construction variables are included on this command line. SHCXXCOMSTR - + + The string displayed when a C++ source file is compiled to a shared object file. -If this is not set, then $SHCXXCOM (the command line) is displayed. +If this is not set, then $SHCXXCOM (the command line) is displayed. - + env = Environment(SHCXXCOMSTR = "Compiling shared object $TARGET") SHCXXFLAGS - + + Options that are passed to the C++ compiler to generate shared-library objects. @@ -5496,7 +5938,8 @@ to generate shared-library objects. SHDC - + + The name of the compiler to use when compiling D source destined to be in a shared objects. @@ -5504,28 +5947,32 @@ destined to be in a shared objects. SHDCOM - + + The command line to use when compiling code to be part of shared objects. SHDLIBVERSION - + + SHDLIBVERSION. SHDLIBVERSIONFLAGS - + + SHDLIBVERSIONFLAGS. SHDLINK - + + The linker to use when creating shared objects for code bases include D sources. @@ -5533,50 +5980,55 @@ include D sources. SHDLINKCOM - + + The command line to use when generating shared objects. SHDLINKFLAGS - + + The list of flags to use when generating a shared object. SHELL - + + A string naming the shell program that will be passed to the -$SPAWN +$SPAWN function. See the -$SPAWN +$SPAWN construction variable for more information. SHF03 - + + The Fortran 03 compiler used for generating shared-library objects. -You should normally set the $SHFORTRAN variable, +You should normally set the $SHFORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $SHF03 if you need to use a specific compiler +You only need to set $SHF03 if you need to use a specific compiler or compiler version for Fortran 03 files. SHF03COM - + + The command line used to compile a Fortran 03 source file to a shared-library object file. -You only need to set $SHF03COM if you need to use a specific +You only need to set $SHF03COM if you need to use a specific command line for Fortran 03 files. -You should normally set the $SHFORTRANCOM variable, +You should normally set the $SHFORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -5584,22 +6036,24 @@ for all Fortran versions. SHF03COMSTR - + + The string displayed when a Fortran 03 source file is compiled to a shared-library object file. -If this is not set, then $SHF03COM or $SHFORTRANCOM +If this is not set, then $SHF03COM or $SHFORTRANCOM (the command line) is displayed. SHF03FLAGS - + + Options that are passed to the Fortran 03 compiler to generated shared-library objects. -You only need to set $SHF03FLAGS if you need to define specific +You only need to set $SHF03FLAGS if you need to define specific user options for Fortran 03 files. -You should normally set the $SHFORTRANFLAGS variable, +You should normally set the $SHFORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -5608,15 +6062,16 @@ for all Fortran versions. SHF03PPCOM - + + 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 $SHF03FLAGS and $CPPFLAGS construction variables +Any options specified in the $SHF03FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $SHF03PPCOM if you need to use a specific +You only need to set $SHF03PPCOM if you need to use a specific C-preprocessor command line for Fortran 03 files. -You should normally set the $SHFORTRANPPCOM variable, +You should normally set the $SHFORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -5624,35 +6079,38 @@ for all Fortran versions. SHF03PPCOMSTR - + + 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 $SHF03PPCOM or $SHFORTRANPPCOM +If this is not set, then $SHF03PPCOM or $SHFORTRANPPCOM (the command line) is displayed. SHF08 - + + The Fortran 08 compiler used for generating shared-library objects. -You should normally set the $SHFORTRAN variable, +You should normally set the $SHFORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $SHF08 if you need to use a specific compiler +You only need to set $SHF08 if you need to use a specific compiler or compiler version for Fortran 08 files. SHF08COM - + + The command line used to compile a Fortran 08 source file to a shared-library object file. -You only need to set $SHF08COM if you need to use a specific +You only need to set $SHF08COM if you need to use a specific command line for Fortran 08 files. -You should normally set the $SHFORTRANCOM variable, +You should normally set the $SHFORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -5660,22 +6118,24 @@ for all Fortran versions. SHF08COMSTR - + + The string displayed when a Fortran 08 source file is compiled to a shared-library object file. -If this is not set, then $SHF08COM or $SHFORTRANCOM +If this is not set, then $SHF08COM or $SHFORTRANCOM (the command line) is displayed. SHF08FLAGS - + + Options that are passed to the Fortran 08 compiler to generated shared-library objects. -You only need to set $SHF08FLAGS if you need to define specific +You only need to set $SHF08FLAGS if you need to define specific user options for Fortran 08 files. -You should normally set the $SHFORTRANFLAGS variable, +You should normally set the $SHFORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -5684,15 +6144,16 @@ for all Fortran versions. SHF08PPCOM - + + The command line used to compile a Fortran 08 source file to a shared-library object file after first running the file through the C preprocessor. -Any options specified in the $SHF08FLAGS and $CPPFLAGS construction variables +Any options specified in the $SHF08FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $SHF08PPCOM if you need to use a specific +You only need to set $SHF08PPCOM if you need to use a specific C-preprocessor command line for Fortran 08 files. -You should normally set the $SHFORTRANPPCOM variable, +You should normally set the $SHFORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -5700,35 +6161,38 @@ for all Fortran versions. SHF08PPCOMSTR - + + The string displayed when a Fortran 08 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 $SHF08PPCOM or $SHFORTRANPPCOM +If this is not set, then $SHF08PPCOM or $SHFORTRANPPCOM (the command line) is displayed. SHF77 - + + The Fortran 77 compiler used for generating shared-library objects. -You should normally set the $SHFORTRAN variable, +You should normally set the $SHFORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $SHF77 if you need to use a specific compiler +You only need to set $SHF77 if you need to use a specific compiler or compiler version for Fortran 77 files. SHF77COM - + + The command line used to compile a Fortran 77 source file to a shared-library object file. -You only need to set $SHF77COM if you need to use a specific +You only need to set $SHF77COM if you need to use a specific command line for Fortran 77 files. -You should normally set the $SHFORTRANCOM variable, +You should normally set the $SHFORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -5736,22 +6200,24 @@ for all Fortran versions. SHF77COMSTR - + + The string displayed when a Fortran 77 source file is compiled to a shared-library object file. -If this is not set, then $SHF77COM or $SHFORTRANCOM +If this is not set, then $SHF77COM or $SHFORTRANCOM (the command line) is displayed. SHF77FLAGS - + + Options that are passed to the Fortran 77 compiler to generated shared-library objects. -You only need to set $SHF77FLAGS if you need to define specific +You only need to set $SHF77FLAGS if you need to define specific user options for Fortran 77 files. -You should normally set the $SHFORTRANFLAGS variable, +You should normally set the $SHFORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -5760,15 +6226,16 @@ for all Fortran versions. SHF77PPCOM - + + The command line used to compile a Fortran 77 source file to a shared-library object file after first running the file through the C preprocessor. -Any options specified in the $SHF77FLAGS and $CPPFLAGS construction variables +Any options specified in the $SHF77FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $SHF77PPCOM if you need to use a specific +You only need to set $SHF77PPCOM if you need to use a specific C-preprocessor command line for Fortran 77 files. -You should normally set the $SHFORTRANPPCOM variable, +You should normally set the $SHFORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -5776,35 +6243,38 @@ for all Fortran versions. SHF77PPCOMSTR - + + The string displayed when a Fortran 77 source file is compiled to a shared-library object file after first running the file through the C preprocessor. -If this is not set, then $SHF77PPCOM or $SHFORTRANPPCOM +If this is not set, then $SHF77PPCOM or $SHFORTRANPPCOM (the command line) is displayed. SHF90 - + + The Fortran 90 compiler used for generating shared-library objects. -You should normally set the $SHFORTRAN variable, +You should normally set the $SHFORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $SHF90 if you need to use a specific compiler +You only need to set $SHF90 if you need to use a specific compiler or compiler version for Fortran 90 files. SHF90COM - + + The command line used to compile a Fortran 90 source file to a shared-library object file. -You only need to set $SHF90COM if you need to use a specific +You only need to set $SHF90COM if you need to use a specific command line for Fortran 90 files. -You should normally set the $SHFORTRANCOM variable, +You should normally set the $SHFORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -5812,22 +6282,24 @@ for all Fortran versions. SHF90COMSTR - + + The string displayed when a Fortran 90 source file is compiled to a shared-library object file. -If this is not set, then $SHF90COM or $SHFORTRANCOM +If this is not set, then $SHF90COM or $SHFORTRANCOM (the command line) is displayed. SHF90FLAGS - + + Options that are passed to the Fortran 90 compiler to generated shared-library objects. -You only need to set $SHF90FLAGS if you need to define specific +You only need to set $SHF90FLAGS if you need to define specific user options for Fortran 90 files. -You should normally set the $SHFORTRANFLAGS variable, +You should normally set the $SHFORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -5836,15 +6308,16 @@ for all Fortran versions. SHF90PPCOM - + + The command line used to compile a Fortran 90 source file to a shared-library object file after first running the file through the C preprocessor. -Any options specified in the $SHF90FLAGS and $CPPFLAGS construction variables +Any options specified in the $SHF90FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $SHF90PPCOM if you need to use a specific +You only need to set $SHF90PPCOM if you need to use a specific C-preprocessor command line for Fortran 90 files. -You should normally set the $SHFORTRANPPCOM variable, +You should normally set the $SHFORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -5852,35 +6325,38 @@ for all Fortran versions. SHF90PPCOMSTR - + + The string displayed when a Fortran 90 source file is compiled to a shared-library object file after first running the file through the C preprocessor. -If this is not set, then $SHF90PPCOM or $SHFORTRANPPCOM +If this is not set, then $SHF90PPCOM or $SHFORTRANPPCOM (the command line) is displayed. SHF95 - + + The Fortran 95 compiler used for generating shared-library objects. -You should normally set the $SHFORTRAN variable, +You should normally set the $SHFORTRAN variable, which specifies the default Fortran compiler for all Fortran versions. -You only need to set $SHF95 if you need to use a specific compiler +You only need to set $SHF95 if you need to use a specific compiler or compiler version for Fortran 95 files. SHF95COM - + + The command line used to compile a Fortran 95 source file to a shared-library object file. -You only need to set $SHF95COM if you need to use a specific +You only need to set $SHF95COM if you need to use a specific command line for Fortran 95 files. -You should normally set the $SHFORTRANCOM variable, +You should normally set the $SHFORTRANCOM variable, which specifies the default command line for all Fortran versions. @@ -5888,22 +6364,24 @@ for all Fortran versions. SHF95COMSTR - + + The string displayed when a Fortran 95 source file is compiled to a shared-library object file. -If this is not set, then $SHF95COM or $SHFORTRANCOM +If this is not set, then $SHF95COM or $SHFORTRANCOM (the command line) is displayed. SHF95FLAGS - + + Options that are passed to the Fortran 95 compiler to generated shared-library objects. -You only need to set $SHF95FLAGS if you need to define specific +You only need to set $SHF95FLAGS if you need to define specific user options for Fortran 95 files. -You should normally set the $SHFORTRANFLAGS variable, +You should normally set the $SHFORTRANFLAGS variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -5912,15 +6390,16 @@ for all Fortran versions. SHF95PPCOM - + + The command line used to compile a Fortran 95 source file to a shared-library object file after first running the file through the C preprocessor. -Any options specified in the $SHF95FLAGS and $CPPFLAGS construction variables +Any options specified in the $SHF95FLAGS and $CPPFLAGS construction variables are included on this command line. -You only need to set $SHF95PPCOM if you need to use a specific +You only need to set $SHF95PPCOM if you need to use a specific C-preprocessor command line for Fortran 95 files. -You should normally set the $SHFORTRANPPCOM variable, +You should normally set the $SHFORTRANPPCOM variable, which specifies the default C-preprocessor command line for all Fortran versions. @@ -5928,25 +6407,28 @@ for all Fortran versions. SHF95PPCOMSTR - + + The string displayed when a Fortran 95 source file is compiled to a shared-library object file after first running the file through the C preprocessor. -If this is not set, then $SHF95PPCOM or $SHFORTRANPPCOM +If this is not set, then $SHF95PPCOM or $SHFORTRANPPCOM (the command line) is displayed. SHFORTRAN - + + The default Fortran compiler used for generating shared-library objects. SHFORTRANCOM - + + The command line used to compile a Fortran source file to a shared-library object file. @@ -5954,17 +6436,19 @@ to a shared-library object file. SHFORTRANCOMSTR - + + The string displayed when a Fortran source file is compiled to a shared-library object file. -If this is not set, then $SHFORTRANCOM +If this is not set, then $SHFORTRANCOM (the command line) is displayed. SHFORTRANFLAGS - + + Options that are passed to the Fortran compiler to generate shared-library objects. @@ -5972,24 +6456,26 @@ to generate shared-library objects. SHFORTRANPPCOM - + + The command line used to compile a Fortran source file to a shared-library object file after first running the file through the C preprocessor. Any options specified -in the $SHFORTRANFLAGS and -$CPPFLAGS construction variables +in the $SHFORTRANFLAGS and +$CPPFLAGS construction variables are included on this command line. SHFORTRANPPCOMSTR - + + The string displayed when a Fortran source file is compiled to a shared-library object file after first running the file through the C preprocessor. -If this is not set, then $SHFORTRANPPCOM +If this is not set, then $SHFORTRANPPCOM (the command line) is displayed. @@ -6007,45 +6493,63 @@ general information on specifying emitters. SHLIBNOVERSIONSYMLINKS - -Instructs the SharedLibrary builder to not create symlinks for versioned + + +Instructs the SharedLibrary builder to not create symlinks for versioned shared libraries. SHLIBPREFIX - + + The prefix used for shared library file names. _SHLIBSONAME - + + A macro that automatically generates shared library's SONAME based on $TARGET, -$SHLIBVERSION and $SHLIBSUFFIX. Used by SharedLibrary builder when -the linker tool supports SONAME (e.g. gnulink). +$SHLIBVERSION and $SHLIBSUFFIX. Used by SharedLibrary builder when +the linker tool supports SONAME (e.g. gnulink). SHLIBSUFFIX - + + The suffix used for shared library file names. SHLIBVERSION - + + When this construction variable is defined, a versioned shared library is created by the SharedLibrary builder. This activates the $_SHLIBVERSIONFLAGS and thus modifies the $SHLINKCOM as required, adds the version number to the library name, and creates the symlinks -that are needed. $SHLIBVERSION versions should exist as alpha-numeric, +that are needed. $SHLIBVERSION versions should exist as alpha-numeric, decimal-delimited values as defined by the regular expression "\w+[\.\w+]*". -Example $SHLIBVERSION values include '1', '1.2.3', and '1.2.gitaa412c8b'. +Example $SHLIBVERSION values include '1', '1.2.3', and '1.2.gitaa412c8b'. + + + + + _SHLIBVERSIONFLAGS + + +This macro automatically introduces extra flags to $SHLINKCOM when +building versioned SharedLibrary (that is when $SHLIBVERSION +is set). _SHLIBVERSIONFLAGS usually adds $SHLIBVERSIONFLAGS +and some extra dynamically generated options (such as +-Wl,-soname=$_SHLIBSONAME. It is unused by "plain" +(unversioned) shared libraries. @@ -6059,63 +6563,55 @@ set. - - _SHLIBVERSIONFLAGS - -This macro automatically introduces extra flags to $SHLINKCOM when -building versioned SharedLibrary (that is when $SHLIBVERSION -is set). _SHLIBVERSIONFLAGS usually adds $SHLIBVERSIONFLAGS -and some extra dynamically generated options (such as --Wl,-soname=$_SHLIBSONAME. It is unused by "plain" -(unversioned) shared libraries. - - - SHLINK - + + The linker for programs that use shared libraries. SHLINKCOM - + + The command line used to link programs using shared libraries. SHLINKCOMSTR - + + The string displayed when programs using shared libraries are linked. -If this is not set, then $SHLINKCOM (the command line) is displayed. +If this is not set, then $SHLINKCOM (the command line) is displayed. - + env = Environment(SHLINKCOMSTR = "Linking shared $TARGET") SHLINKFLAGS - + + General user options passed to the linker for programs using shared libraries. Note that this variable should not contain -(or similar) options for linking with the libraries listed in $LIBS, +(or similar) options for linking with the libraries listed in $LIBS, nor (or similar) include search path options -that scons generates automatically from $LIBPATH. +that scons generates automatically from $LIBPATH. See -$_LIBFLAGS +$_LIBFLAGS above, for the variable that expands to library-link options, and -$_LIBDIRFLAGS +$_LIBDIRFLAGS above, for the variable that expands to library search path options. @@ -6123,32 +6619,36 @@ for the variable that expands to library search path options. SHOBJPREFIX - + + The prefix used for shared object file names. SHOBJSUFFIX - + + The suffix used for shared object file names. SONAME - + + Variable used to hard-code SONAME for versioned shared library/loadable module. env.SharedLibrary('test', 'test.c', SHLIBVERSION='0.1.2', SONAME='libtest.so.2') -The variable is used, for example, by gnulink linker tool. +The variable is used, for example, by gnulink linker tool. SOURCE - + + A reserved variable name that may not be set or used in a construction environment. (See the manpage section "Variable Substitution" @@ -6158,7 +6658,8 @@ for more information). SOURCE_URL - + + The URL (web address) of the location from which the project was retrieved. @@ -6170,7 +6671,8 @@ field in the controlling information for Ipkg and RPM packages. SOURCES - + + A reserved variable name that may not be set or used in a construction environment. (See the manpage section "Variable Substitution" @@ -6180,16 +6682,17 @@ for more information). SPAWN - + + A command interpreter function that will be called to execute command line strings. The function must expect the following arguments: - + def spawn(shell, escape, cmd, args, env): - + sh is a string naming the shell program to use. escape @@ -6207,15 +6710,17 @@ in which the command should be executed. STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME - + + When this variable is true, static objects and shared objects are assumed to be the same; that is, SCons does not check for linking static objects into a shared library. SUBST_DICT - -The dictionary used by the Substfile or Textfile builders + + +The dictionary used by the Substfile or Textfile builders for substitution values. It can be anything acceptable to the dict() constructor, so in addition to a dictionary, @@ -6225,23 +6730,26 @@ lists of tuples are also acceptable. SUBSTFILEPREFIX - -The prefix used for Substfile file names, + + +The prefix used for Substfile file names, the null string by default. SUBSTFILESUFFIX - -The suffix used for Substfile file names, + + +The suffix used for Substfile file names, the null string by default. SUMMARY - + + A short summary of what the project is about. This is used to fill in the Summary: @@ -6254,32 +6762,35 @@ field in MSI packages. SWIG - + + The scripting language wrapper and interface generator. SWIGCFILESUFFIX - + + The suffix that will be used for intermediate C source files generated by the scripting language wrapper and interface generator. The default value is -_wrap$CFILESUFFIX. +_wrap$CFILESUFFIX. By default, this value is used whenever the option is not specified as part of the -$SWIGFLAGS +$SWIGFLAGS construction variable. SWIGCOM - + + The command line used to call the scripting language wrapper and interface generator. @@ -6287,32 +6798,35 @@ the scripting language wrapper and interface generator. SWIGCOMSTR - + + The string displayed when calling the scripting language wrapper and interface generator. -If this is not set, then $SWIGCOM (the command line) is displayed. +If this is not set, then $SWIGCOM (the command line) is displayed. SWIGCXXFILESUFFIX - + + The suffix that will be used for intermediate C++ source files generated by the scripting language wrapper and interface generator. The default value is -_wrap$CFILESUFFIX. +_wrap$CFILESUFFIX. By default, this value is used whenever the -c++ option is specified as part of the -$SWIGFLAGS +$SWIGFLAGS construction variable. SWIGDIRECTORSUFFIX - + + The suffix that will be used for intermediate C++ header files generated by the scripting language wrapper and interface generator. These are only generated for C++ code when the SWIG 'directors' feature is @@ -6324,7 +6838,8 @@ The default value is SWIGFLAGS - + + General options passed to the scripting language wrapper and interface generator. This is where you should set @@ -6335,57 +6850,61 @@ or whatever other options you want to specify to SWIG. If you set the option in this variable, -scons +scons will, by default, generate a C++ intermediate source file with the extension that is specified as the -$CXXFILESUFFIX +$CXXFILESUFFIX variable. _SWIGINCFLAGS - + + An automatically-generated construction variable containing the SWIG command-line options for specifying directories to be searched for included files. -The value of $_SWIGINCFLAGS is created +The value of $_SWIGINCFLAGS is created by respectively prepending and appending -$SWIGINCPREFIX and $SWIGINCSUFFIX +$SWIGINCPREFIX and $SWIGINCSUFFIX to the beginning and end -of each directory in $SWIGPATH. +of each directory in $SWIGPATH. SWIGINCPREFIX - + + The prefix used to specify an include directory on the SWIG command line. This will be prepended to the beginning of each directory -in the $SWIGPATH construction variable -when the $_SWIGINCFLAGS variable is automatically generated. +in the $SWIGPATH construction variable +when the $_SWIGINCFLAGS variable is automatically generated. SWIGINCSUFFIX - + + The suffix used to specify an include directory on the SWIG command line. This will be appended to the end of each directory -in the $SWIGPATH construction variable -when the $_SWIGINCFLAGS variable is automatically generated. +in the $SWIGPATH construction variable +when the $_SWIGINCFLAGS variable is automatically generated. SWIGOUTDIR - + + Specifies the output directory in which the scripting language wrapper and interface generator should place generated language-specific files. This will be used by SCons to identify -the files that will be generated by the swig call, +the files that will be generated by the swig call, and translated into the swig -outdir option on the command line. @@ -6393,14 +6912,15 @@ and translated into the SWIGPATH - + + The list of directories that the scripting language wrapper and interface generate will search for included files. The SWIG implicit dependency scanner will search these directories for include files. The default value is an empty list. - + Don't explicitly put include directory arguments in SWIGFLAGS; the result will be non-portable @@ -6408,90 +6928,96 @@ and the directories will not be searched by the dependency scanner. Note: directory names in SWIGPATH will be looked-up relative to the SConscript directory when they are used in a command. To force -scons +scons to look-up a directory relative to the root of the source tree use #: - + env = Environment(SWIGPATH='#/include') - + The directory look-up can also be forced using the -Dir() +Dir() function: - + include = Dir('include') env = Environment(SWIGPATH=include) - + The directory list will be added to command lines through the automatically-generated -$_SWIGINCFLAGS +$_SWIGINCFLAGS construction variable, which is constructed by respectively prepending and appending the values of the -$SWIGINCPREFIX and $SWIGINCSUFFIX +$SWIGINCPREFIX and $SWIGINCSUFFIX construction variables to the beginning and end -of each directory in $SWIGPATH. +of each directory in $SWIGPATH. Any command lines you define that need the SWIGPATH directory list should -include $_SWIGINCFLAGS: +include $_SWIGINCFLAGS: - + env = Environment(SWIGCOM="my_swig -o $TARGET $_SWIGINCFLAGS $SOURCES") SWIGVERSION - + + The version number of the SWIG tool. TAR - + + The tar archiver. TARCOM - + + The command line used to call the tar archiver. TARCOMSTR - + + The string displayed when archiving files using the tar archiver. -If this is not set, then $TARCOM (the command line) is displayed. +If this is not set, then $TARCOM (the command line) is displayed. - + env = Environment(TARCOMSTR = "Archiving $TARGET") TARFLAGS - + + General options passed to the tar archiver. TARGET - + + A reserved variable name that may not be set or used in a construction environment. (See the manpage section "Variable Substitution" @@ -6503,9 +7029,16 @@ for more information). TARGET_ARCH + The name of the target hardware architecture for the compiled objects + created by this Environment. + This defaults to the value of HOST_ARCH, and the user can override it. + Currently only set for Win32. + + + Sets the target architecture for Visual Studio compiler (i.e. the arch of the binaries generated by the compiler). If not set, default to -$HOST_ARCH, or, if that is unset, to the architecture of the +$HOST_ARCH, or, if that is unset, to the architecture of the running machine's OS (note that the python build or architecture has no effect). This variable must be passed as an argument to the Environment() @@ -6517,7 +7050,7 @@ all installed MSVC's that support the TARGET_ARCH, selecting the latest version for use. - + Valid values for Windows are x86, arm, @@ -6533,18 +7066,12 @@ and ia64 (Itanium). For example, if you want to compile 64-bit binaries, you would set TARGET_ARCH='x86_64' in your SCons environment. - - - The name of the target hardware architecture for the compiled objects - created by this Environment. - This defaults to the value of HOST_ARCH, and the user can override it. - Currently only set for Win32. - - + TARGET_OS - + + The name of the target operating system for the compiled objects created by this Environment. This defaults to the value of HOST_OS, and the user can override it. @@ -6554,7 +7081,8 @@ For example, if you want to compile 64-bit binaries, you would set TARGETS - + + A reserved variable name that may not be set or used in a construction environment. (See the manpage section "Variable Substitution" @@ -6564,15 +7092,17 @@ for more information). TARSUFFIX - + + The suffix used for tar file names. TEMPFILEARGJOIN - -The string (or character) to be used to join the arguments passed to TEMPFILE when command line exceeds the limit set by $MAXLINELENGTH. + + +The string (or character) to be used to join the arguments passed to TEMPFILE when command line exceeds the limit set by $MAXLINELENGTH. The default value is a space. However for MSVC, MSLINK the default is a line seperator characters as defined by os.linesep. Note this value is used literally and not expanded by the subst logic. @@ -6580,7 +7110,8 @@ Note this value is used literally and not expanded by the subst logic. TEMPFILEPREFIX - + + The prefix for a temporary file used to store lines lines longer than $MAXLINELENGTH as operations which call out to a shell will fail @@ -6596,7 +7127,8 @@ or '-via' for ARM toolchain. TEMPFILESUFFIX - + + The suffix used for the temporary file name used for long command lines. The name should include the dot ('.') if one is wanted as @@ -6607,41 +7139,46 @@ The default is '.lnk'. TEX - + + The TeX formatter and typesetter. TEXCOM - + + The command line used to call the TeX formatter and typesetter. TEXCOMSTR - + + The string displayed when calling the TeX formatter and typesetter. -If this is not set, then $TEXCOM (the command line) is displayed. +If this is not set, then $TEXCOM (the command line) is displayed. - + env = Environment(TEXCOMSTR = "Building $TARGET from TeX input $SOURCES") TEXFLAGS - + + General options passed to the TeX formatter and typesetter. TEXINPUTS - + + List of directories that the LaTeX program will search for include directories. The LaTeX implicit dependency scanner will search these @@ -6651,23 +7188,26 @@ directories for \include and \import files. TEXTFILEPREFIX - -The prefix used for Textfile file names, + + +The prefix used for Textfile file names, the null string by default. TEXTFILESUFFIX - -The suffix used for Textfile file names; + + +The suffix used for Textfile file names; .txt by default. TOOLS - + + A list of the names of the Tool specifications that are part of this construction environment. @@ -6675,7 +7215,8 @@ that are part of this construction environment. UNCHANGED_SOURCES - + + A reserved variable name that may not be set or used in a construction environment. (See the manpage section "Variable Substitution" @@ -6685,7 +7226,8 @@ for more information). UNCHANGED_TARGETS - + + A reserved variable name that may not be set or used in a construction environment. (See the manpage section "Variable Substitution" @@ -6695,7 +7237,8 @@ for more information). VENDOR - + + The person or organization who supply the packaged software. This is used to fill in the Vendor: @@ -6708,60 +7251,68 @@ field in the controlling information for MSI packages. VERSION - + + The version of the project, specified as a string. WIN32_INSERT_DEF - -A deprecated synonym for $WINDOWS_INSERT_DEF. + + +A deprecated synonym for $WINDOWS_INSERT_DEF. WIN32DEFPREFIX - -A deprecated synonym for $WINDOWSDEFPREFIX. + + +A deprecated synonym for $WINDOWSDEFPREFIX. WIN32DEFSUFFIX - -A deprecated synonym for $WINDOWSDEFSUFFIX. + + +A deprecated synonym for $WINDOWSDEFSUFFIX. WIN32EXPPREFIX - -A deprecated synonym for $WINDOWSEXPSUFFIX. + + +A deprecated synonym for $WINDOWSEXPSUFFIX. WIN32EXPSUFFIX - -A deprecated synonym for $WINDOWSEXPSUFFIX. + + +A deprecated synonym for $WINDOWSEXPSUFFIX. WINDOWS_EMBED_MANIFEST - + + Set this variable to True or 1 to embed the compiler-generated manifest (normally ${TARGET}.manifest) into all Windows exes and DLLs built with this environment, as a resource during their link step. -This is done using $MT and $MTEXECOM and $MTSHLIBCOM. +This is done using $MT and $MTEXECOM and $MTSHLIBCOM. WINDOWS_INSERT_DEF - + + When this is set to true, a library build of a Windows shared library (.dll file) @@ -6775,9 +7326,10 @@ The default is 0 (do not build a .def file). WINDOWS_INSERT_MANIFEST - + + When this is set to true, -scons +scons will be aware of the .manifest files generated by Microsoft Visua C/C++ 8. @@ -6786,35 +7338,40 @@ files generated by Microsoft Visua C/C++ 8. WINDOWSDEFPREFIX - + + The prefix used for Windows .def file names. WINDOWSDEFSUFFIX - + + The suffix used for Windows .def file names. WINDOWSEXPPREFIX - + + The prefix used for Windows .exp file names. WINDOWSEXPSUFFIX - + + The suffix used for Windows .exp file names. WINDOWSPROGMANIFESTPREFIX - + + The prefix used for executable program .manifest files generated by Microsoft Visual C/C++. @@ -6822,7 +7379,8 @@ generated by Microsoft Visual C/C++. WINDOWSPROGMANIFESTSUFFIX - + + The suffix used for executable program .manifest files generated by Microsoft Visual C/C++. @@ -6830,7 +7388,8 @@ generated by Microsoft Visual C/C++. WINDOWSSHLIBMANIFESTPREFIX - + + The prefix used for shared library .manifest files generated by Microsoft Visual C/C++. @@ -6838,7 +7397,8 @@ generated by Microsoft Visual C/C++. WINDOWSSHLIBMANIFESTSUFFIX - + + The suffix used for shared library .manifest files generated by Microsoft Visual C/C++. @@ -6846,7 +7406,8 @@ generated by Microsoft Visual C/C++. X_IPK_DEPENDS - + + This is used to fill in the Depends: field in the controlling information for Ipkg packages. @@ -6855,7 +7416,8 @@ field in the controlling information for Ipkg packages. X_IPK_DESCRIPTION - + + This is used to fill in the Description: field in the controlling information for Ipkg packages. @@ -6866,7 +7428,8 @@ The default value is X_IPK_MAINTAINER - + + This is used to fill in the Maintainer: field in the controlling information for Ipkg packages. @@ -6875,7 +7438,8 @@ field in the controlling information for Ipkg packages. X_IPK_PRIORITY - + + This is used to fill in the Priority: field in the controlling information for Ipkg packages. @@ -6884,7 +7448,8 @@ field in the controlling information for Ipkg packages. X_IPK_SECTION - + + This is used to fill in the Section: field in the controlling information for Ipkg packages. @@ -6893,7 +7458,8 @@ field in the controlling information for Ipkg packages. X_MSI_LANGUAGE - + + This is used to fill in the Language: attribute in the controlling information for MSI packages. @@ -6902,7 +7468,8 @@ attribute in the controlling information for MSI packages. X_MSI_LICENSE_TEXT - + + The text of the software license in RTF format. Carriage return characters will be replaced with the RTF equivalent \\par. @@ -6911,14 +7478,16 @@ replaced with the RTF equivalent \\par. X_MSI_UPGRADE_CODE - + + TODO X_RPM_AUTOREQPROV - + + This is used to fill in the AutoReqProv: field in the RPM @@ -6928,14 +7497,16 @@ field in the RPM X_RPM_BUILD - + + internal, but overridable X_RPM_BUILDREQUIRES - + + This is used to fill in the BuildRequires: field in the RPM @@ -6946,21 +7517,24 @@ Note this should only be used on a host managed by rpm as the dependencies will X_RPM_BUILDROOT - + + internal, but overridable X_RPM_CLEAN - + + internal, but overridable X_RPM_CONFLICTS - + + This is used to fill in the Conflicts: field in the RPM @@ -6970,7 +7544,8 @@ field in the RPM X_RPM_DEFATTR - + + This value is used as the default attributes for the files in the RPM package. The default value is @@ -6980,7 +7555,8 @@ The default value is X_RPM_DISTRIBUTION - + + This is used to fill in the Distribution: field in the RPM @@ -6990,7 +7566,8 @@ field in the RPM X_RPM_EPOCH - + + This is used to fill in the Epoch: field in the RPM @@ -7000,7 +7577,8 @@ field in the RPM X_RPM_EXCLUDEARCH - + + This is used to fill in the ExcludeArch: field in the RPM @@ -7010,7 +7588,8 @@ field in the RPM X_RPM_EXLUSIVEARCH - + + This is used to fill in the ExclusiveArch: field in the RPM @@ -7020,7 +7599,8 @@ field in the RPM X_RPM_EXTRADEFS - + + A list used to supply extra defintions or flags to be added to the RPM .spec file. Each item is added as-is with a carriage return appended. @@ -7036,7 +7616,7 @@ list that does not include the default line. Added in version 3.1. - + env.Package( NAME = 'foo', ... @@ -7051,7 +7631,8 @@ env.Package( X_RPM_GROUP - + + This is used to fill in the Group: field in the RPM @@ -7061,7 +7642,8 @@ field in the RPM X_RPM_GROUP_lang - + + This is used to fill in the Group(lang): field in the RPM @@ -7076,7 +7658,8 @@ the appropriate language code. X_RPM_ICON - + + This is used to fill in the Icon: field in the RPM @@ -7086,14 +7669,16 @@ field in the RPM X_RPM_INSTALL - + + internal, but overridable X_RPM_PACKAGER - + + This is used to fill in the Packager: field in the RPM @@ -7103,7 +7688,8 @@ field in the RPM X_RPM_POSTINSTALL - + + This is used to fill in the %post: section in the RPM @@ -7113,7 +7699,8 @@ section in the RPM X_RPM_POSTUNINSTALL - + + This is used to fill in the %postun: section in the RPM @@ -7123,7 +7710,8 @@ section in the RPM X_RPM_PREFIX - + + This is used to fill in the Prefix: field in the RPM @@ -7133,7 +7721,8 @@ field in the RPM X_RPM_PREINSTALL - + + This is used to fill in the %pre: section in the RPM @@ -7143,14 +7732,16 @@ section in the RPM X_RPM_PREP - + + internal, but overridable X_RPM_PREUNINSTALL - + + This is used to fill in the %preun: section in the RPM @@ -7160,7 +7751,8 @@ section in the RPM X_RPM_PROVIDES - + + This is used to fill in the Provides: field in the RPM @@ -7170,7 +7762,8 @@ field in the RPM X_RPM_REQUIRES - + + This is used to fill in the Requires: field in the RPM @@ -7180,7 +7773,8 @@ field in the RPM X_RPM_SERIAL - + + This is used to fill in the Serial: field in the RPM @@ -7190,7 +7784,8 @@ field in the RPM X_RPM_URL - + + This is used to fill in the Url: field in the RPM @@ -7200,33 +7795,37 @@ field in the RPM XGETTEXT - + + Path to xgettext(1) program (found via Detect()). -See xgettext tool and POTUpdate builder. +See xgettext tool and POTUpdate builder. XGETTEXTCOM - + + Complete xgettext command line. -See xgettext tool and POTUpdate builder. +See xgettext tool and POTUpdate builder. XGETTEXTCOMSTR - + + A string that is shown when xgettext(1) command is invoked -(default: '', which means "print $XGETTEXTCOM"). -See xgettext tool and POTUpdate builder. +(default: '', which means "print $XGETTEXTCOM"). +See xgettext tool and POTUpdate builder. _XGETTEXTDOMAIN - + + Internal "macro". Generates xgettext domain name form source and target (default: '${TARGET.filebase}'). @@ -7234,36 +7833,40 @@ form source and target (default: '${TARGET.filebase}'). XGETTEXTFLAGS - + + Additional flags to xgettext(1). -See xgettext tool and POTUpdate builder. +See xgettext tool and POTUpdate builder. XGETTEXTFROM - + + Name of file containing list of xgettext(1)'s source files. Autotools' users know this as POTFILES.in so they will in most cases set XGETTEXTFROM="POTFILES.in" here. -The $XGETTEXTFROM files have same syntax and semantics as the well known +The $XGETTEXTFROM files have same syntax and semantics as the well known GNU POTFILES.in. -See xgettext tool and POTUpdate builder. +See xgettext tool and POTUpdate builder. _XGETTEXTFROMFLAGS - + + Internal "macro". Genrates list of -D<dir> flags -from the $XGETTEXTPATH list. +from the $XGETTEXTPATH list. XGETTEXTFROMPREFIX - -This flag is used to add single $XGETTEXTFROM file to + + +This flag is used to add single $XGETTEXTFROM file to xgettext(1)'s commandline (default: '-f'). @@ -7271,34 +7874,38 @@ This flag is used to add single $XGETTEXT XGETTEXTFROMSUFFIX - + + (default: '') XGETTEXTPATH - + + List of directories, there xgettext(1) will look for source files (default: []). -This variable works only together with $XGETTEXTFROM +This variable works only together with $XGETTEXTFROM -See also xgettext tool and POTUpdate builder. +See also xgettext tool and POTUpdate builder. _XGETTEXTPATHFLAGS - + + Internal "macro". Generates list of -f<file> flags -from $XGETTEXTFROM. +from $XGETTEXTFROM. XGETTEXTPATHPREFIX - + + This flag is used to add single search path to xgettext(1)'s commandline (default: '-D'). @@ -7307,21 +7914,24 @@ This flag is used to add single search path to XGETTEXTPATHSUFFIX - + + (default: '') YACC - + + The parser generator. YACCCOM - + + The command line used to call the parser generator to generate a source file. @@ -7329,22 +7939,24 @@ to generate a source file. YACCCOMSTR - + + The string displayed when generating a source file using the parser generator. -If this is not set, then $YACCCOM (the command line) is displayed. +If this is not set, then $YACCCOM (the command line) is displayed. - + env = Environment(YACCCOMSTR = "Yacc'ing $TARGET from $SOURCES") YACCFLAGS - + + General options passed to the parser generator. -If $YACCFLAGS contains a option, +If $YACCFLAGS contains a option, SCons assumes that the call will also create a .h file (if the yacc source file ends in a .y suffix) or a .hpp file @@ -7354,7 +7966,8 @@ or a .hpp file YACCHFILESUFFIX - + + The suffix of the C header file generated by the parser generator when the @@ -7372,7 +7985,8 @@ The default value is YACCHXXFILESUFFIX - + + The suffix of the C++ header file generated by the parser generator when the @@ -7388,7 +8002,7 @@ The default value is except on Mac OS X, where the default is ${TARGET.suffix}.h. -because the default bison parser generator just +because the default bison parser generator just appends .h to the name of the generated C++ file. @@ -7396,7 +8010,8 @@ to the name of the generated C++ file. YACCVCGFILESUFFIX - + + The suffix of the file containing the VCG grammar automaton definition when the @@ -7414,14 +8029,16 @@ The default value is ZIP - + + The zip compression and file packaging utility. ZIPCOM - + + The command line used to call the zip utility, or the internal Python function used to create a zip archive. @@ -7430,7 +8047,8 @@ zip archive. ZIPCOMPRESSION - + + The compression flag @@ -7450,39 +8068,42 @@ module is unavailable. ZIPCOMSTR - + + The string displayed when archiving files using the zip utility. -If this is not set, then $ZIPCOM +If this is not set, then $ZIPCOM (the command line or internal Python function) is displayed. - + env = Environment(ZIPCOMSTR = "Zipping $TARGET") ZIPFLAGS - + + General options passed to the zip utility. ZIPROOT - + + An optional zip root directory (default empty). The filenames stored in the zip file will be relative to this directory, if given. Otherwise the filenames are relative to the current directory of the command. For instance: - + env = Environment() env.Zip('foo.zip', 'subdir1/subdir2/file1', ZIPROOT='subdir1') - + will produce a zip file foo.zip containing a file with the name subdir2/file1 rather than @@ -7492,7 +8113,8 @@ containing a file with the name ZIPSUFFIX - + + The suffix used for zip file names. diff --git a/doc/generated/variables.mod b/doc/generated/variables.mod index b26a645..ba92aa9 100644 --- a/doc/generated/variables.mod +++ b/doc/generated/variables.mod @@ -10,10 +10,10 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $__LDMODULEVERSIONFLAGS"> $__SHLIBVERSIONFLAGS"> -$APPLELINK_COMPATIBILITY_VERSION"> $_APPLELINK_COMPATIBILITY_VERSION"> -$APPLELINK_CURRENT_VERSION"> +$APPLELINK_COMPATIBILITY_VERSION"> $_APPLELINK_CURRENT_VERSION"> +$APPLELINK_CURRENT_VERSION"> $APPLELINK_NO_COMPATIBILITY_VERSION"> $APPLELINK_NO_CURRENT_VERSION"> $AR"> @@ -200,8 +200,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $_FRAMEWORKPATH"> $FRAMEWORKPATHPREFIX"> $FRAMEWORKPREFIX"> -$FRAMEWORKS"> $_FRAMEWORKS"> +$FRAMEWORKS"> $FRAMEWORKSFLAGS"> $GS"> $GSCOM"> @@ -258,8 +258,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $_LDMODULESONAME"> $LDMODULESUFFIX"> $LDMODULEVERSION"> -$_LDMODULEVERSIONFLAGS"> $LDMODULEVERSIONFLAGS"> +$_LDMODULEVERSIONFLAGS"> $LEX"> $LEXCOM"> $LEXCOMSTR"> @@ -434,8 +434,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $RMICCOM"> $RMICCOMSTR"> $RMICFLAGS"> -$RPATH"> $_RPATH"> +$RPATH"> $RPATHPREFIX"> $RPATHSUFFIX"> $RPCGEN"> @@ -651,10 +651,10 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $__LDMODULEVERSIONFLAGS"> $__SHLIBVERSIONFLAGS"> -$APPLELINK_COMPATIBILITY_VERSION"> $_APPLELINK_COMPATIBILITY_VERSION"> -$APPLELINK_CURRENT_VERSION"> +$APPLELINK_COMPATIBILITY_VERSION"> $_APPLELINK_CURRENT_VERSION"> +$APPLELINK_CURRENT_VERSION"> $APPLELINK_NO_COMPATIBILITY_VERSION"> $APPLELINK_NO_CURRENT_VERSION"> $AR"> @@ -841,8 +841,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $_FRAMEWORKPATH"> $FRAMEWORKPATHPREFIX"> $FRAMEWORKPREFIX"> -$FRAMEWORKS"> $_FRAMEWORKS"> +$FRAMEWORKS"> $FRAMEWORKSFLAGS"> $GS"> $GSCOM"> @@ -899,8 +899,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $_LDMODULESONAME"> $LDMODULESUFFIX"> $LDMODULEVERSION"> -$_LDMODULEVERSIONFLAGS"> $LDMODULEVERSIONFLAGS"> +$_LDMODULEVERSIONFLAGS"> $LEX"> $LEXCOM"> $LEXCOMSTR"> @@ -1075,8 +1075,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $RMICCOM"> $RMICCOMSTR"> $RMICFLAGS"> -$RPATH"> $_RPATH"> +$RPATH"> $RPATHPREFIX"> $RPATHSUFFIX"> $RPCGEN"> -- cgit v0.12 From 6a187ca7f326be45bf522f114faa74e541dc3a73 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Tue, 17 Dec 2019 01:46:21 +0000 Subject: Add 3.1.1 release info to debian/changelog and src/Announce.txt --- debian/changelog | 6 ++++++ src/Announce.txt | 28 ++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/debian/changelog b/debian/changelog index 77ac165..204f605 100755 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +scons (3.1.1) unstable; urgency=low + + * Maintenance Release + + -- William Deegan Mon, 16 Dec 2019 15:04:42 -0700 + scons (3.1.0) unstable; urgency=low * Maintenance Release diff --git a/src/Announce.txt b/src/Announce.txt index 1359696..034f34e 100755 --- a/src/Announce.txt +++ b/src/Announce.txt @@ -24,6 +24,34 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER release and consult the CHANGES.txt file for complete a list of changes since last release. This announcement highlights only the important changes. + Please note the following important changes since release 3.1.1: + - Added debug option "action_timestamps" which outputs to stdout the absolute start and end time for each target. + - Update Command() function to accept target_scanner, source_factory, and target_factory arguments. + This makes Command act more like a one-off builder. + - Added support for "-imacros" to ParseFlags + - Avoid crash with UnicodeDecodeError on Python 3 when a Latex log file in + non-UTF-8 encoding (e.g. containing umlauts in Latin-1 encoding when + the fontenc package is included with \usepackage[T1]{fontenc}) is read. + - Improved threading performance by ensuring NodeInfo is shared + across threads. Results in ~13% improvement for parallel builds + (-j# > 1) with many shared nodes. + - Improve performance of Entry.disambiguate() by making check for + most common case first, preventing unnecessary IO. + - Improved DAG walk performance by reducing unnecessary work when + there are no un-visited children. + - Turn previously deprecated debug options into failures: + --debug=tree, --debug=dtree, --debug=stree, --debug=nomemoizer. + - Experimental New Feature: Enable caching MSVC configuration + If SCONS_CACHE_MSVC_CONFIG shell environment variable is set, + SCons will cache the results of past calls to vcvarsall.bat to + a file; integrates with existing memoizing of such vars. + On vs2019 saves 5+ seconds per SCons invocation, which really + helps test suite runs. + - Remove deprecated SourceSignatures, TargetSignatures + - Remove deprecated Builder keywords: overrides and scanner + - Remove deprecated env.Copy + - Remove deprecated BuildDir plus SConscript keyword build_dir + Please note the following important changes since release 3.0.4: - Change the default for AppendENVPath to delete_existing=0, so path order will not be changed, unless explicitly set (Issue #3276) -- cgit v0.12 From f6d28fda767e9b6dace8c63198381e2157a12b1f Mon Sep 17 00:00:00 2001 From: William Deegan Date: Tue, 17 Dec 2019 02:05:17 +0000 Subject: Update content in RELEASE.txt CHANGES.txt Announce.txt and bump the version in ReleaseConfig --- ReleaseConfig | 2 +- src/Announce.txt | 5 ++- src/CHANGES.txt | 4 +-- src/RELEASE.txt | 103 ++++++++++++++++++++++++++++++++----------------------- 4 files changed, 67 insertions(+), 47 deletions(-) diff --git a/ReleaseConfig b/ReleaseConfig index 69be328..3068687 100755 --- a/ReleaseConfig +++ b/ReleaseConfig @@ -32,7 +32,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" # 'final', the patchlevel is set to the release date. This value is # mandatory and must be present in this file. #version_tuple = (2, 2, 0, 'final', 0) -version_tuple = (3, 1, 2, 'alpha', 0) +version_tuple = (3, 1, 2) # Python versions prior to unsupported_python_version cause a fatal error # when that version is used. Python versions prior to deprecate_python_version diff --git a/src/Announce.txt b/src/Announce.txt index 034f34e..17b3093 100755 --- a/src/Announce.txt +++ b/src/Announce.txt @@ -24,7 +24,10 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER release and consult the CHANGES.txt file for complete a list of changes since last release. This announcement highlights only the important changes. - Please note the following important changes since release 3.1.1: + + NOTE: The 4.0.0 Release of SCons will drop Python 2.7 Support + + Please note the following important changes since release 3.1.1: - Added debug option "action_timestamps" which outputs to stdout the absolute start and end time for each target. - Update Command() function to accept target_scanner, source_factory, and target_factory arguments. This makes Command act more like a one-off builder. diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 28a4b43..96517c0 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -4,7 +4,7 @@ Change Log -NOTE: Please add your name below (and your changes) alphabetically by last name. +NOTE: The 4.0.0 Release of SCons will drop Python 2.7 Support RELEASE VERSION/DATE TO BE FILLED IN LATER @@ -35,7 +35,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER (e.g. memmove) were incorrectly recognized as not available. From Jakub Kulik - - Fix subprocess result bytes not being decoded in SunOS/Solaris related tools. + - Fix stacktrace when using SCons with Python 3.5+ and SunOS/Solaris related tools. From Philipp Maierhöfer: - Avoid crash with UnicodeDecodeError on Python 3 when a Latex log file in diff --git a/src/RELEASE.txt b/src/RELEASE.txt index 17e698f..cce5810 100755 --- a/src/RELEASE.txt +++ b/src/RELEASE.txt @@ -3,71 +3,88 @@ https://scons.org/pages/download.html - XXX The primary purpose of this release ... XXX + Here is a summary of the changes since 3.1.1: - A SCons "checkpoint release" is intended to provide early access to - new features so they can be tested in the field before being released - for adoption by other software distributions. - - Note that a checkpoint release is developed using the same test-driven - development methodology as all SCons releases. Existing SCons - functionality should all work as it does in previous releases (except - for any changes identified in the release notes) and early adopters - should be able to use a checkpoint release safely for production work - with existing SConscript files. If not, it represents not only a bug - in SCons but also a hole in the regression test suite, and we want to - hear about it. - - New features may be more lightly tested than in past releases, - especially as concerns their interaction with all of the other - functionality in SCons. We are especially interested in hearing bug - reports about new functionality. - - We do not recommend that downstream distributions (Debian, Fedora, - etc.) package a checkpoint release, mainly to avoid confusing the - "public" release numbering with the long checkpoint release names. - - Here is a summary of the changes since 1.3.0: + NOTE: The 4.0.0 Release of SCons will drop Python 2.7 Support NEW FUNCTIONALITY + - Added debug option "action_timestamps" which outputs to stdout the absolute start and end time for each target. - - List new features (presumably why a checkpoint is being released) + REMOVED FUNCTIONALITY + - Turn previously deprecated debug options into failures: + --debug=tree, --debug=dtree, --debug=stree, --debug=nomemoizer. + - Remove deprecated SourceSignatures, TargetSignatures + - Remove deprecated Builder keywords: overrides and scanner + - Remove deprecated env.Copy + - Remove deprecated BuildDir plus SConscript keyword build_dir - DEPRECATED FUNCTIONALITY - - - List anything that's been deprecated since the last release CHANGED/ENHANCED EXISTING FUNCTIONALITY - - - List modifications to existing features, where the previous behavior - wouldn't actually be considered a bug + - Update Command() function to accept target_scanner, source_factory, and target_factory arguments. + This makes Command act more like a one-off builder. + - Added support for "-imacros" to ParseFlags + - EXPERIMENTAL NEW FEATURE: Enable caching MSVC configuration + If SCONS_CACHE_MSVC_CONFIG shell environment variable is set, + SCons will cache the results of past calls to vcvarsall.bat to + a file; integrates with existing memoizing of such vars. + On vs2019 saves 5+ seconds per SCons invocation, which really + helps test suite runs. FIXES - - - List fixes of outright bugs + - Fix suncxx tool (Oracle Studio compiler) when using Python 3. Previously would throw an exception. + Resolved by properly handling tool version string output as unicode. + - Resolved a race condition in multithreaded Windows builds with Python 2 + in the case where a child process is spawned while a Python action has a + file open. Original author: Ryan Beasley. + - Fix CheckFunc detection code for Visual 2019. Some functions + (e.g. memmove) were incorrectly recognized as not available. + - Fix stacktrace when using SCons with Python 3.5+ and SunOS/Solaris related tools. + - Latex: Avoid crash with UnicodeDecodeError on Python 3 when a Latex log file in + non-UTF-8 encoding (e.g. containing umlauts in Latin-1 encoding when + the fontenc package is included with \usepackage[T1]{fontenc}) is read. + - CmdStringHolder fix from issue #3428 IMPROVEMENTS + - Improved threading performance by ensuring NodeInfo is shared + across threads. Results in ~13% improvement for parallel builds + (-j# > 1) with many shared nodes. + - Improve performance of Entry.disambiguate() by making check for + most common case first, preventing unnecessary IO. + - Improved DAG walk performance by reducing unnecessary work when + there are no un-visited children. - - List improvements that wouldn't be visible to the user in the - documentation: performance improvements (describe the circumstances - under which they would be observed), or major code cleanups PACKAGING - - List changes in the way SCons is packaged and/or released + - N/A DOCUMENTATION - - List any significant changes to the documentation (not individual - typo fixes, even if they're mentioned in src/CHANGES.txt to give - the contributor credit) + - N/A DEVELOPMENT - - List visible changes in the way SCons is developed + - N/A + + +Thanks to the following developers for their contributions to this release. +git shortlog --no-merges -ns 3.1.1..HEAD + 59 Mats Wichmann + 21 William Deegan + 8 Edoardo Bezzeccheri + 5 Adam Gross + 5 maiphi + 4 Ivan Kravets + 4 Mathew Robinson + 2 Jakub Kulík + 2 Jacek Kuczera + 2 Rob Boehne + 2 Jason Kenny + 2 Tim Gates + 1 Jakub Kulik + 1 Theogen Ratkin + 1 jw0k - Thanks to CURLY, LARRY, and MOE for their contributions to this release. - Contributors are listed alphabetically by their last name. __COPYRIGHT__ __FILE__ __REVISION__ __DATE__ __DEVELOPER__ -- cgit v0.12 From bee7caf9defd6e108fc2998a2520ddb36a967691 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Tue, 17 Dec 2019 02:06:47 +0000 Subject: Update version strings --- README.rst | 14 +++++++------- SConstruct | 4 ++-- src/Announce.txt | 2 +- src/CHANGES.txt | 2 +- src/RELEASE.txt | 2 +- testing/framework/TestSCons.py | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.rst b/README.rst index 9589df7..7b7c221 100755 --- a/README.rst +++ b/README.rst @@ -499,13 +499,13 @@ about `Executing SCons Without Installing`_):: Depending on the utilities installed on your system, any or all of the following packages will be built:: - build/dist/scons-3.1.1.tar.gz - build/dist/scons-3.1.1.zip - build/dist/scons-doc-3.1.1.tar.gz - build/dist/scons-local-3.1.1.tar.gz - build/dist/scons-local-3.1.1.zip - build/dist/scons-src-3.1.1.tar.gz - build/dist/scons-src-3.1.1.zip + build/dist/scons-3.1.2.tar.gz + build/dist/scons-3.1.2.zip + build/dist/scons-doc-3.1.2.tar.gz + build/dist/scons-local-3.1.2.tar.gz + build/dist/scons-local-3.1.2.zip + build/dist/scons-src-3.1.2.tar.gz + build/dist/scons-src-3.1.2.zip The SConstruct file is supposed to be smart enough to avoid trying to build packages for which you don't have the proper utilities installed. For diff --git a/SConstruct b/SConstruct index 8db1657..1adf714 100644 --- a/SConstruct +++ b/SConstruct @@ -8,7 +8,7 @@ from __future__ import print_function copyright_years = '2001 - 2019' # This gets inserted into the man pages to reflect the month of release. -month_year = 'August 2019' +month_year = 'December 2019' # # __COPYRIGHT__ @@ -49,7 +49,7 @@ import textwrap import bootstrap project = 'scons' -default_version = '3.1.1' +default_version = '3.1.2' copyright = "Copyright (c) %s The SCons Foundation" % copyright_years SConsignFile() diff --git a/src/Announce.txt b/src/Announce.txt index 17b3093..321496d 100755 --- a/src/Announce.txt +++ b/src/Announce.txt @@ -18,7 +18,7 @@ So that everyone using SCons can help each other learn how to use it more effectively, please go to http://scons.org/lists.html#users to sign up for the scons-users mailing list. -RELEASE VERSION/DATE TO BE FILLED IN LATER +RELEASE 3.1.2 - Mon, 17 Dec 2019 02:06:27 +0000 Please consult the RELEASE.txt file for a summary of changes since the last release and consult the CHANGES.txt file for complete a list of changes diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 96517c0..745bcba 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -6,7 +6,7 @@ NOTE: The 4.0.0 Release of SCons will drop Python 2.7 Support -RELEASE VERSION/DATE TO BE FILLED IN LATER +RELEASE 3.1.2 - Mon, 17 Dec 2019 02:06:27 +0000 From Edoardo Bezzeccheri - Added debug option "action_timestamps" which outputs to stdout the absolute start and end time for each target. diff --git a/src/RELEASE.txt b/src/RELEASE.txt index cce5810..0070c6a 100755 --- a/src/RELEASE.txt +++ b/src/RELEASE.txt @@ -1,4 +1,4 @@ - A new SCons checkpoint release, 3.1.2.alpha.yyyymmdd, is now available + A new SCons checkpoint release, 3.1.2, is now available on the SCons download page: https://scons.org/pages/download.html diff --git a/testing/framework/TestSCons.py b/testing/framework/TestSCons.py index 7dc9e74..d1aed28 100644 --- a/testing/framework/TestSCons.py +++ b/testing/framework/TestSCons.py @@ -35,7 +35,7 @@ from TestCmd import PIPE # here provides some independent verification that what we packaged # conforms to what we expect. -default_version = '3.1.1' +default_version = '3.1.2' python_version_unsupported = (2, 6, 0) python_version_deprecated = (2, 7, 0) -- cgit v0.12 From da2e57392ae9601e922b8b6f20f6faf1d708fc5a Mon Sep 17 00:00:00 2001 From: William Deegan Date: Tue, 17 Dec 2019 02:42:47 +0000 Subject: Updates for README and logic to upload it to Sourceforge as part of the normal upload script --- README-SF.rst | 740 ++++++++++++++++++++++++++++++++++++++++++++ README.rst | 23 +- bin/upload-release-files.sh | 6 + 3 files changed, 755 insertions(+), 14 deletions(-) create mode 100755 README-SF.rst diff --git a/README-SF.rst b/README-SF.rst new file mode 100755 index 0000000..67301d4 --- /dev/null +++ b/README-SF.rst @@ -0,0 +1,740 @@ +SCons - a software construction tool +#################################### + + +Welcome to the SCons development tree. The real purpose of this tree is to +package SCons for production distribution in a variety of formats, not just to +hack SCons code. + +If all you want to do is install and run SCons, it will be easier for you to +download and install the scons-{version}.tar.gz or scons-{version}.zip package +rather than to work with the packaging logic in this tree. + +To the extent that this tree is about building SCons packages, the *full* +development cycle is not just to test the code directly, but to package SCons, +unpack the package, "install" SCons in a test subdirectory, and then to run +the tests against the unpacked and installed software. This helps eliminate +problems caused by, for example, failure to update the list of files to be +packaged. + +For just working on making an individual change to the SCons source, however, +you don't actually need to build or install SCons; you *can* actually edit and +execute SCons in-place. See the following sections below for more +information: + + `Making Changes`_ + How to edit and execute SCons in-place. + + `Debugging`_ + Tips for debugging problems in SCons. + + `Testing`_ + How to use the automated regression tests. + + `Development Workflow`_ + An example of how to put the edit/execute/test pieces + together in a reasonable development workflow. + + +Latest Version +============== + +Before going further, you can check that this package you have is the latest +version at the SCons download page: + + http://www.scons.org/pages/download.html + + +Execution Requirements +====================== + +Running SCons requires either Python version 2.7.* or Python 3.5 or higher. +There should be no other dependencies or requirements to run SCons. + +The default SCons configuration assumes use of the Microsoft Visual C++ +compiler suite on WIN32 systems, and assumes a C compiler named 'cc', a C++ +compiler named 'c++', and a Fortran compiler named 'g77' (such as found in the +GNU C compiler suite) on any other type of system. You may, of course, +override these default values by appropriate configuration of Environment +construction variables. + +By default, SCons knows how to search for available programming tools on +various systems--see the SCons man page for details. You may, of course, +override the default SCons choices made by appropriate configuration of +Environment construction variables. + + +Installation Requirements +========================= + +Nothing special. + + +Executing SCons Without Installing +================================== + +You can execute the local SCons directly from the src/ subdirectory by first +setting the SCONS_LIB_DIR environment variable to the local src/engine +subdirectory, and then executing the local src/script/scons.py script to +populate the build/scons/ subdirectory. You would do this as follows on a +Linux or UNIX system (using sh or a derivative like bash or ksh):: + + $ setenv MYSCONS=`pwd`/src + $ python $MYSCONS/script/scons.py [arguments] + +Or on Windows:: + + C:\scons>set MYSCONS=%cd%\src + C:\scons>python %MYSCONS%\script\scons.py [arguments] + +An alternative approach is to skip the above and use:: + + $ python bootstrap.py [arguments] + +bootstrap.py keeps the src/ subdirectory free of compiled Python (\*.pyc or +\*.pyo) files by copying the necessary SCons files to a local bootstrap/ +subdirectory and executing it from there. + +You can use the -C option to have SCons change directory to another location +where you already have a build configuration set up:: + + $ python bootstrap.py -C /some/other/location [arguments] + +For simplicity in the following examples, we will only show the bootstrap.py +approach. + + +Installation +============ + + Note: You don't need to build SCons packages or install SCons if you just + want to work on developing a patch. See the sections about `Making + Changes`_ and `Testing`_ below if you just want to submit a bug fix or + some new functionality. See the sections below about `Building Packages`_ + and `Testing Packages`_ if your enhancement involves changing the way in + which SCons is packaged and/or installed on an end-user system. + +Assuming your system satisfies the installation requirements in the previous +section, install SCons from this package by first populating the build/scons/ +subdirectory. (For an easier way to install SCons, without having to populate +this directory, use the scons-{version}.tar.gz or scons-{version}.zip +package.) + +Populate build/scons/ using a pre-installed SCons +------------------------------------------------- + +If you already have an appropriate version of SCons installed on your system, +populate the build/scons/ directory by running:: + + $ scons build/scons + +Populate build/scons/ using the SCons source +-------------------------------------------- + +You can also use this version of SCons to populate its own build directory +by using a supplied bootstrap.py script (see the section above about +`Executing SCons Without Installing`_):: + + $ python bootstrap.py build/scons + +Install the built SCons files +----------------------------- + +Any of the above commands will populate the build/scons/ directory with the +necessary files and directory structure to use the Python-standard setup +script as follows on Linux or UNIX:: + + # cd build/scons + # python setup.py install + +Or on Windows:: + + C:\scons\>cd build\scons + C:\scons\build\scons>python setup.py install + +By default, the above commands will do the following: + +- Install the version-numbered "scons-3.1.2" and "sconsign-3.1.2" 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 line. + +- Install scripts named "scons" and "sconsign" scripts in the default system + script directory (/usr/bin or C:\\Python\*\\Scripts, for example). This can be + disabled by specifying the "--no-scons-script" option on the command line, + which is useful if you want to install and experiment with a new version + before 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-3.1.2" and "sconsign-3.1.2" + scripts by specifying the "--hardlink-scons" or "--symlink-scons" options on + the command line. + +- Install "scons-3.1.2.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-3.1.2.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 Windows systems. + +- Install the SCons build engine (a Python module) in an appropriate + version-numbered SCons library directory (/usr/lib/scons-3.1.2 or + C:\\Python\*\\scons-3.1.2, for example). See below for more options related to + installing the build engine library. + +- Install the troff-format man pages in an appropriate directory on UNIX or + Linux systems (/usr/share/man/man1 or /usr/man/man1, for example). This can + be disabled by specifying the "--no-install-man" option on the command line. + The man pages can be installed on Windows systems by specifying the + "--install-man" option on the command line. + +Note that, by default, SCons does not install its build engine library in the +standard Python library directories. If you want to be able to use the SCons +library modules (the build engine) in other Python scripts, specify the +"--standard-lib" option on the command line, as follows:: + + # python setup.py install --standard-lib + +This will install the build engine in the standard Python library directory +(/usr/lib/python\*/site-packages or C:\\Python*\\Lib\\site-packages). + +Alternatively, you can have SCons install its build engine library in a +hard-coded standalone library directory, instead of the default +version-numbered directory, by specifying the "--standalone-lib" option on the +command line, as follows:: + + # python setup.py install --standalone-lib + +This is usually not recommended, however. + +Note that, to install SCons in any of the above system directories, you should +have system installation privileges (that is, "root" or "Administrator") when +running the setup.py script. If you don't have system installation +privileges, you can use the --prefix option to specify an alternate +installation location, such as your home directory:: + + $ python setup.py install --prefix=$HOME + +This will install SCons in the appropriate locations relative to $HOME--that +is, the scons script itself $HOME/bin and the associated library in +$HOME/lib/scons, for example. + + +Making Changes +============== + +Because SCons is implemented in a scripting language, you don't need to build +it in order to make changes and test them. + +Virtually all of the SCons functionality exists in the "build engine," the +src/engine/SCons subdirectory hierarchy that contains all of the modules that +make up SCons. The src/script/scons.py wrapper script exists mainly to find +the appropriate build engine library and then execute it. + +In order to make your own changes locally and test them by hand, simply edit +modules in the local src/engine/SCons subdirectory tree and use the local +bootstrap.py script (see the section above about `Executing SCons Without +Installing`_):: + + $ python bootstrap.py [arguments] + +If you want to be able to just execute your modified version of SCons from the +command line, you can make it executable and add its directory to your $PATH +like so:: + + $ chmod 755 src/script/scons.py + $ export PATH=$PATH:`pwd`/src/script + +You should then be able to run this version of SCons by just typing "scons.py" +at your UNIX or Linux command line. + +Note that the regular SCons development process makes heavy use of automated +testing. See the `Testing`_ and `Development Workflow`_ sections below for more +information about the automated regression tests and how they can be used in a +development cycle to validate that your changes don't break existing +functionality. + + +Debugging +========= + +Python comes with a good interactive debugger. When debugging changes by hand +(i.e., when not using the automated tests), you can invoke SCons under control +of the Python debugger by specifying the --debug=pdb option:: + + $ scons --debug=pdb [arguments] + > /home/knight/SCons/src/engine/SCons/Script/Main.py(927)_main() + -> default_warnings = [ SCons.Warnings.CorruptSConsignWarning, + (Pdb) + +Once in the debugger, you can set breakpoints at lines in files in the build +engine modules by providing the path name of the file relative to the +src/engine subdirectory (that is, including the SCons/ as the first directory +component):: + + (Pdb) b SCons/Tool/msvc.py:158 + +The debugger also supports single stepping, stepping into functions, printing +variables, etc. + +Trying to debug problems found by running the automated tests (see the +`Testing`_ section, below) is more difficult, because the test automation +harness re-invokes SCons and captures output. Consequently, there isn't an +easy way to invoke the Python debugger in a useful way on any particular SCons +call within a test script. + +The most effective technique for debugging problems that occur during an +automated test is to use the good old tried-and-true technique of adding +statements to print tracing information. But note that you can't just use +"print" statement, or even "sys.stdout.write()" because those change the +SCons output, and the automated tests usually look for matches of specific +output strings to decide if a given SCons invocations passes the test. + +To deal with this, SCons supports a Trace() function that (by default) will +print messages to your console screen ("/dev/tty" on UNIX or Linux, "con" on +Windows). By adding Trace() calls to the SCons source code:: + + def sample_method(self, value): + from SCons.Debug import Trace + Trace('called sample_method(%s, %s)\n' % (self, value)) + +You can then run automated tests that print any arbitrary information you wish +about what's going on inside SCons, without interfering with the test +automation. + +The Trace() function can also redirect its output to a file, rather than the +screen:: + + def sample_method(self, value): + from SCons.Debug import Trace + Trace('called sample_method(%s, %s)\n' % (self, value), + file='trace.out') + +Where the Trace() function sends its output is stateful: once you use the +"file=" argument, all subsequent calls to Trace() send their output to the +same file, until another call with a "file=" argument is reached. + + +Testing +======= + +Tests are run by the runtest.py script in this directory. + +There are two types of tests in this package: + +1. Unit tests for individual SCons modules live underneath the src/engine/ + subdirectory and are the same base name as the module with "Tests.py" + appended--for example, the unit test for the Builder.py module is the + BuilderTests.py script. + +2. End-to-end tests of SCons live in the test/ subdirectory. + +You may specifically list one or more tests to be run:: + + $ python runtest.py src/engine/SCons/BuilderTests.py + + $ python runtest.py test/option-j.py test/Program.py + +You also use the -f option to execute just the tests listed in a specified +text file:: + + $ cat testlist.txt + test/option-j.py + test/Program.py + $ python runtest.py -f testlist.txt + +One test must be listed per line, and any lines that begin with '#' will be +ignored (allowing you, for example, to comment out tests that are currently +passing and then uncomment all of the tests in the file for a final validation +run). + +The runtest.py script also takes a -a option that searches the tree for all of +the tests and runs them:: + + $ python runtest.py -a + +If more than one test is run, the runtest.py script prints a summary of how +many tests passed, failed, or yielded no result, and lists any unsuccessful +tests. + +The above invocations all test directly the files underneath the src/ +subdirectory, and do not require that a build be performed first. The +runtest.py script supports additional options to run tests against unpacked +packages in the build/test-\*/ subdirectories. See the `Testing Packages`_ +section below. + + +Development Workflow +==================== + + Caveat: The point of this section isn't to describe one dogmatic workflow. + Just running the test suite can be time-consuming, and getting a patch to + pass all of the tests can be more so. If you're genuinely blocked, it may + make more sense to submit a patch with a note about which tests still + fail, and how. Someone else may be able to take your "initial draft" and + figure out how to improve it to fix the rest of the tests. So there's + plenty of room for use of good judgement. + +The various techniques described in the above sections can be combined to +create simple and effective workflows that allow you to validate that patches +you submit to SCons don't break existing functionality and have adequate +testing, thereby increasing the speed with which they can be integrated. + +For example, suppose your project's SCons configuration is blocked by an SCons +bug, and you decide you want to fix it and submit the patch. Here's one +possible way to go about doing that (using UNIX/Linux as the development +platform, Windows users can translate as appropriate)): + +- Change to the top of your checked-out SCons tree. + +- Confirm that the bug still exists in this version of SCons by using the -C + option to run the broken build:: + + $ python bootstrap.py -C /home/me/broken_project . + +- Fix the bug in SCons by editing appropriate module files underneath + src/engine/SCons. + +- Confirm that you've fixed the bug affecting your project:: + + $ python bootstrap.py -C /home/me/broken_project . + +- Test to see if your fix had any unintended side effects that break existing + functionality:: + + $ python runtest.py -a -o test.log + + Be patient, there are more than 700 test scripts in the whole suite. If you + are on UNIX/Linux, you can use:: + + $ python runtest.py -a | tee test.log + + instead so you can monitor progress from your terminal. + + If any test scripts fail, they will be listed in a summary at the end of the + log file. Some test scripts may also report NO RESULT because (for example) + your local system is the wrong type or doesn't have some installed utilities + necessary to run the script. In general, you can ignore the NO RESULT list. + +- Cut-and-paste the list of failed tests into a file:: + + $ cat > failed.txt + test/failed-test-1.py + test/failed-test-2.py + test/failed-test-3.py + ^D + $ + +- Now debug the test failures and fix them, either by changing SCons, or by + making necessary changes to the tests (if, for example, you have a strong + reason to change functionality, or if you find that the bug really is in the + test script itself). After each change, use the runtest.py -f option to + examine the effects of the change on the subset of tests that originally + failed:: + + $ [edit] + $ python runtest.py -f failed.txt + + Repeat this until all of the tests that originally failed now pass. + +- Now you need to go back and validate that any changes you made while getting + the tests to pass didn't break the fix you originally put in, and didn't + introduce any *additional* unintended side effects that broke other tests:: + + $ python bootstrap.py -C /home/me/broken_project . + $ python runtest.py -a -o test.log + + If you find any newly-broken tests, add them to your "failed.txt" file and + go back to the previous step. + +Of course, the above is only one suggested workflow. In practice, there is a +lot of room for judgment and experience to make things go quicker. For +example, if you're making a change to just the Java support, you might start +looking for regressions by just running the test/Java/\*.py tests instead of +running all of "runtest.py -a". + + +Building Packages +================= + +We use SCons (version 3.1.2 or later) to build its own packages. If you +already have an appropriate version of SCons installed on your system, you can +build everything by simply running it:: + + $ scons + +If you don't have SCons already installed on your +system, you can use the supplied bootstrap.py script (see the section above +about `Executing SCons Without Installing`_):: + + $ python bootstrap.py build/scons + +Depending on the utilities installed on your system, any or all of the +following packages will be built:: + + build/dist/scons-3.1.2.tar.gz + build/dist/scons-3.1.2.zip + build/dist/scons-doc-3.1.2.tar.gz + build/dist/scons-local-3.1.2.tar.gz + build/dist/scons-local-3.1.2.zip + build/dist/scons-src-3.1.2.tar.gz + build/dist/scons-src-3.1.2.zip + +The SConstruct file is supposed to be smart enough to avoid trying to build +packages for which you don't have the proper utilities installed. For +example, if you don't have Debian packaging tools installed, it should just +not build the .deb package, not fail the build. + +If you receive a build error, please report it to the scons-devel mailing list +and open a bug report on the SCons bug tracker. + +Note that in addition to creating the above packages, the default build will +also unpack one or more of the packages for testing. + + +Testing Packages +================ + +A full build will unpack and/or install any .deb, .rpm., .local.tar.gz, +.local.zip, .src.tar.gz, .src.zip, .tar.gz, and .zip packages into separate +build/test-\*/ subdirectories. (Of course, if a package was not built on your +system, it should not try to install it.) The runtest.py script supports a -p +option that will run the specified tests (individually or collectively via +the -a option) against the unpacked build/test-/\* subdirectory:: + + $ python runtest.py -p local-tar-gz + + $ python runtest.py -p local-zip + + $ python runtest.py -p src-tar-gz + + $ python runtest.py -p src-zip + + $ python runtest.py -p tar-gz + + $ python runtest.py -p zip + +(The canonical invocation is to also use the runtest.py -a option so that all +tests are run against the specified package.) + + +Contents of this Package +======================== + +Not guaranteed to be up-to-date (but better than nothing): + +bench/ + A subdirectory for benchmarking scripts, used to perform timing tests + to decide what specific idioms are most efficient for various parts of + the code base. We check these in so they're available in case we have + to revisit any of these decisions in the future. + +bin/ + Miscellaneous utilities used in SCons development. Right now, + some of the stuff here includes: + + - a script that runs pychecker on our source tree; + + - a script that counts source and test files and numbers of lines in each; + + - a prototype script for capturing sample SCons output in xml files; + + - a script that can profile and time a packaging build of SCons itself; + + - a copy of xml_export, which can retrieve project data from SourceForge; + and + + - scripts and a Python module for translating the SCons home-brew XML + documentation tags into DocBook and man page format + + +bootstrap.py + Build script for running SCons from the current source code checkout. This + copies SCons files to bootstrap/ subdirectory, and then executes SCons + with the supplied command-line arguments. + +build/ + This doesn't exist yet if you're looking at a vanilla source tree. This + is generated as part of our build process, and it's where, believe it or + not, we *build* everything. + +debian/ + Files needed to construct a Debian package. The contents of this directory + are dictated by the Debian Policy Manual + (http://www.debian.org/doc/debian-policy). The package will not be + accepted into the Debian distribution unless the contents of this + directory satisfy the relevant Debian policies. + +doc/ + SCons documentation. A variety of things here, in various stages of + (in)completeness. + +gentoo/ + Stuff to generate files for Gentoo Linux. + +HOWTO/ + Documentation of SCons administrative procedures (making a change, + releasing a new version). Maybe other administrative stuff in the future. + +LICENSE + A copy of the copyright and terms under which SCons is distributed (the + Open Source Initiative-approved MIT license). + +LICENSE-local + A copy of the copyright and terms under which SCons is distributed for + inclusion in the scons-local-{version} packages. This is the same as + LICENSE with a preamble that specifies the licensing terms are for SCons + itself, not any other package that includes SCons. + +README.rst + What you're looking at right now. + +README-local + A README file for inclusion in the scons-local-{version} packages. + Similar to this file, but stripped down and modified for people looking at + including SCons in their shipped software. + +runtest.py + Script for running SCons tests. By default, this will run a test against + the code in the local src/ tree, so you don't have to do a build before + testing your changes. + +SConstruct + The file describing to SCons how to build the SCons distribution. + + (It has been pointed out that it's hard to find the SCons API in this + SConstruct file, and that it looks a lot more like a pure Python script + than a build configuration file. That's mainly because all of the magick + we have to perform to deal with all of the different packaging formats + requires a lot of pure Python manipulation. In other words, don't look at + this file for an example of how easy it is to use SCons to build "normal" + software.) + +src/ + Where the actual source code is kept, of course. + +test/ + End-to-end tests of the SCons utility itself. These are separate from the + individual module unit tests, which live side-by-side with the modules + under src/. + +testing/ + SCons testing framework. + +Documentation +============= + +See the src/RELEASE.txt file for notes about this specific release, including +known problems. See the src/CHANGES.txt file for a list of changes since the +previous release. + +The doc/man/scons.1 man page is included in this package, and contains a +section of small examples for getting started using SCons. + +Additional documentation for SCons is available at: + + http://www.scons.org/documentation.html + + +Licensing +========= + +SCons is distributed under the MIT license, a full copy of which is available +in the LICENSE file. + + +Reporting Bugs +============== + +The SCons project welcomes bug reports and feature requests. + +Please make sure you send email with the problem or feature request to +the SCons users mailing list, which you can join via the link below: + + http://two.pairlist.net/mailman/listinfo/scons-users + +Once you have discussed your issue on the users mailing list and the +community has confirmed that it is either a new bug or a duplicate of an +existing bug, then please follow the instructions the community provides +to file a new bug or to add yourself to the CC list for an existing bug + +You can explore the list of existing bugs, which may include workarounds +for the problem you've run into on GitHub Issues: + + https://github.com/SCons/scons/issues + + +Mailing Lists +============= + +An active mailing list for developers of SCons is available. You may +send questions or comments to the list at: + + scons-dev@scons.org + +You may subscribe to the developer's mailing list using form on this page: + + http://two.pairlist.net/mailman/listinfo/scons-dev + +Subscription to the developer's mailing list is by approval. In practice, no +one is refused list membership, but we reserve the right to limit membership +in the future and/or weed out lurkers. + +There is also a low-volume mailing list available for announcements about +SCons. Subscribe by sending email to: + + announce-subscribe@scons.tigris.org + +There are other mailing lists available for SCons users, for notification of +SCons code changes, and for notification of updated bug reports and project +documents. Please see our mailing lists page for details. + + +Donations +========= + +If you find SCons helpful, please consider making a donation (of cash, +software, or hardware) to support continued work on the project. Information +is available at: + + http://www.scons.org/donate.html + + +For More Information +==================== + +Check the SCons web site at: + + http://www.scons.org/ + + +Author Info +=========== + +SCons was originally written by Steven Knight, knight at baldmt dot com. +Since around 2010 it has been maintained by the SCons +development team, co-managed by Bill Deegan and Gary Oberbrunner, with +many contributors, including but not at all limited to: + +- Chad Austin +- Dirk Baechle +- Charles Crain +- William Deegan +- Steve Leblanc +- Rob Managan +- Greg Noel +- Gary Oberbrunner +- Anthony Roach +- Greg Spencer +- Tom Tanner +- Anatoly Techtonik +- Christoph Wiedemann +- Russel Winder + +\... and many others. + +Copyright (c) 2001 - 2019 The SCons Foundation + diff --git a/README.rst b/README.rst index 7b7c221..2fbefc5 100755 --- a/README.rst +++ b/README.rst @@ -178,7 +178,7 @@ Or on Windows:: By default, the above commands will do the following: -- Install the version-numbered "scons-3.1.0" and "sconsign-3.0.3" scripts in +- Install the version-numbered "scons-3.1.2" and "sconsign-3.1.2" 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 line. @@ -190,23 +190,23 @@ By default, the above commands will do the following: before 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-3.0.3" and "sconsign-3.0.3" + hard links or symbolic links to the "scons-3.1.2" and "sconsign-3.1.2" scripts by specifying the "--hardlink-scons" or "--symlink-scons" options on the command line. -- Install "scons-3.0.3.bat" and "scons.bat" wrapper scripts in the Python +- Install "scons-3.1.2.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-3.0.3.bat" and "scons.bat" files installed in the default system + have "scons-3.1.2.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 Windows systems. - Install the SCons build engine (a Python module) in an appropriate - version-numbered SCons library directory (/usr/lib/scons-3.0.3 or - C:\\Python\*\\scons-3.0.3, for example). See below for more options related to + version-numbered SCons library directory (/usr/lib/scons-3.1.2 or + C:\\Python\*\\scons-3.1.2, for example). See below for more options related to installing the build engine library. - Install the troff-format man pages in an appropriate directory on UNIX or @@ -484,7 +484,7 @@ running all of "runtest.py -a". Building Packages ================= -We use SCons (version 3.0.3 or later) to build its own packages. If you +We use SCons (version 3.1.2 or later) to build its own packages. If you already have an appropriate version of SCons installed on your system, you can build everything by simply running it:: @@ -613,10 +613,6 @@ LICENSE-local LICENSE with a preamble that specifies the licensing terms are for SCons itself, not any other package that includes SCons. -QMTest/ - The Python modules we use for testing, some generic modules originating - elsewhere and some specific to SCons. - README.rst What you're looking at right now. @@ -625,9 +621,6 @@ README-local Similar to this file, but stripped down and modified for people looking at including SCons in their shipped software. -rpm/ - The .spec file for building our RPM packages. - runtest.py Script for running SCons tests. By default, this will run a test against the code in the local src/ tree, so you don't have to do a build before @@ -652,6 +645,8 @@ test/ individual module unit tests, which live side-by-side with the modules under src/. +testing/ + SCons testing framework. Documentation ============= diff --git a/bin/upload-release-files.sh b/bin/upload-release-files.sh index 577203e..b23b0a0 100755 --- a/bin/upload-release-files.sh +++ b/bin/upload-release-files.sh @@ -21,6 +21,12 @@ cp -f ../../src/CHANGES.txt ../../src/RELEASE.txt ../../src/Announce.txt ../../s set -x +# upload README +$RSYNC $RSYNCOPTS\ + README-SF.rst bdbaddog@frs.sourceforge.net:/home/frs/project/scons/ \ + $SF_USER@$SF_MACHINE:$SF_TOPDIR/scons/ + + # Upload main scons release files: $RSYNC $RSYNCOPTS \ scons-$VERSION.tar.gz \ -- cgit v0.12 From 06fecd6362d691d16d9ad8347dd85ca7726a4d71 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Tue, 17 Dec 2019 03:00:39 +0000 Subject: Revert code back to development mode --- ReleaseConfig | 2 +- src/Announce.txt | 2 +- src/CHANGES.txt | 7 ++++ src/RELEASE.txt | 105 +++++++++++++++++++++++-------------------------------- 4 files changed, 53 insertions(+), 63 deletions(-) diff --git a/ReleaseConfig b/ReleaseConfig index 3068687..818b405 100755 --- a/ReleaseConfig +++ b/ReleaseConfig @@ -32,7 +32,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" # 'final', the patchlevel is set to the release date. This value is # mandatory and must be present in this file. #version_tuple = (2, 2, 0, 'final', 0) -version_tuple = (3, 1, 2) +version_tuple = (3, 1, 3, 'alpha', 0) # Python versions prior to unsupported_python_version cause a fatal error # when that version is used. Python versions prior to deprecate_python_version diff --git a/src/Announce.txt b/src/Announce.txt index 321496d..17b3093 100755 --- a/src/Announce.txt +++ b/src/Announce.txt @@ -18,7 +18,7 @@ So that everyone using SCons can help each other learn how to use it more effectively, please go to http://scons.org/lists.html#users to sign up for the scons-users mailing list. -RELEASE 3.1.2 - Mon, 17 Dec 2019 02:06:27 +0000 +RELEASE VERSION/DATE TO BE FILLED IN LATER Please consult the RELEASE.txt file for a summary of changes since the last release and consult the CHANGES.txt file for complete a list of changes diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 745bcba..968a2c4 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -6,6 +6,13 @@ NOTE: The 4.0.0 Release of SCons will drop Python 2.7 Support +RELEASE VERSION/DATE TO BE FILLED IN LATER + + From John Doe: + + - Whatever John Doe did. + + RELEASE 3.1.2 - Mon, 17 Dec 2019 02:06:27 +0000 From Edoardo Bezzeccheri diff --git a/src/RELEASE.txt b/src/RELEASE.txt index 0070c6a..825122e 100755 --- a/src/RELEASE.txt +++ b/src/RELEASE.txt @@ -1,90 +1,73 @@ - A new SCons checkpoint release, 3.1.2, is now available + A new SCons checkpoint release, 3.1.3.alpha.yyyymmdd, is now available on the SCons download page: https://scons.org/pages/download.html - Here is a summary of the changes since 3.1.1: + XXX The primary purpose of this release ... XXX - NOTE: The 4.0.0 Release of SCons will drop Python 2.7 Support + A SCons "checkpoint release" is intended to provide early access to + new features so they can be tested in the field before being released + for adoption by other software distributions. + + Note that a checkpoint release is developed using the same test-driven + development methodology as all SCons releases. Existing SCons + functionality should all work as it does in previous releases (except + for any changes identified in the release notes) and early adopters + should be able to use a checkpoint release safely for production work + with existing SConscript files. If not, it represents not only a bug + in SCons but also a hole in the regression test suite, and we want to + hear about it. + + New features may be more lightly tested than in past releases, + especially as concerns their interaction with all of the other + functionality in SCons. We are especially interested in hearing bug + reports about new functionality. + + We do not recommend that downstream distributions (Debian, Fedora, + etc.) package a checkpoint release, mainly to avoid confusing the + "public" release numbering with the long checkpoint release names. + + Here is a summary of the changes since 1.3.0: NEW FUNCTIONALITY - - Added debug option "action_timestamps" which outputs to stdout the absolute start and end time for each target. - REMOVED FUNCTIONALITY - - Turn previously deprecated debug options into failures: - --debug=tree, --debug=dtree, --debug=stree, --debug=nomemoizer. - - Remove deprecated SourceSignatures, TargetSignatures - - Remove deprecated Builder keywords: overrides and scanner - - Remove deprecated env.Copy - - Remove deprecated BuildDir plus SConscript keyword build_dir + - List new features (presumably why a checkpoint is being released) + DEPRECATED FUNCTIONALITY + + - List anything that's been deprecated since the last release CHANGED/ENHANCED EXISTING FUNCTIONALITY - - Update Command() function to accept target_scanner, source_factory, and target_factory arguments. - This makes Command act more like a one-off builder. - - Added support for "-imacros" to ParseFlags - - EXPERIMENTAL NEW FEATURE: Enable caching MSVC configuration - If SCONS_CACHE_MSVC_CONFIG shell environment variable is set, - SCons will cache the results of past calls to vcvarsall.bat to - a file; integrates with existing memoizing of such vars. - On vs2019 saves 5+ seconds per SCons invocation, which really - helps test suite runs. + + - List modifications to existing features, where the previous behavior + wouldn't actually be considered a bug FIXES - - Fix suncxx tool (Oracle Studio compiler) when using Python 3. Previously would throw an exception. - Resolved by properly handling tool version string output as unicode. - - Resolved a race condition in multithreaded Windows builds with Python 2 - in the case where a child process is spawned while a Python action has a - file open. Original author: Ryan Beasley. - - Fix CheckFunc detection code for Visual 2019. Some functions - (e.g. memmove) were incorrectly recognized as not available. - - Fix stacktrace when using SCons with Python 3.5+ and SunOS/Solaris related tools. - - Latex: Avoid crash with UnicodeDecodeError on Python 3 when a Latex log file in - non-UTF-8 encoding (e.g. containing umlauts in Latin-1 encoding when - the fontenc package is included with \usepackage[T1]{fontenc}) is read. - - CmdStringHolder fix from issue #3428 + + - List fixes of outright bugs IMPROVEMENTS - - Improved threading performance by ensuring NodeInfo is shared - across threads. Results in ~13% improvement for parallel builds - (-j# > 1) with many shared nodes. - - Improve performance of Entry.disambiguate() by making check for - most common case first, preventing unnecessary IO. - - Improved DAG walk performance by reducing unnecessary work when - there are no un-visited children. + - List improvements that wouldn't be visible to the user in the + documentation: performance improvements (describe the circumstances + under which they would be observed), or major code cleanups PACKAGING - - N/A + - List changes in the way SCons is packaged and/or released DOCUMENTATION - - N/A + - List any significant changes to the documentation (not individual + typo fixes, even if they're mentioned in src/CHANGES.txt to give + the contributor credit) DEVELOPMENT - - N/A - - -Thanks to the following developers for their contributions to this release. -git shortlog --no-merges -ns 3.1.1..HEAD - 59 Mats Wichmann - 21 William Deegan - 8 Edoardo Bezzeccheri - 5 Adam Gross - 5 maiphi - 4 Ivan Kravets - 4 Mathew Robinson - 2 Jakub Kulík - 2 Jacek Kuczera - 2 Rob Boehne - 2 Jason Kenny - 2 Tim Gates - 1 Jakub Kulik - 1 Theogen Ratkin - 1 jw0k + - List visible changes in the way SCons is developed + Thanks to CURLY, LARRY, and MOE for their contributions to this release. + Contributors are listed alphabetically by their last name. __COPYRIGHT__ __FILE__ __REVISION__ __DATE__ __DEVELOPER__ -- cgit v0.12 From 22a7b1eaaaa6a72f8ee301e45dc1bb72d876ff7a Mon Sep 17 00:00:00 2001 From: Mathew Robinson Date: Wed, 18 Dec 2019 10:27:33 -0500 Subject: Improve performance of Subst by preventing unnecessary frame allocations --- src/CHANGES.txt | 7 +- src/engine/SCons/Subst.py | 719 +++++++++++++++++++++++----------------------- 2 files changed, 365 insertions(+), 361 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 968a2c4..96465d6 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -8,9 +8,10 @@ NOTE: The 4.0.0 Release of SCons will drop Python 2.7 Support RELEASE VERSION/DATE TO BE FILLED IN LATER - From John Doe: - - - Whatever John Doe did. + From Mathew Robinson: + - Improve performance of Subst by preventing unnecessary frame + allocations by no longer defining the *Subber classes inside of their + respective function calls. RELEASE 3.1.2 - Mon, 17 Dec 2019 02:06:27 +0000 diff --git a/src/engine/SCons/Subst.py b/src/engine/SCons/Subst.py index 2de64c5..f3693a1 100644 --- a/src/engine/SCons/Subst.py +++ b/src/engine/SCons/Subst.py @@ -331,6 +331,366 @@ def subst_dict(target, source): return dict + +class StringSubber(object): + """A class to construct the results of a scons_subst() call. + + This binds a specific construction environment, mode, target and + source with two methods (substitute() and expand()) that handle + the expansion. + """ + def __init__(self, env, mode, conv, gvars): + self.env = env + self.mode = mode + self.conv = conv + self.gvars = gvars + + def expand(self, s, lvars): + """Expand a single "token" as necessary, returning an + appropriate string containing the expansion. + + This handles expanding different types of things (strings, + lists, callables) appropriately. It calls the wrapper + substitute() method to re-expand things as necessary, so that + the results of expansions of side-by-side strings still get + re-evaluated separately, not smushed together. + """ + if is_String(s): + try: + s0, s1 = s[:2] + except (IndexError, ValueError): + return s + if s0 != '$': + return s + if s1 == '$': + # In this case keep the double $'s which we'll later + # swap for a single dollar sign as we need to retain + # this information to properly avoid matching "$("" when + # the actual text was "$$("" (or "$)"" when "$$)"" ) + return '$$' + elif s1 in '()': + return s + else: + key = s[1:] + if key[0] == '{' or '.' in key: + if key[0] == '{': + key = key[1:-1] + try: + s = eval(key, self.gvars, lvars) + except KeyboardInterrupt: + raise + except Exception as e: + if e.__class__ in AllowableExceptions: + return '' + raise_exception(e, lvars['TARGETS'], s) + else: + if key in lvars: + s = lvars[key] + elif key in self.gvars: + s = self.gvars[key] + elif NameError not in AllowableExceptions: + raise_exception(NameError(key), lvars['TARGETS'], s) + else: + return '' + + # Before re-expanding the result, handle + # recursive expansion by copying the local + # variable dictionary and overwriting a null + # string for the value of the variable name + # we just expanded. + # + # This could potentially be optimized by only + # copying lvars when s contains more expansions, + # but lvars is usually supposed to be pretty + # small, and deeply nested variable expansions + # are probably more the exception than the norm, + # so it should be tolerable for now. + lv = lvars.copy() + var = key.split('.')[0] + lv[var] = '' + return self.substitute(s, lv) + elif is_Sequence(s): + def func(l, conv=self.conv, substitute=self.substitute, lvars=lvars): + return conv(substitute(l, lvars)) + return list(map(func, s)) + elif callable(s): + try: + s = s(target=lvars['TARGETS'], + source=lvars['SOURCES'], + env=self.env, + for_signature=(self.mode != SUBST_CMD)) + except TypeError: + # This probably indicates that it's a callable + # object that doesn't match our calling arguments + # (like an Action). + if self.mode == SUBST_RAW: + return s + s = self.conv(s) + return self.substitute(s, lvars) + elif s is None: + return '' + else: + return s + + def substitute(self, args, lvars): + """Substitute expansions in an argument or list of arguments. + + This serves as a wrapper for splitting up a string into + separate tokens. + """ + if is_String(args) and not isinstance(args, CmdStringHolder): + args = str(args) # In case it's a UserString. + try: + def sub_match(match): + return self.conv(self.expand(match.group(1), lvars)) + result = _dollar_exps.sub(sub_match, args) + except TypeError: + # If the internal conversion routine doesn't return + # strings (it could be overridden to return Nodes, for + # example), then the 1.5.2 re module will throw this + # exception. Back off to a slower, general-purpose + # algorithm that works for all data types. + args = _separate_args.findall(args) + result = [] + for a in args: + result.append(self.conv(self.expand(a, lvars))) + if len(result) == 1: + result = result[0] + else: + result = ''.join(map(str, result)) + return result + else: + return self.expand(args, lvars) + + +class ListSubber(collections.UserList): + """A class to construct the results of a scons_subst_list() call. + + Like StringSubber, this class binds a specific construction + environment, mode, target and source with two methods + (substitute() and expand()) that handle the expansion. + + In addition, however, this class is used to track the state of + the result(s) we're gathering so we can do the appropriate thing + whenever we have to append another word to the result--start a new + line, start a new word, append to the current word, etc. We do + this by setting the "append" attribute to the right method so + that our wrapper methods only need ever call ListSubber.append(), + and the rest of the object takes care of doing the right thing + internally. + """ + def __init__(self, env, mode, conv, gvars): + collections.UserList.__init__(self, []) + self.env = env + self.mode = mode + self.conv = conv + self.gvars = gvars + + if self.mode == SUBST_RAW: + self.add_strip = lambda x: self.append(x) + else: + self.add_strip = lambda x: None + self.in_strip = None + self.next_line() + + def expand(self, s, lvars, within_list): + """Expand a single "token" as necessary, appending the + expansion to the current result. + + This handles expanding different types of things (strings, + lists, callables) appropriately. It calls the wrapper + substitute() method to re-expand things as necessary, so that + the results of expansions of side-by-side strings still get + re-evaluated separately, not smushed together. + """ + + if is_String(s): + try: + s0, s1 = s[:2] + except (IndexError, ValueError): + self.append(s) + return + if s0 != '$': + self.append(s) + return + if s1 == '$': + self.append('$') + elif s1 == '(': + self.open_strip('$(') + elif s1 == ')': + self.close_strip('$)') + else: + key = s[1:] + if key[0] == '{' or key.find('.') >= 0: + if key[0] == '{': + key = key[1:-1] + try: + s = eval(key, self.gvars, lvars) + except KeyboardInterrupt: + raise + except Exception as e: + if e.__class__ in AllowableExceptions: + return + raise_exception(e, lvars['TARGETS'], s) + else: + if key in lvars: + s = lvars[key] + elif key in self.gvars: + s = self.gvars[key] + elif NameError not in AllowableExceptions: + raise_exception(NameError(), lvars['TARGETS'], s) + else: + return + + # Before re-expanding the result, handle + # recursive expansion by copying the local + # variable dictionary and overwriting a null + # string for the value of the variable name + # we just expanded. + lv = lvars.copy() + var = key.split('.')[0] + lv[var] = '' + self.substitute(s, lv, 0) + self.this_word() + elif is_Sequence(s): + for a in s: + self.substitute(a, lvars, 1) + self.next_word() + elif callable(s): + try: + s = s(target=lvars['TARGETS'], + source=lvars['SOURCES'], + env=self.env, + for_signature=(self.mode != SUBST_CMD)) + except TypeError: + # This probably indicates that it's a callable + # object that doesn't match our calling arguments + # (like an Action). + if self.mode == SUBST_RAW: + self.append(s) + return + s = self.conv(s) + self.substitute(s, lvars, within_list) + elif s is None: + self.this_word() + else: + self.append(s) + + def substitute(self, args, lvars, within_list): + """Substitute expansions in an argument or list of arguments. + + This serves as a wrapper for splitting up a string into + separate tokens. + """ + + if is_String(args) and not isinstance(args, CmdStringHolder): + args = str(args) # In case it's a UserString. + args = _separate_args.findall(args) + for a in args: + if a[0] in ' \t\n\r\f\v': + if '\n' in a: + self.next_line() + elif within_list: + self.append(a) + else: + self.next_word() + else: + self.expand(a, lvars, within_list) + else: + self.expand(args, lvars, within_list) + + def next_line(self): + """Arrange for the next word to start a new line. This + is like starting a new word, except that we have to append + another line to the result.""" + collections.UserList.append(self, []) + self.next_word() + + def this_word(self): + """Arrange for the next word to append to the end of the + current last word in the result.""" + self.append = self.add_to_current_word + + def next_word(self): + """Arrange for the next word to start a new word.""" + self.append = self.add_new_word + + def add_to_current_word(self, x): + """Append the string x to the end of the current last word + in the result. If that is not possible, then just add + it as a new word. Make sure the entire concatenated string + inherits the object attributes of x (in particular, the + escape function) by wrapping it as CmdStringHolder.""" + + if not self.in_strip or self.mode != SUBST_SIG: + try: + current_word = self[-1][-1] + except IndexError: + self.add_new_word(x) + else: + # All right, this is a hack and it should probably + # be refactored out of existence in the future. + # The issue is that we want to smoosh words together + # and make one file name that gets escaped if + # we're expanding something like foo$EXTENSION, + # but we don't want to smoosh them together if + # it's something like >$TARGET, because then we'll + # treat the '>' like it's part of the file name. + # So for now, just hard-code looking for the special + # command-line redirection characters... + try: + last_char = str(current_word)[-1] + except IndexError: + last_char = '\0' + if last_char in '<>|': + self.add_new_word(x) + else: + y = current_word + x + + # We used to treat a word appended to a literal + # as a literal itself, but this caused problems + # with interpreting quotes around space-separated + # targets on command lines. Removing this makes + # none of the "substantive" end-to-end tests fail, + # so we'll take this out but leave it commented + # for now in case there's a problem not covered + # by the test cases and we need to resurrect this. + #literal1 = self.literal(self[-1][-1]) + #literal2 = self.literal(x) + y = self.conv(y) + if is_String(y): + #y = CmdStringHolder(y, literal1 or literal2) + y = CmdStringHolder(y, None) + self[-1][-1] = y + + def add_new_word(self, x): + if not self.in_strip or self.mode != SUBST_SIG: + literal = self.literal(x) + x = self.conv(x) + if is_String(x): + x = CmdStringHolder(x, literal) + self[-1].append(x) + self.append = self.add_to_current_word + + def literal(self, x): + try: + l = x.is_literal + except AttributeError: + return None + else: + return l() + + def open_strip(self, x): + """Handle the "open strip" $( token.""" + self.add_strip(x) + self.in_strip = 1 + + def close_strip(self, x): + """Handle the "close strip" $) token.""" + self.add_strip(x) + self.in_strip = None + + # Constants for the "mode" parameter to scons_subst_list() and # scons_subst(). SUBST_RAW gives the raw command line. SUBST_CMD # gives a command line suitable for passing to a shell. SUBST_SIG @@ -412,136 +772,6 @@ def scons_subst(strSubst, env, mode=SUBST_RAW, target=None, source=None, gvars={ if (isinstance(strSubst, str) and '$' not in strSubst) or isinstance(strSubst, CmdStringHolder): return strSubst - class StringSubber(object): - """A class to construct the results of a scons_subst() call. - - This binds a specific construction environment, mode, target and - source with two methods (substitute() and expand()) that handle - the expansion. - """ - def __init__(self, env, mode, conv, gvars): - self.env = env - self.mode = mode - self.conv = conv - self.gvars = gvars - - def expand(self, s, lvars): - """Expand a single "token" as necessary, returning an - appropriate string containing the expansion. - - This handles expanding different types of things (strings, - lists, callables) appropriately. It calls the wrapper - substitute() method to re-expand things as necessary, so that - the results of expansions of side-by-side strings still get - re-evaluated separately, not smushed together. - """ - if is_String(s): - try: - s0, s1 = s[:2] - except (IndexError, ValueError): - return s - if s0 != '$': - return s - if s1 == '$': - # In this case keep the double $'s which we'll later - # swap for a single dollar sign as we need to retain - # this information to properly avoid matching "$("" when - # the actual text was "$$("" (or "$)"" when "$$)"" ) - return '$$' - elif s1 in '()': - return s - else: - key = s[1:] - if key[0] == '{' or '.' in key: - if key[0] == '{': - key = key[1:-1] - try: - s = eval(key, self.gvars, lvars) - except KeyboardInterrupt: - raise - except Exception as e: - if e.__class__ in AllowableExceptions: - return '' - raise_exception(e, lvars['TARGETS'], s) - else: - if key in lvars: - s = lvars[key] - elif key in self.gvars: - s = self.gvars[key] - elif NameError not in AllowableExceptions: - raise_exception(NameError(key), lvars['TARGETS'], s) - else: - return '' - - # Before re-expanding the result, handle - # recursive expansion by copying the local - # variable dictionary and overwriting a null - # string for the value of the variable name - # we just expanded. - # - # This could potentially be optimized by only - # copying lvars when s contains more expansions, - # but lvars is usually supposed to be pretty - # small, and deeply nested variable expansions - # are probably more the exception than the norm, - # so it should be tolerable for now. - lv = lvars.copy() - var = key.split('.')[0] - lv[var] = '' - return self.substitute(s, lv) - elif is_Sequence(s): - def func(l, conv=self.conv, substitute=self.substitute, lvars=lvars): - return conv(substitute(l, lvars)) - return list(map(func, s)) - elif callable(s): - try: - s = s(target=lvars['TARGETS'], - source=lvars['SOURCES'], - env=self.env, - for_signature=(self.mode != SUBST_CMD)) - except TypeError: - # This probably indicates that it's a callable - # object that doesn't match our calling arguments - # (like an Action). - if self.mode == SUBST_RAW: - return s - s = self.conv(s) - return self.substitute(s, lvars) - elif s is None: - return '' - else: - return s - - def substitute(self, args, lvars): - """Substitute expansions in an argument or list of arguments. - - This serves as a wrapper for splitting up a string into - separate tokens. - """ - if is_String(args) and not isinstance(args, CmdStringHolder): - args = str(args) # In case it's a UserString. - try: - def sub_match(match): - return self.conv(self.expand(match.group(1), lvars)) - result = _dollar_exps.sub(sub_match, args) - except TypeError: - # If the internal conversion routine doesn't return - # strings (it could be overridden to return Nodes, for - # example), then the 1.5.2 re module will throw this - # exception. Back off to a slower, general-purpose - # algorithm that works for all data types. - args = _separate_args.findall(args) - result = [] - for a in args: - result.append(self.conv(self.expand(a, lvars))) - if len(result) == 1: - result = result[0] - else: - result = ''.join(map(str, result)) - return result - else: - return self.expand(args, lvars) - if conv is None: conv = _strconv[mode] @@ -615,234 +845,7 @@ def scons_subst_list(strSubst, env, mode=SUBST_RAW, target=None, source=None, gv The companion scons_subst() function (above) handles basic substitutions within strings, so see that function instead if that's what you're looking for. - """ - class ListSubber(collections.UserList): - """A class to construct the results of a scons_subst_list() call. - - Like StringSubber, this class binds a specific construction - environment, mode, target and source with two methods - (substitute() and expand()) that handle the expansion. - - In addition, however, this class is used to track the state of - the result(s) we're gathering so we can do the appropriate thing - whenever we have to append another word to the result--start a new - line, start a new word, append to the current word, etc. We do - this by setting the "append" attribute to the right method so - that our wrapper methods only need ever call ListSubber.append(), - and the rest of the object takes care of doing the right thing - internally. - """ - def __init__(self, env, mode, conv, gvars): - collections.UserList.__init__(self, []) - self.env = env - self.mode = mode - self.conv = conv - self.gvars = gvars - - if self.mode == SUBST_RAW: - self.add_strip = lambda x: self.append(x) - else: - self.add_strip = lambda x: None - self.in_strip = None - self.next_line() - - def expand(self, s, lvars, within_list): - """Expand a single "token" as necessary, appending the - expansion to the current result. - - This handles expanding different types of things (strings, - lists, callables) appropriately. It calls the wrapper - substitute() method to re-expand things as necessary, so that - the results of expansions of side-by-side strings still get - re-evaluated separately, not smushed together. - """ - - if is_String(s): - try: - s0, s1 = s[:2] - except (IndexError, ValueError): - self.append(s) - return - if s0 != '$': - self.append(s) - return - if s1 == '$': - self.append('$') - elif s1 == '(': - self.open_strip('$(') - elif s1 == ')': - self.close_strip('$)') - else: - key = s[1:] - if key[0] == '{' or key.find('.') >= 0: - if key[0] == '{': - key = key[1:-1] - try: - s = eval(key, self.gvars, lvars) - except KeyboardInterrupt: - raise - except Exception as e: - if e.__class__ in AllowableExceptions: - return - raise_exception(e, lvars['TARGETS'], s) - else: - if key in lvars: - s = lvars[key] - elif key in self.gvars: - s = self.gvars[key] - elif NameError not in AllowableExceptions: - raise_exception(NameError(), lvars['TARGETS'], s) - else: - return - - # Before re-expanding the result, handle - # recursive expansion by copying the local - # variable dictionary and overwriting a null - # string for the value of the variable name - # we just expanded. - lv = lvars.copy() - var = key.split('.')[0] - lv[var] = '' - self.substitute(s, lv, 0) - self.this_word() - elif is_Sequence(s): - for a in s: - self.substitute(a, lvars, 1) - self.next_word() - elif callable(s): - try: - s = s(target=lvars['TARGETS'], - source=lvars['SOURCES'], - env=self.env, - for_signature=(self.mode != SUBST_CMD)) - except TypeError: - # This probably indicates that it's a callable - # object that doesn't match our calling arguments - # (like an Action). - if self.mode == SUBST_RAW: - self.append(s) - return - s = self.conv(s) - self.substitute(s, lvars, within_list) - elif s is None: - self.this_word() - else: - self.append(s) - - def substitute(self, args, lvars, within_list): - """Substitute expansions in an argument or list of arguments. - - This serves as a wrapper for splitting up a string into - separate tokens. - """ - - if is_String(args) and not isinstance(args, CmdStringHolder): - args = str(args) # In case it's a UserString. - args = _separate_args.findall(args) - for a in args: - if a[0] in ' \t\n\r\f\v': - if '\n' in a: - self.next_line() - elif within_list: - self.append(a) - else: - self.next_word() - else: - self.expand(a, lvars, within_list) - else: - self.expand(args, lvars, within_list) - - def next_line(self): - """Arrange for the next word to start a new line. This - is like starting a new word, except that we have to append - another line to the result.""" - collections.UserList.append(self, []) - self.next_word() - - def this_word(self): - """Arrange for the next word to append to the end of the - current last word in the result.""" - self.append = self.add_to_current_word - - def next_word(self): - """Arrange for the next word to start a new word.""" - self.append = self.add_new_word - - def add_to_current_word(self, x): - """Append the string x to the end of the current last word - in the result. If that is not possible, then just add - it as a new word. Make sure the entire concatenated string - inherits the object attributes of x (in particular, the - escape function) by wrapping it as CmdStringHolder.""" - - if not self.in_strip or self.mode != SUBST_SIG: - try: - current_word = self[-1][-1] - except IndexError: - self.add_new_word(x) - else: - # All right, this is a hack and it should probably - # be refactored out of existence in the future. - # The issue is that we want to smoosh words together - # and make one file name that gets escaped if - # we're expanding something like foo$EXTENSION, - # but we don't want to smoosh them together if - # it's something like >$TARGET, because then we'll - # treat the '>' like it's part of the file name. - # So for now, just hard-code looking for the special - # command-line redirection characters... - try: - last_char = str(current_word)[-1] - except IndexError: - last_char = '\0' - if last_char in '<>|': - self.add_new_word(x) - else: - y = current_word + x - - # We used to treat a word appended to a literal - # as a literal itself, but this caused problems - # with interpreting quotes around space-separated - # targets on command lines. Removing this makes - # none of the "substantive" end-to-end tests fail, - # so we'll take this out but leave it commented - # for now in case there's a problem not covered - # by the test cases and we need to resurrect this. - #literal1 = self.literal(self[-1][-1]) - #literal2 = self.literal(x) - y = self.conv(y) - if is_String(y): - #y = CmdStringHolder(y, literal1 or literal2) - y = CmdStringHolder(y, None) - self[-1][-1] = y - - def add_new_word(self, x): - if not self.in_strip or self.mode != SUBST_SIG: - literal = self.literal(x) - x = self.conv(x) - if is_String(x): - x = CmdStringHolder(x, literal) - self[-1].append(x) - self.append = self.add_to_current_word - - def literal(self, x): - try: - l = x.is_literal - except AttributeError: - return None - else: - return l() - - def open_strip(self, x): - """Handle the "open strip" $( token.""" - self.add_strip(x) - self.in_strip = 1 - - def close_strip(self, x): - """Handle the "close strip" $) token.""" - self.add_strip(x) - self.in_strip = None - + """ if conv is None: conv = _strconv[mode] -- cgit v0.12 From c13b879fa7014a7a3e195bdc845fbf5527cca6aa Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Fri, 20 Dec 2019 12:04:35 -0700 Subject: Remove deprecated SourceCode func/method Signed-off-by: Mats Wichmann --- doc/user/builders-writing.xml | 31 ----- doc/user/main.xml | 7 -- doc/user/sourcecode.xml | 185 ----------------------------- src/CHANGES.txt | 3 + src/engine/SCons/Environment.py | 31 ----- src/engine/SCons/Environment.xml | 131 -------------------- src/engine/SCons/EnvironmentTests.py | 19 --- src/engine/SCons/Script/__init__.py | 1 - test/Deprecated/SourceCode/SourceCode.py | 123 ------------------- test/Removed/SourceCode/Old/SourceCode.py | 123 +++++++++++++++++++ test/Removed/SourceCode/Old/sconstest.skip | 0 test/Removed/SourceCode/README.md | 6 + test/Removed/SourceCode/SConstruct.global | 2 + test/Removed/SourceCode/SConstruct.method | 3 + test/Removed/SourceCode/SourceCode.py | 73 ++++++++++++ 15 files changed, 210 insertions(+), 528 deletions(-) delete mode 100644 doc/user/sourcecode.xml delete mode 100644 test/Deprecated/SourceCode/SourceCode.py create mode 100644 test/Removed/SourceCode/Old/SourceCode.py create mode 100644 test/Removed/SourceCode/Old/sconstest.skip create mode 100644 test/Removed/SourceCode/README.md create mode 100644 test/Removed/SourceCode/SConstruct.global create mode 100644 test/Removed/SourceCode/SConstruct.method create mode 100644 test/Removed/SourceCode/SourceCode.py diff --git a/doc/user/builders-writing.xml b/doc/user/builders-writing.xml index a906df8..76fa794 100644 --- a/doc/user/builders-writing.xml +++ b/doc/user/builders-writing.xml @@ -1079,35 +1079,4 @@ from SCons.Script import *
- - - diff --git a/doc/user/main.xml b/doc/user/main.xml index 42724d1..85dcf00 100644 --- a/doc/user/main.xml +++ b/doc/user/main.xml @@ -147,13 +147,6 @@ - - - diff --git a/doc/user/sourcecode.xml b/doc/user/sourcecode.xml deleted file mode 100644 index 5905cc5..0000000 --- a/doc/user/sourcecode.xml +++ /dev/null @@ -1,185 +0,0 @@ - - - %scons; - - - %builders-mod; - - %functions-mod; - - %tools-mod; - - %variables-mod; -]> - - -Fetching Files From Source Code Management Systems - - - - - - - - XXX - - - -
- Fetching Source Code From BitKeeper - - - - XXX - - - - - -env = Environment() -env.SourceCode('.', env.BitKeeper()) -env.Program('hello.c') - - -s.hello.c - - - - - scons -Q - - -
- -
- Fetching Source Code From CVS - - - - XXX - - - - - -env = Environment() -env.SourceCode('.', env.CVS('/usr/local/CVS')) -env.Program('hello.c') - - - - - scons -Q - - -
- -
- Fetching Source Code From RCS - - - - XXX - - - - - -env = Environment() -env.SourceCode('.', env.RCS()) -env.Program('hello.c') - - -hello.c,v - - - - - scons -Q - - -
- -
- Fetching Source Code From SCCS - - - - XXX - - - - - -env = Environment() -env.SourceCode('.', env.SCCS()) -env.Program('hello.c') - - -s.hello.c - - - - - scons -Q - - -
- - - -
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 96465d6..79a65fb 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -13,6 +13,9 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER allocations by no longer defining the *Subber classes inside of their respective function calls. + From Mats Wichmann: + - Remove deprecated SourceCode + RELEASE 3.1.2 - Mon, 17 Dec 2019 02:06:27 +0000 diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 27179c3..36b7c3d 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -2199,37 +2199,6 @@ class Base(SubstitutionEnvironment): target.side_effects.append(side_effect) return side_effects - def SourceCode(self, entry, builder): - """Arrange for a source code builder for (part of) a tree.""" - msg = """SourceCode() has been deprecated and there is no replacement. -\tIf you need this function, please contact scons-dev@scons.org""" - SCons.Warnings.warn(SCons.Warnings.DeprecatedSourceCodeWarning, msg) - entries = self.arg2nodes(entry, self.fs.Entry) - for entry in entries: - entry.set_src_builder(builder) - return entries - - def Split(self, arg): - """This function converts a string or list into a list of strings - or Nodes. This makes things easier for users by allowing files to - be specified as a white-space separated list to be split. - - The input rules are: - - A single string containing names separated by spaces. These will be - split apart at the spaces. - - A single Node instance - - A list containing either strings or Node instances. Any strings - in the list are not split at spaces. - - In all cases, the function returns a list of Nodes and strings.""" - - if SCons.Util.is_List(arg): - return list(map(self.subst, arg)) - elif SCons.Util.is_String(arg): - return self.subst(arg).split() - else: - return [self.subst(arg)] - def Value(self, value, built_value=None): """ """ diff --git a/src/engine/SCons/Environment.xml b/src/engine/SCons/Environment.xml index 6f263a4..b1c2039 100644 --- a/src/engine/SCons/Environment.xml +++ b/src/engine/SCons/Environment.xml @@ -2879,137 +2879,6 @@ function. - - -(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 -builder. -The specified -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, -&scons; -will search up the directory tree -and use the first -&f-SourceCode; -builder it finds. -The specified -builder -may be -None, -in which case -&scons; -will not use a builder to fetch -source files for the specified -entries, -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: - - - -env.SourceCode('.', None) - - - -Note that if the specified -builder -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: - - - -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) - - - - - - - - - -(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: - - - -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 -""") - - - - (input, [raw, target, source, conv]) diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index b2f2bd5..52ab859 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -3255,25 +3255,6 @@ def generate(env): assert ggg.side_effects == [s], ggg.side_effects assert ccc.side_effects == [s], ccc.side_effects - def test_SourceCode(self): - """Test the SourceCode() method.""" - env = self.TestEnvironment(FOO='mmm', BAR='nnn') - e = env.SourceCode('foo', None)[0] - assert e.get_internal_path() == 'foo' - s = e.src_builder() - assert s is None, s - - b = Builder() - e = env.SourceCode(e, b)[0] - assert e.get_internal_path() == 'foo' - s = e.src_builder() - assert s is b, s - - e = env.SourceCode('$BAR$FOO', None)[0] - assert e.get_internal_path() == 'nnnmmm' - s = e.src_builder() - assert s is None, s - def test_Split(self): """Test the Split() method""" env = self.TestEnvironment(FOO = 'fff', BAR = 'bbb') diff --git a/src/engine/SCons/Script/__init__.py b/src/engine/SCons/Script/__init__.py index 9947943..8f526be 100644 --- a/src/engine/SCons/Script/__init__.py +++ b/src/engine/SCons/Script/__init__.py @@ -344,7 +344,6 @@ GlobalDefaultEnvironmentFunctions = [ 'Requires', 'SConsignFile', 'SideEffect', - 'SourceCode', 'Split', 'Tag', 'Value', diff --git a/test/Deprecated/SourceCode/SourceCode.py b/test/Deprecated/SourceCode/SourceCode.py deleted file mode 100644 index b7f1305..0000000 --- a/test/Deprecated/SourceCode/SourceCode.py +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -""" -Test fetching source files using the SourceCode() method. -""" - -import os - -import TestSCons - -test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) - -test.write('SConscript', """ -SourceCode('.', None) -""") - -msg = """SourceCode() has been deprecated and there is no replacement. -\tIf you need this function, please contact scons-dev@scons.org""" -warning = test.deprecated_warning('deprecated-source-code', msg) - -test.subdir('sub', 'sub2') - -test.write('SConstruct', """\ -SetOption('warn', 'deprecated-source-code') -import os - -def cat(env, source, target): - target = str(target[0]) - with open(target, "wb") as ofp: - for src in source: - with open(str(src), "rb") as ifp: - ofp.write(ifp.read()) - -def sc_cat(env, source, target): - source = [] - for t in target: - head, tail = os.path.split(str(t)) - source.append(os.path.join(head, 'sc-' + tail)) - cat(env, source, target) - -env = Environment(BUILDERS={'Cat':Builder(action=cat)}, SUBDIR='sub') -env.SourceCode('$SUBDIR', Builder(action=sc_cat, env=env)) -env.Cat('aaa.out', 'sub/aaa.in') -bbb_in = File('sub/bbb.in') -bbb_in.is_derived() -env.Cat('bbb.out', bbb_in) -env.Cat('ccc.out', 'sub/ccc.in') -env.Cat('all', ['aaa.out', 'bbb.out', 'ccc.out']) -SConscript('sub/SConscript', "env") - -SourceCode('sub2', Builder(action=sc_cat, env=env)) -env.Cat('ddd.out', 'sub2/ddd.in') -""") - -test.write(['sub', 'sc-aaa.in'], "sub/sc-aaa.in\n") -test.write(['sub', 'sc-bbb.in'], "sub/sc-bbb.in\n") -test.write(['sub', 'sc-ccc.in'], "sub/sc-ccc.in\n") -test.write(['sub2', 'sc-ddd.in'], "sub2/sc-ddd.in\n") - -test.write(['sub', 'sc-SConscript'], "'sub/sc-SConscript'\n") - -read_str = """\ -sc_cat(["%s"], []) -""" % (os.path.join('sub', 'SConscript')) - -build_str = """\ -sc_cat(["%s"], []) -cat(["aaa.out"], ["%s"]) -sc_cat(["%s"], []) -cat(["bbb.out"], ["%s"]) -sc_cat(["%s"], []) -cat(["ccc.out"], ["%s"]) -cat(["all"], ["aaa.out", "bbb.out", "ccc.out"]) -sc_cat(["%s"], []) -cat(["ddd.out"], ["%s"]) -""" % (os.path.join('sub', 'aaa.in'), - os.path.join('sub', 'aaa.in'), - os.path.join('sub', 'bbb.in'), - os.path.join('sub', 'bbb.in'), - os.path.join('sub', 'ccc.in'), - os.path.join('sub', 'ccc.in'), - os.path.join('sub2', 'ddd.in'), - os.path.join('sub2', 'ddd.in')) - -stdout = TestSCons.re_escape(test.wrap_stdout(read_str = read_str, - build_str = build_str)) - -test.run(arguments = '.', stdout = stdout, stderr = 2*warning) - -test.must_match(['sub', 'SConscript'], "'sub/sc-SConscript'\n") -test.must_match('all', "sub/sc-aaa.in\nsub/sc-bbb.in\nsub/sc-ccc.in\n") -test.must_match('ddd.out', "sub2/sc-ddd.in\n") - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/SourceCode/Old/SourceCode.py b/test/Removed/SourceCode/Old/SourceCode.py new file mode 100644 index 0000000..b7f1305 --- /dev/null +++ b/test/Removed/SourceCode/Old/SourceCode.py @@ -0,0 +1,123 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Test fetching source files using the SourceCode() method. +""" + +import os + +import TestSCons + +test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) + +test.write('SConscript', """ +SourceCode('.', None) +""") + +msg = """SourceCode() has been deprecated and there is no replacement. +\tIf you need this function, please contact scons-dev@scons.org""" +warning = test.deprecated_warning('deprecated-source-code', msg) + +test.subdir('sub', 'sub2') + +test.write('SConstruct', """\ +SetOption('warn', 'deprecated-source-code') +import os + +def cat(env, source, target): + target = str(target[0]) + with open(target, "wb") as ofp: + for src in source: + with open(str(src), "rb") as ifp: + ofp.write(ifp.read()) + +def sc_cat(env, source, target): + source = [] + for t in target: + head, tail = os.path.split(str(t)) + source.append(os.path.join(head, 'sc-' + tail)) + cat(env, source, target) + +env = Environment(BUILDERS={'Cat':Builder(action=cat)}, SUBDIR='sub') +env.SourceCode('$SUBDIR', Builder(action=sc_cat, env=env)) +env.Cat('aaa.out', 'sub/aaa.in') +bbb_in = File('sub/bbb.in') +bbb_in.is_derived() +env.Cat('bbb.out', bbb_in) +env.Cat('ccc.out', 'sub/ccc.in') +env.Cat('all', ['aaa.out', 'bbb.out', 'ccc.out']) +SConscript('sub/SConscript', "env") + +SourceCode('sub2', Builder(action=sc_cat, env=env)) +env.Cat('ddd.out', 'sub2/ddd.in') +""") + +test.write(['sub', 'sc-aaa.in'], "sub/sc-aaa.in\n") +test.write(['sub', 'sc-bbb.in'], "sub/sc-bbb.in\n") +test.write(['sub', 'sc-ccc.in'], "sub/sc-ccc.in\n") +test.write(['sub2', 'sc-ddd.in'], "sub2/sc-ddd.in\n") + +test.write(['sub', 'sc-SConscript'], "'sub/sc-SConscript'\n") + +read_str = """\ +sc_cat(["%s"], []) +""" % (os.path.join('sub', 'SConscript')) + +build_str = """\ +sc_cat(["%s"], []) +cat(["aaa.out"], ["%s"]) +sc_cat(["%s"], []) +cat(["bbb.out"], ["%s"]) +sc_cat(["%s"], []) +cat(["ccc.out"], ["%s"]) +cat(["all"], ["aaa.out", "bbb.out", "ccc.out"]) +sc_cat(["%s"], []) +cat(["ddd.out"], ["%s"]) +""" % (os.path.join('sub', 'aaa.in'), + os.path.join('sub', 'aaa.in'), + os.path.join('sub', 'bbb.in'), + os.path.join('sub', 'bbb.in'), + os.path.join('sub', 'ccc.in'), + os.path.join('sub', 'ccc.in'), + os.path.join('sub2', 'ddd.in'), + os.path.join('sub2', 'ddd.in')) + +stdout = TestSCons.re_escape(test.wrap_stdout(read_str = read_str, + build_str = build_str)) + +test.run(arguments = '.', stdout = stdout, stderr = 2*warning) + +test.must_match(['sub', 'SConscript'], "'sub/sc-SConscript'\n") +test.must_match('all', "sub/sc-aaa.in\nsub/sc-bbb.in\nsub/sc-ccc.in\n") +test.must_match('ddd.out', "sub2/sc-ddd.in\n") + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Removed/SourceCode/Old/sconstest.skip b/test/Removed/SourceCode/Old/sconstest.skip new file mode 100644 index 0000000..e69de29 diff --git a/test/Removed/SourceCode/README.md b/test/Removed/SourceCode/README.md new file mode 100644 index 0000000..c584dc9 --- /dev/null +++ b/test/Removed/SourceCode/README.md @@ -0,0 +1,6 @@ +SourceCode.py is the "new" test for SourceCode making sure we +get a NameError. + +The Old directory is the former tests from the deprecated state, +preserved here for reference; the presence of an scontest.skip file +means they are never executed. diff --git a/test/Removed/SourceCode/SConstruct.global b/test/Removed/SourceCode/SConstruct.global new file mode 100644 index 0000000..321fe7e --- /dev/null +++ b/test/Removed/SourceCode/SConstruct.global @@ -0,0 +1,2 @@ +DefaultEnvironment(tools=[]) +SourceCode('no_source.c', None) diff --git a/test/Removed/SourceCode/SConstruct.method b/test/Removed/SourceCode/SConstruct.method new file mode 100644 index 0000000..94a4916 --- /dev/null +++ b/test/Removed/SourceCode/SConstruct.method @@ -0,0 +1,3 @@ +DefaultEnvironment(tools=[]) +env = Environment(tools=["textfile"]) +env.SourceCode('no_source.c', None) diff --git a/test/Removed/SourceCode/SourceCode.py b/test/Removed/SourceCode/SourceCode.py new file mode 100644 index 0000000..30499af --- /dev/null +++ b/test/Removed/SourceCode/SourceCode.py @@ -0,0 +1,73 @@ +""" +NameError: name 'SourceCode' is not defined: + File "/tmp/testcmd.193317.nqan7rtg/SConstruct", line 4: + SConscript('SConscript') + File "/home/mats/github/scons/src/engine/SCons/Script/SConscript.py", line 660: + return method(*args, **kw) + File "/home/mats/github/scons/src/engine/SCons/Script/SConscript.py", line 597: + return _SConscript(self.fs, *files, **subst_kw) + File "/home/mats/github/scons/src/engine/SCons/Script/SConscript.py", line 286: + exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals) + File "/tmp/testcmd.193317.nqan7rtg/SConscript", line 2: + SourceCode('.', None) +""" +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Test the removed SourceCode() method errors out if used. +""" + +import os + +import TestSCons + +test = TestSCons.TestSCons(match=TestSCons.match_exact) + +test.subdir('src') + +test.file_fixture('SConstruct.global', 'SConstruct') +expect = """\ +NameError: name 'SourceCode' is not defined: + File "{}", line 2: + SourceCode('no_source.c', None) +""".format(test.workpath('SConstruct')) +test.run(arguments='-Q -s', status=2, stderr=expect) + +test.file_fixture('SConstruct.method', 'SConstruct') +expect = """\ +AttributeError: 'SConsEnvironment' object has no attribute 'SourceCode': + File "{}", line 3: + env.SourceCode('no_source.c', None) +""".format(test.workpath('SConstruct')) +test.run(arguments='-Q -s', status=2, stderr=expect) + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: -- cgit v0.12 From 1b177138a204de2000cc490a96050e54e4626166 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Fri, 20 Dec 2019 12:21:29 -0700 Subject: [PR #3506] fix sider complaint Signed-off-by: Mats Wichmann --- test/Removed/SourceCode/SourceCode.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/Removed/SourceCode/SourceCode.py b/test/Removed/SourceCode/SourceCode.py index 30499af..8ac54d4 100644 --- a/test/Removed/SourceCode/SourceCode.py +++ b/test/Removed/SourceCode/SourceCode.py @@ -40,8 +40,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" Test the removed SourceCode() method errors out if used. """ -import os - import TestSCons test = TestSCons.TestSCons(match=TestSCons.match_exact) -- cgit v0.12 From f6d44c83fc88a3feffa88f747c5cceb875453059 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Fri, 20 Dec 2019 12:52:01 -0700 Subject: [PR #3506] restore accidentally removed Split Oops! somehow removed an extra function block. Signed-off-by: Mats Wichmann --- src/engine/SCons/Environment.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 36b7c3d..2c80424 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -2199,6 +2199,27 @@ class Base(SubstitutionEnvironment): target.side_effects.append(side_effect) return side_effects + def Split(self, arg): + """This function converts a string or list into a list of strings + or Nodes. This makes things easier for users by allowing files to + be specified as a white-space separated list to be split. + + The input rules are: + - A single string containing names separated by spaces. These will be + split apart at the spaces. + - A single Node instance + - A list containing either strings or Node instances. Any strings + in the list are not split at spaces. + + In all cases, the function returns a list of Nodes and strings.""" + + if SCons.Util.is_List(arg): + return list(map(self.subst, arg)) + elif SCons.Util.is_String(arg): + return self.subst(arg).split() + else: + return [self.subst(arg)] + def Value(self, value, built_value=None): """ """ -- cgit v0.12 From c1d1e5492069b799a5e7a9689bf940d34b9a526a Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Fri, 20 Dec 2019 13:19:43 -0700 Subject: [PR #3506] fix remnamt docstring and speed up left a pasted traceback in the SourceCode.py test, got rid of. applied "standard" speedup of dropping tools in DefaultEnvironmment and Environment, speeds up windows a lot (individual Removed tests running in 1 sec instead of 15) Signed-off-by: Mats Wichmann --- test/Removed/BuildDir/BuildDir.py | 2 +- test/Removed/BuildDir/SConscript-build_dir.py | 2 +- test/Removed/BuildDir/SConstruct.global | 1 + test/Removed/BuildDir/SConstruct.kwarg | 1 + test/Removed/BuildDir/SConstruct.method | 4 ++-- test/Removed/Copy-Method/Copy-Method.py | 2 +- test/Removed/Copy-Method/SConstruct.method | 3 ++- test/Removed/SourceCode/SourceCode.py | 13 ------------- test/Removed/SourceSignatures/SConstruct.method | 1 + test/Removed/SourceSignatures/SConstruct.setopt | 1 + test/Removed/SourceSignatures/SourceSignatures.py | 2 +- test/Removed/TargetSignatures/SConstruct.method | 1 + test/Removed/TargetSignatures/SConstruct.setopt | 1 + test/Removed/TargetSignatures/TargetSignatures.py | 2 +- 14 files changed, 15 insertions(+), 21 deletions(-) diff --git a/test/Removed/BuildDir/BuildDir.py b/test/Removed/BuildDir/BuildDir.py index 43c8b8b..589b89a 100644 --- a/test/Removed/BuildDir/BuildDir.py +++ b/test/Removed/BuildDir/BuildDir.py @@ -38,7 +38,7 @@ test.subdir('src') test.file_fixture('SConstruct.global', 'SConstruct') expect = """\ NameError: name 'BuildDir' is not defined: - File "{}", line 1: + File "{}", line 2: BuildDir('build', 'src') """.format(test.workpath('SConstruct')) test.run(arguments='-Q -s', status=2, stderr=expect) diff --git a/test/Removed/BuildDir/SConscript-build_dir.py b/test/Removed/BuildDir/SConscript-build_dir.py index 5a8d1ca..77b6ee4 100644 --- a/test/Removed/BuildDir/SConscript-build_dir.py +++ b/test/Removed/BuildDir/SConscript-build_dir.py @@ -43,7 +43,7 @@ test.write(['src', 'SConscript'], """ # this doesn't work yet expect = """\ TypeError: SConscript() got an unexpected keyword argument 'build_dir': - File "{}", line 1: + File "{}", line 2: SConscript('src/SConscript', build_dir='build') """.format(test.workpath('SConstruct')) test.run(arguments='-Q -s', status=2, stderr=expect) diff --git a/test/Removed/BuildDir/SConstruct.global b/test/Removed/BuildDir/SConstruct.global index 086fbae..7dddf29 100644 --- a/test/Removed/BuildDir/SConstruct.global +++ b/test/Removed/BuildDir/SConstruct.global @@ -1 +1,2 @@ +DefaultEnvironment(tools=[]) BuildDir('build', 'src') diff --git a/test/Removed/BuildDir/SConstruct.kwarg b/test/Removed/BuildDir/SConstruct.kwarg index a5c46fb..2288669 100644 --- a/test/Removed/BuildDir/SConstruct.kwarg +++ b/test/Removed/BuildDir/SConstruct.kwarg @@ -1 +1,2 @@ +DefaultEnvironment(tools=[]) SConscript('src/SConscript', build_dir='build') diff --git a/test/Removed/BuildDir/SConstruct.method b/test/Removed/BuildDir/SConstruct.method index afea459..ddf2324 100644 --- a/test/Removed/BuildDir/SConstruct.method +++ b/test/Removed/BuildDir/SConstruct.method @@ -1,3 +1,3 @@ -env = Environment(BUILD='build', SRC='src') - +DefaultEnvironment(tools=[]) +env = Environment(BUILD='build', SRC='src', tools=[]) env.BuildDir('build', 'src') diff --git a/test/Removed/Copy-Method/Copy-Method.py b/test/Removed/Copy-Method/Copy-Method.py index bca10fe..4c7c386 100644 --- a/test/Removed/Copy-Method/Copy-Method.py +++ b/test/Removed/Copy-Method/Copy-Method.py @@ -35,7 +35,7 @@ test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) test.file_fixture('SConstruct.method', 'SConstruct') expect = """\ AttributeError: 'SConsEnvironment' object has no attribute 'Copy': - File "{}", line 2: + File "{}", line 3: env.Copy() """.format(test.workpath('SConstruct')) test.run(arguments='-Q -s', status=2, stderr=expect, match=TestSCons.match_exact) diff --git a/test/Removed/Copy-Method/SConstruct.method b/test/Removed/Copy-Method/SConstruct.method index 99737e1..5a59bd6 100644 --- a/test/Removed/Copy-Method/SConstruct.method +++ b/test/Removed/Copy-Method/SConstruct.method @@ -1,2 +1,3 @@ -env = Environment() +DefaultEnvironment(tools=[]) +env = Environment(tools=["textfile"]) env.Copy() diff --git a/test/Removed/SourceCode/SourceCode.py b/test/Removed/SourceCode/SourceCode.py index 8ac54d4..f586ef6 100644 --- a/test/Removed/SourceCode/SourceCode.py +++ b/test/Removed/SourceCode/SourceCode.py @@ -1,16 +1,3 @@ -""" -NameError: name 'SourceCode' is not defined: - File "/tmp/testcmd.193317.nqan7rtg/SConstruct", line 4: - SConscript('SConscript') - File "/home/mats/github/scons/src/engine/SCons/Script/SConscript.py", line 660: - return method(*args, **kw) - File "/home/mats/github/scons/src/engine/SCons/Script/SConscript.py", line 597: - return _SConscript(self.fs, *files, **subst_kw) - File "/home/mats/github/scons/src/engine/SCons/Script/SConscript.py", line 286: - exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals) - File "/tmp/testcmd.193317.nqan7rtg/SConscript", line 2: - SourceCode('.', None) -""" #!/usr/bin/env python # # __COPYRIGHT__ diff --git a/test/Removed/SourceSignatures/SConstruct.method b/test/Removed/SourceSignatures/SConstruct.method index e68d6bf..99ef2d2 100644 --- a/test/Removed/SourceSignatures/SConstruct.method +++ b/test/Removed/SourceSignatures/SConstruct.method @@ -1 +1,2 @@ +DefaultEnvironment(tools=[]) SourceSignatures('MD5') diff --git a/test/Removed/SourceSignatures/SConstruct.setopt b/test/Removed/SourceSignatures/SConstruct.setopt index 6e1161f..f4b278e 100644 --- a/test/Removed/SourceSignatures/SConstruct.setopt +++ b/test/Removed/SourceSignatures/SConstruct.setopt @@ -1 +1,2 @@ +DefaultEnvironment(tools=[]) SetOption('warn', 'deprecated-source-signatures') diff --git a/test/Removed/SourceSignatures/SourceSignatures.py b/test/Removed/SourceSignatures/SourceSignatures.py index 014c163..04d2ed7 100644 --- a/test/Removed/SourceSignatures/SourceSignatures.py +++ b/test/Removed/SourceSignatures/SourceSignatures.py @@ -36,7 +36,7 @@ test = TestSCons.TestSCons() test.file_fixture('SConstruct.method', 'SConstruct') expect = """\ NameError: name 'SourceSignatures' is not defined: - File "{}", line 1: + File "{}", line 2: SourceSignatures('MD5') """.format(test.workpath('SConstruct')) test.run(arguments='-Q -s', status=2, stdout=None, stderr=expect) diff --git a/test/Removed/TargetSignatures/SConstruct.method b/test/Removed/TargetSignatures/SConstruct.method index 5e974b6..9f82f9b 100644 --- a/test/Removed/TargetSignatures/SConstruct.method +++ b/test/Removed/TargetSignatures/SConstruct.method @@ -1 +1,2 @@ +DefaultEnvironment(tools=[]) TargetSignatures('MD5') diff --git a/test/Removed/TargetSignatures/SConstruct.setopt b/test/Removed/TargetSignatures/SConstruct.setopt index c887ce4..5576ba8 100644 --- a/test/Removed/TargetSignatures/SConstruct.setopt +++ b/test/Removed/TargetSignatures/SConstruct.setopt @@ -1 +1,2 @@ +DefaultEnvironment(tools=[]) SetOption('warn', 'deprecated-target-signatures') diff --git a/test/Removed/TargetSignatures/TargetSignatures.py b/test/Removed/TargetSignatures/TargetSignatures.py index 889f992..edd60a2 100644 --- a/test/Removed/TargetSignatures/TargetSignatures.py +++ b/test/Removed/TargetSignatures/TargetSignatures.py @@ -36,7 +36,7 @@ test = TestSCons.TestSCons() test.file_fixture('SConstruct.method', 'SConstruct') expect = """\ NameError: name 'TargetSignatures' is not defined: - File "{}", line 1: + File "{}", line 2: TargetSignatures('MD5') """.format(test.workpath('SConstruct')) test.run(arguments='-Q -s', status=2, stdout=None, stderr=expect) -- cgit v0.12 From c73104adc3624503764ff4585b8ba22b62ee4c3b Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sat, 21 Dec 2019 07:12:38 -0700 Subject: Fix two small syntax errors in string formatting Signed-off-by: Mats Wichmann --- src/CHANGES.txt | 1 + src/engine/SCons/Tool/install.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 79a65fb..87980a8 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -15,6 +15,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER From Mats Wichmann: - Remove deprecated SourceCode + - str.format syntax errors fixed RELEASE 3.1.2 - Mon, 17 Dec 2019 02:06:27 +0000 diff --git a/src/engine/SCons/Tool/install.py b/src/engine/SCons/Tool/install.py index c0a193b..dcb3581 100644 --- a/src/engine/SCons/Tool/install.py +++ b/src/engine/SCons/Tool/install.py @@ -168,7 +168,7 @@ def installShlibLinks(dest, source, env): Verbose = False symlinks = listShlibLinksToInstall(dest, source, env) if Verbose: - print('installShlibLinks: symlinks={:r}'.format(SCons.Tool.StringizeLibSymlinks(symlinks))) + print('installShlibLinks: symlinks={!r}'.format(SCons.Tool.StringizeLibSymlinks(symlinks))) if symlinks: SCons.Tool.CreateLibSymlinks(env, symlinks) return @@ -244,7 +244,7 @@ def add_versioned_targets_to_INSTALLED_FILES(target, source, env): Verbose = False _INSTALLED_FILES.extend(target) if Verbose: - print("add_versioned_targets_to_INSTALLED_FILES: target={:r}".format(list(map(str, target)))) + print("add_versioned_targets_to_INSTALLED_FILES: target={!r}".format(list(map(str, target)))) symlinks = listShlibLinksToInstall(target[0], source, env) if symlinks: SCons.Tool.EmitLibSymlinks(env, symlinks, target[0]) -- cgit v0.12