From a54470c7742197c22a37d0429cd135f2ee7abeb8 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 9 Jan 2003 20:45:29 +0000 Subject: [PATCH] * configure.in: Remove Makefile in build, host and target modules unless configure was run with --no-recursion. * configure: Rebuilt. --- ChangeLog | 6 +++ configure | 140 ++++++++++++++++++++++++++++++--------------------- configure.in | 41 ++++++++------- 3 files changed, 113 insertions(+), 74 deletions(-) diff --git a/ChangeLog b/ChangeLog index 62fc4d453..656bf440b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-01-09 Alexandre Oliva + + * configure.in: Remove Makefile in build, host and target modules + unless configure was run with --no-recursion. + * configure: Rebuilt. + 2003-01-08 Chris Demetriou * config.guess: Update to 2003-01-03 version. diff --git a/configure b/configure index 55b400dc8..f85cbce2f 100755 --- a/configure +++ b/configure @@ -1525,20 +1525,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. @@ -2325,13 +2311,24 @@ 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. +# 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= @@ -2343,6 +2340,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'` @@ -2355,6 +2357,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. @@ -2726,7 +2733,7 @@ test -n "$target_alias" && ncn_target_tool_prefix=$target_alias- # Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args. set dummy ${ncn_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2730: checking for $ac_word" >&5 +echo "configure:2737: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2759,7 +2766,7 @@ if test -z "$ac_cv_prog_AR" ; then # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2763: checking for $ac_word" >&5 +echo "configure:2770: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2798,7 +2805,7 @@ fi # Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args. set dummy ${ncn_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2802: checking for $ac_word" >&5 +echo "configure:2809: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2831,7 +2838,7 @@ if test -z "$ac_cv_prog_AS" ; then # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2835: checking for $ac_word" >&5 +echo "configure:2842: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2870,7 +2877,7 @@ fi # Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ncn_tool_prefix}dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2874: checking for $ac_word" >&5 +echo "configure:2881: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2903,7 +2910,7 @@ if test -z "$ac_cv_prog_DLLTOOL" ; then # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2907: checking for $ac_word" >&5 +echo "configure:2914: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2942,7 +2949,7 @@ fi # Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args. set dummy ${ncn_tool_prefix}ld; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2946: checking for $ac_word" >&5 +echo "configure:2953: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2975,7 +2982,7 @@ if test -z "$ac_cv_prog_LD" ; then # Extract the first word of "ld", so it can be a program name with args. set dummy ld; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2979: checking for $ac_word" >&5 +echo "configure:2986: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3014,7 +3021,7 @@ fi # Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args. set dummy ${ncn_tool_prefix}nm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3018: checking for $ac_word" >&5 +echo "configure:3025: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3047,7 +3054,7 @@ if test -z "$ac_cv_prog_NM" ; then # Extract the first word of "nm", so it can be a program name with args. set dummy nm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3051: checking for $ac_word" >&5 +echo "configure:3058: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3086,7 +3093,7 @@ fi # Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ncn_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3090: checking for $ac_word" >&5 +echo "configure:3097: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3119,7 +3126,7 @@ if test -z "$ac_cv_prog_RANLIB" ; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3123: checking for $ac_word" >&5 +echo "configure:3130: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3158,7 +3165,7 @@ fi # Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args. set dummy ${ncn_tool_prefix}windres; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3162: checking for $ac_word" >&5 +echo "configure:3169: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3191,7 +3198,7 @@ if test -z "$ac_cv_prog_WINDRES" ; then # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3195: checking for $ac_word" >&5 +echo "configure:3202: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3230,7 +3237,7 @@ fi # Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args. set dummy ${ncn_tool_prefix}objcopy; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3234: checking for $ac_word" >&5 +echo "configure:3241: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3263,7 +3270,7 @@ if test -z "$ac_cv_prog_OBJCOPY" ; then # Extract the first word of "objcopy", so it can be a program name with args. set dummy objcopy; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3267: checking for $ac_word" >&5 +echo "configure:3274: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3302,7 +3309,7 @@ fi # Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args. set dummy ${ncn_tool_prefix}objdump; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3306: checking for $ac_word" >&5 +echo "configure:3313: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3335,7 +3342,7 @@ if test -z "$ac_cv_prog_OBJDUMP" ; then # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3339: checking for $ac_word" >&5 +echo "configure:3346: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3383,7 +3390,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3387: checking for $ac_word" >&5 +echo "configure:3394: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3416,7 +3423,7 @@ if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3420: checking for $ac_word" >&5 +echo "configure:3427: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3455,7 +3462,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3459: checking for $ac_word" >&5 +echo "configure:3466: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3488,7 +3495,7 @@ if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3492: checking for $ac_word" >&5 +echo "configure:3499: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3527,7 +3534,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3531: checking for $ac_word" >&5 +echo "configure:3538: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3560,7 +3567,7 @@ if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3564: checking for $ac_word" >&5 +echo "configure:3571: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3599,7 +3606,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}ld; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3603: checking for $ac_word" >&5 +echo "configure:3610: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3632,7 +3639,7 @@ if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then # Extract the first word of "ld", so it can be a program name with args. set dummy ld; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3636: checking for $ac_word" >&5 +echo "configure:3643: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3671,7 +3678,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}nm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3675: checking for $ac_word" >&5 +echo "configure:3682: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3704,7 +3711,7 @@ if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then # Extract the first word of "nm", so it can be a program name with args. set dummy nm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3708: checking for $ac_word" >&5 +echo "configure:3715: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3743,7 +3750,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3747: checking for $ac_word" >&5 +echo "configure:3754: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3776,7 +3783,7 @@ if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3780: checking for $ac_word" >&5 +echo "configure:3787: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3815,7 +3822,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}windres; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3819: checking for $ac_word" >&5 +echo "configure:3826: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3848,7 +3855,7 @@ if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3852: checking for $ac_word" >&5 +echo "configure:3859: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3980,15 +3987,34 @@ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then we branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +cat >confdef2opt.sed <<\_ACEOF +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +t quote +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +t quote +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed # Without the "./", some shells look in PATH for config.status. diff --git a/configure.in b/configure.in index d427bbfae..88150ed66 100644 --- a/configure.in +++ b/configure.in @@ -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_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. +# 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.