-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
32 lines (27 loc) · 1.82 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
main_file_name = main
outputname = thesis
source_dir = ./src
out_dir = ./out
pdf:
mkdir -p out
lualatex -shell-escape -halt-on-error -aux-directory=${out_dir} -output-directory=${out_dir} ${source_dir}/${main_file_name}
bibtex ${out_dir}/${main_file_name}||true
lualatex -shell-escape -halt-on-error -aux-directory=${out_dir} -output-directory=${out_dir} ${source_dir}/${main_file_name}
lualatex -shell-escape -halt-on-error -aux-directory=${out_dir} -output-directory=${out_dir} ${source_dir}/${main_file_name}
$(info "Adding extra pages")
pdftk A=${out_dir}/${main_file_name}.pdf B=img/ficha_catalografica.pdf cat A1 B1 A3-end output ${out_dir}/${main_file_name}_1.pdf
pdftk A=${out_dir}/${main_file_name}_1.pdf B=img/formulario_revisao.pdf cat A1-2 B1-2 A3-end output ${out_dir}/${main_file_name}_2.pdf
pdftk A=${out_dir}/${main_file_name}_2.pdf B=img/ata_defesa.pdf cat A1-4 B1-2 A5-end output ${out_dir}/${main_file_name}_3.pdf
pdftk A=${out_dir}/${main_file_name}_3.pdf B=img/capa_folha.pdf cat B1-2 A2-end output ${out_dir}/${outputname}.pdf
rm ${out_dir}/${main_file_name}.pdf ${out_dir}/${main_file_name}_1.pdf ${out_dir}/${main_file_name}_2.pdf ${out_dir}/${main_file_name}_3.pdf
pdf-clean:
mkdir -p out
lualatex -shell-escape -halt-on-error -aux-directory=${out_dir} -output-directory=${out_dir} ${source_dir}/${main_file_name}
bibtex ${out_dir}/${main_file_name}||true
lualatex -shell-escape -halt-on-error -aux-directory=${out_dir} -output-directory=${out_dir} ${source_dir}/${main_file_name}
lualatex -shell-escape -halt-on-error -aux-directory=${out_dir} -output-directory=${out_dir} ${source_dir}/${main_file_name}
mv ${out_dir}/${main_file_name}.pdf ${out_dir}/${outputname}-clean.pdf
clean:
rm -f ${out_dir}/${main_file_name}.{acn,aux,bbl,blg,glo,ist,lot,log,out,toc}
labels:
grep -rho "\\\label{[^}]*}" src | uniq -dc | sort