Re: disabling the built-in rules

2023-07-19 Thread Alejandro Colomar
On 2023-07-19 03:49, Dmitry Goncharov wrote: > On Mon, Jul 17, 2023 at 2:41 PM Alejandro Colomar > wrote: > >> MAKEFLAGS += --no-builtin-variables > > If your makefiles are supposed to work on systems other than linux > (still with gnu make), then you may need built-in variables. > These variabl

Re: disabling the built-in rules

2023-07-18 Thread Dmitry Goncharov
On Mon, Jul 17, 2023 at 2:41 PM Alejandro Colomar wrote: > MAKEFLAGS += --no-builtin-variables If your makefiles are supposed to work on systems other than linux (still with gnu make), then you may need built-in variables. These variables contain different values on different systems. e.g. ARFLA

Re: disabling the built-in rules

2023-07-17 Thread Paul Smith
On Mon, 2023-07-17 at 20:41 +0200, Alejandro Colomar wrote: > BTW, could you point out the problems with the following? > > MAKEFLAGS += --no-builtin-rules > MAKEFLAGS += --no-builtin-variables > MAKEFLAGS += --warn-undefined-variables > > This is what I currently use, and never had a big issue w

Re: disabling the built-in rules

2023-07-17 Thread Bruno Haible
Paul Smith wrote: > POSIX > reserves all targets prefixed with "." (that are not already specified > in the standard) to the implementation. So it's fine with POSIX to add > a pseudo target like .NOBUILTINS; no conforming makefile can use that > target for anything else. Thanks for explaining!

Re: disabling the built-in rules

2023-07-17 Thread Alejandro Colomar
Hi Paul, On 2023-07-17 20:35, Paul Smith wrote: > On Mon, 2023-07-17 at 19:31 +0200, Bruno Haible wrote: >> Except possibly that POSIX does not allow this? Then we would need a >> pseudo-target the turns off only the non-standardized part of the >> built-in database, say, .NO_GNU_BUILTINS. And use

Re: disabling the built-in rules

2023-07-17 Thread Paul Smith
On Mon, 2023-07-17 at 19:31 +0200, Bruno Haible wrote: > Except possibly that POSIX does not allow this? Then we would need a > pseudo-target the turns off only the non-standardized part of the > built-in database, say, .NO_GNU_BUILTINS. And users would have to > write: > >   .SUFFIXES: >   .NO_GN

Re: disabling the built-in rules

2023-07-17 Thread Bruno Haible
Paul Smith wrote: > Or, to test: > > all: > > .SUFFIXES: > %:: %,v > %:: RCS/%,v > %:: RCS/% > %:: s.% > %:: SCCS/s.% Indeed, this works fine with the 'make' on FreeBSD, NetBSD, OpenBSD, Solaris 10, and AIX. > If we were to add something it would be a pseudo-target like: > > .N

Re: disabling the built-in rules

2023-07-17 Thread Paul Smith
On Mon, 2023-07-17 at 18:49 +0200, Bruno Haible wrote: > It's also annyoing because it does not work portably: On FreeBSD and > NetBSD, > 'make' gives an error: > >   make: don't know how to make %,v. Stop > > Similarly on OpenBSD: > >   make: don't know how to make %,v (prerequisite of: %) > >

Re: disabling the built-in rules

2023-07-17 Thread Bruno Haible
Paul Smith wrote: > I do not > usually recommend this method of clearing the default rules. There are > issues with modifying MAKEFLAGS, especially with some older versions of > GNU Make. And also, in some older versions setting MAKEFLAGS in the > makefile doesn't actually take effect anyway: it