-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (40 loc) · 1.39 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
MODULES := ZtoConfl
VS := $(MODULES:%=src/%.v)
TEX := $(MODULES:%=latex/%.v.tex)
VS_DOC := $(MODULES:%=%.v)
.PHONY: coq clean doc html pdf
coq: Makefile.coq
$(MAKE) -f Makefile.coq
Makefile.coq: Makefile $(VS)
coq_makefile $(VS) \
COQC = "coqc -R src ZtoConfl" \
COQDEP = "coqdep -R src ZtoConfl" \
-o Makefile.coq
clean:: Makefile.coq
$(MAKE) -f Makefile.coq clean
rm -f Makefile.coq .depend
cd latex; rm -f *.log *.aux *.dvi *.v.tex *.toc *.bbl *.blg *.idx *.ilg *.pdf *.ind *.out *.fls *.gz *.fdb_latexmk
doc: latex/reportZtoConfl.pdf
COQDOC = coqdoc -R . ZtoConfl
latex/%.tex: Makefile src/%.v src/%.glob
cd src ; $(COQDOC) --interpolate --latex --body-only -s \
$*.v -o ../latex/$*.tex
latex/%.pdf: latex/%.tex
cd latex ; pdflatex $* ; pdflatex $* ; bibtex $* ; pdflatex $* ; pdflatex $*
latex/reportZtoConfl.pdf: latex/ZtoConfl.tex
html: Makefile $(VS) src/toc.html
mkdir -p html
cd src ; $(COQDOC) --interpolate --no-externals $(VS_DOC) \
-d ../html
cp src/toc.html html/
PDF_OPEN = xdg-open latex/reportZtoConfl.pdf&
ifeq ($(OS),Windows_NT) # Se o Sistema Operacional for Windows...
else # Caso o Sistema Operacional seja Mac OS, modifica-se a variável pdf
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S), Darwin)
PDF_OPEN = open -a Skim latex/reportZtoConfl.pdf&
endif
endif
# Assume-se o Linux como sistema operacional padrão
pdf: doc
$(PDF_OPEN)