本文介绍了$(NOOP)在Makefile中通常用于什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Makefile中,通常使用$(NOOP)做什么?

我在一个特定的Makefile中看到, NOOP 设置为/bin/sh -c true ,并且在许多规则中使用,例如:>

I see in one particular Makefile, NOOP is set to /bin/sh -c true and it is used in many rules such as this one:

all: pure_all
    $(NOECHO) $(NOOP)

这比

all: pure_all

推荐答案

这可能是冗长(且效率较低,尽管我不知道它可能更便携)尝试空食谱.

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

具体来说,无需将配方标记为 .PHONY 或以其他方式给他们提供食谱,如问题中的目标将受到隐式规则搜索.

Specifically, without marking a recipe as .PHONY or otherwise giving them a recipe as in the question a target will be subject to Implicit Rule Search.

此搜索有时可能会很慢,并且可能会执行您不想要的事情.

This search can be slow at times and can do things that aren't desirable.

这篇关于$(NOOP)在Makefile中通常用于什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-19 04:12