Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* subdir/toplevel dependence (was Re: (toplevel)...)
@ 2002-12-30  2:42 Nathanael Nerode
  2002-12-30  6:25 ` Alexandre Oliva
  0 siblings, 1 reply; 4+ messages in thread
From: Nathanael Nerode @ 2002-12-30  2:42 UTC (permalink / raw)
  To: gcc-patches, aoliva; +Cc: gdb-patches, binutils

Alex said:
>- I've also removed the dependence of configure-* on ./config.status.
>  I don't understand why we put this in.  I get the impression it was
>  a mistake, since the earlier top-level (say in the gcc-3.3 branch)
>  does not get any sub-packages reconfigured just because the top
>  level config.status changes.  If we really want to do this, we
>  should arrange for the code that updates config.status in the
>  top-level to also remove the Makefiles of all subdirs, so that
>  they're reconfigured next.

I put this in because there's a real dependence here. :-(

The correct dependence, technically, is that configure-* depends on top 
level Makefile, which depends on config.status.

The point is, if you rerun top level 'configure' with different 
arguments, creating a new Makefile which will pass down different 
arguments, it's essential to rerun configure at the lower levels with 
the new arguments as well.  

Implement this however you please, but it needs to be there. :-)

--Nathanael


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: subdir/toplevel dependence (was Re: (toplevel)...)
  2002-12-30  2:42 subdir/toplevel dependence (was Re: (toplevel)...) Nathanael Nerode
@ 2002-12-30  6:25 ` Alexandre Oliva
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2002-12-30  6:25 UTC (permalink / raw)
  To: Nathanael Nerode; +Cc: gcc-patches, gdb-patches, binutils

On Dec 30, 2002, Nathanael Nerode <neroden@twcny.rr.com> wrote:

> I put this in because there's a real dependence here. :-(

Thanks, I see it now.  It just happened to trigger other unwanted
dependencies, that I really disliked.  Well, guess we'll have to put
them back in, but perhaps we can be more clever.

The idea is to force sub-configures to run whenever we run the
top-level configure, but if it's rerun just because the top-level
configure was updated, we don't have to rerun sub-configures, right?
That's the way it used to be.

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?

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: subdir/toplevel dependence (was Re: (toplevel)...)
  2002-12-30  7:46 Nathanael Nerode
@ 2003-01-09 20:44 ` Alexandre Oliva
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2003-01-09 20:44 UTC (permalink / raw)
  To: Nathanael Nerode; +Cc: gcc-patches, binutils, gdb-patches

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: subdir/toplevel dependence (was Re: (toplevel)...)
@ 2002-12-30  7:46 Nathanael Nerode
  2003-01-09 20:44 ` Alexandre Oliva
  0 siblings, 1 reply; 4+ messages in thread
From: Nathanael Nerode @ 2002-12-30  7:46 UTC (permalink / raw)
  To: aoliva; +Cc: gcc-patches, binutils, gdb-patches

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.

--Nathanael


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-01-09 20:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-30  2:42 subdir/toplevel dependence (was Re: (toplevel)...) Nathanael Nerode
2002-12-30  6:25 ` Alexandre Oliva
2002-12-30  7:46 Nathanael Nerode
2003-01-09 20:44 ` Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox