[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patch for some POSIX 1003.1-2001 compliance bugs in CVS
From: |
Paul Eggert |
Subject: |
patch for some POSIX 1003.1-2001 compliance bugs in CVS |
Date: |
Fri, 10 Oct 2003 12:35:31 -0700 |
Here are some patches to fix some portability bugs in CVS 1.11.9 when
running on hosts that conform to POSIX 1003.1-2001. Such hosts don't
support 'diff -c2', 'sort +0', 'head -1', or `tail +3'; portable
replacements are 'diff -C2', 'sort -k 1', 'sed 1q', and `sed 1,2d',
respectively. An example of such a host is Debian GNU/Linux testing
with _POSIX2_VERSION=200112 in the environment.
This patch is relative to a CVS snapshot that I just took.
2003-10-10 Paul Eggert <eggert@twinsun.com>
Port to pedantic POSIX 1003.1-2001 hosts, such as Debian GNU/Linux
testing with _POSIX2_VERSION=200112 in the environment.
* BUGS: Suggest 'diff -C2', not 'diff -c2'.
* FAQ: Suggest 'sort -k 1.2', not 'sort +0.1'.
* contrib/cvs2vendor.sh: Work with POSIX sort as well as with
traditional sort.
* contrib/rcs2sccs.sh, contrib/sccs2rcs.in: Likewise.
* doc/cvs.texinfo: Suggest 'sed 1q', not 'head -1'.
* src/sanity.sh: Use 'sed 1q', not 'head -1'.
* depcomp: Sync to the depcomp shipped with Automake 1.7.8, as
it has the bug fixed and that's better than maintaining our
own depcomp.
Index: BUGS
===================================================================
RCS file: /cvsroot/ccvs/BUGS,v
retrieving revision 1.64
diff -p -u -r1.64 BUGS
--- BUGS 29 Sep 2003 17:45:20 -0000 1.64
+++ BUGS 10 Oct 2003 19:21:44 -0000
@@ -82,7 +82,7 @@ file's description.
Date: Sat, 25 Feb 1995 17:01:15 -0500
mycroft@duality [1]; cd /usr/src/lib/libc
- mycroft@duality [1]; cvs diff -c2 '-D1 day ago' -Dnow
+ mycroft@duality [1]; cvs diff -C2 '-D1 day ago' -Dnow
cvs server: Diffing .
cvs server: Diffing DB
cvs [server aborted]: could not chdir to DB: No such file or directory
Index: FAQ
===================================================================
RCS file: /cvsroot/ccvs/FAQ,v
retrieving revision 1.22
diff -p -u -r1.22 FAQ
--- FAQ 30 Jan 2003 15:49:14 -0000 1.22
+++ FAQ 10 Oct 2003 19:21:45 -0000
@@ -4332,7 +4332,7 @@ kingdon@cyclic.com
You should be able to run:
- sort +0.1 ${dir1}/history ${dir2}/history > history
+ sort -k 1.2 ${dir1}/history ${dir2}/history > history
If you "diff" a standard history file before and after such a sort,
you might see other differences caused by garbage (split lines, nulls,
Index: contrib/cvs2vendor.sh
===================================================================
RCS file: /cvsroot/ccvs/contrib/cvs2vendor.sh,v
retrieving revision 1.2
diff -p -u -r1.2 cvs2vendor.sh
--- contrib/cvs2vendor.sh 12 Feb 1997 15:34:55 -0000 1.2
+++ contrib/cvs2vendor.sh 10 Oct 2003 19:21:50 -0000
@@ -42,6 +42,11 @@ rm -f $revfile
commentfile=/tmp/cvs2vendor_$$_comment
rm -f $commentfile
+if sort -k 1,1 /dev/null 2>/dev/null
+then sort_each_field='-k 1 -k 2 -k 3 -k 4 -k 5 -k 6 -k 7 -k 8 -k 9'
+else sort_each_field='+0 +1 +2 +3 +4 +5 +6 +7 +8'
+fi
+
srcdirs=`cd $tsrcdir && find . -type d -print | sed 's~^\.[/]*~~'`
# the "" is a trick to get $tsrcdir itself without resorting to '.'
@@ -68,7 +73,7 @@ for ldir in "" $srcdirs; do
fi
# work on each rev of that file in ascending order
- rlog $file | grep "^revision [0-9][0-9]*\." | awk '{print $2}'
| sed -e 's/\./ /g' | sort -n -u +0 +1 +2 +3 +4 +5 +6 +7 +8 | sed -e 's/ /./g'
> $revfile
+ rlog $file | grep "^revision [0-9][0-9]*\." | awk '{print $2}'
| sed -e 's/\./ /g' | sort -n -u $sort_each_field | sed -e 's/ /./g' > $revfile
for rev in `cat $revfile`; do
Index: contrib/rcs2sccs.sh
===================================================================
RCS file: /cvsroot/ccvs/contrib/rcs2sccs.sh,v
retrieving revision 1.3
diff -p -u -r1.3 rcs2sccs.sh
--- contrib/rcs2sccs.sh 16 Oct 2001 19:06:24 -0000 1.3
+++ contrib/rcs2sccs.sh 10 Oct 2003 19:21:50 -0000
@@ -42,13 +42,17 @@ cp $tmpfile $sedfile
############################################################
# Loop over every RCS file in RCS dir
#
+if sort -k 1,1 /dev/null 2>/dev/null
+then sort_each_field='-k 1 -k 2 -k 3 -k 4 -k 5 -k 6 -k 7 -k 8 -k 9'
+else sort_each_field='+0 +1 +2 +3 +4 +5 +6 +7 +8'
+fi
for vfile in *,v; do
# get rid of the ",v" at the end of the name
file=`echo $vfile | sed -e 's/,v$//'`
# work on each rev of that file in ascending order
firsttime=1
- rlog $file | grep "^revision [0-9][0-9]*\." | awk '{print $2}' | sed -e
's/\./ /g' | sort -n -u +0 +1 +2 +3 +4 +5 +6 +7 +8 | sed -e 's/ /./g' > $revfile
+ rlog $file | grep "^revision [0-9][0-9]*\." | awk '{print $2}' | sed -e
's/\./ /g' | sort -n -u $sort_each_field | sed -e 's/ /./g' > $revfile
for rev in `cat $revfile`; do
if [ $? != 0 ]; then
echo ERROR - revision
Index: contrib/sccs2rcs.in
===================================================================
RCS file: /cvsroot/ccvs/contrib/sccs2rcs.in,v
retrieving revision 1.6
diff -p -u -r1.6 sccs2rcs.in
--- contrib/sccs2rcs.in 26 Sep 2003 21:37:31 -0000 1.6
+++ contrib/sccs2rcs.in 10 Oct 2003 19:21:50 -0000
@@ -169,6 +169,13 @@ end
onintr ERROR
+sort -k 1,1 /dev/null >& /dev/null
+if ($status == 0) then
+ set sort_each_field = '-k 1 -k 2 -k 3 -k 4 -k 5 -k 6 -k 7 -k 8 -k 9'
+else
+ set sort_each_field = '+0 +1 +2 +3 +4 +5 +6 +7 +8'
+endif
+
############################################################
# Loop over every s-file in SCCS dir
#
@@ -189,7 +196,7 @@ foreach sfile (SCCS/s.*)
# echo This is not a binary file
#endif
- sccs prs $file | grep "^D " | @AWK@ '{print $2}' | sed -e 's/\./ /g' |
sort -n -u +0 +1 +2 +3 +4 +5 +6 +7 +8 | sed -e 's/ /./g' > $revfile
+ sccs prs $file | grep "^D " | @AWK@ '{print $2}' | sed -e 's/\./ /g' |
sort -n -u $sort_each_field | sed -e 's/ /./g' > $revfile
foreach rev (`cat $revfile`)
if ($status != 0) goto ERROR
Index: doc/cvs.texinfo
===================================================================
RCS file: /cvsroot/ccvs/doc/cvs.texinfo,v
retrieving revision 1.584
diff -p -u -r1.584 cvs.texinfo
--- doc/cvs.texinfo 12 Sep 2003 15:22:34 -0000 1.584
+++ doc/cvs.texinfo 10 Oct 2003 19:21:53 -0000
@@ -12884,9 +12884,9 @@ evaluate the log message.
# Verify that the log message contains a valid bugid
# on the first line.
#
-if head -1 < $1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /dev/null; then
+if sed 1q < $1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /dev/null; then
exit 0
-elif head -1 < $1 | grep '^BugId:[ ]*none$' > /dev/null; then
+elif sed 1q < $1 | grep '^BugId:[ ]*none$' > /dev/null; then
# It is okay to allow commits with 'BugId: none',
# but do not put that text into the real log message.
grep -v '^BugId:[ ]*none$' > $1.rewrite
Index: src/sanity.sh
===================================================================
RCS file: /cvsroot/ccvs/src/sanity.sh,v
retrieving revision 1.822
diff -p -u -r1.822 sanity.sh
--- src/sanity.sh 8 Oct 2003 22:31:47 -0000 1.822
+++ src/sanity.sh 10 Oct 2003 19:22:09 -0000
@@ -16423,9 +16423,9 @@ ${SPROG} commit: Rebuilding administrati
# Now test verifymsg
cat >${TESTDIR}/vscript <<EOF
#!${TESTSHELL}
-if head -1 < \$1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /dev/null; then
+if sed 1q < \$1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /dev/null; then
exit 0
-elif head -1 < \$1 | grep '^BugId:[ ]*new$' > /dev/null; then
+elif sed 1q < \$1 | grep '^BugId:[ ]*new$' > /dev/null; then
echo A new bugid was found. >> \$1
exit 0
else
@@ -21652,7 +21652,7 @@ done"
dotest tag8k-16 "$testcvs -Q tag $t-a $file" ''
# Extract the author value.
- name=`sed -n 's/.*; author \([^;]*\);.*/\1/p'
${CVSROOT_DIRNAME}/$module/$file,v|head -1`
+ name=`sed -n 's/.*; author \([^;]*\);.*/\1/p'
${CVSROOT_DIRNAME}/$module/$file,v|sed 1q`
# Form a suffix string of length (16 - length($name)).
# CAREFUL: this will lose if $name is longer than 16.
Index: depcomp
===================================================================
RCS file: /cvsroot/ccvs/depcomp,v
retrieving revision 1.7
diff -p -u -r1.7 depcomp
--- depcomp 17 May 2001 20:59:59 -0000 1.7
+++ depcomp 10 Oct 2003 19:21:49 -0000
@@ -1,7 +1,7 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,6 +18,11 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
@@ -26,7 +31,16 @@ if test -z "$depmode" || test -z "$sourc
fi
# `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/'`}
rm -f "$tmpdepfile"
@@ -50,8 +64,9 @@ fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
-## we want. Yay!
- "$@" -MT "$object" -MF "$tmpdepfile" -MD -MP
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+ "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
@@ -157,19 +172,25 @@ sgi)
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
- # in a .u file. This file always lives in the current directory.
- # Also, the AIX compiler puts `$object:' at the start of each line;
- # $object doesn't have directory information.
- stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts `$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
- outname="$stripped.o"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
-
stat=$?
+
+ if test -f "$tmpdepfile"; then :
+ else
+ stripped=`echo "$stripped" | sed 's,^.*/,,'`
+ tmpdepfile="$stripped.u"
+ fi
+
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
@@ -177,6 +198,7 @@ aix)
fi
if test -f "$tmpdepfile"; then
+ outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
@@ -191,29 +213,80 @@ aix)
rm -f "$tmpdepfile"
;;
+icc)
+ # Intel's C compiler understands `-MD -MF file'. However on
+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+ # ICC 7.0 will fill foo.d with something like
+ # foo.o: sub/foo.c
+ # foo.o: sub/foo.h
+ # which is wrong. We want:
+ # sub/foo.o: sub/foo.c
+ # sub/foo.o: sub/foo.h
+ # sub/foo.c:
+ # sub/foo.h:
+ # ICC 7.1 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
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'.
+ # 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.
# 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$//'`
- tmpdepfile="$object.d"
if test "$libtool" = yes; then
+ tmpdepfile1="$dir.libs/$base.lo.d"
+ tmpdepfile2="$dir.libs/$base.d"
"$@" -Wc,-MD
else
+ tmpdepfile1="$dir$base.o.d"
+ tmpdepfile2="$dir$base.d"
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
- rm -f "$tmpdepfile"
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
+ if test -f "$tmpdepfile1"; then
+ tmpdepfile="$tmpdepfile1"
+ else
+ tmpdepfile="$tmpdepfile2"
+ fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a space and a tab in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
@@ -226,34 +299,42 @@ tru64)
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
- # always write the proprocessed file to stdout, regardless of -o,
- # because we must use -o when running libtool.
- test -z "$dashmflag" && dashmflag=-M
- ( IFS=" "
- case " $* " in
- *" --mode=compile "*) # this is libtool, let us make it quiet
- for arg
- do # cycle over the arguments
- case "$arg" in
- "--mode=compile")
- # insert --quiet before "--mode=compile"
- set fnord "$@" --quiet
- shift # fnord
- ;;
- esac
- set fnord "$@" "$arg"
- shift # fnord
- shift # "$arg"
- done
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
;;
esac
- "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' >
"$tmpdepfile"
- ) &
- proc=$!
- "$@"
- stat=$?
- wait "$proc"
- if test "$stat" != 0; then exit $stat; fi
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for `:'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
@@ -271,36 +352,40 @@ dashXmstdout)
;;
makedepend)
- # X makedepend
- (
- shift
- cleared=no
- for arg in "$@"; do
- case $cleared in no)
- set ""; shift
- cleared=yes
- esac
- case "$arg" in
- -D*|-I*)
- set fnord "$@" "$arg"; shift;;
- -*)
- ;;
- *)
- set fnord "$@" "$arg"; shift;;
- esac
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
done
- obj_suffix="`echo $object | sed 's/^.*\././'`"
- touch "$tmpdepfile"
- ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
- ) &
- proc=$!
- "$@"
- stat=$?
- wait "$proc"
- if test "$stat" != 0; then exit $stat; fi
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no
+ for arg in "$@"; do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix="`echo $object | sed 's/^.*\././'`"
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$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
## correctly. Breaking it into two sed invocations is a workaround.
@@ -310,35 +395,39 @@ makedepend)
cpp)
# Important note: in order to support this mode, a compiler *must*
- # always write the proprocessed file to stdout, regardless of -o,
- # because we must use -o when running libtool.
- ( IFS=" "
- case " $* " in
- *" --mode=compile "*)
- for arg
- do # cycle over the arguments
- case $arg in
- "--mode=compile")
- # insert --quiet before "--mode=compile"
- set fnord "$@" --quiet
- shift # fnord
- ;;
- esac
- set fnord "$@" "$arg"
- shift # fnord
- shift # "$arg"
- done
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
;;
esac
- "$@" -E |
+ done
+
+ "$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
- ) &
- proc=$!
- "$@"
- stat=$?
- wait "$proc"
- if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
@@ -348,34 +437,27 @@ cpp)
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
- # always write the proprocessed file to stdout, regardless of -o,
+ # always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
- ( IFS=" "
- case " $* " in
- *" --mode=compile "*)
- for arg
- do # cycle over the arguments
- case $arg in
- "--mode=compile")
- # insert --quiet before "--mode=compile"
- set fnord "$@" --quiet
- shift # fnord
- ;;
- esac
+ "$@" || exit $?
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
set fnord "$@" "$arg"
- shift # fnord
- shift # "$arg"
- done
- ;;
+ shift
+ shift
+ ;;
esac
- "$@" -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
+ done
+ "$@" -E |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p'
| sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >>
"$depfile"
- patch for some POSIX 1003.1-2001 compliance bugs in CVS,
Paul Eggert <=