From 3e0fcaf2bea7864235ec415895ecd7b788a1531c Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sun, 2 Apr 2023 15:44:00 +0200 Subject: initial commit adding my latex build system The two classes test and handout are provided. * test is for setting any kind of test * handout is for setting any handout sheet All markdown files in any subdirectory are converted to pdfs using pandoc. Found tex files are used to generate pdf files using rubber and can use the latex classes defined in the latex/ directory. --- Makefile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..13993c53 --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +# 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 "./templates/*" -a -not -path "./latex/*" -a -not -path "*/Aufgaben/*" -a "(" -name "*.md" -o -name "*.tex" ")" ")" -printf "%h\n" | uniq) + +# Hide or not the calls depending of VERBOSE +ifeq ($(VERBOSE),TRUE) + HIDE := +else + HIDE := @ +endif + +.DEFAULT_GOAL := all +all: $(SRC_DIRS) + +define generateRules +$(1): + @echo \#\# Building $$@ \#\# + @pushd $$(@) >/dev/null && make-lesson || popd >/dev/null +endef + +$(foreach dir, $(SRC_DIRS), $(eval $(call generateRules, $(dir)))) +$(eval $(call generateRules, templates)) + +.PHONY: $(SRC_DIRS) templates + -- cgit v1.2.3