diff options
author | William Deegan <bill@baddogconsulting.com> | 2021-01-15 02:04:22 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2021-01-15 02:04:22 (GMT) |
commit | 40ad600f0fb5201ad6ec1251cf90879f96f730af (patch) | |
tree | 937afd8df3b258ecc715108c19a7026395d9b3d3 | |
parent | 04340876d205824bc3e53b56ff6e98f77ed5783d (diff) | |
download | SCons-40ad600f0fb5201ad6ec1251cf90879f96f730af.zip SCons-40ad600f0fb5201ad6ec1251cf90879f96f730af.tar.gz SCons-40ad600f0fb5201ad6ec1251cf90879f96f730af.tar.bz2 |
fix copyright text, remove SHDLIBVERSION entirely. Never worked before, and doesn't make sense. Use SHLIBVERSION instead. TODO: Fix soname generation for command line
-rw-r--r-- | SCons/Tool/DCommon.xml | 7 | ||||
-rw-r--r-- | SCons/Tool/dmd.py | 13 | ||||
-rw-r--r-- | SCons/Tool/dmd.xml | 1 | ||||
-rw-r--r-- | SCons/Tool/gdc.py | 10 | ||||
-rw-r--r-- | SCons/Tool/gdc.xml | 1 | ||||
-rw-r--r-- | SCons/Tool/ldc.py | 15 | ||||
-rw-r--r-- | SCons/Tool/ldc.xml | 1 | ||||
-rw-r--r-- | SCons/Tool/linkCommon/LoadableModule.py | 23 | ||||
-rw-r--r-- | SCons/Tool/linkCommon/SharedLibrary.py | 23 | ||||
-rw-r--r-- | test/D/DMD.py | 7 | ||||
-rw-r--r-- | test/D/GDC.py | 7 | ||||
-rw-r--r-- | test/D/HSTeoh/Common/singleStringCannotBeMultipleOptions.py | 20 | ||||
-rw-r--r-- | test/D/HSTeoh/sconstest-singleStringCannotBeMultipleOptions_gdc.py | 13 | ||||
-rw-r--r-- | test/D/LDC.py | 7 | ||||
-rw-r--r-- | test/D/SharedObjects/Common/common.py | 7 | ||||
-rw-r--r-- | test/D/SharedObjects/sconstest-dmd.py | 6 | ||||
-rwxr-xr-x | test/D/Support/executablesSearch.py | 15 |
17 files changed, 84 insertions, 92 deletions
diff --git a/SCons/Tool/DCommon.xml b/SCons/Tool/DCommon.xml index a4efd7b..fd1e4a5 100644 --- a/SCons/Tool/DCommon.xml +++ b/SCons/Tool/DCommon.xml @@ -319,13 +319,6 @@ See also &cv-link-DCOMSTR; for compiling to static objects. </summary> </cvar> -<cvar name="SHDLIBVERSION"> -<summary> -<para> -SHDLIBVERSION. -</para> -</summary> -</cvar> <cvar name="SHDLIBVERSIONFLAGS"> <summary> diff --git a/SCons/Tool/dmd.py b/SCons/Tool/dmd.py index 76fcf51..67ed43e 100644 --- a/SCons/Tool/dmd.py +++ b/SCons/Tool/dmd.py @@ -151,18 +151,7 @@ def generate(env): env['_DRPATH'] = '${_concat(DRPATHPREFIX, RPATH, DRPATHSUFFIX, __env__)}' # Support for versioned libraries - env['_SHDLIBVERSIONFLAGS'] = '$SHDLIBVERSIONFLAGS -L-soname=$_SHDLIBSONAME' - - # TODO: Fix this with new logic - # env['_SHDLIBSONAME'] = '${DShLibSonameGenerator(__env__,TARGET)}' - # # NOTE: this is a quick hack, the soname will only work if there is - # # c/c++ linker loaded which provides callback for the ShLibSonameGenerator - # env['DShLibSonameGenerator'] = ShLibSonameGenerator - - # NOTE: this is only for further reference, currently $SHDLIBVERSION does - # not work, the user must use $SHLIBVERSION - env['SHDLIBVERSION'] = '$SHLIBVERSION' - env['SHDLIBVERSIONFLAGS'] = [] + env['_SHDLIBVERSIONFLAGS'] = '$SHDLIBVERSIONFLAGS -L-soname=$_SHLIBSONAME' env['BUILDERS']['ProgramAllAtOnce'] = SCons.Builder.Builder( action='$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -of$TARGET $DLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS', diff --git a/SCons/Tool/dmd.xml b/SCons/Tool/dmd.xml index 1ee0edb..be9f23d 100644 --- a/SCons/Tool/dmd.xml +++ b/SCons/Tool/dmd.xml @@ -65,7 +65,6 @@ Sets construction variables for D language compiler DMD. <item>DLINKFLAGSUFFIX</item> <item>DRPATHPREFIX</item> <item>DRPATHSUFFIX</item> -<item>SHDLIBVERSION</item> <item>SHDLIBVERSIONFLAGS</item> </sets> <uses> diff --git a/SCons/Tool/gdc.py b/SCons/Tool/gdc.py index 09b6d26..0728c6f 100644 --- a/SCons/Tool/gdc.py +++ b/SCons/Tool/gdc.py @@ -117,16 +117,6 @@ def generate(env): # Support for versioned libraries env['_SHDLIBVERSIONFLAGS'] = '$SHDLIBVERSIONFLAGS -Wl,-soname=$_SHLIBSONAME' - # TODO: Fix with new versioned shared lib logic - # env['_SHDLIBSONAME'] = '${DShLibSonameGenerator(__env__,TARGET)}' - # # NOTE: this is a quick hack, the soname will only work if there is - # # c/c++ linker loaded which provides callback for the ShLibSonameGenerator - # env['DShLibSonameGenerator'] = SCons.Tool.linkCommon.ShLibSonameGenerator - # NOTE: this is only for further reference, currently $SHDLIBVERSION does - # not work, the user must use $SHLIBVERSION - env['SHDLIBVERSION'] = '$SHLIBVERSION' - env['SHDLIBVERSIONFLAGS'] = '$SHLIBVERSIONFLAGS' - env['BUILDERS']['ProgramAllAtOnce'] = SCons.Builder.Builder( action='$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -o $TARGET $DLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS', emitter=DCommon.allAtOnceEmitter, diff --git a/SCons/Tool/gdc.xml b/SCons/Tool/gdc.xml index 8248026..fd4cae7 100644 --- a/SCons/Tool/gdc.xml +++ b/SCons/Tool/gdc.xml @@ -65,7 +65,6 @@ Sets construction variables for the D language compiler GDC. <item>DLINKFLAGSUFFIX</item> <item>DRPATHPREFIX</item> <item>DRPATHSUFFIX</item> -<item>SHDLIBVERSION</item> <item>SHDLIBVERSIONFLAGS</item> </sets> <uses> diff --git a/SCons/Tool/ldc.py b/SCons/Tool/ldc.py index 23cc837..fa02bf8 100644 --- a/SCons/Tool/ldc.py +++ b/SCons/Tool/ldc.py @@ -127,19 +127,8 @@ def generate(env): env['_DRPATH'] = '${_concat(DRPATHPREFIX, RPATH, DRPATHSUFFIX, __env__)}' # Support for versioned libraries - env['_SHDLIBVERSIONFLAGS'] = '$SHDLIBVERSIONFLAGS -L-soname=$_SHDLIBSONAME' - - # TODO: Fix to work with new logic - # env['_SHDLIBSONAME'] = '${DShLibSonameGenerator(__env__,TARGET)}' - # # NOTE: this is a quick hack, the soname will only work if there is - # # c/c++ linker loaded which provides callback for the ShLibSonameGenerator - # env['DShLibSonameGenerator'] = ShLibSonameGenerator - # - - # NOTE: this is only for further reference, currently $SHDLIBVERSION does - # not work, the user must use $SHLIBVERSION - env['SHDLIBVERSION'] = '$SHLIBVERSION' - env['SHDLIBVERSIONFLAGS'] = [] + env['_SHDLIBVERSIONFLAGS'] = '$SHDLIBVERSIONFLAGS -L-soname=$_SHLIBSONAME' + env['BUILDERS']['ProgramAllAtOnce'] = SCons.Builder.Builder( action='$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -of=$TARGET $DLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS', diff --git a/SCons/Tool/ldc.xml b/SCons/Tool/ldc.xml index 5802751..d584466 100644 --- a/SCons/Tool/ldc.xml +++ b/SCons/Tool/ldc.xml @@ -65,7 +65,6 @@ Sets construction variables for the D language compiler LDC2. <item>DLINKFLAGSUFFIX</item> <item>DRPATHPREFIX</item> <item>DRPATHSUFFIX</item> -<item>SHDLIBVERSION</item> <item>SHDLIBVERSIONFLAGS</item> </sets> <uses> diff --git a/SCons/Tool/linkCommon/LoadableModule.py b/SCons/Tool/linkCommon/LoadableModule.py index e9c31dc..c8124a0 100644 --- a/SCons/Tool/linkCommon/LoadableModule.py +++ b/SCons/Tool/linkCommon/LoadableModule.py @@ -1,3 +1,26 @@ +# MIT License +# +# Copyright The SCons Foundation +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + from SCons.Tool import createLoadableModuleBuilder from .SharedLibrary import shlib_symlink_emitter from . import lib_emitter diff --git a/SCons/Tool/linkCommon/SharedLibrary.py b/SCons/Tool/linkCommon/SharedLibrary.py index 1e98499..cfeddbb 100644 --- a/SCons/Tool/linkCommon/SharedLibrary.py +++ b/SCons/Tool/linkCommon/SharedLibrary.py @@ -1,3 +1,26 @@ +# MIT License +# +# Copyright The SCons Foundation +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + from SCons.Errors import UserError from SCons.Tool import createSharedLibBuilder from SCons.Util import CLVar diff --git a/test/D/DMD.py b/test/D/DMD.py index 2d9333a..8e09de4 100644 --- a/test/D/DMD.py +++ b/test/D/DMD.py @@ -1,6 +1,8 @@ #!/usr/bin/env python # -# __COPYRIGHT__ +# MIT License +# +# Copyright The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -20,12 +22,9 @@ # 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. -# # Amended by Russel Winder <russel@russel.org.uk> 2010-05-05 -__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - import TestSCons import sys diff --git a/test/D/GDC.py b/test/D/GDC.py index b548b94..b73c09c 100644 --- a/test/D/GDC.py +++ b/test/D/GDC.py @@ -1,6 +1,8 @@ #!/usr/bin/env python # -# __COPYRIGHT__ +# MIT License +# +# Copyright The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -20,12 +22,9 @@ # 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. -# # Amended by Russel Winder <russel@russel.org.uk> 2010-05-05 -__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - import TestSCons _exe = TestSCons._exe diff --git a/test/D/HSTeoh/Common/singleStringCannotBeMultipleOptions.py b/test/D/HSTeoh/Common/singleStringCannotBeMultipleOptions.py index 2632f87..65ad61a 100644 --- a/test/D/HSTeoh/Common/singleStringCannotBeMultipleOptions.py +++ b/test/D/HSTeoh/Common/singleStringCannotBeMultipleOptions.py @@ -1,10 +1,6 @@ -""" -These tests verify that SCons fails appropriately where the user has tried to supply multiple command line -options via a single string rather than providing a list of strings, one string per option. -""" - +# MIT License # -# __COPYRIGHT__ +# Copyright The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -24,9 +20,11 @@ options via a single string rather than providing a list of strings, one string # 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__" +""" +These tests verify that SCons fails appropriately where the user has tried to supply multiple command line +options via a single string rather than providing a list of strings, one string per option. +""" import TestSCons @@ -49,7 +47,6 @@ def testForTool(tool): config = f.read().format(tool) test.write('SConstruct', config) - test.run(status=2, stdout=None, stderr=None) result = { 'dmd': ".*unrecognized switch '-m64 -O'.*", @@ -57,11 +54,14 @@ def testForTool(tool): 'ldc': ".*Unknown command line argument '-m64 -O'.*", }[tool] + from SCons.Environment import Base if tool == 'dmd' and Base()['DC'] == 'gdmd': result = ".*unrecognized command line option '-m64 -O'.*" - test.fail_test(not test.match_re_dotall(test.stderr(), result)) + test.run(status=2, stdout=None, stderr=result, match=TestSCons.match_re_dotall) + + # test.fail_test(not test.match_re_dotall(test.stderr(), result)) test.pass_test() diff --git a/test/D/HSTeoh/sconstest-singleStringCannotBeMultipleOptions_gdc.py b/test/D/HSTeoh/sconstest-singleStringCannotBeMultipleOptions_gdc.py index d65495a..30eefbc 100644 --- a/test/D/HSTeoh/sconstest-singleStringCannotBeMultipleOptions_gdc.py +++ b/test/D/HSTeoh/sconstest-singleStringCannotBeMultipleOptions_gdc.py @@ -1,9 +1,6 @@ -""" -Test compiling and executing using the gdc tool. -""" - +# MIT License # -# __COPYRIGHT__ +# Copyright The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -23,9 +20,11 @@ Test compiling and executing using the gdc tool. # 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 compiling and executing using the gdc tool. +""" +import pdb; pdb.set_trace() from Common.singleStringCannotBeMultipleOptions import testForTool testForTool('gdc') diff --git a/test/D/LDC.py b/test/D/LDC.py index 19070a5..aa242c1 100644 --- a/test/D/LDC.py +++ b/test/D/LDC.py @@ -1,6 +1,8 @@ #!/usr/bin/env python # -# __COPYRIGHT__ +# MIT License +# +# Copyright The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -20,12 +22,9 @@ # 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. -# # Amended by Russel Winder <russel@russel.org.uk> 2010-05-05 -__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - import TestSCons from os.path import abspath, dirname diff --git a/test/D/SharedObjects/Common/common.py b/test/D/SharedObjects/Common/common.py index 5113cc4..d5588be 100644 --- a/test/D/SharedObjects/Common/common.py +++ b/test/D/SharedObjects/Common/common.py @@ -1,9 +1,9 @@ """ Support functions for all the tests. """ - +# MIT License # -# __COPYRIGHT__ +# Copyright The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -23,9 +23,6 @@ Support functions for all the tests. # 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 TestSCons diff --git a/test/D/SharedObjects/sconstest-dmd.py b/test/D/SharedObjects/sconstest-dmd.py index df6ddeb..7dca880 100644 --- a/test/D/SharedObjects/sconstest-dmd.py +++ b/test/D/SharedObjects/sconstest-dmd.py @@ -2,8 +2,9 @@ Test compiling and executing using the dmd tool. """ +# MIT License # -# __COPYRIGHT__ +# Copyright The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -23,9 +24,6 @@ Test compiling and executing using the dmd tool. # 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__" from Common.common import testForTool testForTool('dmd') diff --git a/test/D/Support/executablesSearch.py b/test/D/Support/executablesSearch.py index e24601c..c7da4ff 100755 --- a/test/D/Support/executablesSearch.py +++ b/test/D/Support/executablesSearch.py @@ -1,11 +1,6 @@ -#! /usr/bin/env python - -""" -Support functions for all the tests. -""" - +# MIT License # -# __COPYRIGHT__ +# Copyright The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -25,9 +20,11 @@ Support functions for all the tests. # 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. -# +#! /usr/bin/env python -__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" +""" +Support functions for all the tests. +""" if __name__ == '__main__': import sys |