Skip to content

Commit

Permalink
Makefile: permite conservar archivos auxiliares de LaTeX opcionalmente
Browse files Browse the repository at this point in the history
  • Loading branch information
danipozo committed Mar 3, 2020
1 parent 2ab3c7c commit 898a1c9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ TARGET= apuntes.tar.gz

# Output directory
OUT = .out
OUT_AUX = $(OUT)/.aux

# Templates
TEX_TEMPLATE=plantilla_tex.tex
Expand Down Expand Up @@ -43,12 +44,17 @@ $(OUT)/$(TARGET): $(PDFS)
$(SUBJECTS): % : $(OUT)/%.pdf



# LaTeX compilation
latex_args = -pdf --shell-escape --interaction=nonstopmode -output-directory=$(OUT) -halt-on-error -file-line-error -jobname=$(1)
latex_args = -pdf --shell-escape --interaction=nonstopmode -output-directory=$(OUT_AUX) -halt-on-error -file-line-error -jobname=$(1)
$(OUT)/%.pdf: $(TEX_TEMPLATE) %/config.sty %/apuntes.tex %/ejercicios.tex
mkdir -p $(OUT_AUX)
mkdir -p $(OUT)
TEXINPUTS="$*:_assets:" latexmk $(call latex_args,$*) $(CONTARG) $(TEX_TEMPLATE)
mv $(OUT_AUX)/*.pdf $(OUT)

ifneq ($(KEEP_AUX), true)
rm -rf $(OUT_AUX)
endif


# Markdown compilation
Expand Down

0 comments on commit 898a1c9

Please sign in to comment.