]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* Makefile.tpl: Introduce rules to serialize subconfigure runs.
authorNathanael Nerode <neroden@gcc.gnu.org>
Tue, 3 Dec 2002 22:54:00 +0000 (22:54 +0000)
committerNathanael Nerode <neroden@gcc.gnu.org>
Tue, 3 Dec 2002 22:54:00 +0000 (22:54 +0000)
* Makefile.in: Regenerate.
* configure.in: Introduce rules to serialize subconfigure runs.

ChangeLog
Makefile.in
Makefile.tpl
configure.in

index 3d96b3c532784a4b11533e612784e0fde757836a..b82f0604cf22c5d044d8875b7dc3106ffafa8a41 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2002-12-03  Nathanael Nerode  <neroden@gcc.gnu.org>
 
+       * Makefile.tpl: Introduce rules to serialize subconfigure runs.
+       * Makefile.in: Regenerate.
+       * configure.in: Introduce rules to serialize subconfigure runs.
+
        * configure.in: Introduce BASE_CC_FOR_TARGET.
        * Makefile.tpl: Reorganize and comment.  Introduce HOST_CONFIGARGS.
        Realize configure-build-* targets.  Realize configure-target-* targets.
index 723f50e4886d49505cbb813d8f3dc812eb823c2d..cf4ac1926f0004a2f265c22617f56eb836ff8fa8 100644 (file)
@@ -4920,6 +4920,11 @@ $(TARGET_SUBDIR)/qthreads/Makefile: $(ALL_GCC_C)
 # all-gcc only depends on all-gas if gas is present and being configured.
 @maybe_dependencies@
 
+# Serialization dependencies.  Host configures don't work well in parallel to
+# each other, due to contention over config.cache.  Target configures and 
+# build configures are similar.
+@serialization_dependencies@
+
 # --------------------------------
 # Regenerating top level configury
 # --------------------------------
index 288fa0c8f6acda6206dd66f0575df1a84aa55266..dc99532abe83704d0d0faf6a74d8d188ebf47d52 100644 (file)
@@ -1289,6 +1289,11 @@ $(TARGET_SUBDIR)/qthreads/Makefile: $(ALL_GCC_C)
 # all-gcc only depends on all-gas if gas is present and being configured.
 @maybe_dependencies@
 
+# Serialization dependencies.  Host configures don't work well in parallel to
+# each other, due to contention over config.cache.  Target configures and 
+# build configures are similar.
+@serialization_dependencies@
+
 # --------------------------------
 # Regenerating top level configury
 # --------------------------------
index a0795f65a67cf107520b8f3d70cfd644e243edd1..1a1cd4c7c28b3b3241dc9511866d773b4baffea6 100644 (file)
@@ -59,10 +59,17 @@ fi
 
 ### To add a new directory to the tree, first choose whether it is a target
 ### or a host dependent tool.  Then put it into the appropriate list
-### (library or tools, host or target), doing a dependency sort.  For
-### example, gdb requires that byacc (or bison) be built first, so it is in
-### the ${host_tools} list after byacc and bison.  
+### (library or tools, host or target), doing a dependency sort.
 
+# Subdirs will be configured in the order listed in build_configdirs, 
+# configdirs, or target_configdirs; see the serialization section below.
+
+# Dependency sorting is only needed when *configuration* must be done in 
+# a particular order.  In all cases a dependency should be specified in 
+# the Makefile, whether or not it's implicitly specified here.
+
+# Double entries in build_configdirs, configdirs, or target_configdirs may
+# cause circular dependencies and break everything horribly.
 
 # these libraries are used by various programs built for the host environment
 #
@@ -73,7 +80,7 @@ libstdcxx_version="target-libstdc++-v3"
 # these tools are built for the host environment
 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
 # know that we are building the simulator.
-host_tools="texinfo byacc flex bison binutils ld gas gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool grep diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils snavigator libtool gettext zip fastjar"
+host_tools="texinfo byacc flex bison binutils ld gas gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool grep diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils snavigator gettext zip fastjar"
 
 # libgcj represents the runtime libraries only used by gcj.
 libgcj="target-libffi \
@@ -1434,6 +1441,41 @@ rm -f Makefile
 mv -f Makefile.tem Makefile
 rm -f maybedep.tmp
 
+# Create the serialization dependencies.  This uses a temporary file.
+
+# These force 'configure's to be done one at a time, to avoid problems
+# with contention over a shared config.cache.
+rm -f serdep.tmp
+olditem=
+for item in ${build_configdirs} ; do
+  case ${olditem} in
+    "") ;;
+    *) echo "\$(BUILD_SUBDIR)/${item}/Makefile: \$(BUILD_SUBDIR)/${olditem}/Makefile" >> serdep.tmp ;;
+  esac
+  olditem=${item}
+done
+olditem=
+for item in ${configdirs} ; do
+  case ${olditem} in
+    "") ;;
+    *) echo "${item}/Makefile: ${olditem}/Makefile" >> serdep.tmp ;;
+  esac
+  olditem=${item}
+done
+olditem=
+for item in ${target_configdirs} ; do
+  case ${olditem} in
+    "") ;;
+    *) echo "\$(TARGET_SUBDIR)/${item}/Makefile: \$(TARGET_SUBDIR)/${olditem}/Makefile" >> serdep.tmp ;;
+  esac
+  olditem=${item}
+done
+sed -e '/@serialization_dependencies@/r serdep.tmp' \
+    -e 's/@serialization_dependencies@//' Makefile > Makefile.tem
+rm -f Makefile
+mv -f Makefile.tem Makefile
+rm -f serdep.tmp
+
 # Base args.  Strip norecursion, cache-file, srcdir, host, build, target.
 # These are the ones we might not want to pass down to subconfigures.
 baseargs=`echo "${arguments}" | \