From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12052 invoked by alias); 14 Nov 2002 18:34:53 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 11972 invoked from network); 14 Nov 2002 18:34:51 -0000 Received: from unknown (HELO mailout5-0.nyroc.rr.com) (24.92.226.122) by sources.redhat.com with SMTP; 14 Nov 2002 18:34:51 -0000 Received: from doctormoo (syr-24-24-16-193.twcny.rr.com [24.24.16.193]) by mailout5-0.nyroc.rr.com (8.11.6/RoadRunner 1.20) with ESMTP id gAEIYlF08138; Thu, 14 Nov 2002 13:34:47 -0500 (EST) Received: from neroden by doctormoo with local (Exim 3.36 #1 (Debian)) id 18COp1-0005MJ-00; Thu, 14 Nov 2002 13:34:35 -0500 Date: Thu, 14 Nov 2002 10:34:00 -0000 To: gcc-patches@gcc.gnu.org Cc: dj@redhat.com, binutils@sources.redhat.com, gdb-patches@sources.redhat.com Subject: toplevel patch: Let configure decide which targets to hit (1) Message-ID: <20021114183435.GA20499@doctormoo> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i From: Nathanael Nerode X-SW-Source: 2002-11/txt/msg00410.txt.bz2 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 <