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
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
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
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!
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
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
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
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: %)
>
>
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