In Kernel Makefile i found the code like below:
ctags CTAGS CSCOPE: $(HEADERS) $(SOURCES)
$(ETAGS) $(ETAGSFALGS) $(HEADERS) $(SOURCES)
$(call cmd, ctags)
Also, where can i find the Macro or function ?
In Kernel Makefile i found the code like below:
ctags CTAGS CSCOPE: $(HEADERS) $(SOURCES)
$(ETAGS) $(ETAGSFALGS) $(HEADERS) $(SOURCES)
$(call cmd, ctags)
Also, where can i find the Macro or function ?
If you run
make -p
it will print the entire database of all variables, rules, etc. with line numbers where they were last defined.Using MadScientist's method on kernel v4.1:
we find:
scripts/Kbuild.include
is included on the top levelMakefile
. It also contains:quiet
: set at the top level makefile, depending on the value ofV
.Will be either:
quiet_
to printCC file.c
V=
silent_
to not print anything onmake -s
escsq
is defined as:It escapes single quotes so that
echo '$(call escsq,Letter 'a'.'
will print properly insh
.echo-why
: defined further down atKbuild.include
.It is used for
make V=2
, and says why a target is being remade.The setup of
make tags
is done in theMakefile
:Which shows the typical usage pattern for calling commands on kbuild:
A comment on the
Makefile
explains how all of this is done to make themake
output prettier: