From 00f9fdf7db792d942180a31253b349803d5683cd Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sat, 20 Jul 2024 20:36:44 +0200 Subject: add first version of the SOS workbook --- course/Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'course/Makefile') diff --git a/course/Makefile b/course/Makefile index 309e1b9..d74f830 100644 --- a/course/Makefile +++ b/course/Makefile @@ -3,17 +3,21 @@ 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) +VERBOSE ?= @ + .DEFAULT_GOAL := all all: $(SRC_DIRS) define generateRules $(1): - @echo "## Building $$@ ##" - $(VERBOSE)make -C $$(@) -f $(MAKEFILE_DIR)/common.mk + $(VERBOSE)echo "## Building $$@ ##" + $(VERBOSE)if [ -d $$(@)/Makefile ]; then\ + $(MAKE) -C $$(@);\ + else\ + $(MAKE) -C $$(@) -f $(MAKEFILE_DIR)/toplevel-build.mk;\ + fi endef $(foreach dir, $(SRC_DIRS), $(eval $(call generateRules, $(dir)))) -- cgit v1.2.3