From: adin Date: Wed, 31 Aug 2016 13:37:11 +0000 (-0300) Subject: Add makefile to example X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=329e18bb0d7e10cb972eef6633bb8409301b04b5;p=mcv-academic Add makefile to example --- diff --git a/example/Makefile b/example/Makefile new file mode 100644 index 0000000..66fcc43 --- /dev/null +++ b/example/Makefile @@ -0,0 +1,33 @@ +# Our languages +LANGS = en es + +# Default source options +NAME = example +SOURCE = $(NAME: %=%.tex) +DETAILS = true + +# Rules +all: $(LANGS) + +# Default make to build these rules instead of files in case they exist +.PHONY: all clean veryclean $(LANGS) + +# we need to clean before compiling a new language +$(LANGS): clean + # compile the language + $(eval INPUT="\def\defaultlang{\selectshortlanguage{$@}\details$(DETAILS)}\input{$(SOURCE)}") + pdflatex -interaction=nonstopmode $(INPUT) -jobname=$(NAME) || true + pdflatex -interaction=nonstopmode $(INPUT) -jobname=$(NAME) + biber $(NAME) + pdflatex -interaction=nonstopmode $(INPUT) -jobname=$(NAME) || true + pdflatex -interaction=nonstopmode $(INPUT) -jobname=$(NAME) + # if it finishes move the file to the correct name + mv $(NAME).pdf $(NAME)-$@.pdf + + +# ignoramos los errores con - +clean: + rm *.log *.aux *.out *.blg *.bbl *.run.xml *.bcf || true + +veryclean: clean + rm *.pdf || true \ No newline at end of file