| Version: | 6.2.0 |
|---|---|
| Manual group: | Universal Ctags |
| Manual section: | 7 |
This parser extracts macro and target definitions. It also extracts included files as references.
"input.mak"
-include base.mak SRC = hello.c all: hello hello: hello.o hello.o: hello.c $(CC) -c $(CFLAGS) $(CPPFLAGS) $<
"output.tags" with "--options=NONE --extras=+r --fields=+KlrE -o - input.mak"
With -D option in a C compiler like gcc, a programmer can define a macro outside C source files. The options appears on a Makefile frequently. For an example:
CPPFLAGS = -DDEBUG
The Make parser has heuristics [DINMAKE] for extracting the macros defined with the option. With enabling CppDef extra, you can turn on the heuristics.
"input.mak"
-include base.mak CFLAGS = -g -O2 CPPFLAGS = -DOUTPUT=stdout SRC = hello.c all: hello hello: hello.o hello.o: hello.c $(CC) -c $(CFLAGS) $(CPPFLAGS) $<
"output.tags" with "--options=NONE --extras-Make=+{CppDef} --fields=+KlE -o - input.mak"
ctags(1)
| [DINMAKE] | (1, 2) CONFIG_X86_X32_ABI is not visible (defined in Makefile, not C or Kconfig) (https://github.com/bootlin/elixir/issues/221) |