Re: Disabling builtin rules / varialbes from within a Makefile?

Paul Smith <[email protected]>
Newsgroups gmane.comp.gnu.make.general
Organization GNU's Not UNIX!
Message-ID <[email protected]>
On Sun, 2022-09-11 at 19:12 +0200, Sébastien Hinderer wrote:
> Is there a way, in a Makefile, to get the same result as with the
> -r/--no-builtin-rules or -R/--no-builtin-variables options, please?

You can just add them to MAKEFLAGS in the makefile itself:

  MAKEFLAGS += -rR

Note, this requires that you have GNU make 4.0 or better: previous
versions don't support this.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.