Commits

Anonymous committed ac38020

Add $PKGCHK and $PKGINFO variables for use on Solaris, and make the default $PKGCHECK = /usr/sbin/pkgcheck.

Comments (0)

Files changed (5)

   - Add /usr/ccs/bin to the end of the the default external execution
     PATH on Solaris.
 
+  - Add $PKGCHK and $PKGINFO variables for use on Solaris when searching
+    for the SunPRO C++ compiler.  Make the default value for $PKGCHK
+    be /usr/sbin/pgkchk (since /usr/sbin isn't usually on the external
+    execution $PATH).
+
   From Chen Lee:
 
   - Handle Visual Studio project and solution files in Unicode.

src/engine/MANIFEST-xml.in

 SCons/Environment.xml
 SCons/Platform/__init__.xml
 SCons/Platform/posix.xml
+SCons/Platform/sunos.xml
 SCons/Platform/win32.xml
 SCons/Tool/386asm.xml
 SCons/Tool/aixcc.xml

src/engine/SCons/Platform/sunos.py

     # Based on sunSparc 8:32bit
     # ARG_MAX=1048320 - 3000 for environment expansion
     env['MAXLINELENGTH']  = 1045320
+    env['PKGINFO'] = 'pkginfo'
+    env['PKGCHK'] = '/usr/sbin/pkgchk'
     env['ENV']['PATH'] = env['ENV']['PATH'] + ':/usr/ccs/bin'

src/engine/SCons/Platform/sunos.xml

+<!--
+__COPYRIGHT__
+
+This file is processed by the bin/SConsDoc.py module.
+See its __doc__ string for a discussion of the format.
+-->
+
+<cvar name="PKGCHK">
+<summary>
+On Solaris systems,
+the package-checking program that will
+be used (along with &cv-PKGINFO;)
+to look for installed versions of
+the Sun PRO C++ compiler.
+The default is
+<filename>/usr/sbin/pgkchk</filename>.
+</summary>
+</cvar>
+
+<cvar name="PKGINFO">
+<summary>
+On Solaris systems,
+the package information program that will
+be used (along with &cv-PKGCHK;)
+to look for installed versions of
+the Sun PRO C++ compiler.
+The default is
+<filename>pkginfo</filename>.
+</summary>
+</cvar>

src/engine/SCons/Tool/sunc++.py

     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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.