]> git.llucax.com Git - z.facultad/75.00/informe.git/blob - Makefile
af4ea81a18d278d2edaa069bc8503da9bc6cea1f
[z.facultad/75.00/informe.git] / Makefile
1
2 rst=rst
3 latex=latex
4 html=html
5
6 rstopts=--section-subtitles --language=es
7 latexopts=--use-latex-footnotes --use-latex-citations --use-latex-docinfo \
8           --use-latex-toc --documentclass=book --use-verbatim-when-possible
9 printopts=--hyperlink-color=0
10 htmlopts=--footnote-references=superscript --cloak-email-addresses
11
12 targets=informe.pdf informe.$(html) #informe-print.pdf
13
14 docnames=informe informe-print
15
16 all: $(targets) clean-tmp
17
18 # Informe
19 informe.$(latex): informe.$(rst)
20         @echo "Generando $@..."
21         @rst2latex $(rstopts) $(latexopts) "$(basename $<).$(rst)" > "$@"
22
23 informe.$(html): informe.$(rst)
24         @echo "Generando $@..."
25         @rst2html $(rstopts) $(htmlopts) "$(basename $<).$(rst)" > "$@"
26
27 informe.pdf: informe.$(latex)
28         @echo "Generando $@..."
29         @pdflatex "$(basename $<).$(latex)" > /dev/null
30         @pdflatex "$(basename $<).$(latex)" > /dev/null
31
32 # Informe para imprimir
33 informe-print.$(latex): informe.$(rst)
34         @echo "Generando $@..."
35         @rst2latex $(rstopts) $(latexopts) $(printopts) "$(basename $<).$(rst)" > "$@"
36
37 informe-print.pdf: informe-print.$(latex)
38         @echo "Generando $@..."
39         @pdflatex "$(basename $<).$(latex)" > /dev/null
40         @pdflatex "$(basename $<).$(latex)" > /dev/null
41
42 clean-tmp:
43         @$(RM) $(addsuffix .aux, $(docnames)) $(addsuffix .out,$(docnames))
44         @$(RM) $(addsuffix .log, $(docnames)) $(addsuffix .toc, $(docnames)) texput.log
45         @$(RM) texput.log
46
47 clean: clean-tmp
48         @$(RM) -fv $(targets) $(addsuffix .latex, $(docnames))
49
50 .PHONY: clean all
51