gcc/Makefile.in targets 'compare' and 'gnucompare' behave differently
Zack Weinberg
zack@codesourcery.com
Fri Oct 25 17:44:00 GMT 2002
On Fri, Oct 25, 2002 at 06:57:07PM -0400, DJ Delorie wrote:
>
> > for file in *.o; do \
> > test -f stage$stage/$file && (cmp --ignor...bad_compare) || true; \
> > done
>
> That adds back in some of the overhead, unless we assume that the
> shell is running the test command internally.
I think that's a safe assumption with any modern shell
> Otherwise, I can't think of a better way, unless we can check for
> cmp's exit code being exactly 1 (it returns 2 if one of the files is
> missing).
for file in *.o; do \
cmp ...
if [ $? -eq 1 ] ; then
# bad
fi
done
zw
More information about the Gcc-bugs
mailing list