From f36ff530132ecfe7941f80d2d6e5f03f75decf41 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Mon, 15 Sep 2003 12:03:51 +0000 Subject: Correct __COPYRIGHT__ and __revision__ lines in files. Add missing copyright notices. Fix some portability problems with new Tool files. --- bin/restore.sh | 15 +++++++++++++++ src/engine/SCons/Tool/c++.py | 4 ++-- src/engine/SCons/Tool/hpc++.py | 34 ++++++++++++++++++++++++++++++++-- src/engine/SCons/Tool/hplink.py | 8 +++++++- src/engine/SCons/Tool/icl.py | 23 +++++++++++++++++++++++ src/engine/SCons/Tool/midl.py | 4 ++-- src/engine/SCons/Tool/sunlink.py | 8 +++++++- test/SCONS_LIB_DIR.py | 2 +- test/append-action.py | 2 +- test/dependency-cycle.py | 2 +- test/midl.py | 4 ++-- test/option--max-drift.py | 2 -- test/pre-post-actions.py | 2 +- test/sconsign-script.py | 4 ++-- 14 files changed, 96 insertions(+), 18 deletions(-) create mode 100644 bin/restore.sh 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 <&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 -- cgit v0.12