Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the meaning of $(Q)@: in Makefile

I've read in linux Makefile:

$(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make
    $(Q)@:

What is the meaning of $(Q)@:?

I'm trying to google it, but google always crappy if the search using some weird character. So in the end i can't found any Manual about it.

like image 390
nafsaka Avatar asked Apr 09 '16 18:04

nafsaka


1 Answers

After looking in the code. Q is defined somewhere after those line. Since makefile have peculiar concept of variable (which is expandable), it can be implement in anywhere. Q is used to whether show message or not (Q maybe for Quiet).

ifeq ($(KBUILD_VERBOSE),1)
  quiet =
  Q =
else
  quiet=quiet_
  Q = @
endif

And for the last @: this means do-nothing-output-nothing.

So the conclusion $(Q)@: simply do-nothing-output-nothing.

like image 105
nafsaka Avatar answered Nov 15 '22 11:11

nafsaka