diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2004-08-30 08:05:42 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gnu.org> | 2004-08-30 08:05:42 +0000 |
commit | 9cb3fa6fd242b34da6824ce77783b730ae34c353 (patch) | |
tree | 69a002c6676455883ebea818e13e36a0984ce8d7 /Makefile.tpl | |
parent | 80f57dfaa0d4ae844d30824fc87ad9e87f67530d (diff) | |
download | gdb-9cb3fa6fd242b34da6824ce77783b730ae34c353.zip gdb-9cb3fa6fd242b34da6824ce77783b730ae34c353.tar.gz gdb-9cb3fa6fd242b34da6824ce77783b730ae34c353.tar.bz2 |
2004-08-26 Paolo Bonzini <bonzini@gnu.org>
* Makefile.def (bootstrap stages): Add 'lean' parameter.
* Makefile.tpl (configure-stageN-*, all-stageN-*): Turned into
phony targets; do not generate timestamp files.
(distclean-stageN): Remove references to their timestamp files.
(restageN, touch-stageN): Remove.
(stageN-bubble): Rewritten.
(compare): Support lean bootstraps.
* Makefile.in: Regenerate.
* configure.in: Only warn when bootstrapping but
build != host or build != target. Support lean bootstraps.
* configure: Regenerate.
Sync from gcc:
2004-08-26 Phil Edwards <phil@codesourcery.com>
* configure.in: Give a better error message if GMP/MPFR are missing
and a language needing them has been requested.
* configure: Regenerated.
2004-08-25 Phil Edwards <phil@codesourcery.com>
* configure.in: Print a list of available language front-ends if
a requested one is missing. Tidy stray tab characters.
* configure: Regenerated.
Diffstat (limited to 'Makefile.tpl')
-rw-r--r-- | Makefile.tpl | 88 |
1 files changed, 32 insertions, 56 deletions
diff --git a/Makefile.tpl b/Makefile.tpl index 27ab1fb..fed6824 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -1376,19 +1376,19 @@ POSTSTAGE1_FLAGS_TO_PASS = \ .PHONY: stage[+id+]-start stage[+id+]-end stage[+id+]-start:: - [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : + @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \ echo stage[+id+] > stage_current ; \ echo stage[+id+] > stage_last[+ FOR host_modules +][+ IF bootstrap +] @if [+ module +] - [ -d stage[+id+]-[+module+] ] || mkdir stage[+id+]-[+module+]; \ + @[ -d stage[+id+]-[+module+] ] || mkdir stage[+id+]-[+module+]; \ set stage[+id+]-[+module+] [+module+] ; @CREATE_LINK_TO_DIR@ [+ IF prev +] ; \ set stage[+prev+]-[+module+] prev-[+module+] ; @CREATE_LINK_TO_DIR@ [+ ENDIF prev +] @endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +] stage[+id+]-end:: - rm -f stage_current[+ FOR host_modules +][+ IF bootstrap +] + @rm -f stage_current[+ FOR host_modules +][+ IF bootstrap +] @if [+ module +] - set [+module+] stage[+id+]-[+module+] ; @UNDO_LINK_TO_DIR@ [+ IF prev +] ; \ + @set [+module+] stage[+id+]-[+module+] ; @UNDO_LINK_TO_DIR@ [+ IF prev +] ; \ set prev-[+module+] stage[+prev+]-[+module+] ; @UNDO_LINK_TO_DIR@ [+ ENDIF prev +] @endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +] @@ -1396,12 +1396,14 @@ stage[+id+]-end:: # are remade, but not reconfigured. The next stage (if any) will not # be reconfigured as well. .PHONY: stage[+id+]-bubble -stage[+id+]-bubble:: [+ IF prev +]stage[+prev+]-bubble[+ ENDIF +] - @case `echo all-stage[+id+]-*` in \ - 'all-stage[+id+]-*') ;; \ - *) echo Remaking stage [+id+] ; rm -f all-stage[+id+]-* ;; \ - esac ; \ - $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage[+id+] +stage[+id+]-bubble:: [+ IF prev +]stage[+prev+]-bubble[+ ENDIF +][+IF lean +] + @bootstrap_lean@-rm -rf stage[+lean+]-* ; $(STAMP) stage[+lean+]-lean[+ ENDIF lean +] + @if test -f stage[+id+]-lean [+ + IF prev +]|| test -f stage[+prev+]-lean [+ ENDIF prev +] ; then \ + echo Skipping rebuild of stage[+id+] ; \ + else \ + $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage[+id+]; \ + fi .PHONY: all-stage[+id+] all-stage[+id+]: [+ FOR host_modules +][+ IF bootstrap +]\ @@ -1409,19 +1411,17 @@ all-stage[+id+]: [+ FOR host_modules +][+ IF bootstrap +]\ ENDIF bootstrap+] [+ ENDFOR host_modules +] [+ FOR host_modules +][+ IF bootstrap +] +.PHONY: configure-stage[+id+]-[+module+] maybe-configure-stage[+id+]-[+module+] +.PHONY: all-stage[+id+]-[+module+] maybe-all-stage[+id+]-[+module+] + maybe-configure-stage[+id+]-[+module+]: maybe-all-stage[+id+]-[+module+]: @if [+module+]-bootstrap maybe-configure-stage[+id+]-[+module+]: configure-stage[+id+]-[+module+] -configure-stage[+id+]-[+module+]: [+ IF prev +] maybe-all-stage[+prev+]-[+module+] [+ ENDIF prev +] - $(MAKE) stage[+id+]-start - @if [ -f stage[+id+]-[+module+]/Makefile ] ; then \ - $(STAMP) configure-stage[+id+]-[+module+] ; \ - exit 0; \ - else \ - true ; \ - fi ; \ +configure-stage[+id+]-[+module+]: + @$(MAKE) stage[+id+]-start + @[ -f [+module+]/Makefile ] && exit 0 || : ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; [+ IF prev +] \ $(STAGE_HOST_EXPORTS) [+ ELSE prev +] \ @@ -1441,12 +1441,11 @@ configure-stage[+id+]-[+module+]: [+ IF prev +] maybe-all-stage[+prev+]-[+module esac; \ $(SHELL) $${libsrcdir}/configure \ $(HOST_CONFIGARGS) $${srcdiroption} \ - [+stage_configure_flags+] [+extra_configure_flags+] && \ - $(STAMP) ../configure-stage[+id+]-[+module+] + [+stage_configure_flags+] [+extra_configure_flags+] maybe-all-stage[+id+]-[+module+]: all-stage[+id+]-[+module+] all-stage[+id+]-[+module+]: configure-stage[+id+]-[+module+] - $(MAKE) stage[+id+]-start + @$(MAKE) stage[+id+]-start @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; [+ IF prev +] \ $(STAGE_HOST_EXPORTS) [+ ELSE prev +] \ @@ -1454,8 +1453,7 @@ all-stage[+id+]-[+module+]: configure-stage[+id+]-[+module+] cd [+module+] && \ $(MAKE) $(FLAGS_TO_PASS) [+ IF prev +] \ $(POSTSTAGE1_FLAGS_TO_PASS) [+ ENDIF prev +] \ - [+stage_make_flags+] [+extra_make_flags+] && \ - $(STAMP) ../all-stage[+id+]-[+module+] + [+stage_make_flags+] [+extra_make_flags+] @endif [+module+]-bootstrap [+ ENDIF bootstrap +][+ ENDFOR host_modules +] @@ -1463,8 +1461,12 @@ all-stage[+id+]-[+module+]: configure-stage[+id+]-[+module+] # only possibility, but now it conflicts with no-bootstrap rules @if gcc-bootstrap [+ IF compare-target +] -[+compare-target+]: all-stage[+id+]-gcc - [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : +[+compare-target+]: + @if test -f stage[+prev+]-lean; then \ + echo Cannot compare object files as stage [+prev+] was deleted. ; \ + exit 0 ; \ + fi; \ + [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \ @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ rm -f .bad_compare ; \ @@ -1483,49 +1485,23 @@ all-stage[+id+]-[+module+]: configure-stage[+id+]-[+module+] else \ true; \ fi ; \ - $(STAMP) [+compare-target+] + $(STAMP) [+compare-target+][+ IF prev +] + @bootstrap_lean@-rm -rf stage[+prev+]-* ; $(STAMP) stage[+prev+]-lean[+ ENDIF prev +] [+ ENDIF compare-target +] [+ IF bootstrap-target +] .PHONY: [+bootstrap-target+] -[+bootstrap-target+]: stage[+id+]-bubble [+ - IF compare-target +] [+compare-target+] [+ - ENDIF compare-target +] all +[+bootstrap-target+]: stage[+id+]-bubble [+compare-target+] all [+ ENDIF bootstrap-target +] -.PHONY: restage[+id+] touch-stage[+id+] distclean-stage[+id+] +.PHONY: distclean-stage[+id+] # Rules to wipe a stage and all the following ones, used for cleanstrap [+ IF prev +]distclean-stage[+prev+]:: distclean-stage[+id+] [+ ENDIF prev +] distclean-stage[+id+]:: [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : - rm -rf configure-stage[+id+]-* all-stage[+id+]-* stage[+id+]-* [+ - IF compare-target +][+compare-target+] [+ ENDIF compare-target +] - -# Rules to renew the timestamp on a stage and all the following ones -[+ IF prev +]touch-stage[+prev+]:: touch-stage[+id+] [+ ENDIF prev +] -touch-stage[+id+]:: - @case `echo configure-stage[+id+]-*` in \ - 'configure-stage[+id+]-*') ;; \ - *) \ - echo '$(STAMP)' configure-stage[+id+]-* && \ - $(STAMP) configure-stage[+id+]-* ;; \ - esac ; \ - case `echo all-stage[+id+]-*` in \ - 'all-stage[+id+]-*') ;; \ - *) \ - echo '$(STAMP)' all-stage[+id+]-* && \ - $(STAMP) all-stage[+id+]-* ;; \ - esac - -# After building a stage, touch the following ones -[+ IF prev +]restage[+prev+]:: touch-stage[+id+] [+ ENDIF prev +] -restage[+id+]:: - rm -rf all-stage[+id+]-* [+ + rm -rf stage[+id+]-* [+ IF compare-target +][+compare-target+] [+ ENDIF compare-target +] - $(MAKE) $(RECURSE_FLAGS_TO_PASS) [+ - IF compare-target +][+compare-target+] [+ - ELSE +] all-stage[+id+] [+ ENDIF compare-target +] [+ IF cleanstrap-target +] .PHONY: [+cleanstrap-target+] |