lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Trivial patch to fix autotools builds


From: Greg Chicares
Subject: Re: [lmi] Trivial patch to fix autotools builds
Date: Thu, 30 May 2019 22:14:58 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 2019-05-29 00:23, Vadim Zeitlin wrote:
> 
>  I made https://github.com/vadz/lmi/pull/111 to fix the build using
> autotools as currently it fails due to the recently added extra
> backslashes.

Cherry-picked and pushed.

>  Unfortunately I don't think there is any way to use your preferred style
> with automake, but I'm submitting this PR instead of committing this
> directly just in case you want me to spend more time on trying to convince
> Automake to accept it (but I'm feeling rather defeatist in advance).

Well...here's a trivial fix for a blatant defect:
  https://lists.gnu.org/archive/html/libtool-patches/2011-06/msg00001.html
  https://lists.gnu.org/archive/html/libtool-patches/2011-06/msg00002.html
  https://lists.gnu.org/archive/html/libtool-patches/2011-07/msg00001.html
...and then it just seemed to be ignored. I'd be discouraged.

As for the present problem, it's described quite well here:
  https://lists.gnu.org/archive/html/automake/2009-01/msg00044.html

Ralf's "not strictly against" a careful, thorough patch including
tests and docs:
  https://lists.gnu.org/archive/html/automake/2009-01/msg00058.html
but that's not exactly welcoming either.

BTW, the URL in his message is broken--now it should be:
  
http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/autoconf.html#Backslash_002dNewline_002dEmpty
  12.4 Backslash-Newline Before Empty Lines

This weird rule is motivated by a defect in bash-2.03
(released 1999-02-19), which interprets this:

     SHELL = /bin/bash
     EMPTY =
     foo:
        touch foo \
        $(EMPTY)

as:

     /bin/bash -c 'touch foo \
     '

But if I'm reading the automake email thread above correctly,
then automake forbids only a trailing backslash followed by a
blank line. Thus, a nullable macro at the end is the problem
they intended to forbid; but they actually forbade something
different than that; and the workaround for the problem induced
by the attempt to forbid a nullable macro at the end is...

...to write a nullable macro at the end:
  https://lists.gnu.org/archive/html/automake/2009-01/msg00051.html
Another person does the same thing:
  https://lists.gnu.org/archive/html/automake/2009-01/msg00054.html

The proposal is:

  EMPTY =
  foo_SOURCES = \
     fileA.c \
     fileB.c \
     fileC.c \
     $(EMPTY)

Probably we should prefer a name that's not a common word like
"EMPTY"; is there a recommended automake convention for choosing
unique names, say, "LMI_EMPTY"?

I'd be delighted to make such a change and never have to deal with
this automake craziness again. What do you think?



reply via email to

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