summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2008-06-10 05:18:40 (GMT)
committerSteven Knight <knight@baldmt.com>2008-06-10 05:18:40 (GMT)
commit50ba1009a7603e964d3b9a00537c42f177683053 (patch)
tree157829194403f92142df5686c6754b9ca5836a8d /src/engine/SCons
parentca08e32b14859f51f6108abd1ef4a103f6f61250 (diff)
downloadSCons-50ba1009a7603e964d3b9a00537c42f177683053.zip
SCons-50ba1009a7603e964d3b9a00537c42f177683053.tar.gz
SCons-50ba1009a7603e964d3b9a00537c42f177683053.tar.bz2
Merged revisions 2949-2953,2955-3056 via svnmerge from0.98.5
http://scons.tigris.org/svn/scons/branches/core ................ r2955 | stevenknight | 2008-05-18 07:48:43 -0700 (Sun, 18 May 2008) | 2 lines Update lines for next development cycle. ................ r2956 | GregNoel | 2008-05-19 14:24:39 -0700 (Mon, 19 May 2008) | 1 line Fix typo in Mkdir() description ................ r2957 | cournape | 2008-05-19 22:37:17 -0700 (Mon, 19 May 2008) | 1 line sunc++ tool: do not parse pkgchk output if no output available (Fix for #2060). ................ r2958 | cournape | 2008-05-19 23:34:01 -0700 (Mon, 19 May 2008) | 6 lines Do not set cppcPath to CXX if CXX has no dirname. This caused weird behaviour, because cppcPath and cxx were joined together, and scons used things like CC/CC as CXX. ................ r2960 | cournape | 2008-05-20 22:23:12 -0700 (Tue, 20 May 2008) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-2959" from http://scons.tigris.org/svn/scons/branches/pyext ................ r2971 | stevenknight | 2008-05-22 16:01:11 -0700 (Thu, 22 May 2008) | 4 lines Issue 2056: Fix scons.bat so that it returns the SCons exit status even though we're using setlocal + endlocal to avoid polluting the calling user's %PATH% variable. ................ r2972 | stevenknight | 2008-05-22 16:35:00 -0700 (Thu, 22 May 2008) | 2 lines Move generic windows tests from the test/ subdirectory into test/Win32. ................ r2973 | stevenknight | 2008-05-22 18:58:35 -0700 (Thu, 22 May 2008) | 2 lines Fix scoping under Python 1.5 / 2.0 / 2.1. ................ r2976 | cournape | 2008-05-23 04:10:37 -0700 (Fri, 23 May 2008) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-2975" from http://scons.tigris.org/svn/scons/branches/libwithcontext ................ r2978 | GregNoel | 2008-05-23 12:39:42 -0700 (Fri, 23 May 2008) | 1 line script to convert XML issues into CSV spreadsheet ................ r2987 | GregNoel | 2008-05-25 10:57:14 -0700 (Sun, 25 May 2008) | 1 line trivial typo ................ r2989 | pankrat | 2008-05-25 14:42:53 -0700 (Sun, 25 May 2008) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-2988" from http://scons.tigris.org/svn/scons/branches/heapmonitor ................ r2992 | belley | 2008-05-27 08:23:34 -0700 (Tue, 27 May 2008) | 41 lines Fixed the detection of Intel C++ Compiler for EMT64 The table used to check the registry keys for installed versions of the Intel C++ compiler for EMT64 seems erroneous. I have double check using the Intel C++ compiler versions 9.1 and 10.0 on both Windows XP 32-bit and Windows Server2003 64-bits. The registry keys have the form HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\Compilers\C++\100.025\IA32 HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\Compilers\C++\100.025\IA64 HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\Compilers\C++\100.025\EMT64 Benoit Index: src/engine/SCons/Tool/intelc.py =================================================================== *** src/engine/SCons/Tool/intelc.py (revision 2991) --- src/engine/SCons/Tool/intelc.py (working copy) *************** *** 101,108 **** valid_abis = {'ia32' : 'ia32', 'x86' : 'ia32', 'ia64' : 'ia64', ! 'em64t' : 'ia32e', ! 'amd64' : 'ia32e'} if is_linux: valid_abis = {'ia32' : 'ia32', 'x86' : 'ia32', --- 101,108 ---- valid_abis = {'ia32' : 'ia32', 'x86' : 'ia32', 'ia64' : 'ia64', ! 'em64t' : 'em64t', ! 'amd64' : 'em64t'} if is_linux: valid_abis = {'ia32' : 'ia32', 'x86' : 'ia32', ................ r2993 | stevenknight | 2008-05-27 16:22:35 -0700 (Tue, 27 May 2008) | 3 lines Issue 2062: Fix --interactive mode getting "stuck" reporting failures for every build after the first one that fails. ................ r2997 | stevenknight | 2008-05-28 18:18:36 -0700 (Wed, 28 May 2008) | 4 lines Fix the closing message on interrupt to report "building terminated because of errors." Add a missing test.pass_test() call to the end of test/KeyboardInterrupt.py. ................ r2998 | stevenknight | 2008-05-29 08:14:47 -0700 (Thu, 29 May 2008) | 2 lines Issue 2075: Fix the ability to call the Node.FS.File.File() method. ................ r2999 | stevenknight | 2008-05-29 14:12:07 -0700 (Thu, 29 May 2008) | 2 lines Issue 2063: On Mac OS X, install under /usr/local by default. ................ r3017 | stevenknight | 2008-05-30 08:05:26 -0700 (Fri, 30 May 2008) | 3 lines Get the fix for File.File() right this time. Apply the same fix to File.Dir() and File.Entry(), too. ................ r3022 | stevenknight | 2008-06-02 18:52:42 -0700 (Mon, 02 Jun 2008) | 3 lines Fix "deprecated conversion from string constant to char *" warnings in various C++ tests. ................ r3045 | garyo | 2008-06-05 06:05:37 -0700 (Thu, 05 Jun 2008) | 8 lines This fix uses Python sequence comparison to compare the dotted version numbers used in .NET version numbers rather than comparing each element of the list individually. It's more robust and also more correct. I also fixed a Python 1.5.2 compatibility issue (strings didn't have the split method). Original reporter confirms this fixes his issue. ................ r3046 | garyo | 2008-06-05 20:35:27 -0700 (Thu, 05 Jun 2008) | 1 line Minor doc tweaks to Users Guide. ................ r3050 | stevenknight | 2008-06-06 11:38:38 -0700 (Fri, 06 Jun 2008) | 21 lines Merged revisions 2877,2879-2978,2980-3019,3021-3048 via svnmerge from http://scons.tigris.org/svn/scons/branches/fortran_refactor ........ r2980 | cournape | 2008-05-23 21:56:19 -0700 (Fri, 23 May 2008) | 1 line Emit a warning and use as a linker when fortran and c++ codes are mixed. ........ r3000 | cournape | 2008-05-29 21:29:37 -0700 (Thu, 29 May 2008) | 1 line Improve warning when mixing c++ and fortran. ........ r3048 | stevenknight | 2008-06-06 11:30:25 -0700 (Fri, 06 Jun 2008) | 6 lines Issue 2047: update the warning text to make it less alarming. Move the warning classes so they can be suppressed. Add a test of the warning (and suppression) behavior Only issue one warning per SCons invocation, not one per built executable. Update CHANGES.txt and RELEASE.txt. ........ ................ r3051 | stevenknight | 2008-06-07 08:11:46 -0700 (Sat, 07 Jun 2008) | 3 lines Fix the Fortran/C++ link test for deprecation warnings under earlier Python version. ................ r3052 | stevenknight | 2008-06-07 08:12:22 -0700 (Sat, 07 Jun 2008) | 2 lines Add Benoit's EMT64 change that will be released in 0.98.5. ................ r3053 | stevenknight | 2008-06-07 08:21:50 -0700 (Sat, 07 Jun 2008) | 2 lines Update lines for 0.98.5 release. ................ r3054 | stevenknight | 2008-06-07 08:26:04 -0700 (Sat, 07 Jun 2008) | 2 lines Update 0.98.4 versions to 0.98.5. ................
Diffstat (limited to 'src/engine/SCons')
-rw-r--r--src/engine/SCons/Node/FS.py9
-rw-r--r--src/engine/SCons/Script/Main.py18
-rw-r--r--src/engine/SCons/Tool/intelc.py4
-rw-r--r--src/engine/SCons/Tool/link.py15
-rw-r--r--src/engine/SCons/Tool/msvs.py14
-rw-r--r--src/engine/SCons/Tool/sunc++.py34
-rw-r--r--src/engine/SCons/Warnings.py6
7 files changed, 73 insertions, 27 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py
index b154e34..99ae822 100644
--- a/src/engine/SCons/Node/FS.py
+++ b/src/engine/SCons/Node/FS.py
@@ -2150,12 +2150,14 @@ class File(Base):
def Entry(self, name):
"""Create an entry node named 'name' relative to
the SConscript directory of this file."""
- return self.cwd.Entry(name)
+ cwd = self.cwd or self.fs._cwd
+ return cwd.Entry(name)
def Dir(self, name, create=True):
"""Create a directory node named 'name' relative to
the SConscript directory of this file."""
- return self.cwd.Dir(name, create)
+ cwd = self.cwd or self.fs._cwd
+ return cwd.Dir(name, create)
def Dirs(self, pathlist):
"""Create a list of directories relative to the SConscript
@@ -2165,7 +2167,8 @@ class File(Base):
def File(self, name):
"""Create a file node named 'name' relative to
the SConscript directory of this file."""
- return self.cwd.File(name)
+ cwd = self.cwd or self.fs._cwd
+ return cwd.File(name)
#def generate_build_dict(self):
# """Return an appropriate dictionary of values for building
diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py
index 75d0117..ec00737 100644
--- a/src/engine/SCons/Script/Main.py
+++ b/src/engine/SCons/Script/Main.py
@@ -195,14 +195,17 @@ class BuildTask(SCons.Taskmaster.Task):
def do_failed(self, status=2):
_BuildFailures.append(self.exception[1])
global exit_status
+ global this_build_status
if self.options.ignore_errors:
SCons.Taskmaster.Task.executed(self)
elif self.options.keep_going:
SCons.Taskmaster.Task.fail_continue(self)
exit_status = status
+ this_build_status = status
else:
SCons.Taskmaster.Task.fail_stop(self)
exit_status = status
+ this_build_status = status
def executed(self):
t = self.targets[0]
@@ -384,7 +387,9 @@ class QuestionTask(SCons.Taskmaster.Task):
if self.targets[0].get_state() != SCons.Node.up_to_date or \
(self.top and not self.targets[0].exists()):
global exit_status
+ global this_build_status
exit_status = 1
+ this_build_status = 1
self.tm.stop()
def executed(self):
@@ -428,7 +433,8 @@ print_stacktrace = 0
print_time = 0
sconscript_time = 0
cumulative_command_time = 0
-exit_status = 0 # exit status, assume success by default
+exit_status = 0 # final exit status, assume success by default
+this_build_status = 0 # "exit status" of an individual build
num_jobs = None
delayed_warnings = []
@@ -714,6 +720,7 @@ def version_string(label, module):
def _main(parser):
global exit_status
+ global this_build_status
options = parser.values
@@ -727,6 +734,7 @@ def _main(parser):
default_warnings = [ SCons.Warnings.CorruptSConsignWarning,
SCons.Warnings.DeprecatedWarning,
SCons.Warnings.DuplicateEnvironmentWarning,
+ SCons.Warnings.LinkWarning,
SCons.Warnings.MissingSConscriptWarning,
SCons.Warnings.NoMD5ModuleWarning,
SCons.Warnings.NoMetaclassSupportWarning,
@@ -734,6 +742,7 @@ def _main(parser):
SCons.Warnings.NoParallelSupportWarning,
SCons.Warnings.MisleadingKeywordsWarning,
SCons.Warnings.StackSizeWarning, ]
+
for warning in default_warnings:
SCons.Warnings.enableWarningClass(warning)
SCons.Warnings._warningOut = _scons_internal_warning
@@ -974,6 +983,9 @@ def _main(parser):
def _build_targets(fs, options, targets, target_top):
+ global this_build_status
+ this_build_status = 0
+
progress_display.set_mode(not (options.no_progress or options.silent))
display.set_mode(not options.silent)
SCons.Action.print_actions = not options.silent
@@ -1143,9 +1155,11 @@ def _build_targets(fs, options, targets, target_top):
if jobs.were_interrupted():
progress_display("scons: Build interrupted.")
global exit_status
+ global this_build_status
exit_status = 2
+ this_build_status = 2
- if exit_status:
+ if this_build_status:
progress_display("scons: " + failure_message)
else:
progress_display("scons: " + closing_message)
diff --git a/src/engine/SCons/Tool/intelc.py b/src/engine/SCons/Tool/intelc.py
index 020a6f7..d6f19c2 100644
--- a/src/engine/SCons/Tool/intelc.py
+++ b/src/engine/SCons/Tool/intelc.py
@@ -101,8 +101,8 @@ def check_abi(abi):
valid_abis = {'ia32' : 'ia32',
'x86' : 'ia32',
'ia64' : 'ia64',
- 'em64t' : 'ia32e',
- 'amd64' : 'ia32e'}
+ 'em64t' : 'em64t',
+ 'amd64' : 'em64t'}
if is_linux:
valid_abis = {'ia32' : 'ia32',
'x86' : 'ia32',
diff --git a/src/engine/SCons/Tool/link.py b/src/engine/SCons/Tool/link.py
index 866df08..4522ba1 100644
--- a/src/engine/SCons/Tool/link.py
+++ b/src/engine/SCons/Tool/link.py
@@ -36,18 +36,27 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import SCons.Defaults
import SCons.Tool
import SCons.Util
-import SCons.Errors
+import SCons.Warnings
from SCons.Tool.FortranCommon import isfortran
cplusplus = __import__('c++', globals(), locals(), [])
+issued_mixed_link_warning = False
+
def smart_link(source, target, env, for_signature):
has_cplusplus = cplusplus.iscplusplus(source)
has_fortran = isfortran(env, source)
if has_cplusplus and has_fortran:
- raise SCons.Errors.InternalError(
- "Sorry, scons cannot yet link c++ and fortran code together.")
+ global issued_mixed_link_warning
+ if not issued_mixed_link_warning:
+ msg = "Using $CXX to link Fortran and C++ code together.\n\t" + \
+ "This may generate a buggy executable if the %s\n\t" + \
+ "compiler does not know how to deal with Fortran runtimes."
+ SCons.Warnings.warn(SCons.Warnings.FortranCxxMixWarning,
+ msg % repr(env.subst('$CXX')))
+ issued_mixed_link_warning = True
+ return '$CXX'
elif has_fortran:
return '$FORTRAN'
elif has_cplusplus:
diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py
index ca1b5f6..e9d73da 100644
--- a/src/engine/SCons/Tool/msvs.py
+++ b/src/engine/SCons/Tool/msvs.py
@@ -1393,14 +1393,12 @@ def get_msvs_install_dirs(version = None, vs8suite = None):
# since version numbers aren't really floats...
aa = a[1:]
bb = b[1:]
- aal = aa.split('.')
- bbl = bb.split('.')
- c = int(bbl[0]) - int(aal[0])
- if c == 0:
- c = int(bbl[1]) - int(aal[1])
- if c == 0:
- c = int(bbl[2]) - int(aal[2])
- return c
+ aal = string.split(aa, '.')
+ bbl = string.split(bb, '.')
+ # sequence comparison in python is lexicographical
+ # which is exactly what we want.
+ # Note we sort backwards so the highest version is first.
+ return cmp(bbl,aal)
installed_framework_versions.sort(versrt)
diff --git a/src/engine/SCons/Tool/sunc++.py b/src/engine/SCons/Tool/sunc++.py
index 36316cb..95b4516 100644
--- a/src/engine/SCons/Tool/sunc++.py
+++ b/src/engine/SCons/Tool/sunc++.py
@@ -42,21 +42,37 @@ cplusplus = __import__('c++', globals(), locals(), [])
# use the package installer tool lslpp to figure out where cppc and what
# version of it is installed
def get_cppc(env):
- cppcPath = env.get('CXX', None)
+ cxx = env.get('CXX', None)
+ if cxx:
+ cppcPath = os.path.dirname(cxx)
+ else:
+ cppcPath = None
+
cppcVersion = None
pkginfo = env.subst('$PKGINFO')
pkgchk = env.subst('$PKGCHK')
- for package in ['SPROcpl']:
- cmd = "%s -l %s 2>/dev/null | grep '^ *VERSION:'" % (pkginfo, package)
- line = os.popen(cmd).readline()
- if line:
- cppcVersion = line.split()[-1]
- cmd = "%s -l %s 2>/dev/null | grep '^Pathname:.*/bin/CC$' | grep -v '/SC[0-9]*\.[0-9]*/'" % (pkgchk, package)
+ def look_pkg_db(pkginfo=pkginfo, pkgchk=pkgchk):
+ version = None
+ path = None
+ for package in ['SPROcpl']:
+ cmd = "%s -l %s 2>/dev/null | grep '^ *VERSION:'" % (pkginfo, package)
line = os.popen(cmd).readline()
- cppcPath = os.path.dirname(line.split()[-1])
- break
+ if line:
+ version = line.split()[-1]
+ cmd = "%s -l %s 2>/dev/null | grep '^Pathname:.*/bin/CC$' | grep -v '/SC[0-9]*\.[0-9]*/'" % (pkgchk, package)
+ line = os.popen(cmd).readline()
+ if line:
+ path = os.path.dirname(line.split()[-1])
+ break
+
+ return path, version
+
+ path, version = look_pkg_db()
+ if path and version:
+ cppcPath, cppcVersion = path, version
+
return (cppcPath, 'CC', 'CC', cppcVersion)
def generate(env):
diff --git a/src/engine/SCons/Warnings.py b/src/engine/SCons/Warnings.py
index c9b8a26..5af9263 100644
--- a/src/engine/SCons/Warnings.py
+++ b/src/engine/SCons/Warnings.py
@@ -64,6 +64,9 @@ class DeprecatedTargetSignaturesWarning(DeprecatedWarning):
class DuplicateEnvironmentWarning(Warning):
pass
+class LinkWarning(Warning):
+ pass
+
class MisleadingKeywordsWarning(Warning):
pass
@@ -91,6 +94,9 @@ class ReservedVariableWarning(Warning):
class StackSizeWarning(Warning):
pass
+class FortranCxxMixWarning(LinkWarning):
+ pass
+
_warningAsException = 0
# The below is a list of 2-tuples. The first element is a class object.