diff options
author | Steven Knight <knight@baldmt.com> | 2009-11-29 05:11:31 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2009-11-29 05:11:31 (GMT) |
commit | eb66f0847662f27850c390ded65d5e22aec19d0d (patch) | |
tree | e52608293dce6c7a6eb4b874941b47c579a284c7 /src/engine/SCons/Tool/sunc++.py | |
parent | db73fef714103833182608cea7f0164d1a2bb70a (diff) | |
download | SCons-eb66f0847662f27850c390ded65d5e22aec19d0d.zip SCons-eb66f0847662f27850c390ded65d5e22aec19d0d.tar.gz SCons-eb66f0847662f27850c390ded65d5e22aec19d0d.tar.bz2 |
Fix c++ compiler detection: correct the order of values returned,
return the dirname of the executables found, not the full path.
Diffstat (limited to 'src/engine/SCons/Tool/sunc++.py')
-rw-r--r-- | src/engine/SCons/Tool/sunc++.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/engine/SCons/Tool/sunc++.py b/src/engine/SCons/Tool/sunc++.py index 164551c..49f90ea 100644 --- a/src/engine/SCons/Tool/sunc++.py +++ b/src/engine/SCons/Tool/sunc++.py @@ -54,10 +54,10 @@ def get_package_info(package_name, pkginfo, pkgchk): except EnvironmentError: pass else: - sadm_re = re.compile('^(\S*/bin/CC)[= ].* %s$' % package_name, re.M) + sadm_re = re.compile('^(\S*/bin/CC)(=\S*)? %s$' % package_name, re.M) sadm_match = sadm_re.search(sadm_contents) if sadm_match: - pathname = sadm_match.group(1) + pathname = os.path.dirname(sadm_match.group(1)) try: p = subprocess.Popen([pkginfo, '-l', package_name], @@ -84,9 +84,9 @@ def get_package_info(package_name, pkginfo, pkgchk): pathname_re = re.compile(r'^Pathname:\s*(.*/bin/CC)$', re.M) pathname_match = pathname_re.search(pkgchk_contents) if pathname_match: - pathname = pathname_match.group(1) + pathname = os.path.dirname(pathname_match.group(1)) - package_info[package_name] = (version, pathname) + package_info[package_name] = (pathname, version) return package_info[package_name] # use the package installer tool lslpp to figure out where cppc and what |