This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Autogen-erated dependencies for the toplevel


The attached patch addresses all the issues you gave me. Unfortunately it involves more Scheme magic than I liked; at which point, I decided to use Scheme for almost everything about dependencies, because it is more readable that way.

Unfortunately I am not sure about the way to split the patch, but I hope I can provide enough assurance about the resulting Makefile.in so that the patch can go in (see later).

The scheme is a bit more verbose, and requires including in Makefile.def about the same stuff that went in Makefile.tpl but:

1) is more intuitive and readable than Makefile.tpl
1) and probably more readable even than my previous attempt
2) autogeneration of bootstrap/prebootstrap stuff is better

> You should find a way to retain those distinctions. Sorry.

I kinda expected it, nothing to be sorry about.

(1) This change requires testing with newlib/libgloss, binutils,
and gdb.

With the alternative scheme I am submitting now, I can do much better than testing :-) because the output is so much similar that I could compare the make database (obtained from "make -p FOOBAR | grep : | grep -v '#' | sort -u").


The diff is attached, and a detailed list of differences follows:

all-stage*, configure-stage*: New dependencies, not in deps.diff.

all-automake, all-bison, all-build-byacc, all-build-flex, all-build-m4, all-diff, all-fastjar, all-fileutils, all-flex, all-gzip, all-hello, all-m4, all-make, all-patch, all-recode, all-sed, all-tar, all-texinfo: Reflects more precise dependencies introduced in Makefile.def

all-gcc, all-libcpp, all-libiberty, configure-libcpp: Reflects hard dependencies introduced in Makefile.def

all-bootstrap: Renamed to all-prebootstrap; they are a bit reordered, but the targets match exactly what is done in Makefile.def.

all-target-gperf: Removed useless dependency on the target libiberty, and a dependency on the target libstdc++-v3 already present in configure-target-gperf.

configure-target-libjava: Added missing dependency on maybe-all-target-libstdc++-v3.

configure-target-libmudflap: Added missing dependency on $(ALL_GCC_C)

(4) You've lost this line:
GDB_TK = @GDB_TK@
and these dependencies:
all-gdb: $(gdbnlmrequirements) $(GDB_TK)

This is a pasto. I exactly meant to leave it in Makefile.tpl but forgot about it.


(5) A future cleanup project I've been working on will require a dependency
of a host directory on a target directory, screwy though that may sound.
(Again, if necessary, this can be done by hand in Makefile.tpl while
autogenerating the rest.)

This is ok with my new scheme.


Tested i686-pc-linux-gnu the same as the previous version, and with the additional manual check above. Ok for mainline and src?

Paolo

-all-automake: maybe-all-m4 maybe-all-texinfo
+all-automake: maybe-all-m4 maybe-all-texinfo maybe-all-autoconf

-all-bison: maybe-all-texinfo
+all-bison: maybe-all-intl maybe-all-texinfo

+all-build-byacc: maybe-all-build-texinfo

-all-build-flex: maybe-all-build-texinfo
+all-build-flex: maybe-all-build-texinfo maybe-all-build-bison maybe-all-build-byacc maybe-all-build-m4

-all-build-m4: maybe-all-build-libiberty maybe-all-build-texinfo
+all-build-m4: maybe-all-build-texinfo

-all-diff: maybe-all-libiberty
+all-diff: maybe-all-intl maybe-all-texinfo

-all-fastjar: configure-fastjar maybe-all-zlib maybe-all-libiberty
+all-fastjar: configure-fastjar maybe-all-zlib maybe-all-texinfo maybe-all-libiberty

-all-fileutils: maybe-all-libiberty
+all-fileutils: maybe-all-intl maybe-all-texinfo

-all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc
+all-flex: maybe-all-bison maybe-all-byacc maybe-all-intl maybe-all-m4 maybe-all-texinfo

-all-gcc: configure-gcc maybe-all-libiberty maybe-all-intl maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib maybe-all-libbanshee maybe-all-libcpp maybe-all-build-libiberty
+all-gcc: configure-gcc all-libiberty maybe-all-intl maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib maybe-all-libbanshee all-libcpp maybe-all-build-libiberty

-all-gzip: maybe-all-libiberty
+all-gzip: maybe-all-intl maybe-all-zlib maybe-all-texinfo

-all-hello: maybe-all-libiberty
+all-hello: maybe-all-intl maybe-all-texinfo

-all-libcpp: configure-libcpp maybe-all-libiberty maybe-all-intl
+all-libcpp: configure-libcpp all-libiberty maybe-all-intl

-all-m4: maybe-all-libiberty maybe-all-texinfo
+all-m4: maybe-all-intl maybe-all-texinfo

-all-make: maybe-all-libiberty maybe-all-intl
+all-make: maybe-all-intl maybe-all-texinfo maybe-all-texinfo

