Re: Prerequisites and .DEFAULT -- what am I doing wrong?
Paul Smith <[email protected]> Wed, 08 Nov 2023 09:49:37 -0500
| Newsgroups | gmane.comp.gnu.make.general |
|---|---|
| Organization | GNU's Not UNIX! |
| Message-ID | <[email protected]> |
On Tue, 2023-11-07 at 22:02 +0400, Ivan Shapovalov wrote: > However, when I run `make` on this Makefile, the recipe for > `build-base-image` is not run, despite that it is specified as a > prerequisite for the `.DEFAULT` target: From the docs: .DEFAULT The recipe specified for .DEFAULT is used for any target for which no rules are found (either explicit rules or implicit rules). See Defining Last-Resort Default Rules. If a .DEFAULT recipe is specified, every file mentioned as a prerequisite, but not as a target in a rule, will have that recipe executed on its behalf. See Implicit Rule Search Algorithm. This talks only about the recipe; it doesn't say anything about prerequisites, and, in fact, prerequisites of .DEFAULT are ignored.