X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=Makefile.tpl;h=f543003949e1633da06c626bf6f3f6570fd653c0;hb=f89ddd70e77a50ec7881354155ecd4f23a9c6c7c;hp=d4b2f0314b7b5febe0732e466f35cd0636b17ebe;hpb=7b6175f9c6195432011dc348479a3b05859bad2b;p=binutils-gdb.git diff --git a/Makefile.tpl b/Makefile.tpl index d4b2f0314b7..f543003949e 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -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 -@if gcc-no-bootstrap - if :; then :; \ -@endif gcc-no-bootstrap - $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target; \ - fi + $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target \ +@if gcc-bootstrap + ; \ + 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 ;; \