This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: automake strips GNU make "else/endif" conditionals
| >>>>> "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.
|
| 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.
My own opinion, FWIW, is that Automake should stop using the same
syntax as Make, and move to %, which is now its signature.
%if
%else
%endif
%include
Of course there is the problem of backward compatibility. I propose
%verbatim
%end verbatim
Peter, anyway, if I were you, I would copy what Jim does for the
fileutils: i.e., use GNUmakefile for GNU Make extensions. Indeed,
that's a better way of leaving Automake do its job: enforcing
portability.