Makefile (compare): Exit with nonzero status if there are comparison failures.
authorJeffrey A Law <law@cygnus.com>
Thu, 11 Sep 1997 03:36:41 +0000 (03:36 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 11 Sep 1997 03:36:41 +0000 (21:36 -0600)
        * Makefile (compare): Exit with nonzero status if there
        are comparison failures.  Note which files failed the
        comparison test in .bad_compare.
For toplevel "make bootstrap".

From-SVN: r15400

gcc/ChangeLog
gcc/Makefile.in

index 410dcfceeaf542eb8e16dc6fb4ad3b70d344b396..b73336b6a82716ae945ed6a7a48ff6b38c370f48 100644 (file)
@@ -1,3 +1,9 @@
+Wed Sep 10 21:37:30 1997  Jeffrey A Law  (law@cygnus.com)
+
+       * Makefile.in (compare): Exit with nonzero status if there
+       are comparison failures.  Note which files failed the
+       comparison test in .bad_compare.
+
 Wed Sep 10 17:05:46 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
 
        * config/alpha/elf.h (CPP_PREDEFINES): Remove -D__PIC__ -D__pic__.
index c1e4e2315b260b5c22c89c566a6bce51a5cd8012..481295b0ff198259e4e6e5eb0d5b23274354bd54 100644 (file)
@@ -2589,21 +2589,30 @@ bootstrap3: force
 
 # ./ avoids bug in some versions of tail.
 compare: force
+       -rm -f .bad_compare
        for file in *$(objext); do \
          tail +16c ./$$file > tmp-foo1; \
-         tail +16c stage2/$$file > tmp-foo2 2>/dev/null \
-           && (cmp tmp-foo1 tmp-foo2 || echo $$file differs) || true; \
+         tail +16c stage2/$$file > tmp-foo2 \
+           && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
        done
        for dir in tmp-foo $(SUBDIRS); do \
          if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
            for file in $$dir/*$(objext); do \
              tail +16c ./$$file > tmp-foo1; \
-             tail +16c stage2/$$file > tmp-foo2 2>/dev/null \
-               && (cmp tmp-foo1 tmp-foo2 || echo $$file differs) || true; \
+             tail +16c stage2/$$file > tmp-foo2 \
+               && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
            done; \
          fi; \
        done
        -rm -f tmp-foo*
+       if [ -f .bad_compare ]; then \
+         echo "Bootstrap comparison failure!"; \
+         cat .bad_compare; \
+         exit 1; \
+       else true; \
+       fi
+       
+       
 
 # Similar, but compare with stage3 directory
 compare3: force