Skip to content

Commit d02040b

Browse files
committed
Update compile script, as per the latest version available in Automake (1.11)
Fossil-ID: SVN r3358
1 parent 85d2f79 commit d02040b

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

compile

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#! /bin/sh
22
# Wrapper for compilers which do not understand `-c -o'.
33

4-
scriptversion=2005-05-14.22
4+
scriptversion=2009-10-06.20; # UTC
55

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.
78
# Written by Tom Tromey <[email protected]>.
89
#
910
# This program is free software; you can redistribute it and/or modify
@@ -17,8 +18,7 @@ scriptversion=2005-05-14.22
1718
# GNU General Public License for more details.
1819
#
1920
# 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/>.
2222

2323
# As a special exception to the GNU General Public License, if you
2424
# distribute this file as part of a program that contains a
@@ -103,13 +103,13 @@ if test -z "$ofile" || test -z "$cfile"; then
103103
fi
104104

105105
# 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/'`
107107

108108
# 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
110110
# that we are using for the .o file. Also, base the name on the expected
111111
# 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
113113
while true; do
114114
if mkdir "$lockdir" >/dev/null 2>&1; then
115115
break
@@ -124,9 +124,9 @@ trap "rmdir '$lockdir'; exit 1" 1 2 15
124124
ret=$?
125125

126126
if test -f "$cofile"; then
127-
mv "$cofile" "$ofile"
127+
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
128128
elif test -f "${cofile}bj"; then
129-
mv "${cofile}bj" "$ofile"
129+
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
130130
fi
131131

132132
rmdir "$lockdir"
@@ -138,5 +138,6 @@ exit $ret
138138
# eval: (add-hook 'write-file-hooks 'time-stamp)
139139
# time-stamp-start: "scriptversion="
140140
# time-stamp-format: "%:y-%02m-%02d.%02H"
141-
# time-stamp-end: "$"
141+
# time-stamp-time-zone: "UTC"
142+
# time-stamp-end: "; # UTC"
142143
# End:

0 commit comments

Comments
 (0)