Makefile to recursively build all subdirs

This commit is contained in:
IOhannes m zmölnig 2020-03-04 14:48:46 +01:00 committed by katjav
parent 2da8d220ad
commit 968558f9f2

16
tests/Makefile Normal file
View file

@ -0,0 +1,16 @@
# recursively build all example projects in the subdirectories
projects := $(filter-out _%, $(dir $(wildcard */Makefile)))
all: $(projects:%=%-build)
clean: $(projects:%=%-clean)
install: $(projects:%=%-install)
projects:
@echo $(projects)
%-build: %/Makefile
$(MAKE) -C $(<D)
%-clean: %/Makefile
$(MAKE) -C $(<D) clean
%-install: %/Makefile
$(MAKE) -C $(<D) install