delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/08/07/20:30:04

From: pjfarley3 AT escape DOT com (Peter J. Farley III)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: automake help needed
Message-ID: <3b70853c.20971873@news.escape.com>
References: <3b6cd296 DOT 9879890 AT news DOT escape DOT com> <9km37t$o7c$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <3b6f3c7d DOT 1918773 AT news DOT escape DOT com> <3B6FBFFD DOT 99705625 AT falconsoft DOT be>
X-Newsreader: Forte Free Agent 1.21/32.243
Lines: 41
NNTP-Posting-Date: Tue, 07 Aug 2001 19:23:35 CDT
Organization: Giganews.Com - Premium News Outsourcing
X-Trace: sv3-Z30wN9pw3syRKjDvRuX6ykmvPA3/GOTppXwqwR+wk5s4SzTfCg5EvJljRYNezOjxxEoyu9oduKq5Xgd!SAZozQvBUWCaqEvNKmvdcsPVW7CZCToDXcOH0Kp9xjIIFiGHpjCk6oJbfUgKR7p3
X-Complaints-To: abuse AT GigaNews DOT Com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
Date: Wed, 08 Aug 2001 00:28:29 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Tim Van Holder <tim DOT vanholder AT falconsoft DOT be> wrote:
<Snipped>
>Problem is that they're not functionally equivalent.
>Automake conditionals represent a configure-time decision; GNU make
>conditionals are a run-time decision.  The latter allows you to change
>make's behaviour by running
>
>  make CONDVAR=value
>
>but automake conditionals require a reconfigure to make such a change.

Exactly.

>I just ran a little test and it seems there is a way out: automake
>requires its conditionals to start in column 0, make doesnt.  So if
>you merely precede your if/else/endif by a single space, automake
>won't complain and the conditional will end up in the Makefile as
>intended.

Yes, Tom Tromey also answered me on this question over on the automake
mailing list.  I'll quote the relevant piece of the exchange here:

At 10:52 PM 8/6/01 -0600, Tom Tromey wrote:
>>>>>> "Peter" == Peter J Farley <pjfarley AT dorsai DOT org> writes:
>Peter> Does automake disallow using GNU make conditionals in rules?
>
>Not really, but they aren't supported either.  Sometimes they "work"
>if you indent them.  Try adding a leading space.

I was able to solve my immediate problem before I saw Tom's suggestion
by turning it into a make-time rule action shell test on the value of
the variable (which is actually an environment variable, not just a
local make variable, so a shell-based test was appropriate), so my
particular problem was not hard to work around.

Thanks for testing Tom's solution, it's good to know that it works for
the next time I need it.

----------------------------------------------------
Peter J. Farley III (pjfarley AT nospam DOT dorsai DOT org OR
                     pjfarley3 AT nospam DOT escape DOT com)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019