This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: automake strips GNU make "else/endif" conditionals


At 10:52 PM 8/6/01 -0600, Tom Tromey wrote:
>>>>>> "Peter" == Peter J Farley <pjfarley@dorsai.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.

Well, I found a slightly different approach that worked, making the test into a normal shell "if test x$THISVAR = x" test as a "normal" rule action, and this satisfied my need.

Maybe next time I'll try adding a space and see how it "works". :)

>My thinking has been that one of automake's primary goals is to
>generate portable Makefiles.  So supporting a nonportable feature
>isn't very important.
>
>That's been the overriding factor since supporting it is, I think, not
>actually very easy.  For one thing, automake splits macro assignments
>and targets into two different sections of Makefile.in.  So we would
>have to change how Makefile.in is generated for this to work reliably.
>
>Of course, like everything, this is open to debate.  Perhaps it is
>worthwhile to expend the effort to make this work.  I still don't
>think it is that important, though, so at least right now I don't plan
>to spend time on it.

Tom,

I can't disagree with your portability goal, and I was able to find a perfectly acceptable solution to my problem, so I won't be asking you to work on it.

Thanks for the advice and honest reply.

---------------------------------------------------------
Peter J. Farley III (pjfarley@dorsai.org)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]