This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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]

toplevel patch: Let configure decide which targets to hit (1)


This starts to shift the top level Makefile towards containing actual
dependencies, a really key step in simplification.  After this change,
'all' depends on 'all-x' only for those 'x' actually being configured.
Similarly for 'check'.  Other targets will follow.  Woo-hoo!

Previously the 'all-x' for unconfigured targets were exercised and ran
through little shell scripts solely to decide to do nothing.  This should
speed up 'make' though I haven't timed it.

Tested with full bootstrap on i686-pc-linux-gnu.  No unexpectedly unconfigured
directories (or indeed any significant changes).

This is for 3.4bib, blah, blah, blah.

	* configure.in: Produce lists of subdir targets we're actually 
	configuring.
	* Makefile.tpl: Let configure set which subdir targets are hit.
	* Makefile.in: Regenerate.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.in,v
retrieving revision 1.111.4.9
diff -c -3 -r1.111.4.9 Makefile.in
*** Makefile.in	14 Nov 2002 05:49:29 -0000	1.111.4.9
--- Makefile.in	14 Nov 2002 18:07:21 -0000
***************
*** 947,959 ****
  	clean-tix 
  
  # The target built for a native build.
  .PHONY: all.normal
! all.normal: \
! 	$(ALL_BUILD_MODULES) \
! 	$(ALL_MODULES) \
! 	$(ALL_X11_MODULES) \
! 	$(ALL_TARGET_MODULES) \
! 	all-gcc
  
  # Do a target for all the subdirectories.  A ``make do-X'' will do a
  # ``make X'' in all subdirectories (because, in general, there is a
--- 947,957 ----
  	clean-tix 
  
  # The target built for a native build.
+ # This list only includes modules actually being configured and built.
  .PHONY: all.normal
! all.normal: @all_build_modules@ \
! 	@all_host_modules@ \
! 	@all_target_modules@
  
  # Do a target for all the subdirectories.  A ``make do-X'' will do a
  # ``make X'' in all subdirectories (because, in general, there is a
***************
*** 1470,1479 ****
  check:
  	$(MAKE) do-check NOTPARALLEL=parallel-ok
  
! do-check: $(CHECK_MODULES) \
! 	$(CHECK_TARGET_MODULES) \
! 	$(CHECK_X11_MODULES) \
! 	check-gcc
  
  # Automated reporting of test results.
  
--- 1468,1476 ----
  check:
  	$(MAKE) do-check NOTPARALLEL=parallel-ok
  
! # Only include modules actually being configured and built.
! do-check: @check_host_modules@ \
! 	@check_target_modules@
  
  # Automated reporting of test results.
  
***************
*** 2412,2417 ****
--- 2409,2418 ----
  	  true; \
  	fi
  
+ # Dummy target for uncheckable module.
+ .PHONY: check-target-libtermcap
+ check-target-libtermcap:
+ 
  \
  .PHONY: install-target-libtermcap
  install-target-libtermcap: installdirs
***************
*** 2687,2692 ****
--- 2688,2697 ----
  	  true; \
  	fi
  
+ # Dummy target for uncheckable module.
+ .PHONY: check-target-libgloss
+ check-target-libgloss:
+ 
  \
  .PHONY: install-target-libgloss
  install-target-libgloss: installdirs
***************
*** 3105,3110 ****
--- 3110,3119 ----
  	else \
  	  true; \
  	fi
+ 
+ # Dummy target for uncheckable module.
+ .PHONY: check-target-examples
+ check-target-examples:
  
  
  
Index: Makefile.tpl
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.tpl,v
retrieving revision 1.5.2.7
diff -c -3 -r1.5.2.7 Makefile.tpl
*** Makefile.tpl	14 Nov 2002 05:49:29 -0000	1.5.2.7
--- Makefile.tpl	14 Nov 2002 18:07:23 -0000
***************
*** 637,649 ****
  	clean-[+module+] [+ ENDIF with_x +][+ ENDFOR host_modules +]
  
  # The target built for a native build.
  .PHONY: all.normal
