forked from Binary-Kitchen/SolderingTutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
60 lines (41 loc) · 1.73 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Copyright (c) Binary Kitchen e.V., 2017-2018
# Author: Ralf Ramsauer <ralf@binary-kitchen.de>
#
# This work is licensed under the terms of CC-BY-SA, version 4. See the COPYING
# file in the top-level directory.
MAN_LANGS=de en fr
PROJECTS= $(foreach MAN_LANG,$(MAN_LANGS), $(wildcard */manual/configuration/$(MAN_LANG)_config.csv))
PROJECTLABELS= $(wildcard */manual/configuration/de_config.csv)
TEMP_FILES=*.aux *.fdb_latexmk *.fls *.log
projectname = $(subst /manual/configuration/, ,$(dir $(PROJECT)))
projectfolder = $(join $(projectname), /manual/)
projectlanguage = $(join _, $(patsubst %_config.csv, %, $(notdir $(PROJECT))))
FOLDERS=$(foreach PROJECT,$(PROJECTS), \
$(projectname))
MANUALS=$(foreach PROJECT,$(PROJECTS), \
$(join $(projectfolder),$(join $(projectname), $(projectlanguage))))
#source = "LaTeX_config/solderingTut"
LABELS=$(foreach PROJECT,$(PROJECTLABELS), \
$(join $(projectfolder),$(join misc/, $(join $(projectname), _label))))
#source = "LaTeX_config/solderingLabels"
BOXLABELS=$(foreach PROJECT,$(PROJECTLABELS), \
$(join $(projectfolder),$(join misc/, $(join $(projectname), _boxlabel))))
#source = "LaTeX_config/solderingBoxLabels"
all: $(MANUALS) $(LABELS) $(BOXLABELS) index.html
manuals: $(MANUALS)
labels: $(LABELS) $(BOXLABELS)
landing_page: index.html
clean:
rm $(foreach TEMP, $(TEMP_FILES), \
$(wildcard */*/$(TEMP)))
rm $(foreach TEMP, $(TEMP_FILES), \
$(wildcard */$(TEMP)))
rm index.html
$(MANUALS):
latexmk -lualatex --jobname=$@ "LaTeX_config/solderingTut"
$(LABELS):
latexmk -lualatex --jobname=$@ "LaTeX_config/solderingLabels"
$(BOXLABELS):
latexmk -lualatex --jobname=$@ "LaTeX_config/solderingBoxLabels"
index.html:
python build_landingpage.py "$(FOLDERS)"