Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Remove config.cache files when reconfiguring at top level
@ 2010-02-15 10:53 Nick Clifton
  2010-02-15 10:58 ` Andreas Schwab
  0 siblings, 1 reply; 18+ messages in thread
From: Nick Clifton @ 2010-02-15 10:53 UTC (permalink / raw)
  To: binutils; +Cc: gdb-patches, gcc-patches

Hi Guys,

  I am going to apply the patch below to the top level configure.ac file
  to fix a problem reported in the binutils PR 11238.

  Essentially the problem is that if a toolchain builder re-runs the
  configure script with a new set of CFLAGS (or some other similar
  variable) without first running distclean, then the config.cache files
  will be left behind in the build sub-directories.  This then prevents
  the the next build from working as the cached value of CFLAGS differs
  from the new one.  The patch fixes the problem by makeing the
  configure script delete config.cache files at the same time as it is
  deleting Makefiles in the sub-directories.

Cheers
  Nick

ChangeLog
2010-02-15  Nick Clifton  <nickc@redhat.com>

	PR 11238
	* configure.ac: Delete config.cache files in sub-directories when
	deleting Makefiles.
	* configure: Regenerate.

Index: configure.ac
===================================================================
RCS file: /cvs/src/src/configure.ac,v
retrieving revision 1.93
diff -c -3 -p -r1.93 configure.ac
*** configure.ac	15 Feb 2010 10:37:54 -0000	1.93
--- configure.ac	15 Feb 2010 10:42:04 -0000
*************** for module in ${build_configdirs} ; do
*** 2710,2715 ****
--- 2710,2721 ----
      echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
      rm -f ${build_subdir}/${module}/Makefile
    fi
+   # PR 11238: Also remove config.cache files.
+   if test -z "${no_recursion}" \
+      && test -f ${build_subdir}/${module}/config.cache; then
+     echo 1>&2 "*** removing ${build_subdir}/${module}/config.cache to allow reconfigure"
+     rm -f ${build_subdir}/${module}/config.cache
+   fi
    extrasub_build="$extrasub_build
  /^@if build-$module\$/d
  /^@endif build-$module\$/d
*************** for module in ${configdirs} ; do
*** 2725,2730 ****
--- 2731,2741 ----
  	rm -f ${file}
        fi
      done
+     # PR 11238: Also remove config.cache files.
+     if test -f ${module}/config.cache; then
+       echo 1>&2 "*** removing ${module}/config.cache to allow reconfigure"
+       rm -f ${module}/config.cache
+     fi
    fi
    extrasub_host="$extrasub_host
  /^@if $module\$/d
*************** for module in ${target_configdirs} ; do
*** 2739,2744 ****
--- 2750,2761 ----
      echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
      rm -f ${target_subdir}/${module}/Makefile
    fi
+   # PR 11238: Also remove config.cache files.
+   if test -z "${no_recursion}" \
+      && test -f ${target_subdir}/${module}/config.cache; then
+     echo 1>&2 "*** removing ${target_subdir}/${module}/config.cache to allow reconfigure"
+     rm -f ${target_subdir}/${module}/config.cache
+   fi
  
    # We only bootstrap target libraries listed in bootstrap_target_libs.
    case $bootstrap_target_libs in


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

end of thread, other threads:[~2010-02-17 11:04 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-15 10:53 Remove config.cache files when reconfiguring at top level Nick Clifton
2010-02-15 10:58 ` Andreas Schwab
2010-02-15 15:54   ` Nick Clifton
2010-02-15 18:04     ` Andreas Schwab
2010-02-15 18:23       ` Alfred M. Szmidt
2010-02-15 19:37         ` Andreas Schwab
2010-02-16 11:23           ` Alfred M. Szmidt
2010-02-16 10:07       ` Nick Clifton
     [not found]       ` <4B7A6E32.6070307__49868.1737961762$1266314832$gmane$org@redhat.com>
2010-02-16 10:42         ` Andreas Schwab
2010-02-16 11:04           ` Nick Clifton
2010-02-16 11:12             ` Andreas Schwab
2010-02-16 11:23             ` Alfred M. Szmidt
2010-02-16 12:40               ` Nick Clifton
2010-02-16 13:25                 ` Alfred M. Szmidt
2010-02-16 14:03                   ` Andreas Schwab
2010-02-17 10:06                   ` Nick Clifton
2010-02-17 10:17                     ` Mark Kettenis
2010-02-17 11:04                       ` Nick Clifton

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