aboutsummaryrefslogtreecommitdiff
path: root/course/Makefile
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2024-07-20 20:36:44 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2024-07-20 20:39:07 +0200
commit00f9fdf7db792d942180a31253b349803d5683cd (patch)
tree972da51a45a4c804eb0d6706e2db1d96d3a7a69f /course/Makefile
parentdf66d76b5b29703f1822beda897dd92c5f90af5e (diff)
downloadSOS-00f9fdf7db792d942180a31253b349803d5683cd.tar.gz
SOS-00f9fdf7db792d942180a31253b349803d5683cd.zip
add first version of the SOS workbook
Diffstat (limited to 'course/Makefile')
-rw-r--r--course/Makefile12
1 files changed, 8 insertions, 4 deletions
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))))