-all-patch: maybe-all-libiberty
+all-patch: maybe-all-texinfo

-all-bootstrap: maybe-all-binutils maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-gas maybe-all-intl maybe-all-ld maybe-all-libcpp maybe-all-libbanshee maybe-all-libiberty maybe-all-texinfo maybe-all-zlib
+all-prebootstrap: maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-texinfo maybe-all-bfd maybe-all-opcodes maybe-all-binutils maybe-all-gas maybe-all-intl maybe-all-ld maybe-all-libcpp maybe-all-libbanshee maybe-all-libiberty maybe-all-zlib

-all-recode: maybe-all-libiberty
+all-recode: maybe-all-texinfo

-all-sed: maybe-all-libiberty
+all-sed: maybe-all-texinfo

-all-tar: maybe-all-libiberty
+all-tar: maybe-all-texinfo

-all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3

-all-texinfo: maybe-all-libiberty

-all-uudecode: maybe-all-libiberty
+all-uudecode: maybe-all-texinfo

-configure-libcpp: maybe-configure-libiberty maybe-configure-intl
+configure-libcpp: configure-libiberty maybe-configure-intl

-configure-target-libjava: i686-pc-linux-gnu/libjava/multilib.out maybe-all-gcc maybe-all-target-newlib maybe-all-target-libgloss maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi
+configure-target-libjava: i686-pc-linux-gnu/libjava/multilib.out maybe-all-gcc maybe-all-target-newlib maybe-all-target-libgloss maybe-all-target-libstdc++-v3 maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi

-configure-target-libmudflap: i686-pc-linux-gnu/libmudflap/multilib.out
+configure-target-libmudflap: i686-pc-linux-gnu/libmudflap/multilib.out maybe-all-gcc
2004-08-03  Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.def (bfd, opcodes, gcc, zlib): Mark as bootstrap module.
	(bison, byacc, flex, texinfo): Do not mark as bootstrap module.
	(Dependencies): New section.
	* Makefile.tpl (Dependencies): Generate from Makefile.def.
	(configure-target-[+module+]): Depend on maybe-all-gcc
	(all-prebootstrap): New name of all-bootstrap.  Changed throughout.
	(toplevel profiledbootstrap): Fix dependencies.
	* Makefile.in: Regenerate.

Index: Makefile.def
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.def,v
retrieving revision 1.30
diff -u -r1.30 Makefile.def
*** Makefile.def	3 Aug 2004 09:35:45 -0000	1.30
--- Makefile.def	4 Aug 2004 08:53:07 -0000
***************
*** 36,46 ****
  host_modules= { module= autoconf; };
  host_modules= { module= automake; };
  host_modules= { module= bash; };
! host_modules= { module= bfd; };
! host_modules= { module= opcodes; };
  host_modules= { module= binutils; bootstrap=true; };
! host_modules= { module= bison; no_check_cross= true; bootstrap=true; };
! host_modules= { module= byacc; no_check_cross= true; bootstrap=true; };
  host_modules= { module= bzip2; };
  host_modules= { module= dejagnu; };
  host_modules= { module= diff; };
--- 36,46 ----
  host_modules= { module= autoconf; };
  host_modules= { module= automake; };
  host_modules= { module= bash; };
! host_modules= { module= bfd; bootstrap=true; };
! host_modules= { module= opcodes; bootstrap=true; };
  host_modules= { module= binutils; bootstrap=true; };
! host_modules= { module= bison; no_check_cross= true; };
! host_modules= { module= byacc; no_check_cross= true; };
  host_modules= { module= bzip2; };
  host_modules= { module= dejagnu; };
  host_modules= { module= diff; };
***************
*** 50,58 ****
  host_modules= { module= fileutils; };
  host_modules= { module= findutils; };
  host_modules= { module= find; };
! host_modules= { module= flex; no_check_cross= true; bootstrap=true; };
  host_modules= { module= gas; bootstrap=true; };
! host_modules= { module= gcc; extra_make_flags="$(EXTRA_GCC_FLAGS)"; };
  host_modules= { module= gawk; };
  host_modules= { module= gettext; };
  host_modules= { module= gnuserv; };
--- 50,59 ----
  host_modules= { module= fileutils; };
  host_modules= { module= findutils; };
  host_modules= { module= find; };
! host_modules= { module= flex; no_check_cross= true; };
  host_modules= { module= gas; bootstrap=true; };
! host_modules= { module= gcc; bootstrap=true; 
! 		extra_make_flags="$(EXTRA_GCC_FLAGS)"; };
  host_modules= { module= gawk; };
  host_modules= { module= gettext; };
  host_modules= { module= gnuserv; };
***************
*** 86,92 ****
  host_modules= { module= sid; };
  host_modules= { module= sim; };
  host_modules= { module= tar; };
