Makefile.in (gnucompare): Do comparison of all files using one of the chosen methods...
authorJakub Jelinek <jakub@redhat.com>
Wed, 9 Nov 2005 21:36:06 +0000 (22:36 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 9 Nov 2005 21:36:06 +0000 (22:36 +0100)
* Makefile.in (gnucompare): Do comparison of all files using one of
the chosen methods and only afterwards decide if just warning should
be issued or comparison failure raised.

From-SVN: r106707

gcc/ChangeLog
gcc/Makefile.in

index 96381d7aef8112d97380a68d8b9a6f8ecf87df7b..44efa5b89b45f3764b5cd8416eb54f80300d5c79 100644 (file)
@@ -1,3 +1,9 @@
+2005-11-09  Jakub Jelinek  <jakub@redhat.com>
+
+       * Makefile.in (gnucompare): Do comparison of all files using one of
+       the chosen methods and only afterwards decide if just warning should
+       be issued or comparison failure raised.
+
 2005-11-09  Eric Botcazou  <ebotcazou@adacore.com>
 
        * ifcvt.c (noce_get_alt_condition): Use prev_nonnote_insn.
index 8bba4e097b456da1b88c08ab2dae38b72578d02f..4fbbd6c6336209e9dded594903462e4cb52ee860 100644 (file)
@@ -4241,30 +4241,30 @@ fastcompare fastcompare3 fastcompare4 fastcompare-lean fastcompare3-lean fastcom
        for dir in . $(SUBDIRS) libgcc; do \
          if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
            for file in $$dir/*$(objext); do \
-             case $$file in \
-               ./cc*-checksum$(objext) | libgcc/* ) \
-                   tail +16c ./$$file > tmp-foo1 \
-                   && tail +16c stage$$stage/$$file > tmp-foo2 \
-                   && ( cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 \
-                        || echo warning: $$file differs || true ) \
+             case "$@" in \
+               slowcompare* ) \
+                 tail +16c ./$$file > tmp-foo1; \
+                 tail +16c stage$$stage/$$file > tmp-foo2; \
+                 cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1; \
+                 cmpret=$$?; \
+                 ;; \
+               fastcompare* ) \
+                 cmp $$file stage$$stage/$$file 16 16 > /dev/null 2>&1; \
+                 cmpret=$$?; \
+                 ;; \
+               gnucompare* ) \
+                 cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1; \
+                 cmpret=$$?; \
                  ;; \
-               *)  case "$@" in \
-                 slowcompare* ) \
-                   tail +16c ./$$file > tmp-foo1; \
-                   tail +16c stage$$stage/$$file > tmp-foo2 \
-                     && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 \
-                         || echo $$file differs >> .bad_compare) || true; \
-                   ;; \
-                 fastcompare* ) \
-                   cmp $$file stage$$stage/$$file 16 16 > /dev/null 2>&1; \
-                   test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \
-                   ;; \
-                 gnucompare* ) \
-                   cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1; \
-                   test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \
-                   ;; \
-               esac ; \
              esac ; \
+             if test $$cmpret -eq 1; then \
+               case $$file in \
+                 ./cc*-checksum$(objext) | libgcc/* ) \
+                   echo warning: $$file differs;; \
+                 *) \
+                   echo $$file differs >> .bad_compare;; \
+               esac ; \
+             fi; \
            done; \
          else true; fi; \
        done