diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-04-02 15:44:00 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-04-02 15:44:00 +0200 |
| commit | 3e0fcaf2bea7864235ec415895ecd7b788a1531c (patch) | |
| tree | 2b46035962c688c4bd91fe5d2876eecd8e172f0f /Makefile | |
| download | unterricht-3e0fcaf2bea7864235ec415895ecd7b788a1531c.tar.gz unterricht-3e0fcaf2bea7864235ec415895ecd7b788a1531c.zip | |
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.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 30 |
1 files changed, 30 insertions, 0 deletions
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 + |