! host_modules= { module= texinfo; no_install= true; bootstrap=true; };
  host_modules= { module= textutils; };
  host_modules= { module= time; };
  host_modules= { module= uudecode; };
--- 87,93 ----
  host_modules= { module= sid; };
  host_modules= { module= sim; };
  host_modules= { module= tar; };
! host_modules= { module= texinfo; no_install= true; };
  host_modules= { module= textutils; };
  host_modules= { module= time; };
  host_modules= { module= uudecode; };
***************
*** 221,226 ****
--- 222,447 ----
  flags_to_pass = { flag= RANLIB_FOR_TARGET ; };
  flags_to_pass = { flag= WINDRES_FOR_TARGET ; };
  
+ // Inter-module dependencies
+ 
+ // Build modules
+ dependencies = { module=all-build-bison; on=all-build-texinfo; };
+ dependencies = { module=all-build-byacc; on=all-build-texinfo; };
+ dependencies = { module=all-build-flex; on=all-build-texinfo; };
+ dependencies = { module=all-build-flex; on=all-build-bison; };
+ dependencies = { module=all-build-flex; on=all-build-byacc; };
+ dependencies = { module=all-build-flex; on=all-build-m4; };
+ dependencies = { module=all-build-libiberty; on=all-build-texinfo; };
+ dependencies = { module=all-build-m4; on=all-build-texinfo; };
+ 
+ // Host modules specific to gcc.
+ dependencies = { module=configure-gcc; on=configure-intl; };
+ dependencies = { module=configure-gcc; on=configure-binutils; };
+ dependencies = { module=configure-gcc; on=configure-gas; };
+ dependencies = { module=configure-gcc; on=configure-ld; };
+ dependencies = { module=configure-gcc; on=configure-bison; };
+ dependencies = { module=configure-gcc; on=configure-flex; };
+ dependencies = { module=all-gcc; on=all-libiberty; hard=true; };
+ dependencies = { module=all-gcc; on=all-intl; };
+ dependencies = { module=all-gcc; on=all-texinfo; };
+ dependencies = { module=all-gcc; on=all-bison; };
+ dependencies = { module=all-gcc; on=all-byacc; };
+ dependencies = { module=all-gcc; on=all-flex; };
+ dependencies = { module=all-gcc; on=all-binutils; };
+ dependencies = { module=all-gcc; on=all-gas; };
+ dependencies = { module=all-gcc; on=all-ld; };
+ dependencies = { module=all-gcc; on=all-zlib; };
+ dependencies = { module=all-gcc; on=all-libbanshee; };
+ dependencies = { module=all-gcc; on=all-libcpp; hard=true; };
+ dependencies = { module=all-gcc; on=all-build-libiberty; };
+ 
+ dependencies = { module=configure-libcpp; on=configure-libiberty; hard=true; };
+ dependencies = { module=configure-libcpp; on=configure-intl; };
+ dependencies = { module=all-libcpp; on=all-libiberty; hard=true; };
+ dependencies = { module=all-libcpp; on=all-intl; };
+ 
+ // Host modules specific to gdb.
+ dependencies = { module=configure-gdb; on=configure-itcl; };
+ dependencies = { module=configure-gdb; on=configure-tcl; };
+ dependencies = { module=configure-gdb; on=configure-tk; };
+ dependencies = { module=configure-gdb; on=configure-sim; };
+ dependencies = { module=all-gdb; on=all-libiberty; };
+ dependencies = { module=all-gdb; on=all-opcodes; };
+ dependencies = { module=all-gdb; on=all-bfd; };
+ dependencies = { module=all-gdb; on=all-mmalloc; };
+ dependencies = { module=all-gdb; on=all-readline; };
+ dependencies = { module=all-gdb; on=all-bison; };
+ dependencies = { module=all-gdb; on=all-byacc; };
+ dependencies = { module=all-gdb; on=all-sim; };
+ dependencies = { module=install-gdb; on=install-tcl; };
+ dependencies = { module=install-gdb; on=install-tk; };
+ dependencies = { module=install-gdb; on=install-itcl; };
+ dependencies = { module=install-gdb; on=install-tix; };
+ dependencies = { module=install-gdb; on=install-libgui; };
+ 
+ dependencies = { module=configure-libgui; on=configure-tcl; };
+ dependencies = { module=configure-libgui; on=configure-tk; };
+ dependencies = { module=all-libgui; on=all-tcl; };
+ dependencies = { module=all-libgui; on=all-tk; };
+ dependencies = { module=all-libgui; on=all-itcl; };
+ 
+ // Host modules specific to binutils.
+ dependencies = { module=configure-bfd; on=configure-libiberty; hard=true; };
+ dependencies = { module=all-bfd; on=all-libiberty; };
+ dependencies = { module=all-bfd; on=all-intl; };
+ 
+ dependencies = { module=all-binutils; on=all-libiberty; };
+ dependencies = { module=all-binutils; on=all-opcodes; };
+ dependencies = { module=all-binutils; on=all-bfd; };
+ dependencies = { module=all-binutils; on=all-flex; };
+ dependencies = { module=all-binutils; on=all-bison; };
+ dependencies = { module=all-binutils; on=all-byacc; };
+ dependencies = { module=all-binutils; on=all-intl; };
+ 
+ // We put install-opcodes before install-binutils because the installed
+ // binutils might be on PATH, and they might need the shared opcodes
+ // library.
+ dependencies = { module=install-binutils; on=install-opcodes; };
+ 
+ // libopcodes depends on libbfd
+ dependencies = { module=install-opcodes; on=install-bfd; };
+ 
+ dependencies = { module=all-gas; on=all-libiberty; };
+ dependencies = { module=all-gas; on=all-opcodes; };
+ dependencies = { module=all-gas; on=all-bfd; };
+ dependencies = { module=all-gas; on=all-intl; };
+ dependencies = { module=all-gprof; on=all-libiberty; };
+ dependencies = { module=all-gprof; on=all-bfd; };
+ dependencies = { module=all-gprof; on=all-opcodes; };
+ dependencies = { module=all-gprof; on=all-intl; };
+ dependencies = { module=all-ld; on=all-libiberty; };
+ dependencies = { module=all-ld; on=all-bfd; };
+ dependencies = { module=all-ld; on=all-opcodes; };
+ dependencies = { module=all-ld; on=all-bison; };
+ dependencies = { module=all-ld; on=all-byacc; };
+ dependencies = { module=all-ld; on=all-flex; };
+ dependencies = { module=all-ld; on=all-intl; };
+ 
+ dependencies = { module=all-opcodes; on=all-bfd; };
+ dependencies = { module=all-opcodes; on=all-libiberty; };
+ 
+ // Other host modules in the 'src' repository.
+ dependencies = { module=all-dejagnu; on=all-tcl; };
+ dependencies = { module=all-dejagnu; on=all-expect; };
+ dependencies = { module=all-dejagnu; on=all-tk; };
+ dependencies = { module=configure-expect; on=configure-tcl; };
+ dependencies = { module=configure-expect; on=configure-tk; };
+ dependencies = { module=all-expect; on=all-tcl; };
+ dependencies = { module=all-expect; on=all-tk; };
+ 
+ // We put install-tcl before install-itcl because itcl wants to run a
+ // program on installation which uses the Tcl libraries.
+ dependencies = { module=configure-itcl; on=configure-tcl; };
+ dependencies = { module=configure-itcl; on=configure-tk; };
+ dependencies = { module=all-itcl; on=all-tcl; };
+ dependencies = { module=all-itcl; on=all-tk; };
+ dependencies = { module=install-itcl; on=install-tcl; };
+ 
+ dependencies = { module=configure-tk; on=configure-tcl; };
+ dependencies = { module=all-tk; on=all-tcl; };
+ dependencies = { module=configure-tix; on=configure-tcl; };
+ dependencies = { module=configure-tix; on=configure-tk; };
+ dependencies = { module=all-tix; on=all-tcl; };
+ dependencies = { module=all-tix; on=all-tk; };
+ 
+ dependencies = { module=all-sid; on=all-libiberty; };
+ dependencies = { module=all-sid; on=all-bfd; };
+ dependencies = { module=all-sid; on=all-opcodes; };
+ dependencies = { module=all-sid; on=all-tcl; };
+ dependencies = { module=all-sid; on=all-tk; };
+ dependencies = { module=install-sid; on=install-tcl; };
+ dependencies = { module=install-sid; on=install-tk; };
+ 
+ dependencies = { module=all-sim; on=all-libiberty; };
+ dependencies = { module=all-sim; on=all-bfd; };
+ dependencies = { module=all-sim; on=all-opcodes; };
+ dependencies = { module=all-sim; on=all-readline; };
+ dependencies = { module=all-sim; on=configure-gdb; };
+ 
+ // Other host modules.
+ dependencies = { module=all-fastjar; on=all-zlib; };
+ dependencies = { module=all-fastjar; on=all-texinfo; };
+ dependencies = { module=all-fastjar; on=all-libiberty; };
+ 
+ // Warning, these are not well tested.
+ dependencies = { module=all-autoconf; on=all-m4; };
+ dependencies = { module=all-autoconf; on=all-texinfo; };
+ dependencies = { module=all-automake; on=all-m4; };
+ dependencies = { module=all-automake; on=all-texinfo; };
+ dependencies = { module=all-automake; on=all-autoconf; };
+ dependencies = { module=all-bison; on=all-intl; };
+ dependencies = { module=all-bison; on=all-texinfo; };
+ dependencies = { module=all-diff; on=all-intl; };
+ dependencies = { module=all-diff; on=all-texinfo; };
+ dependencies = { module=all-fileutils; on=all-intl; };
+ dependencies = { module=all-fileutils; on=all-texinfo; };
+ dependencies = { module=all-flex; on=all-bison; };
+ dependencies = { module=all-flex; on=all-byacc; };
+ dependencies = { module=all-flex; on=all-intl; };
+ dependencies = { module=all-flex; on=all-m4; };
+ dependencies = { module=all-flex; on=all-texinfo; };
+ dependencies = { module=all-gzip; on=all-intl; };
+ dependencies = { module=all-gzip; on=all-zlib; };
+ dependencies = { module=all-gzip; on=all-texinfo; };
+ dependencies = { module=all-hello; on=all-intl; };
+ dependencies = { module=all-hello; on=all-texinfo; };
+ dependencies = { module=all-m4; on=all-intl; };
+ dependencies = { module=all-m4; on=all-texinfo; };
+ dependencies = { module=all-make; on=all-intl; };
+ dependencies = { module=all-make; on=all-texinfo; };
+ dependencies = { module=all-patch; on=all-texinfo; };
+ dependencies = { module=all-make; on=all-texinfo; };
+ dependencies = { module=all-prms; on=all-libiberty; };
+ dependencies = { module=all-recode; on=all-texinfo; };
+ dependencies = { module=all-sed; on=all-texinfo; };
+ dependencies = { module=all-send-pr; on=all-prms; };
+ dependencies = { module=all-tar; on=all-texinfo; };
+ dependencies = { module=all-uudecode; on=all-texinfo; };
+ 
+ // Target modules.  These can also have dependencies on the language
+ // environment (e.g. on libstdc++).
+ lang_env_dependencies = { module=boehm-gc; };
+ lang_env_dependencies = { module=gperf; cxx=true; };
+ lang_env_dependencies = { module=libada; };
+ lang_env_dependencies = { module=libgfortran; };
+ lang_env_dependencies = { module=libffi; };
+ lang_env_dependencies = { module=libjava; cxx=true; };
+ lang_env_dependencies = { module=libobjc; };
+ lang_env_dependencies = { module=libstdc++-v3; };
+ lang_env_dependencies = { module=zlib; };
+ 
+ dependencies = { module=configure-target-boehm-gc; on=configure-target-qthreads; };
+ dependencies = { module=configure-target-fastjar; on=configure-target-zlib; };
+ dependencies = { module=all-target-fastjar; on=all-target-zlib; };
+ dependencies = { module=all-target-fastjar; on=all-target-libiberty; };
+ dependencies = { module=configure-target-libjava; on=configure-target-zlib; };
+ dependencies = { module=configure-target-libjava; on=configure-target-boehm-gc; };
+ dependencies = { module=configure-target-libjava; on=configure-target-qthreads; };
+ dependencies = { module=configure-target-libjava; on=configure-target-libffi; };
+ dependencies = { module=all-target-libjava; on=all-fastjar; };
+ dependencies = { module=all-target-libjava; on=all-target-zlib; };
+ dependencies = { module=all-target-libjava; on=all-target-boehm-gc; };
+ dependencies = { module=all-target-libjava; on=all-target-qthreads; };
+ dependencies = { module=all-target-libjava; on=all-target-libffi; };
+ dependencies = { module=all-target-libobjc; on=all-target-libiberty; };
+ dependencies = { module=all-target-libstdc++-v3; on=all-target-libiberty; };
+ 
+ // Target modules in the 'src' repository.
+ lang_env_dependencies = { module=examples; };
+ lang_env_dependencies = { module=libtermcap; };
+ lang_env_dependencies = { module=rda; };
+ lang_env_dependencies = { module=winsup; };
+ lang_env_dependencies = { module=qthreads; };
+ 
+ dependencies = { module=all-target-libgloss; on=configure-target-newlib; };
+ dependencies = { module=all-target-winsup; on=all-target-libiberty; };
+ dependencies = { module=all-target-winsup; on=all-target-libtermcap; };
+ 
  // Toplevel bootstrap
  bootstrap_stage = {
  	id=1 ;
Index: Makefile.tpl
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.tpl,v
retrieving revision 1.109
diff -u -r1.109 Makefile.tpl
*** Makefile.tpl	3 Aug 2004 09:35:45 -0000	1.109
--- Makefile.tpl	4 Aug 2004 08:53:07 -0000
***************
*** 738,745 ****
  
  .PHONY: install-host-nogcc
  install-host-nogcc: [+
!   FOR host_modules +] \
!     maybe-install-[+module+][+
    ENDFOR host_modules +]
  
  .PHONY: install-host
--- 738,745 ----
  
  .PHONY: install-host-nogcc
  install-host-nogcc: [+
!   FOR host_modules +][+ IF (not (= (get "module") "gcc")) +] \
!     maybe-install-[+module+][+ ENDIF +][+
    ENDFOR host_modules +]
  
  .PHONY: install-host
***************
*** 1196,1202 ****
  
  GCC_STRAP_TARGETS = bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
  .PHONY: $(GCC_STRAP_TARGETS)
! $(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
  	@r=`${PWD_COMMAND}`; export r; \
  	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  	$(SET_LIB_PATH) \
--- 1196,1202 ----
  
  GCC_STRAP_TARGETS = bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
  .PHONY: $(GCC_STRAP_TARGETS)
! $(GCC_STRAP_TARGETS): all-prebootstrap configure-gcc
  	@r=`${PWD_COMMAND}`; export r; \
  	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  	$(SET_LIB_PATH) \
***************
*** 1229,1235 ****
  	echo "Building runtime libraries"; \
  	$(MAKE) $(RECURSE_FLAGS_TO_PASS) all
  
! profiledbootstrap: all-bootstrap configure-gcc
  	@r=`${PWD_COMMAND}`; export r; \
  	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  	$(SET_LIB_PATH) \
--- 1229,1235 ----
  	echo "Building runtime libraries"; \
  	$(MAKE) $(RECURSE_FLAGS_TO_PASS) all
  
! profiledbootstrap: all-prebootstrap configure-gcc
  	@r=`${PWD_COMMAND}`; export r; \
  	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  	$(SET_LIB_PATH) \
***************
*** 1363,1369 ****
  # Real targets act phony if they depend on phony targets; this hack
  # prevents gratuitous rebuilding of stage 1.
  prebootstrap:
! 	$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-bootstrap
  	$(STAMP) prebootstrap
  
  # Flags to pass to stage2 and later makes.
--- 1363,1369 ----
  # Real targets act phony if they depend on phony targets; this hack
  # prevents gratuitous rebuilding of stage 1.
  prebootstrap:
! 	$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-prebootstrap
  	$(STAMP) prebootstrap
  
  # Flags to pass to stage2 and later makes.
***************
*** 1534,1540 ****
  	  { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../gcc/&",' | $(SHELL); } && \
  	  { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../gcc/&",' | $(SHELL); }
  
! profiledbootstrap: all-bootstrap configure-gcc
  	@r=`${PWD_COMMAND}`; export r; \
  	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  	$(SET_LIB_PATH) \
--- 1534,1540 ----
  	  { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../gcc/&",' | $(SHELL); } && \
  	  { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../gcc/&",' | $(SHELL); }
  
! profiledbootstrap: all-prebootstrap configure-gcc
  	@r=`${PWD_COMMAND}`; export r; \
  	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  	$(SET_LIB_PATH) \
***************
*** 1559,1685 ****
  # Dependencies between different modules
  # --------------------------------------
  
  # There are two types of dependencies here: 'hard' dependencies, where one
  # module simply won't build without the other; and 'soft' dependencies, where
  # if the depended-on module is missing, the depending module will do without
  # or find a substitute somewhere (perhaps installed).  Soft dependencies
! # are specified by depending on a 'maybe-' target.  If you're not sure,
  # it's safer to use a soft dependency.
  
! # Build modules
! all-build-bison: maybe-all-build-texinfo
! all-build-flex: maybe-all-build-texinfo
! all-build-libiberty: maybe-all-build-texinfo
! all-build-m4: maybe-all-build-libiberty maybe-all-build-texinfo
! 
! # Host modules specific to gcc.
! # GCC needs to identify certain tools.
! # GCC also needs the information exported by the intl configure script.
! configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
! all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib maybe-all-libbanshee maybe-all-libcpp
! configure-libcpp: maybe-configure-libiberty maybe-configure-intl
! all-libcpp: maybe-all-libiberty maybe-all-intl
! # This is a slightly kludgy method of getting dependencies on 
! # all-build-libiberty correct; it would be better to build it every time.
! all-gcc: maybe-all-build-libiberty
! all-bootstrap: [+ FOR host_modules +][+ IF bootstrap +]maybe-all-[+module+] [+ ENDIF bootstrap +][+ ENDFOR host_modules +]
! 
! # Host modules specific to gdb.
! # GDB needs to know that the simulator is being built.
! configure-gdb: maybe-configure-itcl maybe-configure-tcl maybe-configure-tk maybe-configure-sim
  GDB_TK = @GDB_TK@
! all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK)
! install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui
! configure-libgui: maybe-configure-tcl maybe-configure-tk
! all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl
! 
! # Host modules specific to binutils.
! configure-bfd: configure-libiberty
! all-bfd: maybe-all-libiberty maybe-all-intl
! all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl
! # We put install-opcodes before install-binutils because the installed
! # binutils might be on PATH, and they might need the shared opcodes
! # library.
! install-binutils: maybe-install-opcodes
! # libopcodes depends on libbfd
! install-opcodes: maybe-install-bfd
! all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl
! all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl
! all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl
! all-opcodes: maybe-all-bfd maybe-all-libiberty
! 
! # Other host modules in the 'src' repository.
! all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk
! configure-expect: maybe-configure-tcl maybe-configure-tk
! all-expect: maybe-all-tcl maybe-all-tk
! configure-itcl: maybe-configure-tcl maybe-configure-tk
! all-itcl: maybe-all-tcl maybe-all-tk
! # We put install-tcl before install-itcl because itcl wants to run a
! # program on installation which uses the Tcl libraries.
! install-itcl: maybe-install-tcl
! all-sid: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-tcl maybe-all-tk
! install-sid: maybe-install-tcl maybe-install-tk
! all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline maybe-configure-gdb
! configure-tk: maybe-configure-tcl
! all-tk: maybe-all-tcl
! configure-tix: maybe-configure-tcl maybe-configure-tk
! all-tix: maybe-all-tcl maybe-all-tk
! all-texinfo: maybe-all-libiberty
! 
! # Other host modules.  Warning, these are not well tested.
! all-autoconf: maybe-all-m4 maybe-all-texinfo
! all-automake: maybe-all-m4 maybe-all-texinfo
! all-bison: maybe-all-texinfo
! all-diff: maybe-all-libiberty
! all-fastjar: maybe-all-zlib maybe-all-libiberty
! all-fileutils: maybe-all-libiberty
! all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc
! all-gzip: maybe-all-libiberty
! all-hello: maybe-all-libiberty
! all-m4: maybe-all-libiberty maybe-all-texinfo
! all-make: maybe-all-libiberty maybe-all-intl
! all-patch: maybe-all-libiberty
! all-prms: maybe-all-libiberty
! all-recode: maybe-all-libiberty
! all-sed: maybe-all-libiberty
! all-send-pr: maybe-all-prms
! all-tar: maybe-all-libiberty
! all-uudecode: maybe-all-libiberty
! 
! ALL_GCC = maybe-all-gcc
! ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss
! ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3
! 
! # Target modules specific to gcc.
! configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads
! configure-target-fastjar: maybe-configure-target-zlib
! all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty
! configure-target-libada: $(ALL_GCC_C)
! configure-target-libgfortran: $(ALL_GCC_C)
! configure-target-libffi: $(ALL_GCC_C) 
! configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi
! all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi
! configure-target-libobjc: $(ALL_GCC_C)
! all-target-libobjc: maybe-all-target-libiberty
! configure-target-libstdc++-v3: $(ALL_GCC_C)
! all-target-libstdc++-v3: maybe-all-target-libiberty
! configure-target-zlib: $(ALL_GCC_C)
! 
! # Target modules in the 'src' repository.
! configure-target-examples: $(ALL_GCC_C)
! configure-target-libgloss: $(ALL_GCC)
! all-target-libgloss: maybe-configure-target-newlib
! configure-target-libiberty: $(ALL_GCC)
! configure-target-libtermcap: $(ALL_GCC_C)
! configure-target-newlib: $(ALL_GCC)
! configure-target-rda: $(ALL_GCC_C)
! configure-target-winsup: $(ALL_GCC_C)
! all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap
! 
! # Other target modules.  Warning, these are not well tested.
! configure-target-gperf: $(ALL_GCC_CXX)
! all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3
! configure-target-qthreads: $(ALL_GCC_C)
  
  # Serialization dependencies.  Host configures don't work well in parallel to
  # each other, due to contention over config.cache.  Target configures and 
--- 1559,1686 ----
  # Dependencies between different modules
  # --------------------------------------
  
+ # Generic dependencies for target modules on host stuff, especially gcc
+ [+ FOR target_modules +]
+ configure-target-[+module+]: maybe-all-gcc
+ [+ ENDFOR target_modules +]
+ 
+ [+ FOR lang_env_dependencies +]
+ configure-target-[+module+]: maybe-all-target-newlib maybe-all-target-libgloss
+ [+ IF cxx +]configure-target-[+module+]: maybe-all-target-libstdc++-v3
+ [+ ENDIF cxx +][+ ENDFOR lang_env_dependencies +]
+ 
  # There are two types of dependencies here: 'hard' dependencies, where one
  # module simply won't build without the other; and 'soft' dependencies, where
  # if the depended-on module is missing, the depending module will do without
  # or find a substitute somewhere (perhaps installed).  Soft dependencies
! # are made here to depend on a 'maybe-' target.  If you're not sure,
  # it's safer to use a soft dependency.
  
! [+ ;; These Scheme functions build the bulk of the dependencies.
!    ;; dep-target builds a string like "maybe-all-MODULE_KIND-gcc",
!    ;; where "maybe-" is only included if HARD is true, and all-gcc
!    ;; is taken from VAR-NAME.
!    (define dep-target (lambda (module-kind var-name hard)
!       (string-append
!          (if hard "" "maybe-")
!          (dep-subtarget var-name)
!          module-kind
!          (dep-module var-name)
!       )))
! 
!    ;; make-dep builds a dependency from the MODULE and ON AutoGen vars.
!    (define make-dep (lambda (module-kind)
!       (string-append
!          (dep-target module-kind "module" #t) ": "
!          (dep-target module-kind "on" (exist? "hard")))))
! 
!    ;; dep-subtarget extracts everything up to the first dash in the given
!    ;; AutoGen variable, for example it extracts "all-" out of "all-gcc".
!    (define dep-subtarget (lambda (var-name)
!       (substring (get var-name) 0 (+ 1 (string-index (get var-name) #\-)))))
! 
!    ;; dep-module extracts everything up to the first dash in the given
!    ;; AutoGen variable, for example it extracts "gcc" out of "all-gcc".
!    (define dep-module (lambda (var-name)
!       (substring (get var-name) (+ 1 (string-index (get var-name) #\-)))))
! 
!    ;; dep-stage builds a string for the prefix of a bootstrap stage.
!    (define dep-stage (lambda ()
!       (string-append
! 	 "stage"
! 	 (get "id")
! 	 "-")))
! 
!    ;; dep-maybe is the same as the AutoGen expression "- hard 'maybe-'"
!    ;; but is written in Scheme.
!    (define dep-maybe (lambda ()
!       (if (exist? "hard") "" "maybe-")))
! 
!    ;; dep-kind returns "normal" is the dependency is on an "install" target,
!    ;; or if the LHS module is not bootstrapped.  It returns "bootstrap" for
!    ;; configure or build dependencies between bootstrapped modules; it returns
!    ;; "prebootstrap" for configure or build dependencies of bootstrapped
!    ;; modules on a non-bootstrapped modules (e.g. gcc on bison).  All this
!    ;; is only necessary for host modules.
!    (define dep-kind (lambda ()
!       (if (or (= (dep-subtarget "on") "install-")
! 	      (=* (dep-module "on") "build-")
! 	      (=* (dep-module "on") "target-"))
!           "normal"
! 
!           (if (hash-ref boot-modules (dep-module "module"))
!               (if (hash-ref boot-modules (dep-module "on"))
! 	          "bootstrap"
! 	          "prebootstrap")
! 	      "normal"))))
! 
!    ;; We now build the hash table that is used by dep-kind.
!    (define boot-modules (make-hash-table 113))
!    (define preboot-modules (make-hash-table 37))
! +]
! 
! [+ FOR host_modules +][+
!    (if (exist? "bootstrap")
!        (hash-create-handle! boot-modules (get "module") #t))
!    "" +][+ ENDFOR host_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
! # to check for bootstrap/prebootstrap dependencies.  To resolve
! # prebootstrap dependencies, prebootstrap modules are gathered in
! # a hash table.
! [+ FOR dependencies +][+ (make-dep "") +]
! [+ CASE (dep-kind) +][+
!    == "prebootstrap"
!      +][+ (hash-create-handle! preboot-modules (dep-module "on") #t) "" +][+
!    == "bootstrap"
!      +][+ FOR bootstrap_stage +]
! [+ (make-dep (dep-stage)) +][+
!        ENDFOR bootstrap_stage +]
! [+ ESAC +][+
! ENDFOR dependencies +]
! 
! # Now build the prebootstrap dependencies.
! [+ FOR host_modules +][+
!    IF (hash-ref preboot-modules (get "module")) +]
! all-prebootstrap: maybe-all-[+module+][+
!    ENDIF +][+
! ENDFOR host_modules +]
! 
! # Unless toplevel bootstrap is going, bootstrapped packages are actually
! # prebootstrapped, with the exception of gcc.  Another wart that will go
! # away with toplevel bootstrap.
! @if gcc-no-bootstrap
! [+ FOR host_modules +][+
!    IF (and (not (= (get "module") "gcc"))
! 	   (hash-ref boot-modules (get "module"))) +]
! all-prebootstrap: maybe-all-[+module+][+
!    ENDIF +][+
! ENDFOR host_modules +]
! @endif gcc-no-bootstrap
! 
  GDB_TK = @GDB_TK@
! all-gdb: $(gdbnlmrequirements) $(GDB_TK)
  
  # Serialization dependencies.  Host configures don't work well in parallel to
  # each other, due to contention over config.cache.  Target configures and 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]