automake-patches
[Top][All Lists]
Advanced

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

Re: depcomp testing


From: Ralf Wildenhues
Subject: Re: depcomp testing
Date: Mon, 20 Mar 2006 18:06:37 +0100
User-agent: Mutt/1.5.11

* Alexandre Duret-Lutz wrote on Sun, Mar 19, 2006 at 11:06:36AM CET:
> On Sun, Mar 19, 2006 at 07:13:44AM +0100, Ralf Wildenhues wrote:
> > * Ralf Wildenhues wrote on Sun, Mar 19, 2006 at 06:46:24AM CET:
> [about "if $MAKE; then false; fi"]
> > > * Alexandre Duret-Lutz wrote on Sat, Mar 18, 2006 at 07:28:14AM CET:
> > > > Let's write "$MAKE && exit 1" because that's what of the other test do, 
> > > > and
> > > > I'm wary that some shell will return the $? of $MAKE if it fails, in 
> > > > turn
> > > > causing "set -e" to abort the script.  Don't ask me which shell, but 
> > > > that's
> > > > why we have "else :; fi" all over the Makefiles.
> > >
> > > I always thought that was because of the `sh -e -c "$cmd"' that some
> > > make implementations used (see Autoconf portability section).
> 
> Isn't that exactly what I'm saying?

As far as I understood, you were referring to the
  "else :; fi"
all over the Makefiles.  That is due to old make implementations that
call their rules with `sh -e -c "$cmd"', rather than with || :.  Right?

But here we're not being called from make.  So I thought that was
something different.

> > And then I applied this patch to fix our thinko.  :-)
> 
> Huh???  Those two lines are fully equivalent to me.
> 
> > -  $MAKE && exit 1
> > +  if $MAKE; then false; else :; fi

Argh.  Thinko-thinko.  Those tests failed for me because the
  $MAKE && exit 1
was the last command in the test script.  D'oh.  Adding `:' helps.

OK to apply this patch?  Sorry about all that noise.

Cheers,
Ralf

        * tests/depcomp6.test, tests/depcomp7.test: Change back to
        using `$MAKE && exit 1', but make sure the last command in the
        test is successful.

Index: tests/depcomp6.test
===================================================================
RCS file: /cvs/automake/automake/tests/depcomp6.test,v
retrieving revision 1.2
diff -u -r1.2 depcomp6.test
--- tests/depcomp6.test 19 Mar 2006 06:13:41 -0000      1.2
+++ tests/depcomp6.test 20 Mar 2006 17:04:58 -0000
@@ -98,5 +98,6 @@
   cd sub2
   $sleep
   echo 'choke me' > sub3/ba3.h
-  if $MAKE; then false; else :; fi
+  $MAKE && exit 1
 fi
+:
Index: tests/depcomp7.test
===================================================================
RCS file: /cvs/automake/automake/tests/depcomp7.test,v
retrieving revision 1.2
diff -u -r1.2 depcomp7.test
--- tests/depcomp7.test 19 Mar 2006 06:13:41 -0000      1.2
+++ tests/depcomp7.test 20 Mar 2006 17:04:58 -0000
@@ -100,5 +100,6 @@
   cd sub2
   $sleep
   echo 'choke me' > sub3/ba3.h
-  if $MAKE; then false; else :; fi
+  $MAKE && exit 1
 fi
+:




reply via email to

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