On Sat, 2014-09-06 at 20:01 +0200, Frank Heckenbach wrote: > > Since it knows that phony targets do not name actual files that > > could be remade from other files, `make' skips the implicit rule > > search for phony targets (*note Implicit Rules::). This is why > > declaring a target phony is good for performance, even if you > > are not worried about the actual file existing. > > Well, "foobar" (in my example) is not an actual *file*, but yet it > can be "remade" just like any other phony target.
This "since" relates to how make thinks of the target, not necessarily how it is in real life. By declaring it phony you have told make that it should not be considered a real file. There may or may not be an actual file with the same name as the target but either way make will ignore it: since the target is always out of date there's no need to check its modified time etc. > Also, the rule in question is not an implicit one (which I understand > to mean built-in rules), but one I gave explictly. "Implicit rule" doesn't mean built-in rules, although all built-in rules happen to be implicit rules. "Implicit rule" is a generic term for the combination of suffix and pattern rules; that is, any rule which doesn't name an explicit target (those are explicit rules). Apparently that should be made more clear. > Phone targets are not eligible for pattern rules (implicit or > explicit). This is why declaring a target phony is good for > performance, even if you are not worried about the actual file > existing. As above, saying "pattern rules (implicit or explicit)" is not right because there's no such thing as an "explicit pattern rule". _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make