This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: obtaining configure args from config.status (was: Update rebuild rules in non-automake directories.)
- From: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 6 Sep 2009 20:14:57 +0200
- Subject: Re: obtaining configure args from config.status (was: Update rebuild rules in non-automake directories.)
- References: <20090628183334.GA5401@gmx.de> <20090728181748.GA3134@gmx.de> <20090826151719.GA22276@host0.dyn.jankratochvil.net> <20090826164636.GA15791@ins.uni-bonn.de> <20090826165410.GA28796@host0.dyn.jankratochvil.net> <20090831202938.GC21485@gmx.de>
Ping <http://sourceware.org/ml/gdb-patches/2009-08/msg00592.html>
* Ralf Wildenhues wrote on Mon, Aug 31, 2009 at 10:29:39PM CEST:
> OK to apply?
> Fix parallel check//% rule in gdb.
>
> 2009-08-29 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.
>
>
> diff --git a/gdb/Makefile.in b/gdb/Makefile.in
> index 90c285f..7bc02cd 100644
> --- a/gdb/Makefile.in
> +++ b/gdb/Makefile.in
> @@ -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)" \