Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@redhat.com>
To: Nathanael Nerode <neroden@twcny.rr.com>
Cc: gcc-patches@gcc.gnu.org, binutils@sources.redhat.com,
	gdb-patches@sources.redhat.com
Subject: Re: subdir/toplevel dependence (was Re: (toplevel)...)
Date: Thu, 09 Jan 2003 20:44:00 -0000	[thread overview]
Message-ID: <orvg0ykq8o.fsf@free.redhat.lsd.ic.unicamp.br> (raw)
In-Reply-To: <20021230142402.GA29870@doctormoo>

[-- Attachment #1: Type: text/plain, Size: 402 bytes --]

On Dec 30, 2002, Nathanael Nerode <neroden@twcny.rr.com> 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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: recurse-force-reconfigure.patch --]
[-- Type: text/x-patch, Size: 3820 bytes --]

Index: ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* 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.

[-- Attachment #3: Type: text/plain, Size: 289 bytes --]


-- 
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

  reply	other threads:[~2003-01-09 20:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-30  7:46 Nathanael Nerode
2003-01-09 20:44 ` Alexandre Oliva [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-12-30  2:42 Nathanael Nerode
2002-12-30  6:25 ` Alexandre Oliva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=orvg0ykq8o.fsf@free.redhat.lsd.ic.unicamp.br \
    --to=aoliva@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=neroden@twcny.rr.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox