-
Notifications
You must be signed in to change notification settings - Fork 11
/
makefile
47 lines (40 loc) · 1.43 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
SHELL = /bin/bash
XELATEX = xelatex -shell-escape
BIBER = biber -quiet
RERUN = 'rerun latex( afterwards){0}'
UNDEFINED = "Citation .* undefined"
LABEL_MULTIPLE = "(multiply defined)"
LABEL_NON_DEFINI = "(Reference .* undefined)"
.PHONY: all clean
all:papier.pdf ecran.pdf
%.pdf: %.tex plan.tex ./annexes/* ./biblio/* ./biblio_fichiers/* ./exemples/*/*/* ./preambule/* ./navigation/* preliminaires/* premierpas/* schemas/* shs/*
@echo "Compilation XELATEX"
@$(XELATEX) $<
@echo "Compilation Biber"
@$(BIBER) $*
sed -i -e 's/@/"@/g' *.idx
sed -i -e 's/"@\\oldcs/@\\oldcs/' *.idx
splitindex -m "makeindex -s latex-humain.ist" $*.idx
python post-index.py
@echo "Compilation XELATEX 2"
@$(XELATEX) $<
for ((i = 3 ; i < 6 ; i++)) ; \
do \
if egrep -i -q $(RERUN) *.log ; \
then \
sed -i -e 's/@/"@/g' *.idx ; \
sed -i -e 's/"@\\oldcs/@\\oldcs/' *.idx ; \
splitindex -m "makeindex -s latex-humain.ist" $*.idx ; \
python post-index.py ; \
echo "Compilation XELATEX" $$i; \
$(XELATEX) $< ; \
fi \
done \
@echo "Citations indéfinies:"
@egrep -i $(UNDEFINED) *.log || echo "Aucune"
@echo "Erreurs de label"
@egrep -i $(LABEL_MULTIPLE) *.log || echo "Pas de label multiple"
@egrep -i $(LABEL_NON_DEFINI) *.log || echo "Pas de label indéfini"
clean:
@rm -f *.log *.out *.toc *-e principal.pdf *idx *ind *run.xml *blg *bbl *bcf *ilg *.1 *.2 *.3 *.4 *.end *.pyg *.eledsec*
@find -name '*\.aux' -exec rm -f {} \;