diff options
author | Steven Knight <knight@baldmt.com> | 2005-11-19 20:13:46 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2005-11-19 20:13:46 (GMT) |
commit | a63e48e4d02da4d7fa5bbebd2d2b3b18da287cfb (patch) | |
tree | 18aa8e602341e1a1e1eb1bd13f0b039be63c4c9b /src/engine/SCons/Tool/sunc++.py | |
parent | 8ab5f90e399ef8057ec3ee42ae20a819d4472d01 (diff) | |
download | SCons-a63e48e4d02da4d7fa5bbebd2d2b3b18da287cfb.zip SCons-a63e48e4d02da4d7fa5bbebd2d2b3b18da287cfb.tar.gz SCons-a63e48e4d02da4d7fa5bbebd2d2b3b18da287cfb.tar.bz2 |
Add $PKGCHK and $PKGINFO variables for use on Solaris, and make the default $PKGCHECK = /usr/sbin/pkgcheck.
Diffstat (limited to 'src/engine/SCons/Tool/sunc++.py')
-rw-r--r-- | src/engine/SCons/Tool/sunc++.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/engine/SCons/Tool/sunc++.py b/src/engine/SCons/Tool/sunc++.py index 91c0f6c..a6ac10a 100644 --- a/src/engine/SCons/Tool/sunc++.py +++ b/src/engine/SCons/Tool/sunc++.py @@ -45,19 +45,22 @@ def get_cppc(env): cppcPath = env.get('CXX', None) cppcVersion = None + pkginfo = env.subst('$PKGINFO') + pkgchk = env.subst('$PKGCHK') + for package in ['SPROcpl']: - cmd = "pkginfo -l " + package + " 2>/dev/null | grep '^ *VERSION:'" + cmd = "%s -l %s 2>/dev/null | grep '^ *VERSION:'" % (pkginfo, package) line = os.popen(cmd).readline() if line: cppcVersion = line.split()[-1] - cmd = "pkgchk -l " + package + " | grep '^Pathname:.*/bin/CC$' | grep -v '/SC[0-9]*\.[0-9]*/'" + cmd = "%s -l %s | grep '^Pathname:.*/bin/CC$' | grep -v '/SC[0-9]*\.[0-9]*/'" % (pkgchk, package) line = os.popen(cmd).readline() cppcPath = os.path.dirname(line.split()[-1]) break return (cppcPath, 'CC', 'CC', cppcVersion) def generate(env): - """Add Builders and construction variables for SUN PRO C++ to an Environment.""" + """Add Builders and construction variables for SunPRO C++.""" path, cxx, shcxx, version = get_cppc(env) if path: cxx = os.path.join(path, cxx) |