2 ms·
While we're at it, a small tip: make -p (or `make -pn` when you're inside a directory with a Makefile and you don't want to trigger the default target as a
by oefrha 6y ago
While we're at it, a small tip:
make -p
(or `make -pn` when you're inside a directory with a Makefile and you don't want to trigger the default target as a side effect) lists all rules including implicit ones, which is great for discovering useful builtin variables. For instance,
$ make -p | grep '^LINK.c'
LINK.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
LINK.cpp = $(LINK.cc)