What is the $ (NOOP) commonly used in Makefile?

In the Makefile, what is $ (NOOP) commonly used for?

I see in one particular Makefile, NOOP

set to /bin/sh -c true

and used in many rules, such as this one:

all: pure_all
    $(NOECHO) $(NOOP)

      

How is it better / different from

all: pure_all

      

+3


source to share


1 answer


This is probably a verbose (and less efficient, although perhaps more portable, I don't know) attempt at Empty Recipe .

Specifically, without labeling the recipe in .PHONY

any way or otherwise giving them the recipe, as in the question, the object will be subject to an implicit search rule .



This search can be slow and can do things that are not desirable.

Also: the comments on this question cover the topic of rules .PHONY

and their equivalents fairly well FORCE

. I am thinking (albeit in the round - about fashion, since it was not so).

+3


source







All Articles