Running make in a set of subdirectories
.
├── Makefile
├── scripts
│ └── Makefile
└── tasks
└── MakefileAll Makefiles have all, test and lint targets.
SUBDIRS = scripts tekton
TOPTARGETS = all lint test
$(TOPTARGETS): $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@ $(MAKECMDGOALS)
.PHONY: $(SUBDIRS) $(TOPTARGETS)$@ is an automatic variable that contains the target name (one of SUBDIRS in this case).
Source: stackoverflow
Last updated
Was this helpful?