For the complete documentation index, see llms.txt. This page is also available as Markdown.

Running make in a set of subdirectories

.
β”œβ”€β”€ Makefile
β”œβ”€β”€ scripts
β”‚   └── Makefile
└── tasks
    └── Makefile

All 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