automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [FYI] {testsuite-work} tests: extend tests on dependency tracking wi


From: Stefano Lattarini
Subject: Re: [FYI] {testsuite-work} tests: extend tests on dependency tracking with VPATH
Date: Sat, 7 May 2011 15:30:16 +0200
User-agent: KMail/1.13.5 (FreeBSD/8.2-RELEASE; KDE/4.5.5; i386; ; )

References:
 <http://lists.gnu.org/archive/html/automake-patches/2011-05/msg00019.html>
 <http://lists.gnu.org/archive/html/automake-patches/2011-04/msg00140.html>

On Sunday 01 May 2011, Stefano Lattarini wrote:
> 
> On Tuesday 19 April 2011, Stefano Lattarini wrote:
> > Hello Ralf.
> > 
> > On Monday 11 April 2011, Ralf Wildenhues wrote:
> > > * Ralf Wildenhues wrote on Mon, Apr 11, 2011 at 07:13:00AM CEST:
> > > >     Fix hp depmode for VPATH builds with GNU make.
> > > >     
> > > >     * lib/depcomp: Be sure to remove VPATH-prefixed object from
> > > >     dependency output when creating stub rule.
> > > >     * tests/depcomp10.test: New test.
> > > >     * tests/Makefile.am (TESTS): Update.
> > > >     * NEWS: Update.
> > > >     Report by Bruno Haible.
> > > 
> > > Of course I should be merging this test and depcomp9, and generalizing
> > > for all depmodes, and tuning my test scripts to exercise both make and
> > > gmake on all systems.  (on my TODO list)
> > > 
> > I hope you don't mind if I've done this for you ;-)
> > 
> > See the attached patch.  I've tested it with pcc, gcc-2.95, gcc-3.4,
> > gcc-4.4 and the Sun C compiler, and with GNU, BSD (Debian ports) and
> > Heirloom make.  Currently there is only one failure (with gcc >= 3
> > and NetBSD or GNU make and depmode=tru64, which I haven't tried to
> > analyze yet (in any case, it isn't a regression, so we can tackle it
> > in a follow-up).  The log of this failure is attached, together with
> > the content of the offending file `src/sub/.deps/subfoo.Po'.
> > 
> > OK for for a temporary public branch based off of master, to be merged
> > back into master once the failure above is fixed?
> > 
> > Regards,
> >   Stefano
> > 
> I've pushed this patch to the 'testsuite-work' branch now (after
> rebasing).  The updated patch is attached, for reference.
> 
> Regards,
>   Stefano
> 
Oops, there was a bug in the generation of the `depmod-tests.am' makefile
fragment, which I caught testing on FreeBSD.  Fixed by the attached patch,
applied to a temporary bug-fixing branch and merged into 'testsuite-work'.

Sorry for the noise,
  Stefano
From 90d328715bac43d0e0568d137602d7dab36c29d1 Mon Sep 17 00:00:00 2001
Message-Id: <address@hidden>
From: Stefano Lattarini <address@hidden>
Date: Sat, 7 May 2011 11:49:40 +0200
Subject: [PATCH] depmod tests: fix bug in depmodes list extraction

* tests/depmod-tests.sh (get_depmodes): Use `echo $all_depmodes'
instead of `... | tr "$nl" "$sp"' to strip extra whitespaces and
newlines from `$all_depmodes'.  The latter idiom with `tr' is
wrong since it gets run before `./defs' is sourced, and thus `$nl'
and `$sp' are undefined.
Bug revealad by FreeBSD tr(1) implementation, which doesn't accept
empty strings as arguments.
---
 ChangeLog             |   11 +++++++++++
 tests/depmod-tests.sh |    4 +++-
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 541955c..f427fa8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-05-07  Stefano Lattarini  <address@hidden>
+
+       depmod tests: fix bug in depmodes list extraction
+       * tests/depmod-tests.sh (get_depmodes): Use `echo $all_depmodes'
+       instead of `... | tr "$nl" "$sp"' to strip extra whitespaces and
+       newlines from `$all_depmodes'.  The latter idiom with `tr' is
+       wrong since it gets run before `./defs' is sourced, and thus `$nl'
+       and `$sp' are undefined.
+       Bug revealad by FreeBSD tr(1) implementation, which doesn't accept
+       empty strings as arguments.
+
 2011-05-01  Stefano Lattarini  <address@hidden>
 
        tests: extend tests on dependency tracking with VPATH
diff --git a/tests/depmod-tests.sh b/tests/depmod-tests.sh
index 4eb8419..2be8af0 100755
--- a/tests/depmod-tests.sh
+++ b/tests/depmod-tests.sh
@@ -141,7 +141,9 @@ get_depmodes ()
 {
   # Keep this in sync with the contents of depend.m4.
   all_depmodes=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "$1" \
-    | grep -v '^none$' | tr "$nl" "$sp"` \
+                  | grep -v '^none$'` \
+    && : Turn newlines and tabs into spaces, and strip extra whitespace. \
+    && all_depmodes=`echo $all_depmodes` \
     && test -n "$all_depmodes" || {
       echo "$2: failed to extract list of valid depmodes from '$1'" >&2
       exit 99
-- 
1.7.3.5


reply via email to

[Prev in Thread] Current Thread [Next in Thread]