summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/restore.sh15
-rw-r--r--src/engine/SCons/Tool/c++.py4
-rw-r--r--src/engine/SCons/Tool/hpc++.py34
-rw-r--r--src/engine/SCons/Tool/hplink.py8
-rw-r--r--src/engine/SCons/Tool/icl.py23
-rw-r--r--src/engine/SCons/Tool/midl.py4
-rw-r--r--src/engine/SCons/Tool/sunlink.py8
-rw-r--r--test/SCONS_LIB_DIR.py2
-rw-r--r--test/append-action.py2
-rw-r--r--test/dependency-cycle.py2
-rw-r--r--test/midl.py4
-rw-r--r--test/option--max-drift.py2
-rw-r--r--test/pre-post-actions.py2
-rw-r--r--test/sconsign-script.py4
14 files changed, 96 insertions, 18 deletions
diff --git a/bin/restore.sh b/bin/restore.sh
new file mode 100644
index 0000000..2b7a726
--- /dev/null
+++ b/bin/restore.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env sh
+#
+# Simple hack script to restore __revision__ and __COPYRIGHT_ lines
+# to what gets checked in to source. This comes in handy when people
+# send in diffs based on the released source.
+#
+
+for i in `find src test -name '*.py'`; do
+ed $i <<EOF
+/__revision__ = /s/= .*/= "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"/p
+/# Copyright (c) 2001/s/.*/# __COPYRIGHT__/p
+w
+q
+EOF
+done
diff --git a/src/engine/SCons/Tool/c++.py b/src/engine/SCons/Tool/c++.py
index 8ede17e..1a6c6c0 100644
--- a/src/engine/SCons/Tool/c++.py
+++ b/src/engine/SCons/Tool/c++.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003 Steven Knight
+# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = ""
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os.path
diff --git a/src/engine/SCons/Tool/hpc++.py b/src/engine/SCons/Tool/hpc++.py
index b654df8..5b650d6 100644
--- a/src/engine/SCons/Tool/hpc++.py
+++ b/src/engine/SCons/Tool/hpc++.py
@@ -7,6 +7,30 @@ It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
+
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
__revision__ = ""
import os.path
@@ -17,7 +41,13 @@ cplusplus = __import__('c++', globals(), locals(), [])
acc = None
# search for the acc compiler and linker front end
-for dir in os.listdir('/opt'):
+
+try:
+ dirs = os.listdir('/opt')
+except:
+ dirs = []
+
+for dir in dirs:
cc = '/opt/' + dir + '/bin/aCC'
if os.path.exists(cc):
acc = cc
@@ -29,7 +59,7 @@ def generate(env):
cplusplus.generate(env)
if acc:
- env['CXX'] = acc
+ env['CXX'] = acc or 'aCC'
# determine version of aCC
line = os.popen(acc + ' -V 2>&1').readline().rstrip()
if string.find(line, 'aCC: HP ANSI C++') == 0:
diff --git a/src/engine/SCons/Tool/hplink.py b/src/engine/SCons/Tool/hplink.py
index 3f3cd85..7468920 100644
--- a/src/engine/SCons/Tool/hplink.py
+++ b/src/engine/SCons/Tool/hplink.py
@@ -40,7 +40,13 @@ import link
ccLinker = None
# search for the acc compiler and linker front end
-for dir in os.listdir('/opt'):
+
+try:
+ dirs = os.listdir('/opt')
+except:
+ dirs = []
+
+for dir in dirs:
linker = '/opt/' + dir + '/bin/aCC'
if os.path.exists(linker):
ccLinker = linker
diff --git a/src/engine/SCons/Tool/icl.py b/src/engine/SCons/Tool/icl.py
index 666bcd1..ec1e063 100644
--- a/src/engine/SCons/Tool/icl.py
+++ b/src/engine/SCons/Tool/icl.py
@@ -8,6 +8,29 @@ selection method.
"""
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os.path
diff --git a/src/engine/SCons/Tool/midl.py b/src/engine/SCons/Tool/midl.py
index a1f079b..a3f8165 100644
--- a/src/engine/SCons/Tool/midl.py
+++ b/src/engine/SCons/Tool/midl.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003 Steven Knight
+# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "__REVISION__"
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os.path
diff --git a/src/engine/SCons/Tool/sunlink.py b/src/engine/SCons/Tool/sunlink.py
index c73a309..f23917b 100644
--- a/src/engine/SCons/Tool/sunlink.py
+++ b/src/engine/SCons/Tool/sunlink.py
@@ -40,7 +40,13 @@ import link
ccLinker = None
# search for the acc compiler and linker front end
-for dir in os.listdir('/opt'):
+
+try:
+ dirs = os.listdir('/opt')
+except:
+ dirs = []
+
+for dir in dirs:
linker = '/opt/' + dir + '/bin/CC'
if os.path.exists(linker):
ccLinker = linker
diff --git a/test/SCONS_LIB_DIR.py b/test/SCONS_LIB_DIR.py
index 2a9b986..553da1d 100644
--- a/test/SCONS_LIB_DIR.py
+++ b/test/SCONS_LIB_DIR.py
@@ -22,7 +22,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "test/SCONS_LIB_DIR.py __REVISION__ __DATE__ __DEVELOPER__"
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import TestSCons
import os
diff --git a/test/append-action.py b/test/append-action.py
index c8de281..fa3bb64 100644
--- a/test/append-action.py
+++ b/test/append-action.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (c) 2001, 2002 Steven Knight
+# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
diff --git a/test/dependency-cycle.py b/test/dependency-cycle.py
index 194be94..1486c76 100644
--- a/test/dependency-cycle.py
+++ b/test/dependency-cycle.py
@@ -22,7 +22,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "test/dependency-cycle.py __REVISION__ __DATE__ __DEVELOPER__"
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import TestSCons
import TestCmd
diff --git a/test/midl.py b/test/midl.py
index 6c1f836..f2bb5d2 100644
--- a/test/midl.py
+++ b/test/midl.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (c) 2001, 2002, 2003 Steven Knight
+# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -22,7 +22,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "__REVISION__"
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import TestSCons
import sys
diff --git a/test/option--max-drift.py b/test/option--max-drift.py
index 255b3b1..bc26f33 100644
--- a/test/option--max-drift.py
+++ b/test/option--max-drift.py
@@ -24,8 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
import os.path
import os
import string
diff --git a/test/pre-post-actions.py b/test/pre-post-actions.py
index d5340f2..1e69a21 100644
--- a/test/pre-post-actions.py
+++ b/test/pre-post-actions.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (c) 2001, 2002 Steven Knight
+# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
diff --git a/test/sconsign-script.py b/test/sconsign-script.py
index a5c0aa7..24e23a0 100644
--- a/test/sconsign-script.py
+++ b/test/sconsign-script.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (c) 2001, 2002, 2003 Steven Knight
+# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -22,7 +22,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "/home/scons/scons/branch.0/baseline/test/sconsign.py 0.90.D001 2003/06/25 15:32:24 knight"
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os.path
import string