From 2dfbef6d47202babd8c6cffb5d6bc9bb0972657d Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 25 May 2005 14:18:54 +0000 Subject: [PATCH] Makefile.tpl (stage[+id+]-start): Iterate over target module as well. 2005-05-25 Paolo Bonzini * Makefile.tpl (stage[+id+]-start): Iterate over target module as well. (Dependencies): Consider target modules for bootstrap dependencies. Make target bootstrap modules depend on each stage's gcc. * Makefile.in: Regenerate. From-SVN: r100151 --- ChangeLog | 7 +++++++ Makefile.in | 13 +++++++------ Makefile.tpl | 32 +++++++++++++++++++++++++++----- 3 files changed, 41 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index e3b91286590..897a621ad1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-05-25 Paolo Bonzini + + * Makefile.tpl (stage[+id+]-start): Iterate over target module as well. + (Dependencies): Consider target modules for bootstrap dependencies. + Make target bootstrap modules depend on each stage's gcc. + * Makefile.in: Regenerate. + 2005-05-20 Paolo Bonzini * Makefile.def (configure-gcc): Depend on binutils having been built. diff --git a/Makefile.in b/Makefile.in index 719b091f211..1e080926569 100644 --- a/Makefile.in +++ b/Makefile.in @@ -33414,7 +33414,7 @@ stage1-start:: @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \ echo stage1 > stage_current ; \ echo stage1 > stage_last; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR) @if bfd @cd $(HOST_SUBDIR); [ -d stage1-bfd ] || \ mkdir stage1-bfd; \ @@ -33557,7 +33557,7 @@ stage2-start:: @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \ echo stage2 > stage_current ; \ echo stage2 > stage_last; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR) @if bfd @cd $(HOST_SUBDIR); [ -d stage2-bfd ] || \ mkdir stage2-bfd; \ @@ -33743,7 +33743,7 @@ stage3-start:: @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \ echo stage3 > stage_current ; \ echo stage3 > stage_last; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR) @if bfd @cd $(HOST_SUBDIR); [ -d stage3-bfd ] || \ mkdir stage3-bfd; \ @@ -33960,7 +33960,7 @@ stage4-start:: @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \ echo stage4 > stage_current ; \ echo stage4 > stage_last; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR) @if bfd @cd $(HOST_SUBDIR); [ -d stage4-bfd ] || \ mkdir stage4-bfd; \ @@ -34174,7 +34174,7 @@ stageprofile-start:: @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \ echo stageprofile > stage_current ; \ echo stageprofile > stage_last; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR) @if bfd @cd $(HOST_SUBDIR); [ -d stageprofile-bfd ] || \ mkdir stageprofile-bfd; \ @@ -34357,7 +34357,7 @@ stagefeedback-start:: @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \ echo stagefeedback > stage_current ; \ echo stagefeedback > stage_last; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR) @if bfd @cd $(HOST_SUBDIR); [ -d stagefeedback-bfd ] || \ mkdir stagefeedback-bfd; \ @@ -34654,6 +34654,7 @@ configure-target-qthreads: maybe-all-target-newlib maybe-all-target-libgloss + # With all the machinery above in place, it is pretty easy to generate # dependencies. Host dependencies are a bit more complex because we have # to check for bootstrap/prebootstrap dependencies. To resolve diff --git a/Makefile.tpl b/Makefile.tpl index 2c114e40681..365301d73aa 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -1340,7 +1340,7 @@ stage[+id+]-start:: @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \ echo stage[+id+] > stage_current ; \ echo stage[+id+] > stage_last; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)[+ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR)[+ FOR host_modules +][+ IF bootstrap +] @if [+ module +] @cd $(HOST_SUBDIR); [ -d stage[+id+]-[+module+] ] || \ @@ -1349,7 +1349,16 @@ stage[+id+]-start:: @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 +] +@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +][+ + FOR target_modules +][+ IF bootstrap +] +@if target-[+ module +] + @cd $(TARGET_SUBDIR); [ -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 target-[+ module +][+ ENDIF bootstrap +][+ ENDFOR target_modules +] stage[+id+]-end:: @rm -f stage_current[+ FOR host_modules +][+ IF bootstrap +] @@ -1358,7 +1367,14 @@ stage[+id+]-end:: @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 +] +@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +][+ + FOR target_modules +][+ IF bootstrap +] +@if target-[+ module +] + @cd $(HOST_SUBDIR); 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 target_modules +] # Bubble a bugfix through all the stages up to stage [+id+]. They # are remade, but not reconfigured. The next stage (if any) will not @@ -1467,7 +1483,10 @@ do-distclean: distclean-stage1 # -------------------------------------- # Generic dependencies for target modules on host stuff, especially gcc -[+ FOR target_modules +] +[+ FOR target_modules +][+ IF bootstrap +] +@if gcc-bootstrap[+ FOR bootstrap_stage +] +configure-stage[+id+]-target-[+module+]: maybe-all-stage[+id+]-gcc[+ ENDFOR +] +@endif gcc-bootstrap[+ ENDIF bootstrap +] configure-target-[+module+]: maybe-all-gcc [+ ENDFOR target_modules +] @@ -1535,7 +1554,6 @@ configure-target-[+module+]: maybe-all-target-newlib maybe-all-target-libgloss "prebootstrap" (if (or (= (dep-subtarget "on") "install-") - (=* (dep-module "on") "target-") (not (hash-ref boot-modules (dep-module "module"))) (not (hash-ref boot-modules (dep-module "on")))) "normal" @@ -1549,6 +1567,10 @@ configure-target-[+module+]: maybe-all-target-newlib maybe-all-target-libgloss (if (exist? "bootstrap") (hash-create-handle! boot-modules (get "module") #t)) "" +][+ ENDFOR host_modules +] +[+ FOR target_modules +][+ + (if (exist? "bootstrap") + (hash-create-handle! boot-modules (string-append "target-" (get "module")) #t)) + "" +][+ ENDFOR target_modules +] # With all the machinery above in place, it is pretty easy to generate # dependencies. Host dependencies are a bit more complex because we have