summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool/hpc++.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-08-24 14:44:10 (GMT)
committerSteven Knight <knight@baldmt.com>2003-08-24 14:44:10 (GMT)
commit852e7119fb7c6d6ccc2a4cb2c159445376b97fef (patch)
treed14db00af1a9d01734146c6e5ceceb61b83da6e0 /src/engine/SCons/Tool/hpc++.py
parent189d5b4d754cbd7eefde34aef617c4e3adcd8180 (diff)
downloadSCons-852e7119fb7c6d6ccc2a4cb2c159445376b97fef.zip
SCons-852e7119fb7c6d6ccc2a4cb2c159445376b97fef.tar.gz
SCons-852e7119fb7c6d6ccc2a4cb2c159445376b97fef.tar.bz2
Support for additional UNIX variants: (Christian Engel)
Diffstat (limited to 'src/engine/SCons/Tool/hpc++.py')
-rw-r--r--src/engine/SCons/Tool/hpc++.py44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/engine/SCons/Tool/hpc++.py b/src/engine/SCons/Tool/hpc++.py
new file mode 100644
index 0000000..b654df8
--- /dev/null
+++ b/src/engine/SCons/Tool/hpc++.py
@@ -0,0 +1,44 @@
+"""SCons.Tool.hpc++
+
+Tool-specific initialization for c++ on HP/UX.
+
+There normally shouldn't be any need to import this module directly.
+It will usually be imported through the generic SCons.Tool.Tool()
+selection method.
+
+"""
+__revision__ = ""
+
+import os.path
+import string
+
+cplusplus = __import__('c++', globals(), locals(), [])
+
+acc = None
+
+# search for the acc compiler and linker front end
+for dir in os.listdir('/opt'):
+ cc = '/opt/' + dir + '/bin/aCC'
+ if os.path.exists(cc):
+ acc = cc
+ break
+
+
+def generate(env):
+ """Add Builders and construction variables for g++ to an Environment."""
+ cplusplus.generate(env)
+
+ if acc:
+ env['CXX'] = acc
+ # determine version of aCC
+ line = os.popen(acc + ' -V 2>&1').readline().rstrip()
+ if string.find(line, 'aCC: HP ANSI C++') == 0:
+ env['CXXVERSION'] = string.split(line)[-1]
+
+ if env['PLATFORM'] == 'cygwin':
+ env['SHCXXFLAGS'] = '$CXXFLAGS'
+ else:
+ env['SHCXXFLAGS'] = '$CXXFLAGS +Z'
+
+def exists(env):
+ return acc