$(Q)@:在Makefile中的含义是什么

naf*_*aka 4 makefile gnu-make

我已经阅读了Linux Makefile:

$(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make
    $(Q)@:
Run Code Online (Sandbox Code Playgroud)

“ $(Q)@:”是什么意思?

我正在尝试使用google进行搜索,但如果搜索使用某些奇怪的字符,则google总是会崩溃。所以最后我找不到任何有关它的手册。

naf*_*aka 5

看完代码后。Q在这些行之后的某处定义。由于makefile具有变量的特殊概念(可扩展),因此可以在任何地方实现。Q用于表示是否显示消息(Q可能表示安静)。

ifeq ($(KBUILD_VERBOSE),1)
  quiet =
  Q =
else
  quiet=quiet_
  Q = @
endif
Run Code Online (Sandbox Code Playgroud)

最后,@:这意味着do-nothing-output-nothing

因此结论很$(Q)@:简单do-nothing-output-nothing