mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 09:13:04 +00:00
Sync with Automake 1.6.3.
This commit is contained in:
226
config/depcomp
226
config/depcomp
@@ -31,7 +31,16 @@ if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
|||||||
fi
|
fi
|
||||||
# `libtool' can also be set to `yes' or `no'.
|
# `libtool' can also be set to `yes' or `no'.
|
||||||
|
|
||||||
depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
|
if test -z "$depfile"; then
|
||||||
|
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
|
||||||
|
dir=`echo "$object" | sed 's,/.*$,/,'`
|
||||||
|
if test "$dir" = "$object"; then
|
||||||
|
dir=
|
||||||
|
fi
|
||||||
|
# FIXME: should be _deps on DOS.
|
||||||
|
depfile="$dir.deps/$base"
|
||||||
|
fi
|
||||||
|
|
||||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||||
|
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile"
|
||||||
@@ -198,17 +207,22 @@ aix)
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
tru64)
|
tru64)
|
||||||
# The Tru64 AIX compiler uses -MD to generate dependencies as a side
|
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||||
# dependencies in `foo.d' instead, so we check for that too.
|
# dependencies in `foo.d' instead, so we check for that too.
|
||||||
# Subdirectories are respected.
|
# Subdirectories are respected.
|
||||||
|
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||||
|
test "x$dir" = "x$object" && dir=
|
||||||
|
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||||
|
|
||||||
tmpdepfile1="$object.d"
|
|
||||||
tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'`
|
|
||||||
if test "$libtool" = yes; then
|
if test "$libtool" = yes; then
|
||||||
|
tmpdepfile1="$dir.libs/$base.lo.d"
|
||||||
|
tmpdepfile2="$dir.libs/$base.d"
|
||||||
"$@" -Wc,-MD
|
"$@" -Wc,-MD
|
||||||
else
|
else
|
||||||
|
tmpdepfile1="$dir$base.o.d"
|
||||||
|
tmpdepfile2="$dir$base.d"
|
||||||
"$@" -MD
|
"$@" -MD
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -240,34 +254,40 @@ tru64)
|
|||||||
|
|
||||||
dashmstdout)
|
dashmstdout)
|
||||||
# Important note: in order to support this mode, a compiler *must*
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
# always write the proprocessed file to stdout, regardless of -o,
|
# always write the proprocessed file to stdout, regardless of -o.
|
||||||
# because we must use -o when running libtool.
|
"$@" || exit $?
|
||||||
test -z "$dashmflag" && dashmflag=-M
|
|
||||||
( IFS=" "
|
# Remove the call to Libtool.
|
||||||
case " $* " in
|
if test "$libtool" = yes; then
|
||||||
*" --mode=compile "*) # this is libtool, let us make it quiet
|
while test $1 != '--mode=compile'; do
|
||||||
for arg
|
shift
|
||||||
do # cycle over the arguments
|
done
|
||||||
case "$arg" in
|
shift
|
||||||
"--mode=compile")
|
fi
|
||||||
# insert --quiet before "--mode=compile"
|
|
||||||
set fnord "$@" --quiet
|
# Remove `-o $object'. We will use -o /dev/null later,
|
||||||
shift # fnord
|
# however we can't do the remplacement now because
|
||||||
;;
|
# `-o $object' might simply not be used
|
||||||
esac
|
IFS=" "
|
||||||
set fnord "$@" "$arg"
|
for arg
|
||||||
shift # fnord
|
do
|
||||||
shift # "$arg"
|
case $arg in
|
||||||
done
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
"$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
done
|
||||||
) &
|
|
||||||
proc=$!
|
test -z "$dashmflag" && dashmflag=-M
|
||||||
"$@"
|
"$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||||
stat=$?
|
|
||||||
wait "$proc"
|
|
||||||
if test "$stat" != 0; then exit $stat; fi
|
|
||||||
rm -f "$depfile"
|
rm -f "$depfile"
|
||||||
cat < "$tmpdepfile" > "$depfile"
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
tr ' ' '
|
tr ' ' '
|
||||||
@@ -285,36 +305,31 @@ dashXmstdout)
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
makedepend)
|
makedepend)
|
||||||
|
"$@" || exit $?
|
||||||
# X makedepend
|
# X makedepend
|
||||||
(
|
shift
|
||||||
shift
|
cleared=no
|
||||||
cleared=no
|
for arg in "$@"; do
|
||||||
for arg in "$@"; do
|
case $cleared in
|
||||||
case $cleared in no)
|
no)
|
||||||
set ""; shift
|
set ""; shift
|
||||||
cleared=yes
|
cleared=yes ;;
|
||||||
esac
|
esac
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
-D*|-I*)
|
-D*|-I*)
|
||||||
set fnord "$@" "$arg"; shift;;
|
set fnord "$@" "$arg"; shift ;;
|
||||||
-*)
|
-*)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
set fnord "$@" "$arg"; shift;;
|
set fnord "$@" "$arg"; shift ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||||
touch "$tmpdepfile"
|
touch "$tmpdepfile"
|
||||||
${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||||
) &
|
|
||||||
proc=$!
|
|
||||||
"$@"
|
|
||||||
stat=$?
|
|
||||||
wait "$proc"
|
|
||||||
if test "$stat" != 0; then exit $stat; fi
|
|
||||||
rm -f "$depfile"
|
rm -f "$depfile"
|
||||||
cat < "$tmpdepfile" > "$depfile"
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
tail +3 "$tmpdepfile" | tr ' ' '
|
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||||
' | \
|
' | \
|
||||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
## correctly. Breaking it into two sed invocations is a workaround.
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
@@ -324,35 +339,39 @@ makedepend)
|
|||||||
|
|
||||||
cpp)
|
cpp)
|
||||||
# Important note: in order to support this mode, a compiler *must*
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
# always write the proprocessed file to stdout, regardless of -o,
|
# always write the proprocessed file to stdout.
|
||||||
# because we must use -o when running libtool.
|
"$@" || exit $?
|
||||||
( IFS=" "
|
|
||||||
case " $* " in
|
# Remove the call to Libtool.
|
||||||
*" --mode=compile "*)
|
if test "$libtool" = yes; then
|
||||||
for arg
|
while test $1 != '--mode=compile'; do
|
||||||
do # cycle over the arguments
|
shift
|
||||||
case $arg in
|
done
|
||||||
"--mode=compile")
|
shift
|
||||||
# insert --quiet before "--mode=compile"
|
fi
|
||||||
set fnord "$@" --quiet
|
|
||||||
shift # fnord
|
# Remove `-o $object'.
|
||||||
;;
|
IFS=" "
|
||||||
esac
|
for arg
|
||||||
set fnord "$@" "$arg"
|
do
|
||||||
shift # fnord
|
case $arg in
|
||||||
shift # "$arg"
|
-o)
|
||||||
done
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
"$@" -E |
|
done
|
||||||
|
|
||||||
|
"$@" -E |
|
||||||
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||||
sed '$ s: \\$::' > "$tmpdepfile"
|
sed '$ s: \\$::' > "$tmpdepfile"
|
||||||
) &
|
|
||||||
proc=$!
|
|
||||||
"$@"
|
|
||||||
stat=$?
|
|
||||||
wait "$proc"
|
|
||||||
if test "$stat" != 0; then exit $stat; fi
|
|
||||||
rm -f "$depfile"
|
rm -f "$depfile"
|
||||||
echo "$object : \\" > "$depfile"
|
echo "$object : \\" > "$depfile"
|
||||||
cat < "$tmpdepfile" >> "$depfile"
|
cat < "$tmpdepfile" >> "$depfile"
|
||||||
@@ -364,32 +383,25 @@ msvisualcpp)
|
|||||||
# Important note: in order to support this mode, a compiler *must*
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
# always write the proprocessed file to stdout, regardless of -o,
|
# always write the proprocessed file to stdout, regardless of -o,
|
||||||
# because we must use -o when running libtool.
|
# because we must use -o when running libtool.
|
||||||
( IFS=" "
|
"$@" || exit $?
|
||||||
case " $* " in
|
IFS=" "
|
||||||
*" --mode=compile "*)
|
for arg
|
||||||
for arg
|
do
|
||||||
do # cycle over the arguments
|
case "$arg" in
|
||||||
case $arg in
|
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||||
"--mode=compile")
|
set fnord "$@"
|
||||||
# insert --quiet before "--mode=compile"
|
shift
|
||||||
set fnord "$@" --quiet
|
shift
|
||||||
shift # fnord
|
;;
|
||||||
;;
|
*)
|
||||||
esac
|
|
||||||
set fnord "$@" "$arg"
|
set fnord "$@" "$arg"
|
||||||
shift # fnord
|
shift
|
||||||
shift # "$arg"
|
shift
|
||||||
done
|
;;
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
"$@" -E |
|
done
|
||||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
"$@" -E |
|
||||||
) &
|
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||||
proc=$!
|
|
||||||
"$@"
|
|
||||||
stat=$?
|
|
||||||
wait "$proc"
|
|
||||||
if test "$stat" != 0; then exit $stat; fi
|
|
||||||
rm -f "$depfile"
|
rm -f "$depfile"
|
||||||
echo "$object : \\" > "$depfile"
|
echo "$object : \\" > "$depfile"
|
||||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ then
|
|||||||
echo "install: no input file specified"
|
echo "install: no input file specified"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
true
|
:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ x"$dir_arg" != x ]; then
|
if [ x"$dir_arg" != x ]; then
|
||||||
@@ -120,7 +120,7 @@ if [ x"$dir_arg" != x ]; then
|
|||||||
instcmd=:
|
instcmd=:
|
||||||
chmodcmd=""
|
chmodcmd=""
|
||||||
else
|
else
|
||||||
instcmd=mkdir
|
instcmd=$mkdirprog
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|
||||||
@@ -128,9 +128,9 @@ else
|
|||||||
# might cause directories to be created, which would be especially bad
|
# might cause directories to be created, which would be especially bad
|
||||||
# if $src (and thus $dsttmp) contains '*'.
|
# if $src (and thus $dsttmp) contains '*'.
|
||||||
|
|
||||||
if [ -f $src -o -d $src ]
|
if [ -f "$src" ] || [ -d "$src" ]
|
||||||
then
|
then
|
||||||
true
|
:
|
||||||
else
|
else
|
||||||
echo "install: $src does not exist"
|
echo "install: $src does not exist"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -141,7 +141,7 @@ else
|
|||||||
echo "install: no destination specified"
|
echo "install: no destination specified"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
true
|
:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If destination is a directory, append the input filename; if your system
|
# If destination is a directory, append the input filename; if your system
|
||||||
@@ -151,7 +151,7 @@ else
|
|||||||
then
|
then
|
||||||
dst="$dst"/`basename $src`
|
dst="$dst"/`basename $src`
|
||||||
else
|
else
|
||||||
true
|
:
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -163,8 +163,8 @@ dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
|||||||
|
|
||||||
# Skip lots of stat calls in the usual case.
|
# Skip lots of stat calls in the usual case.
|
||||||
if [ ! -d "$dstdir" ]; then
|
if [ ! -d "$dstdir" ]; then
|
||||||
defaultIFS='
|
defaultIFS='
|
||||||
'
|
'
|
||||||
IFS="${IFS-${defaultIFS}}"
|
IFS="${IFS-${defaultIFS}}"
|
||||||
|
|
||||||
oIFS="${IFS}"
|
oIFS="${IFS}"
|
||||||
@@ -183,7 +183,7 @@ while [ $# -ne 0 ] ; do
|
|||||||
then
|
then
|
||||||
$mkdirprog "${pathcomp}"
|
$mkdirprog "${pathcomp}"
|
||||||
else
|
else
|
||||||
true
|
:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pathcomp="${pathcomp}/"
|
pathcomp="${pathcomp}/"
|
||||||
@@ -194,10 +194,10 @@ if [ x"$dir_arg" != x ]
|
|||||||
then
|
then
|
||||||
$doit $instcmd $dst &&
|
$doit $instcmd $dst &&
|
||||||
|
|
||||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
|
||||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
|
||||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
|
||||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
|
||||||
else
|
else
|
||||||
|
|
||||||
# If we're going to rename the final executable, determine the name now.
|
# If we're going to rename the final executable, determine the name now.
|
||||||
@@ -216,7 +216,7 @@ else
|
|||||||
then
|
then
|
||||||
dstfile=`basename $dst`
|
dstfile=`basename $dst`
|
||||||
else
|
else
|
||||||
true
|
:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make a temp file name in the proper directory.
|
# Make a temp file name in the proper directory.
|
||||||
@@ -235,10 +235,10 @@ else
|
|||||||
# ignore errors from any of these, just make sure not to ignore
|
# ignore errors from any of these, just make sure not to ignore
|
||||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||||
|
|
||||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
|
||||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
|
||||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
|
||||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
|
||||||
|
|
||||||
# Now rename the file to the real destination.
|
# Now rename the file to the real destination.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user