-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (31 loc) · 987 Bytes
/
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
#Author: Polonio Davide <[email protected]>
#License: GPLv3
OUTPUT_NAME= GhioCA
LIST_NAME= listOfSections.tex
PATH_OF_CONTENTS= res/sections
COMPILER_OPTIONS= pdflatex -interaction=nonstopmode
SHELL := /bin/bash #Need bash not shell
export EMAIL
export PASSWORD
all: generate quiet
slow: image generate quiet
debug: generate notquiet
generate:
set -e; \
if [[ -a "res/$(LIST_NAME)" ]]; then echo "Removing res/$(LIST_NAME)"; \
rm res/$(LIST_NAME); fi; \
for i in $(sort $(wildcard $(PATH_OF_CONTENTS)/*.tex)); do \
echo "Adding $$i into $(LIST_NAME)"; \
echo "\input{$$i}" >> res/$(LIST_NAME); \
done; \
quiet:
latexmk -jobname=$(OUTPUT_NAME) -pdflatex='$(COMPILER_OPTIONS)' -quiet -pdf main.tex;
notquiet:
latexmk -jobname=$(OUTPUT_NAME) -pdflatex='$(COMPILER_OPTIONS)' -pdf main.tex;
image:
set -e; \
cd ./tool/emaildownloader/; \
$(MAKE) IMAGES_PATH=../../res/img/;
clean:
git clean -Xfd
if [[ -a "$(OUTPUT_NAME)" ]]; then rm -rv $(OUTPUT_NAME)/; fi;