[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNUMAKEFLAGS vs MAKEFLAGS
From: |
Paul Smith |
Subject: |
Re: GNUMAKEFLAGS vs MAKEFLAGS |
Date: |
Tue, 16 Jul 2024 15:06:29 -0400 |
User-agent: |
Evolution 3.52.3 (by Flathub.org) |
On Tue, 2024-07-16 at 20:56 +0200, Alejandro Colomar wrote:
> > That is, this does what you expect:
> >
> > $ GNUMAKEFLAGS=-Rr make -f Makefile
>
> But this would be quite insane, isn't it? (Except during recursive
> make(1), which is also insane in its own way.) :-)
Yes, very likely this would break many things.
GNUMAKEFLAGS is really intended for options which change the behavior
of GNU Make only in superficial ways. But, you don't want to set them
in MAKEFLAGS in your environment in case you run non-GNU Make sometimes
as well.
One canonical example of such an option is --no-print-directory.
The docs do mention this, at least:
> It’s best to use GNUMAKEFLAGS only with flags which won’t materially
> change the behavior of your makefiles. If your makefiles require GNU
> Make anyway then simply use MAKEFLAGS. Flags such as ‘--no-print-
> directory’ or ‘--output-sync’ may be appropriate for GNUMAKEFLAGS.
Agreed that the docs will need to be updated. In the paragraph prior
to GNUMAKEFILES in the docs we are talking about putting MAKEFLAGS in
the environment, and the author (:-)) mentally continued that context
without making it clear.