[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: disabling the built-in rules

From: Paul Smith
Subject: Re: disabling the built-in rules
Date: Mon, 17 Jul 2023 13:16:17 -0400
User-agent: Evolution 3.48.3 (by Flathub.org)

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: %)
> Can we get a syntax to clear all built-in rules that works portably?
> For example, such as:


Why is make trying to build these targets?  It should only be building
stuff you asked it to build.  Maybe you put these at the top of the
makefile so one of them is considered the default target?  Just as with
any boilerplate like this it needs to be put at the end of the makefile
after any other target that might be considered the default target.

Oh maybe you just cut and pasted my example directly?  That's supposed
to be added to (the end presumably) of a "real" makefile.  Or, to test:


  %:: %,v
  %:: RCS/%,v
  %:: RCS/%
  %:: s.%
  %:: SCCS/s.%

As long as you don't get a syntax error reading these funny-looking
targets they shouldn't cause any issues for non-GNU Make makefiles.


That's not really right because suffix rules are a particular thing,
and these are not suffix rules.  If we were to add something it would
be a pseudo-target like:


or something like that that would just turn off the entire built-in

reply via email to

[Prev in Thread] Current Thread [Next in Thread]