Fix parallel check//% rule in gdb for non-VPATH build.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 8 Sep 2009 18:50:40 +0000 (18:50 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 8 Sep 2009 18:50:40 +0000 (18:50 +0000)
gdb/:
* gdb/Makefile.in (check//%): Parse 'config.status --version'
output to recreate the configuration from the testsuite directory,
rather than running 'config.status --recheck' from a different
build directory.  Let configure do the recursion rather than
doing it manually.

gdb/ChangeLog
gdb/Makefile.in

index 0283607cf0b9c675ed13a4bea6c71803ed0cf3a8..595281100f8082b4a310d6ae3a522dc8bfcf38b3 100644 (file)
@@ -1,3 +1,11 @@
+2009-09-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * gdb/Makefile.in (check//%): Parse 'config.status --version'
+       output to recreate the configuration from the testsuite directory,
+       rather than running 'config.status --recheck' from a different
+       build directory.  Let configure do the recursion rather than
+       doing it manually.
+
 2009-09-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * ia64-tdep.c (ia64_memory_remove_breakpoint): Call do_cleanups
index 90c285fc653ff0f90479c790ef192ab57d20d4e2..7bc02cd8b1d1e967441caa7434fa946305d8f041 100644 (file)
@@ -888,6 +888,7 @@ check: force
 # a shell that expands alternations within braces.  If GNU make is not
 # used, this rule will harmlessly fail to match.  Used FORCE_PARALLEL to
 # prevent serialized checking due to the passed RUNTESTFLAGS.
+# FIXME: use config.status --config not --version, when available.
 check//%: force
        @if [ -f testsuite/config.status ]; then \
          rootme=`pwd`; export rootme; \
@@ -896,14 +897,14 @@ check//%: force
          variant=`echo "$@" | sed 's,^[^/]*//,,'`; \
          vardots=`echo "$$variant" | sed 's,/,.,g'`; \
          testdir=testsuite.$$vardots; \
-         if [ ! -f $$testdir/Makefile ]; then \
-           (cd testsuite && find . -name config.status) | \
-           sed s,/config.status$$,, | sort | while read subdir; do \
-             $(SHELL) $(srcdir)/../mkinstalldirs $$testdir/$$subdir && \
-             (cd $$testdir/$$subdir && \
-              $(SHELL) $$rootme/testsuite/$$subdir/config.status \
-                --recheck && \
-              $(SHELL) ./config.status); done; \
+         if [ ! -f $$testdir/Makefile ] && [ -f testsuite/config.status ]; then \
+           configargs=`cd testsuite && ./config.status --version | \
+             sed -n -e 's,"$$,,' -e 's,^ *with options ",,p'`; \
+           $(SHELL) $(srcdir)/../mkinstalldirs $$testdir && \
+           (cd $$testdir && \
+            eval $(SHELL) "\"\$$rootsrc/testsuite/configure\" $$configargs" \
+                          "\"--srcdir=\$$rootsrc/testsuite\"" \
+            ); \
          else :; fi && cd $$testdir && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS) \
            RUNTESTFLAGS="--target_board=$$variant $(RUNTESTFLAGS)" \