|
Packit Service |
50ad14 |
#! /bin/sh
|
|
Packit Service |
50ad14 |
# depcomp - compile a program generating dependencies as side-effects
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
scriptversion=2012-03-27.16; # UTC
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
|
|
Packit Service |
50ad14 |
# 2011, 2012 Free Software Foundation, Inc.
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# This program is free software; you can redistribute it and/or modify
|
|
Packit Service |
50ad14 |
# it under the terms of the GNU General Public License as published by
|
|
Packit Service |
50ad14 |
# the Free Software Foundation; either version 2, or (at your option)
|
|
Packit Service |
50ad14 |
# any later version.
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# This program is distributed in the hope that it will be useful,
|
|
Packit Service |
50ad14 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
50ad14 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit Service |
50ad14 |
# GNU General Public License for more details.
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# You should have received a copy of the GNU General Public License
|
|
Packit Service |
50ad14 |
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# As a special exception to the GNU General Public License, if you
|
|
Packit Service |
50ad14 |
# distribute this file as part of a program that contains a
|
|
Packit Service |
50ad14 |
# configuration script generated by Autoconf, you may include it under
|
|
Packit Service |
50ad14 |
# the same distribution terms that you use for the rest of that program.
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
case $1 in
|
|
Packit Service |
50ad14 |
'')
|
|
Packit Service |
50ad14 |
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
|
Packit Service |
50ad14 |
exit 1;
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
-h | --h*)
|
|
Packit Service |
50ad14 |
cat <<\EOF
|
|
Packit Service |
50ad14 |
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
Run PROGRAMS ARGS to compile a file, generating dependencies
|
|
Packit Service |
50ad14 |
as side-effects.
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
Environment variables:
|
|
Packit Service |
50ad14 |
depmode Dependency tracking mode.
|
|
Packit Service |
50ad14 |
source Source file read by 'PROGRAMS ARGS'.
|
|
Packit Service |
50ad14 |
object Object file output by 'PROGRAMS ARGS'.
|
|
Packit Service |
50ad14 |
DEPDIR directory where to store dependencies.
|
|
Packit Service |
50ad14 |
depfile Dependency file to output.
|
|
Packit Service |
50ad14 |
tmpdepfile Temporary file to use when outputting dependencies.
|
|
Packit Service |
50ad14 |
libtool Whether libtool is used (yes/no).
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
Report bugs to <bug-automake@gnu.org>.
|
|
Packit Service |
50ad14 |
EOF
|
|
Packit Service |
50ad14 |
exit $?
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
-v | --v*)
|
|
Packit Service |
50ad14 |
echo "depcomp $scriptversion"
|
|
Packit Service |
50ad14 |
exit $?
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
esac
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# A tabulation character.
|
|
Packit Service |
50ad14 |
tab=' '
|
|
Packit Service |
50ad14 |
# A newline character.
|
|
Packit Service |
50ad14 |
nl='
|
|
Packit Service |
50ad14 |
'
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
|
Packit Service |
50ad14 |
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
|
Packit Service |
50ad14 |
exit 1
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
|
Packit Service |
50ad14 |
depfile=${depfile-`echo "$object" |
|
|
Packit Service |
50ad14 |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
|
Packit Service |
50ad14 |
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile"
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# Some modes work just like other modes, but use different flags. We
|
|
Packit Service |
50ad14 |
# parameterize here, but still list the modes in the big case below,
|
|
Packit Service |
50ad14 |
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
|
Packit Service |
50ad14 |
# here, because this file can only contain one case statement.
|
|
Packit Service |
50ad14 |
if test "$depmode" = hp; then
|
|
Packit Service |
50ad14 |
# HP compiler uses -M and no extra arg.
|
|
Packit Service |
50ad14 |
gccflag=-M
|
|
Packit Service |
50ad14 |
depmode=gcc
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
if test "$depmode" = dashXmstdout; then
|
|
Packit Service |
50ad14 |
# This is just like dashmstdout with a different argument.
|
|
Packit Service |
50ad14 |
dashmflag=-xM
|
|
Packit Service |
50ad14 |
depmode=dashmstdout
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
cygpath_u="cygpath -u -f -"
|
|
Packit Service |
50ad14 |
if test "$depmode" = msvcmsys; then
|
|
Packit Service |
50ad14 |
# This is just like msvisualcpp but w/o cygpath translation.
|
|
Packit Service |
50ad14 |
# Just convert the backslash-escaped backslashes to single forward
|
|
Packit Service |
50ad14 |
# slashes to satisfy depend.m4
|
|
Packit Service |
50ad14 |
cygpath_u='sed s,\\\\,/,g'
|
|
Packit Service |
50ad14 |
depmode=msvisualcpp
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
if test "$depmode" = msvc7msys; then
|
|
Packit Service |
50ad14 |
# This is just like msvc7 but w/o cygpath translation.
|
|
Packit Service |
50ad14 |
# Just convert the backslash-escaped backslashes to single forward
|
|
Packit Service |
50ad14 |
# slashes to satisfy depend.m4
|
|
Packit Service |
50ad14 |
cygpath_u='sed s,\\\\,/,g'
|
|
Packit Service |
50ad14 |
depmode=msvc7
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
if test "$depmode" = xlc; then
|
|
Packit Service |
50ad14 |
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
|
|
Packit Service |
50ad14 |
gccflag=-qmakedep=gcc,-MF
|
|
Packit Service |
50ad14 |
depmode=gcc
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
case "$depmode" in
|
|
Packit Service |
50ad14 |
gcc3)
|
|
Packit Service |
50ad14 |
## gcc 3 implements dependency tracking that does exactly what
|
|
Packit Service |
50ad14 |
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
|
Packit Service |
50ad14 |
## it if -MD -MP comes after the -MF stuff. Hmm.
|
|
Packit Service |
50ad14 |
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
|
Packit Service |
50ad14 |
## the command line argument order; so add the flags where they
|
|
Packit Service |
50ad14 |
## appear in depend2.am. Note that the slowdown incurred here
|
|
Packit Service |
50ad14 |
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
|
Packit Service |
50ad14 |
for arg
|
|
Packit Service |
50ad14 |
do
|
|
Packit Service |
50ad14 |
case $arg in
|
|
Packit Service |
50ad14 |
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
|
Packit Service |
50ad14 |
*) set fnord "$@" "$arg" ;;
|
|
Packit Service |
50ad14 |
esac
|
|
Packit Service |
50ad14 |
shift # fnord
|
|
Packit Service |
50ad14 |
shift # $arg
|
|
Packit Service |
50ad14 |
done
|
|
Packit Service |
50ad14 |
"$@"
|
|
Packit Service |
50ad14 |
stat=$?
|
|
Packit Service |
50ad14 |
if test $stat -eq 0; then :
|
|
Packit Service |
50ad14 |
else
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile"
|
|
Packit Service |
50ad14 |
exit $stat
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
mv "$tmpdepfile" "$depfile"
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
gcc)
|
|
Packit Service |
50ad14 |
## There are various ways to get dependency output from gcc. Here's
|
|
Packit Service |
50ad14 |
## why we pick this rather obscure method:
|
|
Packit Service |
50ad14 |
## - Don't want to use -MD because we'd like the dependencies to end
|
|
Packit Service |
50ad14 |
## up in a subdir. Having to rename by hand is ugly.
|
|
Packit Service |
50ad14 |
## (We might end up doing this anyway to support other compilers.)
|
|
Packit Service |
50ad14 |
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
|
Packit Service |
50ad14 |
## -MM, not -M (despite what the docs say).
|
|
Packit Service |
50ad14 |
## - Using -M directly means running the compiler twice (even worse
|
|
Packit Service |
50ad14 |
## than renaming).
|
|
Packit Service |
50ad14 |
if test -z "$gccflag"; then
|
|
Packit Service |
50ad14 |
gccflag=-MD,
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
"$@" -Wp,"$gccflag$tmpdepfile"
|
|
Packit Service |
50ad14 |
stat=$?
|
|
Packit Service |
50ad14 |
if test $stat -eq 0; then :
|
|
Packit Service |
50ad14 |
else
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile"
|
|
Packit Service |
50ad14 |
exit $stat
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
rm -f "$depfile"
|
|
Packit Service |
50ad14 |
echo "$object : \\" > "$depfile"
|
|
Packit Service |
50ad14 |
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
|
Packit Service |
50ad14 |
## The second -e expression handles DOS-style file names with drive letters.
|
|
Packit Service |
50ad14 |
sed -e 's/^[^:]*: / /' \
|
|
Packit Service |
50ad14 |
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
|
Packit Service |
50ad14 |
## This next piece of magic avoids the "deleted header file" problem.
|
|
Packit Service |
50ad14 |
## The problem is that when a header file which appears in a .P file
|
|
Packit Service |
50ad14 |
## is deleted, the dependency causes make to die (because there is
|
|
Packit Service |
50ad14 |
## typically no way to rebuild the header). We avoid this by adding
|
|
Packit Service |
50ad14 |
## dummy dependencies for each header file. Too bad gcc doesn't do
|
|
Packit Service |
50ad14 |
## this for us directly.
|
|
Packit Service |
50ad14 |
tr ' ' "$nl" < "$tmpdepfile" |
|
|
Packit Service |
50ad14 |
## Some versions of gcc put a space before the ':'. On the theory
|
|
Packit Service |
50ad14 |
## that the space means something, we add a space to the output as
|
|
Packit Service |
50ad14 |
## well. hp depmode also adds that space, but also prefixes the VPATH
|
|
Packit Service |
50ad14 |
## to the object. Take care to not repeat it in the output.
|
|
Packit Service |
50ad14 |
## Some versions of the HPUX 10.20 sed can't process this invocation
|
|
Packit Service |
50ad14 |
## correctly. Breaking it into two sed invocations is a workaround.
|
|
Packit Service |
50ad14 |
sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
|
Packit Service |
50ad14 |
| sed -e 's/$/ :/' >> "$depfile"
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile"
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
hp)
|
|
Packit Service |
50ad14 |
# This case exists only to let depend.m4 do its work. It works by
|
|
Packit Service |
50ad14 |
# looking at the text of this script. This case will never be run,
|
|
Packit Service |
50ad14 |
# since it is checked for above.
|
|
Packit Service |
50ad14 |
exit 1
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
sgi)
|
|
Packit Service |
50ad14 |
if test "$libtool" = yes; then
|
|
Packit Service |
50ad14 |
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
|
Packit Service |
50ad14 |
else
|
|
Packit Service |
50ad14 |
"$@" -MDupdate "$tmpdepfile"
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
stat=$?
|
|
Packit Service |
50ad14 |
if test $stat -eq 0; then :
|
|
Packit Service |
50ad14 |
else
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile"
|
|
Packit Service |
50ad14 |
exit $stat
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
rm -f "$depfile"
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
|
Packit Service |
50ad14 |
echo "$object : \\" > "$depfile"
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# Clip off the initial element (the dependent). Don't try to be
|
|
Packit Service |
50ad14 |
# clever and replace this with sed code, as IRIX sed won't handle
|
|
Packit Service |
50ad14 |
# lines with more than a fixed number of characters (4096 in
|
|
Packit Service |
50ad14 |
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
|
Packit Service |
50ad14 |
# the IRIX cc adds comments like '#:fec' to the end of the
|
|
Packit Service |
50ad14 |
# dependency line.
|
|
Packit Service |
50ad14 |
tr ' ' "$nl" < "$tmpdepfile" \
|
|
Packit Service |
50ad14 |
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
|
Packit Service |
50ad14 |
tr "$nl" ' ' >> "$depfile"
|
|
Packit Service |
50ad14 |
echo >> "$depfile"
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# The second pass generates a dummy entry for each header file.
|
|
Packit Service |
50ad14 |
tr ' ' "$nl" < "$tmpdepfile" \
|
|
Packit Service |
50ad14 |
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
|
Packit Service |
50ad14 |
>> "$depfile"
|
|
Packit Service |
50ad14 |
else
|
|
Packit Service |
50ad14 |
# The sourcefile does not contain any dependencies, so just
|
|
Packit Service |
50ad14 |
# store a dummy comment line, to avoid errors with the Makefile
|
|
Packit Service |
50ad14 |
# "include basename.Plo" scheme.
|
|
Packit Service |
50ad14 |
echo "#dummy" > "$depfile"
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile"
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
xlc)
|
|
Packit Service |
50ad14 |
# This case exists only to let depend.m4 do its work. It works by
|
|
Packit Service |
50ad14 |
# looking at the text of this script. This case will never be run,
|
|
Packit Service |
50ad14 |
# since it is checked for above.
|
|
Packit Service |
50ad14 |
exit 1
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
aix)
|
|
Packit Service |
50ad14 |
# The C for AIX Compiler uses -M and outputs the dependencies
|
|
Packit Service |
50ad14 |
# in a .u file. In older versions, this file always lives in the
|
|
Packit Service |
50ad14 |
# current directory. Also, the AIX compiler puts '$object:' at the
|
|
Packit Service |
50ad14 |
# start of each line; $object doesn't have directory information.
|
|
Packit Service |
50ad14 |
# Version 6 uses the directory in both cases.
|
|
Packit Service |
50ad14 |
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
|
Packit Service |
50ad14 |
test "x$dir" = "x$object" && dir=
|
|
Packit Service |
50ad14 |
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
|
Packit Service |
50ad14 |
if test "$libtool" = yes; then
|
|
Packit Service |
50ad14 |
tmpdepfile1=$dir$base.u
|
|
Packit Service |
50ad14 |
tmpdepfile2=$base.u
|
|
Packit Service |
50ad14 |
tmpdepfile3=$dir.libs/$base.u
|
|
Packit Service |
50ad14 |
"$@" -Wc,-M
|
|
Packit Service |
50ad14 |
else
|
|
Packit Service |
50ad14 |
tmpdepfile1=$dir$base.u
|
|
Packit Service |
50ad14 |
tmpdepfile2=$dir$base.u
|
|
Packit Service |
50ad14 |
tmpdepfile3=$dir$base.u
|
|
Packit Service |
50ad14 |
"$@" -M
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
stat=$?
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
if test $stat -eq 0; then :
|
|
Packit Service |
50ad14 |
else
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
|
Packit Service |
50ad14 |
exit $stat
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
|
Packit Service |
50ad14 |
do
|
|
Packit Service |
50ad14 |
test -f "$tmpdepfile" && break
|
|
Packit Service |
50ad14 |
done
|
|
Packit Service |
50ad14 |
if test -f "$tmpdepfile"; then
|
|
Packit Service |
50ad14 |
# Each line is of the form 'foo.o: dependent.h'.
|
|
Packit Service |
50ad14 |
# Do two passes, one to just change these to
|
|
Packit Service |
50ad14 |
# '$object: dependent.h' and one to simply 'dependent.h:'.
|
|
Packit Service |
50ad14 |
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
|
Packit Service |
50ad14 |
sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
|
Packit Service |
50ad14 |
else
|
|
Packit Service |
50ad14 |
# The sourcefile does not contain any dependencies, so just
|
|
Packit Service |
50ad14 |
# store a dummy comment line, to avoid errors with the Makefile
|
|
Packit Service |
50ad14 |
# "include basename.Plo" scheme.
|
|
Packit Service |
50ad14 |
echo "#dummy" > "$depfile"
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile"
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
icc)
|
|
Packit Service |
50ad14 |
# Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
|
|
Packit Service |
50ad14 |
# However on
|
|
Packit Service |
50ad14 |
# $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
|
Packit Service |
50ad14 |
# ICC 7.0 will fill foo.d with something like
|
|
Packit Service |
50ad14 |
# foo.o: sub/foo.c
|
|
Packit Service |
50ad14 |
# foo.o: sub/foo.h
|
|
Packit Service |
50ad14 |
# which is wrong. We want
|
|
Packit Service |
50ad14 |
# sub/foo.o: sub/foo.c
|
|
Packit Service |
50ad14 |
# sub/foo.o: sub/foo.h
|
|
Packit Service |
50ad14 |
# sub/foo.c:
|
|
Packit Service |
50ad14 |
# sub/foo.h:
|
|
Packit Service |
50ad14 |
# ICC 7.1 will output
|
|
Packit Service |
50ad14 |
# foo.o: sub/foo.c sub/foo.h
|
|
Packit Service |
50ad14 |
# and will wrap long lines using '\':
|
|
Packit Service |
50ad14 |
# foo.o: sub/foo.c ... \
|
|
Packit Service |
50ad14 |
# sub/foo.h ... \
|
|
Packit Service |
50ad14 |
# ...
|
|
Packit Service |
50ad14 |
# tcc 0.9.26 (FIXME still under development at the moment of writing)
|
|
Packit Service |
50ad14 |
# will emit a similar output, but also prepend the continuation lines
|
|
Packit Service |
50ad14 |
# with horizontal tabulation characters.
|
|
Packit Service |
50ad14 |
"$@" -MD -MF "$tmpdepfile"
|
|
Packit Service |
50ad14 |
stat=$?
|
|
Packit Service |
50ad14 |
if test $stat -eq 0; then :
|
|
Packit Service |
50ad14 |
else
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile"
|
|
Packit Service |
50ad14 |
exit $stat
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
rm -f "$depfile"
|
|
Packit Service |
50ad14 |
# Each line is of the form 'foo.o: dependent.h',
|
|
Packit Service |
50ad14 |
# or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
|
|
Packit Service |
50ad14 |
# Do two passes, one to just change these to
|
|
Packit Service |
50ad14 |
# '$object: dependent.h' and one to simply 'dependent.h:'.
|
|
Packit Service |
50ad14 |
sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \
|
|
Packit Service |
50ad14 |
< "$tmpdepfile" > "$depfile"
|
|
Packit Service |
50ad14 |
sed '
|
|
Packit Service |
50ad14 |
s/[ '"$tab"'][ '"$tab"']*/ /g
|
|
Packit Service |
50ad14 |
s/^ *//
|
|
Packit Service |
50ad14 |
s/ *\\*$//
|
|
Packit Service |
50ad14 |
s/^[^:]*: *//
|
|
Packit Service |
50ad14 |
/^$/d
|
|
Packit Service |
50ad14 |
/:$/d
|
|
Packit Service |
50ad14 |
s/$/ :/
|
|
Packit Service |
50ad14 |
' < "$tmpdepfile" >> "$depfile"
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile"
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
hp2)
|
|
Packit Service |
50ad14 |
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
|
Packit Service |
50ad14 |
# compilers, which have integrated preprocessors. The correct option
|
|
Packit Service |
50ad14 |
# to use with these is +Maked; it writes dependencies to a file named
|
|
Packit Service |
50ad14 |
# 'foo.d', which lands next to the object file, wherever that
|
|
Packit Service |
50ad14 |
# happens to be.
|
|
Packit Service |
50ad14 |
# Much of this is similar to the tru64 case; see comments there.
|
|
Packit Service |
50ad14 |
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
|
Packit Service |
50ad14 |
test "x$dir" = "x$object" && dir=
|
|
Packit Service |
50ad14 |
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
|
Packit Service |
50ad14 |
if test "$libtool" = yes; then
|
|
Packit Service |
50ad14 |
tmpdepfile1=$dir$base.d
|
|
Packit Service |
50ad14 |
tmpdepfile2=$dir.libs/$base.d
|
|
Packit Service |
50ad14 |
"$@" -Wc,+Maked
|
|
Packit Service |
50ad14 |
else
|
|
Packit Service |
50ad14 |
tmpdepfile1=$dir$base.d
|
|
Packit Service |
50ad14 |
tmpdepfile2=$dir$base.d
|
|
Packit Service |
50ad14 |
"$@" +Maked
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
stat=$?
|
|
Packit Service |
50ad14 |
if test $stat -eq 0; then :
|
|
Packit Service |
50ad14 |
else
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
|
Packit Service |
50ad14 |
exit $stat
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
|
Packit Service |
50ad14 |
do
|
|
Packit Service |
50ad14 |
test -f "$tmpdepfile" && break
|
|
Packit Service |
50ad14 |
done
|
|
Packit Service |
50ad14 |
if test -f "$tmpdepfile"; then
|
|
Packit Service |
50ad14 |
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
|
Packit Service |
50ad14 |
# Add 'dependent.h:' lines.
|
|
Packit Service |
50ad14 |
sed -ne '2,${
|
|
Packit Service |
50ad14 |
s/^ *//
|
|
Packit Service |
50ad14 |
s/ \\*$//
|
|
Packit Service |
50ad14 |
s/$/:/
|
|
Packit Service |
50ad14 |
p
|
|
Packit Service |
50ad14 |
}' "$tmpdepfile" >> "$depfile"
|
|
Packit Service |
50ad14 |
else
|
|
Packit Service |
50ad14 |
echo "#dummy" > "$depfile"
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile" "$tmpdepfile2"
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
tru64)
|
|
Packit Service |
50ad14 |
# The Tru64 compiler uses -MD to generate dependencies as a side
|
|
Packit Service |
50ad14 |
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
|
Packit Service |
50ad14 |
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
|
Packit Service |
50ad14 |
# dependencies in 'foo.d' instead, so we check for that too.
|
|
Packit Service |
50ad14 |
# Subdirectories are respected.
|
|
Packit Service |
50ad14 |
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
|
Packit Service |
50ad14 |
test "x$dir" = "x$object" && dir=
|
|
Packit Service |
50ad14 |
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
if test "$libtool" = yes; then
|
|
Packit Service |
50ad14 |
# With Tru64 cc, shared objects can also be used to make a
|
|
Packit Service |
50ad14 |
# static library. This mechanism is used in libtool 1.4 series to
|
|
Packit Service |
50ad14 |
# handle both shared and static libraries in a single compilation.
|
|
Packit Service |
50ad14 |
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
|
Packit Service |
50ad14 |
#
|
|
Packit Service |
50ad14 |
# With libtool 1.5 this exception was removed, and libtool now
|
|
Packit Service |
50ad14 |
# generates 2 separate objects for the 2 libraries. These two
|
|
Packit Service |
50ad14 |
# compilations output dependencies in $dir.libs/$base.o.d and
|
|
Packit Service |
50ad14 |
# in $dir$base.o.d. We have to check for both files, because
|
|
Packit Service |
50ad14 |
# one of the two compilations can be disabled. We should prefer
|
|
Packit Service |
50ad14 |
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
|
Packit Service |
50ad14 |
# automatically cleaned when .libs/ is deleted, while ignoring
|
|
Packit Service |
50ad14 |
# the former would cause a distcleancheck panic.
|
|
Packit Service |
50ad14 |
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
|
Packit Service |
50ad14 |
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
|
Packit Service |
50ad14 |
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
|
Packit Service |
50ad14 |
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
|
Packit Service |
50ad14 |
"$@" -Wc,-MD
|
|
Packit Service |
50ad14 |
else
|
|
Packit Service |
50ad14 |
tmpdepfile1=$dir$base.o.d
|
|
Packit Service |
50ad14 |
tmpdepfile2=$dir$base.d
|
|
Packit Service |
50ad14 |
tmpdepfile3=$dir$base.d
|
|
Packit Service |
50ad14 |
tmpdepfile4=$dir$base.d
|
|
Packit Service |
50ad14 |
"$@" -MD
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
stat=$?
|
|
Packit Service |
50ad14 |
if test $stat -eq 0; then :
|
|
Packit Service |
50ad14 |
else
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
|
Packit Service |
50ad14 |
exit $stat
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
|
Packit Service |
50ad14 |
do
|
|
Packit Service |
50ad14 |
test -f "$tmpdepfile" && break
|
|
Packit Service |
50ad14 |
done
|
|
Packit Service |
50ad14 |
if test -f "$tmpdepfile"; then
|
|
Packit Service |
50ad14 |
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
|
Packit Service |
50ad14 |
sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
|
Packit Service |
50ad14 |
else
|
|
Packit Service |
50ad14 |
echo "#dummy" > "$depfile"
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile"
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
msvc7)
|
|
Packit Service |
50ad14 |
if test "$libtool" = yes; then
|
|
Packit Service |
50ad14 |
showIncludes=-Wc,-showIncludes
|
|
Packit Service |
50ad14 |
else
|
|
Packit Service |
50ad14 |
showIncludes=-showIncludes
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
"$@" $showIncludes > "$tmpdepfile"
|
|
Packit Service |
50ad14 |
stat=$?
|
|
Packit Service |
50ad14 |
grep -v '^Note: including file: ' "$tmpdepfile"
|
|
Packit Service |
50ad14 |
if test "$stat" = 0; then :
|
|
Packit Service |
50ad14 |
else
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile"
|
|
Packit Service |
50ad14 |
exit $stat
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
rm -f "$depfile"
|
|
Packit Service |
50ad14 |
echo "$object : \\" > "$depfile"
|
|
Packit Service |
50ad14 |
# The first sed program below extracts the file names and escapes
|
|
Packit Service |
50ad14 |
# backslashes for cygpath. The second sed program outputs the file
|
|
Packit Service |
50ad14 |
# name when reading, but also accumulates all include files in the
|
|
Packit Service |
50ad14 |
# hold buffer in order to output them again at the end. This only
|
|
Packit Service |
50ad14 |
# works with sed implementations that can handle large buffers.
|
|
Packit Service |
50ad14 |
sed < "$tmpdepfile" -n '
|
|
Packit Service |
50ad14 |
/^Note: including file: *\(.*\)/ {
|
|
Packit Service |
50ad14 |
s//\1/
|
|
Packit Service |
50ad14 |
s/\\/\\\\/g
|
|
Packit Service |
50ad14 |
p
|
|
Packit Service |
50ad14 |
}' | $cygpath_u | sort -u | sed -n '
|
|
Packit Service |
50ad14 |
s/ /\\ /g
|
|
Packit Service |
50ad14 |
s/\(.*\)/'"$tab"'\1 \\/p
|
|
Packit Service |
50ad14 |
s/.\(.*\) \\/\1:/
|
|
Packit Service |
50ad14 |
H
|
|
Packit Service |
50ad14 |
$ {
|
|
Packit Service |
50ad14 |
s/.*/'"$tab"'/
|
|
Packit Service |
50ad14 |
G
|
|
Packit Service |
50ad14 |
p
|
|
Packit Service |
50ad14 |
}' >> "$depfile"
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile"
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
msvc7msys)
|
|
Packit Service |
50ad14 |
# This case exists only to let depend.m4 do its work. It works by
|
|
Packit Service |
50ad14 |
# looking at the text of this script. This case will never be run,
|
|
Packit Service |
50ad14 |
# since it is checked for above.
|
|
Packit Service |
50ad14 |
exit 1
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
#nosideeffect)
|
|
Packit Service |
50ad14 |
# This comment above is used by automake to tell side-effect
|
|
Packit Service |
50ad14 |
# dependency tracking mechanisms from slower ones.
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
dashmstdout)
|
|
Packit Service |
50ad14 |
# Important note: in order to support this mode, a compiler *must*
|
|
Packit Service |
50ad14 |
# always write the preprocessed file to stdout, regardless of -o.
|
|
Packit Service |
50ad14 |
"$@" || exit $?
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# Remove the call to Libtool.
|
|
Packit Service |
50ad14 |
if test "$libtool" = yes; then
|
|
Packit Service |
50ad14 |
while test "X$1" != 'X--mode=compile'; do
|
|
Packit Service |
50ad14 |
shift
|
|
Packit Service |
50ad14 |
done
|
|
Packit Service |
50ad14 |
shift
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# Remove '-o $object'.
|
|
Packit Service |
50ad14 |
IFS=" "
|
|
Packit Service |
50ad14 |
for arg
|
|
Packit Service |
50ad14 |
do
|
|
Packit Service |
50ad14 |
case $arg in
|
|
Packit Service |
50ad14 |
-o)
|
|
Packit Service |
50ad14 |
shift
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
$object)
|
|
Packit Service |
50ad14 |
shift
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
*)
|
|
Packit Service |
50ad14 |
set fnord "$@" "$arg"
|
|
Packit Service |
50ad14 |
shift # fnord
|
|
Packit Service |
50ad14 |
shift # $arg
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
esac
|
|
Packit Service |
50ad14 |
done
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
test -z "$dashmflag" && dashmflag=-M
|
|
Packit Service |
50ad14 |
# Require at least two characters before searching for ':'
|
|
Packit Service |
50ad14 |
# in the target name. This is to cope with DOS-style filenames:
|
|
Packit Service |
50ad14 |
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
|
Packit Service |
50ad14 |
"$@" $dashmflag |
|
|
Packit Service |
50ad14 |
sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
|
|
Packit Service |
50ad14 |
rm -f "$depfile"
|
|
Packit Service |
50ad14 |
cat < "$tmpdepfile" > "$depfile"
|
|
Packit Service |
50ad14 |
tr ' ' "$nl" < "$tmpdepfile" | \
|
|
Packit Service |
50ad14 |
## Some versions of the HPUX 10.20 sed can't process this invocation
|
|
Packit Service |
50ad14 |
## correctly. Breaking it into two sed invocations is a workaround.
|
|
Packit Service |
50ad14 |
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile"
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
dashXmstdout)
|
|
Packit Service |
50ad14 |
# This case only exists to satisfy depend.m4. It is never actually
|
|
Packit Service |
50ad14 |
# run, as this mode is specially recognized in the preamble.
|
|
Packit Service |
50ad14 |
exit 1
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
makedepend)
|
|
Packit Service |
50ad14 |
"$@" || exit $?
|
|
Packit Service |
50ad14 |
# Remove any Libtool call
|
|
Packit Service |
50ad14 |
if test "$libtool" = yes; then
|
|
Packit Service |
50ad14 |
while test "X$1" != 'X--mode=compile'; do
|
|
Packit Service |
50ad14 |
shift
|
|
Packit Service |
50ad14 |
done
|
|
Packit Service |
50ad14 |
shift
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
# X makedepend
|
|
Packit Service |
50ad14 |
shift
|
|
Packit Service |
50ad14 |
cleared=no eat=no
|
|
Packit Service |
50ad14 |
for arg
|
|
Packit Service |
50ad14 |
do
|
|
Packit Service |
50ad14 |
case $cleared in
|
|
Packit Service |
50ad14 |
no)
|
|
Packit Service |
50ad14 |
set ""; shift
|
|
Packit Service |
50ad14 |
cleared=yes ;;
|
|
Packit Service |
50ad14 |
esac
|
|
Packit Service |
50ad14 |
if test $eat = yes; then
|
|
Packit Service |
50ad14 |
eat=no
|
|
Packit Service |
50ad14 |
continue
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
case "$arg" in
|
|
Packit Service |
50ad14 |
-D*|-I*)
|
|
Packit Service |
50ad14 |
set fnord "$@" "$arg"; shift ;;
|
|
Packit Service |
50ad14 |
# Strip any option that makedepend may not understand. Remove
|
|
Packit Service |
50ad14 |
# the object too, otherwise makedepend will parse it as a source file.
|
|
Packit Service |
50ad14 |
-arch)
|
|
Packit Service |
50ad14 |
eat=yes ;;
|
|
Packit Service |
50ad14 |
-*|$object)
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
*)
|
|
Packit Service |
50ad14 |
set fnord "$@" "$arg"; shift ;;
|
|
Packit Service |
50ad14 |
esac
|
|
Packit Service |
50ad14 |
done
|
|
Packit Service |
50ad14 |
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
|
Packit Service |
50ad14 |
touch "$tmpdepfile"
|
|
Packit Service |
50ad14 |
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
|
Packit Service |
50ad14 |
rm -f "$depfile"
|
|
Packit Service |
50ad14 |
# makedepend may prepend the VPATH from the source file name to the object.
|
|
Packit Service |
50ad14 |
# No need to regex-escape $object, excess matching of '.' is harmless.
|
|
Packit Service |
50ad14 |
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
|
Packit Service |
50ad14 |
sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
|
|
Packit Service |
50ad14 |
## Some versions of the HPUX 10.20 sed can't process this invocation
|
|
Packit Service |
50ad14 |
## correctly. Breaking it into two sed invocations is a workaround.
|
|
Packit Service |
50ad14 |
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
cpp)
|
|
Packit Service |
50ad14 |
# Important note: in order to support this mode, a compiler *must*
|
|
Packit Service |
50ad14 |
# always write the preprocessed file to stdout.
|
|
Packit Service |
50ad14 |
"$@" || exit $?
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# Remove the call to Libtool.
|
|
Packit Service |
50ad14 |
if test "$libtool" = yes; then
|
|
Packit Service |
50ad14 |
while test "X$1" != 'X--mode=compile'; do
|
|
Packit Service |
50ad14 |
shift
|
|
Packit Service |
50ad14 |
done
|
|
Packit Service |
50ad14 |
shift
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# Remove '-o $object'.
|
|
Packit Service |
50ad14 |
IFS=" "
|
|
Packit Service |
50ad14 |
for arg
|
|
Packit Service |
50ad14 |
do
|
|
Packit Service |
50ad14 |
case $arg in
|
|
Packit Service |
50ad14 |
-o)
|
|
Packit Service |
50ad14 |
shift
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
$object)
|
|
Packit Service |
50ad14 |
shift
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
*)
|
|
Packit Service |
50ad14 |
set fnord "$@" "$arg"
|
|
Packit Service |
50ad14 |
shift # fnord
|
|
Packit Service |
50ad14 |
shift # $arg
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
esac
|
|
Packit Service |
50ad14 |
done
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
"$@" -E |
|
|
Packit Service |
50ad14 |
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
|
Packit Service |
50ad14 |
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
|
Packit Service |
50ad14 |
sed '$ s: \\$::' > "$tmpdepfile"
|
|
Packit Service |
50ad14 |
rm -f "$depfile"
|
|
Packit Service |
50ad14 |
echo "$object : \\" > "$depfile"
|
|
Packit Service |
50ad14 |
cat < "$tmpdepfile" >> "$depfile"
|
|
Packit Service |
50ad14 |
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile"
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
msvisualcpp)
|
|
Packit Service |
50ad14 |
# Important note: in order to support this mode, a compiler *must*
|
|
Packit Service |
50ad14 |
# always write the preprocessed file to stdout.
|
|
Packit Service |
50ad14 |
"$@" || exit $?
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# Remove the call to Libtool.
|
|
Packit Service |
50ad14 |
if test "$libtool" = yes; then
|
|
Packit Service |
50ad14 |
while test "X$1" != 'X--mode=compile'; do
|
|
Packit Service |
50ad14 |
shift
|
|
Packit Service |
50ad14 |
done
|
|
Packit Service |
50ad14 |
shift
|
|
Packit Service |
50ad14 |
fi
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
IFS=" "
|
|
Packit Service |
50ad14 |
for arg
|
|
Packit Service |
50ad14 |
do
|
|
Packit Service |
50ad14 |
case "$arg" in
|
|
Packit Service |
50ad14 |
-o)
|
|
Packit Service |
50ad14 |
shift
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
$object)
|
|
Packit Service |
50ad14 |
shift
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
|
Packit Service |
50ad14 |
set fnord "$@"
|
|
Packit Service |
50ad14 |
shift
|
|
Packit Service |
50ad14 |
shift
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
*)
|
|
Packit Service |
50ad14 |
set fnord "$@" "$arg"
|
|
Packit Service |
50ad14 |
shift
|
|
Packit Service |
50ad14 |
shift
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
esac
|
|
Packit Service |
50ad14 |
done
|
|
Packit Service |
50ad14 |
"$@" -E 2>/dev/null |
|
|
Packit Service |
50ad14 |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
|
Packit Service |
50ad14 |
rm -f "$depfile"
|
|
Packit Service |
50ad14 |
echo "$object : \\" > "$depfile"
|
|
Packit Service |
50ad14 |
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
|
Packit Service |
50ad14 |
echo "$tab" >> "$depfile"
|
|
Packit Service |
50ad14 |
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
|
Packit Service |
50ad14 |
rm -f "$tmpdepfile"
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
msvcmsys)
|
|
Packit Service |
50ad14 |
# This case exists only to let depend.m4 do its work. It works by
|
|
Packit Service |
50ad14 |
# looking at the text of this script. This case will never be run,
|
|
Packit Service |
50ad14 |
# since it is checked for above.
|
|
Packit Service |
50ad14 |
exit 1
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
none)
|
|
Packit Service |
50ad14 |
exec "$@"
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
*)
|
|
Packit Service |
50ad14 |
echo "Unknown depmode $depmode" 1>&2
|
|
Packit Service |
50ad14 |
exit 1
|
|
Packit Service |
50ad14 |
;;
|
|
Packit Service |
50ad14 |
esac
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
exit 0
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# Local Variables:
|
|
Packit Service |
50ad14 |
# mode: shell-script
|
|
Packit Service |
50ad14 |
# sh-indentation: 2
|
|
Packit Service |
50ad14 |
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
Packit Service |
50ad14 |
# time-stamp-start: "scriptversion="
|
|
Packit Service |
50ad14 |
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
Packit Service |
50ad14 |
# time-stamp-time-zone: "UTC"
|
|
Packit Service |
50ad14 |
# time-stamp-end: "; # UTC"
|
|
Packit Service |
50ad14 |
# End:
|