OSDN Git Service

Error out if building separately but srcdir has build remnants.
authorrwild <rwild@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Sep 2009 18:00:15 +0000 (18:00 +0000)
committerrwild <rwild@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Sep 2009 18:00:15 +0000 (18:00 +0000)
/:
PR bootstrap/32272
* configure.ac: Error out if $srcdir isn't '.' but contains
host-${host_noncanonical}.
* configure: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152037 138bc75d-0d04-0410-961f-82ee72b054a4

ChangeLog
configure
configure.ac

index ca0838f..54f0449 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       PR bootstrap/32272
+       * configure.ac: Error out if $srcdir isn't '.' but contains
+       host-${host_noncanonical}.
+       * configure: Regenerate.
+
 2009-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * MAINTAINERS (OS Port Maintainers): Add myself as Solaris
index 720fa23..667b514 100755 (executable)
--- a/configure
+++ b/configure
@@ -2743,6 +2743,11 @@ fi
 # No prefix.
 target_subdir=${target_noncanonical}
 
+# Be sure to cover against remnants of an in-tree build.
+if test $srcdir != .  && test -d $srcdir/host-${host_noncanonical}; then
+  as_fn_error "building out of tree but $srcdir contains host-${host_noncanonical}.
+Use a pristine source tree when building in a separate tree" "$LINENO" 5
+fi
 
 # Skipdirs are removed silently.
 skipdirs=
index 794a419..e7d44db 100644 (file)
@@ -235,6 +235,11 @@ fi
 
 # Find the build and target subdir names.
 GCC_TOPLEV_SUBDIRS
+# Be sure to cover against remnants of an in-tree build.
+if test $srcdir != .  && test -d $srcdir/host-${host_noncanonical}; then
+  AC_MSG_ERROR([building out of tree but $srcdir contains host-${host_noncanonical}.
+Use a pristine source tree when building in a separate tree])
+fi
 
 # Skipdirs are removed silently.
 skipdirs=