Last updated 3 years ago
All Makefiles have all, test and lint targets.
all
test
lint
$@ is an automatic variable that contains the target name (one of SUBDIRS in this case).
$@
SUBDIRS
Source:
. ├── Makefile ├── scripts │ └── Makefile └── tasks └── Makefile
SUBDIRS = scripts tekton TOPTARGETS = all lint test $(TOPTARGETS): $(SUBDIRS) $(SUBDIRS): $(MAKE) -C $@ $(MAKECMDGOALS) .PHONY: $(SUBDIRS) $(TOPTARGETS)