Unverified Commit 2cf33d8d authored by Caleb Maclennan's avatar Caleb Maclennan
Browse files

Sketch out a way of iterating through modules

parent ea0eebfa
SUBMODULES := $(wildcard course_* book_*)
COURSES := $(subst course_,,$(wildcard course_*))
BOOKS := $(subst book_,,$(wildcard book_*))
all: language
init_ccmtoolkit: init_ccmtoolkit_language
clean: clean_ccmtoolkit_language
debug_ccmtoolkit: debug_ccmtoolkit_language
.PHONY: debug_ccmtoolkit_language
debug_ccmtoolkit_language:
@echo BOOKS: $(BOOKS)
@echo COURSES: $(COURSES)
@echo SUBMODULES: $(SUBMODULES)
define SUBMODULEMAKE =
.PHONY: $1__%
$1__%:
$(MAKE) -C $1 $$*
endef
$(foreach SUBMODULE,$(SUBMODULES),$(eval $(call SUBMODULEMAKE,$(SUBMODULE))))
.PHONY: init_ccmtoolkit_language
init_ccmtoolkit_language: $(call pattern_list,$(SUBMODULES),__init)
.PHONY: clean_ccmtoolkit_language
clean_ccmtoolkit_language: $(call pattern_list,$(SUBMODULES),__clean)
BOOKMANIFESTS := $(foreach BOOK,$(BOOKS),book_$(BOOK)__$(_book)_$(BOOK)-manifest.yml)
.PHONY: language $(BOOKMANIFESTS)
language: $(BOOKMANIFESTS)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment