OSDN Git Service

2009-06-07 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / Makefile.tpl
index ff058d6..44c2bd8 100644 (file)
@@ -621,15 +621,16 @@ all:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 @if gcc-bootstrap
        if [ -f stage_last ]; then \
-         TFLAGS="$(STAGE$(shell sed s,^stage,, stage_last)_TFLAGS)"; \
+         TFLAGS="$(STAGE$(shell test ! -f stage_last || sed s,^stage,, stage_last)_TFLAGS)"; \
          $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target; \
        else \
 @endif gcc-bootstrap
          $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target \
 @if gcc-bootstrap
            ; \
-       fi
+       fi \
 @endif gcc-bootstrap
+       && :
 
 .PHONY: all-build
 [+ FOR build_modules +]
@@ -1426,15 +1427,16 @@ do-clean: clean-stage[+id+]
        : $(MAKE); $(stage); \
        rm -f .bad_compare ; \
        echo Comparing stages [+prev+] and [+id+] ; \
-       cd stage[+id+]-gcc; \
-       files=`find . -name "*$(objext)" -print` ; \
-       cd .. ; \
+        sed=`echo stage[+id+] | sed 's,^stage,,;s,.,.,g'`; \
+       files=`find stage[+id+]-* -name "*$(objext)" -print | \
+                sed -n s,^stage$$sed-,,p` ; \
        for file in $${files} ; do \
-         f1=$$r/stage[+prev+]-gcc/$$file; f2=$$r/stage[+id+]-gcc/$$file; \
+         f1=$$r/stage[+prev+]-$$file; f2=$$r/stage[+id+]-$$file; \
+         if test ! -f $$f1; then continue; fi; \
          $(do-[+compare-target+]) > /dev/null 2>&1; \
          if test $$? -eq 1; then \
            case $$file in \
-             ./cc*-checksum$(objext) | ./libgcc/* ) \
+             gcc/cc*-checksum$(objext) | ./libgcc/* | ./gcc/ada/*tools/*) \
                echo warning: $$file differs ;; \
              *) \
                echo $$file differs >> .bad_compare ;; \