diff options
-rw-r--r-- | doc/man/scons.xml | 2 | ||||
-rw-r--r-- | doc/user/output.xml | 2 | ||||
-rwxr-xr-x | src/CHANGES.txt | 9 | ||||
-rw-r--r-- | src/engine/SCons/Conftest.py | 4 | ||||
-rw-r--r-- | src/engine/SCons/Subst.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Tool/__init__.xml | 30 | ||||
-rw-r--r-- | src/engine/SCons/Tool/suncxx.py | 4 | ||||
-rw-r--r-- | test/Configure/config-h.py | 27 | ||||
-rw-r--r-- | test/Subst/bug3428.py | 55 |
9 files changed, 113 insertions, 22 deletions
diff --git a/doc/man/scons.xml b/doc/man/scons.xml index 78f71e7..b346cac 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -4606,7 +4606,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 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 <scons_example name="output_COMSTR-VERBOSE"> <file name="SConstruct" printme="1"> env = Environment() -if ARGUMENTS.get('VERBOSE') != "1': +if ARGUMENTS.get('VERBOSE') != '1': env['CCCOMSTR'] = "Compiling $TARGET" env['LINKCOMSTR'] = "Linking $TARGET" env.Program('foo.c') diff --git a/src/CHANGES.txt b/src/CHANGES.txt index f1f6e53..260cb91 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -15,13 +15,20 @@ 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 - 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. + + 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. - RELEASE 3.1.1 - Mon, 07 Aug 2019 20:09:12 -0500 From William Deegan: 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 <assert.h> %(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 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): 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. </para> </summary> </cvar> @@ -476,7 +476,10 @@ determine the version of versioned import library. <cvar name="LIBEMITTER"> <summary> <para> -TODO +Contains the emitter specification for the +&b-link-StaticLibrary; builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. </para> </summary> </cvar> @@ -494,10 +497,24 @@ format as &cv-link-SHLIBVERSION;. </summary> </cvar> +<cvar name="LDMODULEEMITTER"> +<summary> +<para> +Contains the emitter specification for the +&b-link-LoadableModule; builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. +</para> +</summary> +</cvar> + <cvar name="SHLIBEMITTER"> <summary> <para> -TODO +Contains the emitter specification for the +&b-link-SharedLibrary; builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. </para> </summary> </cvar> @@ -505,7 +522,10 @@ TODO <cvar name="PROGEMITTER"> <summary> <para> -TODO +Contains the emitter specification for the +&b-link-Program; builder. +The manpage section "Builder Objects" contains +general information on specifying emitters. </para> </summary> </cvar> @@ -514,7 +534,7 @@ TODO <summary> <para> 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, 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: 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 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: |