automake-patches
[Top][All Lists]
Advanced

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

Re: trailing whitespace in make macros


From: Ralf Wildenhues
Subject: Re: trailing whitespace in make macros
Date: Sat, 22 Jan 2011 12:22:33 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

* Stefano Lattarini wrote on Sat, Jan 22, 2011 at 12:02:24PM CET:
> Hi Ralf, and thanks for the patch.  More comments about non-obvious
> code are always welcome!

Yes, and ## comments should be verbose that way, see HACKING.

> On Saturday 22 January 2011, Ralf Wildenhues wrote:
> > +## Work around a GNU make 3.80 bug expanding trailing whitespace in
> > +## `TESTS = foo.test $(empty)'  to `foo.log .log' in $(TESTS_LOGS).
> >
> Hmm... I tend to read this as "we work around a GNU make 3.80 bug here;
> we do so by  expanding trailing whitespace ...".  What about this
> formulation instead:
>   ## Trailing whitespace in `TESTS = foo.test $(empty)' causes GNU make
>   ## 3.80 to erronously expand $(TESTS_LOGS) to `foo.log .log'.
>   ## Work around this.
> ?

Thanks, that sounds better.  I'm pushing the patch as below.

Cheers,
Ralf

2011-01-22  Ralf Wildenhues  <address@hidden>
            Stefano Lattarini  <address@hidden>

        Add comment to check-TESTS rule working around make 3.80 bug.
        * lib/am/check.am (check-TESTS): Update comment.

diff --git a/lib/am/check.am b/lib/am/check.am
index 5728081..4d10ce9 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -235,6 +235,10 @@ check-TESTS:
 ## OTOH, this means that, in the rule for `$(TEST_SUITE_LOG)', we
 ## cannot use `$?' to compute the set of lazily rerun tests, lest
 ## we rely on .PHONY to work portably.
+##
+## Trailing whitespace in `TESTS = foo.test $(empty)' causes GNU make
+## 3.80 to erroneously expand $(TESTS_LOGS) to `foo.log .log'.
+## Work around this bug.
        @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
        @list='$(TEST_LOGS)';                                           \
        list=`for f in $$list; do                                       \



reply via email to

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