3
# The contents of this file are subject to the Netscape Public
4
# License Version 1.1 (the "License"); you may not use this file
5
# except in compliance with the License. You may obtain a copy of
6
# the License at http://www.mozilla.org/NPL/
8
# Software distributed under the License is distributed on an "AS
9
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
10
# implied. See the License for the specific language governing
11
# rights and limitations under the License.
13
# The Original Code is mozilla.org code.
15
# The Initial Developer of the Original Code is Netscape
16
# Communications Corporation. Portions created by Netscape are
17
# Copyright (C) 1998 Netscape Communications Corporation. All
24
# Fix brain-damaged compilers that don't understand -o and -c together
26
CC=`echo $1 | sed -e "s|'||g" -e 's|"||g'`
37
[ "${CHECK_O}" = yes ] && {
43
./*.o) OBJECT="`basename $i`"
47
*.o) if [ $i = `basename $i` ]
56
*) OPTS="${OPTS} -o $i"
71
# cc always creates the .o from the .c name
72
OBJ=`basename $C_SRC .c`.o
76
# or the .o from the .s name
77
OBJ=`basename $S_SRC .s`.o
87
${CC} ${OPTS} || exit $?
89
# if there was no -c and -o we're done
90
[ $DASH_C = 1 -a $DASH_O = 1 ] || exit 0
92
# if $OBJ and $OBJECT are the same we're done
93
[ $OBJ = $OBJECT ] && exit 0
95
[ -f $OBJ ] && mv -f $OBJ $OBJECT