1
1
#! /bin/sh
2
2
# Wrapper for compilers which do not understand `-c -o'.
3
3
4
- scriptversion=2005-05-14.22
4
+ scriptversion=2009-10-06.20 ; # UTC
5
5
6
- # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
6
+ # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
7
+ # Foundation, Inc.
7
8
# Written by Tom Tromey <[email protected] >.
8
9
#
9
10
# This program is free software; you can redistribute it and/or modify
@@ -17,8 +18,7 @@ scriptversion=2005-05-14.22
17
18
# GNU General Public License for more details.
18
19
#
19
20
# You should have received a copy of the GNU General Public License
20
- # along with this program; if not, write to the Free Software
21
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
22
22
23
23
# As a special exception to the GNU General Public License, if you
24
24
# distribute this file as part of a program that contains a
@@ -103,13 +103,13 @@ if test -z "$ofile" || test -z "$cfile"; then
103
103
fi
104
104
105
105
# Name of file we expect compiler to create.
106
- cofile=` echo " $cfile " | sed -e ' s|^.*/|| ' -e ' s/\.c$/.o/' `
106
+ cofile=` echo " $cfile " | sed ' s|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/' `
107
107
108
108
# Create the lock directory.
109
- # Note: use `[/.-]' here to ensure that we don't use the same name
109
+ # Note: use `[/\\: .-]' here to ensure that we don't use the same name
110
110
# that we are using for the .o file. Also, base the name on the expected
111
111
# object file name, since that is what matters with a parallel build.
112
- lockdir=` echo " $cofile " | sed -e ' s|[/.-]|_|g' ` .d
112
+ lockdir=` echo " $cofile " | sed -e ' s|[/\\: .-]|_|g' ` .d
113
113
while true ; do
114
114
if mkdir " $lockdir " > /dev/null 2>&1 ; then
115
115
break
@@ -124,9 +124,9 @@ trap "rmdir '$lockdir'; exit 1" 1 2 15
124
124
ret=$?
125
125
126
126
if test -f " $cofile " ; then
127
- mv " $cofile " " $ofile "
127
+ test " $cofile " = " $ofile " || mv " $cofile " " $ofile "
128
128
elif test -f " ${cofile} bj" ; then
129
- mv " ${cofile} bj" " $ofile "
129
+ test " ${cofile} bj " = " $ofile " || mv " ${cofile} bj" " $ofile "
130
130
fi
131
131
132
132
rmdir " $lockdir "
@@ -138,5 +138,6 @@ exit $ret
138
138
# eval: (add-hook 'write-file-hooks 'time-stamp)
139
139
# time-stamp-start: "scriptversion="
140
140
# time-stamp-format: "%:y-%02m-%02d.%02H"
141
- # time-stamp-end: "$"
141
+ # time-stamp-time-zone: "UTC"
142
+ # time-stamp-end: "; # UTC"
142
143
# End:
0 commit comments