! all.normal: \
! 	$(ALL_BUILD_MODULES) \
! 	$(ALL_MODULES) \
! 	$(ALL_X11_MODULES) \
! 	$(ALL_TARGET_MODULES) \
! 	all-gcc
  
  # Do a target for all the subdirectories.  A ``make do-X'' will do a
  # ``make X'' in all subdirectories (because, in general, there is a
--- 637,647 ----
  	clean-[+module+] [+ ENDIF with_x +][+ ENDFOR host_modules +]
  
  # The target built for a native build.
+ # This list only includes modules actually being configured and built.
  .PHONY: all.normal
! all.normal: @all_build_modules@ \
! 	@all_host_modules@ \
! 	@all_target_modules@
  
  # Do a target for all the subdirectories.  A ``make do-X'' will do a
  # ``make X'' in all subdirectories (because, in general, there is a
***************
*** 784,793 ****
  check:
  	$(MAKE) do-check NOTPARALLEL=parallel-ok
  
! do-check: $(CHECK_MODULES) \
! 	$(CHECK_TARGET_MODULES) \
! 	$(CHECK_X11_MODULES) \
! 	check-gcc
  
  # Automated reporting of test results.
  
--- 782,790 ----
  check:
  	$(MAKE) do-check NOTPARALLEL=parallel-ok
  
! # Only include modules actually being configured and built.
! do-check: @check_host_modules@ \
! 	@check_target_modules@
  
  # Automated reporting of test results.
  
***************
*** 1149,1155 ****
  	else \
  	  true; \
  	fi
! [+ IF no_check +][+ ELSE check +]
  .PHONY: check-target-[+module+]
  check-target-[+module+]:
  	@dir=[+module+] ; \
--- 1146,1156 ----
  	else \
  	  true; \
  	fi
! [+ IF no_check +]
! # Dummy target for uncheckable module.
! .PHONY: check-target-[+module+]
! check-target-[+module+]:
! [+ ELSE check +]
  .PHONY: check-target-[+module+]
  check-target-[+module+]:
  	@dir=[+module+] ; \
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/configure.in,v
retrieving revision 1.177.4.6
diff -c -3 -r1.177.4.6 configure.in
*** configure.in	12 Nov 2002 03:27:41 -0000	1.177.4.6
--- configure.in	14 Nov 2002 18:07:24 -0000
***************
*** 1348,1353 ****
--- 1348,1376 ----
  rm -f Makefile
  mv -f Makefile.tem Makefile
  
+ # Record target_configdirs and the configure arguments for target and
+ # build configuration in Makefile.
+ target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
+ 
+ # This is the final value for target_configdirs.  configdirs already
+ # has its final value.  It's time to create some lists of valid targets.
+ all_host_modules=""
+ check_host_modules=""
+ for module in ${configdirs} ; do
+   all_host_modules="${all_host_modules} all-${module}"
+   check_host_modules="${check_host_modules} check-${module}"
+ done
+ export all_host_modules
+ export check_host_modules
+ 
+ all_target_modules=
+ check_target_modules=
+ for module in ${target_configdirs} ; do
+   all_target_modules="${all_target_modules} all-target-${module}"
+   check_target_modules="${check_target_modules} check-target-${module}"
+ done
+ export all_target_modules
+ export check_target_modules
  
  # Base args.  Strip norecursion, cache-file, srcdir, host, build, target.
  # These are the ones we might not want to pass down to subconfigures.
***************
*** 1364,1372 ****
  # desired.
  buildargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}"
  
- # Record target_configdirs and the configure arguments for target and
- # build configuration in Makefile.
- target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
  targargs=${baseargs}
  
  # Passing a --with-cross-host argument lets the target libraries know
--- 1387,1392 ----
***************
*** 1548,1553 ****
--- 1568,1577 ----
  
  sedtemp=sed.$$
  cat >$sedtemp <<EOF
+ s%@all_host_modules@%${all_host_modules}%
+ s%@check_host_modules@%${check_host_modules}%
+ s%@all_target_modules@%${all_target_modules}%
+ s%@check_target_modules@%${check_target_modules}%
  s:@target_configdirs@:${target_configdirs}:
  s%@target_configargs@%${targargs}%
  s%@FLAGS_FOR_TARGET@%${FLAGS_FOR_TARGET}%


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