I know nothing about autotools, so I should probably stop talking, but not
quite yet.

You say GNUMAKEFLAGS+=-r is "invalid syntax" but I don't know quite how to
read that. It's not invalid in the sense of causing an error, it's just
that it would be invisible to any non-GNU make program so presumably that's
what you mean. But the thing is, I don't believe other make programs are
reactive to MAKEFLAGS being set within the makefile. At least, it's been a
long time since I read POSIX but I don't think it's required. My assumption
may be wrong but if not, setting MAKEFLAGS would be a NOP in non-GNU makes
anyway. Except that it would take effect in recursive invocations but that
complicates things further.

Anyway, I really should stop talking since I know zero about automake.

David

On Mon, Jul 17, 2023 at 11:22 AM Bruno Haible <br...@clisp.org> wrote:

> David Boyce wrote:
> > Everything else aside, there's a profound difference between MAKEFLAGS=-r
> > and MAKEFLAGS+=-r. The latter is far less destabilizing.
>
> At least the '-n' option does not get lost by MAKEFLAGS=-r. That is,
> setting MAKEFLAGS=-r and running 'make -n' does not cause the actions
> to be actually executed.
>
> > And yes, GNUMAKEFLAGS is definitely better for this use.
>
> But MAKEFLAGS+=-r or GNUMAKEFLAGS+=-r is not something one can use in a
> Makefile.am, since this is invalid syntax for a POSIX make program.
> Thus, for those who want to get rid of implicit rules because Automake
> provides the rules already, it's either MAKEFLAGS=-r or nothing at all.
>
> Bruno
>
>
>
>

Reply via email to