From 638706371ba3e4091fafb9da7509b51b523cc36d Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 12 Feb 2024 15:45:23 +0100 Subject: add course material build tooling --- course/Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 course/Makefile (limited to 'course/Makefile') diff --git a/course/Makefile b/course/Makefile new file mode 100644 index 0000000..309e1b9 --- /dev/null +++ b/course/Makefile @@ -0,0 +1,21 @@ +# The full path to the Makefile +MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) +# The path to the directory of the Makefile +MAKEFILE_DIR := $(dir $(MAKEFILE_PATH)) + +include $(MAKEFILE_DIR)/common.mk + +SRC_DIRS := $(shell find "(" -not -path "./pandoc/*" -a "(" -name "*.md" -o -name "*.tex" ")" -printf "%h\n" ")" | uniq) + +.DEFAULT_GOAL := all +all: $(SRC_DIRS) + +define generateRules +$(1): + @echo "## Building $$@ ##" + $(VERBOSE)make -C $$(@) -f $(MAKEFILE_DIR)/common.mk +endef + +$(foreach dir, $(SRC_DIRS), $(eval $(call generateRules, $(dir)))) + +.PHONY: $(SRC_DIRS) -- cgit v1.2.3