From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Received: (qmail 14018 invoked from network); 9 Jan 2003 20:44:38 -0000 Received: from unknown (HELO lacrosse.corp.redhat.com) (66.187.233.200) by 209.249.29.67 with SMTP; 9 Jan 2003 20:44:38 -0000 Received: from free.redhat.lsd.ic.unicamp.br (aoliva.cipe.redhat.com [10.0.1.10]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id h09KiNY18974; Thu, 9 Jan 2003 15:44:24 -0500 Received: from free.redhat.lsd.ic.unicamp.br (localhost.localdomain [127.0.0.1]) by free.redhat.lsd.ic.unicamp.br (8.12.6/8.12.6) with ESMTP id h09KiNuD013848; Thu, 9 Jan 2003 18:44:23 -0200 Received: (from aoliva@localhost) by free.redhat.lsd.ic.unicamp.br (8.12.6/8.12.6/Submit) id h09KiN3V013844; Thu, 9 Jan 2003 18:44:23 -0200 To: Nathanael Nerode Cc: gcc-patches@gcc.gnu.org, binutils@sources.redhat.com, gdb-patches@sources.redhat.com Subject: Re: subdir/toplevel dependence (was Re: (toplevel)...) References: <20021230142402.GA29870@doctormoo> From: Alexandre Oliva Organization: GCC Team, Red Hat Date: Thu, 09 Jan 2003 20:44:00 -0000 In-Reply-To: <20021230142402.GA29870@doctormoo> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2003-01/txt/msg00382.txt.bz2 --=-=-= Content-length: 402 On Dec 30, 2002, Nathanael Nerode wrote: > Alex said: >> The solution I see is to arrange for configure to remove sub-Makefiles >> if it is run without --no-recursion (i.e., no_recursion != yes). >> Then, the check for sub-Makefile in the configure-* targets will take >> care of reconfiguring. How does this sound? > Sounds good to me. Should work. Fixed with this patch: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=recurse-force-reconfigure.patch Content-length: 3820 Index: ChangeLog from Alexandre Oliva * configure.in: Remove Makefile in build, host and target modules unless configure was run with --no-recursion. * configure: Rebuilt. Index: configure.in =================================================================== RCS file: /cvs/gcc/gcc/configure.in,v retrieving revision 1.208 diff -u -p -r1.208 configure.in --- configure.in 7 Jan 2003 20:40:40 -0000 1.208 +++ configure.in 9 Jan 2003 20:35:44 -0000 @@ -1,5 +1,5 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, -# 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +# 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -868,20 +868,6 @@ if test -n "${target_configdirs}" ; then fi fi -# Deconfigure all subdirectories, in case we are changing the -# configuration from one where a subdirectory is supported to one where it -# is not. -if test -z "${norecursion}" && test -n "${configdirs}" ; then - for i in `echo ${configdirs} | sed -e s/target-//g` ; do - rm -f $i/Makefile - done -fi -if test -z "${norecursion}" && test -n "${target_configdirs}" ; then - for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do - rm -f ${target_subdir}/$i/Makefile - done -fi - # Quietly strip out all directories which aren't configurable in this tree. # This relies on all configurable subdirectories being autoconfiscated, which # is now the case. @@ -1668,13 +1654,24 @@ target_configdirs=`echo "${target_config # This is the final value for target_configdirs. configdirs already # has its final value. It's time to create some lists of valid targets. +# While at that, we remove Makefiles if we were started for recursive +# configuration, such that the top-level Makefile reconfigures them, +# like we used to do when configure itself was recursive. + all_build_modules= configure_build_modules= # Only make build modules if build != host. # This should be done more generally, but at the moment it doesn't matter. if test ${host_alias} != ${build_alias} ; then - all_build_modules=all-build-libiberty - configure_build_modules=configure-build-libiberty + for module in libiberty ; do + all_build_modules=all-build-${module} + configure_build_modules=configure-build-${module} + if test -z "${no_recursion}" \ + && test -f ${build_subdir}/${module}/Makefile; then + echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure" + rm -f ${build_subdir}/${module}/Makefile + fi + done fi all_host_modules= @@ -1686,6 +1683,11 @@ for module in ${configdirs} ; do check_host_modules="${check_host_modules} check-${module}" install_host_modules="${install_host_modules} install-${module}" configure_host_modules="${configure_host_modules} configure-${module}" + if test -z "${no_recursion}" \ + && test -f ${module}/Makefile; then + echo 1>&2 "*** removing ${module}/Makefile to force reconfigure" + rm -f ${module}/Makefile + fi done install_host_modules_nogcc=`echo "${install_host_modules}" | sed -e 's/install-gcc//g'` @@ -1698,6 +1700,11 @@ for module in ${target_configdirs} ; do check_target_modules="${check_target_modules} check-target-${module}" install_target_modules="${install_target_modules} install-target-${module}" configure_target_modules="${configure_target_modules} configure-target-${module}" + if test -z "${no_recursion}" \ + && test -f ${target_subdir}/${module}/Makefile; then + echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure" + rm -f ${target_subdir}/${module}/Makefile + fi done # Determine whether gdb needs tk/tcl or not. --=-=-= Content-length: 289 -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist Professional serial bug killer --=-=-=--