This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Allow "make compare" to use "make gnucompare"automatically
Phil Edwards <phil@jaj.com> writes:
|> If we can't use ! inversion in 'if', then the patch under discussion looks
|> something like
|>
|> echo abfoo >t1
|> echo cdfoo >t2
|> if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
|> if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
|> make_compare_target=slowcompare
|> else
|> make_compare_target=gnucompare
|> fi
|> else
|> make_compare_target=slowcompare
|> fi
|> rm t1 t2
|> AC_SUBST(make_compare_target)
|>
|> Right?
No.
if cmp --ignore-initial=2 t1 t2 &&
if cmp --ignore-initial=1 t1 t2; then false; else true; fi; then
make_compare_target=gnucompare
else
make_compare_target=slowcompare
fi
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."