From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10571 invoked by alias); 9 Nov 2009 17:20:09 -0000 Received: (qmail 10372 invoked by uid 22791); 9 Nov 2009 17:20:05 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,FAKE_REPLY_C,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 09 Nov 2009 17:19:56 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nA9HJtHe024247 for ; Mon, 9 Nov 2009 12:19:55 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nA9HJqZu019684 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 9 Nov 2009 12:19:54 -0500 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id nA9HJq5e007250; Mon, 9 Nov 2009 18:19:52 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id nA9HJpI8007241; Mon, 9 Nov 2009 18:19:51 +0100 Date: Mon, 09 Nov 2009 17:20:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: gdb-patches@sourceware.org, Doug Evans Subject: Re: [patch] Fix parallel gdb/ make check//% site.exp Message-ID: <20091109171950.GA6665@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-08-17) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-11/txt/msg00142.txt.bz2 On Mon, 09 Nov 2009 16:37:42 +0100, Tom Tromey wrote: > >>>>> "Jan" == Jan Kratochvil writes: > > Jan> -check-single: all site.exp > Jan> +check-single: all ./site.exp > > I think make will still search vpath for "./site.exp". > So, won't that cause the same problem? A nice catch, verified now VPATH does work even for relative paths. The only safe way is to use absolute path there. make-3.81/ vpath_search(): /* If there are no VPATH entries or FILENAME starts at the root, there is nothing we can do. */ > What am I missing? It was a testing mistake as when I edited ./Makefile I changed its timestamp which did falsely "fix" it by: Considering target file `site.exp'. Pruning file `config.status'. Pruning file `Makefile'. Finished prerequisites of target file `site.exp'. Prerequisite `config.status' is older than target `site.exp'. Prerequisite `Makefile' is newer than target `site.exp'. Must remake target `site.exp'. Ignoring VPATH name `/home/jkratoch/redhat/gdb-clean/gdb/testsuite/site.exp'. On Mon, 09 Nov 2009 17:38:04 +0100, Doug Evans wrote: > but if the patch does go in, I'd like to see comments added to the > code explaining why things are the way they are. > site vs ./site.exp seems fairly subtle. Followed. Thanks, Jan gdb/testsuite/ 2009-11-09 Jan Kratochvil * Makefile.in (abs_builddir): New. (site.exp): New target `$(abs_builddir)/site.exp'. New comment. (check-single, $(TEST_TARGETS), check-gdb.base%): Change `site.exp' to `$(abs_builddir)/site.exp'. --- a/gdb/testsuite/Makefile.in +++ b/gdb/testsuite/Makefile.in @@ -22,6 +22,7 @@ VPATH = @srcdir@ srcdir = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ +abs_builddir = @abs_builddir@ target_alias = @target_noncanonical@ program_transform_name = @program_transform_name@ @@ -102,7 +103,11 @@ install: uninstall: force -site.exp: ./config.status Makefile +# Use absolute `site.exp' path everywhere to suppress VPATH lookups for it. +# $(RUNTEST) is looking up `site.exp' only in the current directory. +# Bare `site.exp' is present as a target here if user requests it explicitly. + +$(abs_builddir)/site.exp site.exp: ./config.status Makefile @echo "Making a new config file..." -@rm -f ./tmp? @touch site.exp @@ -147,7 +151,7 @@ DO_RUNTEST = \ export TCL_LIBRARY ; fi ; \ $(RUNTEST) -check-single: all site.exp +check-single: all $(abs_builddir)/site.exp $(DO_RUNTEST) $(RUNTESTFLAGS) # A list of all directories named "gdb.*" which also hold a .exp file. @@ -170,7 +174,7 @@ check-parallel: $(SHELL) $(srcdir)/dg-extract-results.sh -L \ $(addsuffix /gdb.log,$(TEST_DIRS)) > gdb.log -$(filter-out check-gdb.base%,$(TEST_TARGETS)): check-gdb.%: all site.exp +$(filter-out check-gdb.base%,$(TEST_TARGETS)): check-gdb.%: all $(abs_builddir)/site.exp @if test ! -d gdb.$*; then mkdir gdb.$*; fi $(DO_RUNTEST) --directory=gdb.$* --outdir=gdb.$* $(RUNTESTFLAGS) @@ -179,7 +183,7 @@ BASE1_FILES = $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/gdb.base/[a-m]*.exp) BASE2_FILES = $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/gdb.base/[n-z]*.exp)) # Handle each half of gdb.base. -check-gdb.base%: all site.exp +check-gdb.base%: all $(abs_builddir)/site.exp @if test ! -d gdb.base$*; then mkdir gdb.base$*; fi $(DO_RUNTEST) $(BASE$*_FILES) --outdir gdb.base$* $(RUNTESTFLAGS)