-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
37 lines (29 loc) · 956 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
.PHONY: default
# Generate PDF
default: clean
@echo "Generating PDF..."
mkdir out
latexmk -pdf main.tex -output-directory=out
# Generate PNG from pdf
preview: default
@echo "Generating PNG..."
magick convert -density 150 out/main.pdf -quality 90 -background white -alpha remove -alpha off out/main.png
# Prepare archive to be used on Overleaf
archive:
@echo "Preparing archive..."
rm -rf build
rm -f template-latex-polytech-dijon.zip
mkdir build
cp report-polytech-dijon.cls main.tex LICENSE README.md .gitignore .gitattributes .latexmkrc Makefile build/
cp -r src Graphismes-polytech-dijon-Dijon build/
cd build && zip -r ../template-latex-polytech-dijon.zip * .latexmkrc
# Export the pdf and the png to the overveleaf folder
prepare_deploy: preview archive
rm -rf overview
mkdir overview
cp out/main.pdf out/main-0.png out/main-1.png overview/
# Remove all temporary files
clean:
@echo "Cleaning..."
latexmk -C
rm -rf out build