O := .tmp R2B := rst2beamer.py PYTHON := python R2BTHEME := Madrid R2BFLAGS := --halt=2 --lang es --codeblocks-use-pygments \ --input-encoding=utf-8 --output-encoding=utf-8 \ --overlaybullets= \ --theme $(R2BTHEME) R2BFILTER := sed '/\\usepackage\[scaled=\.90\]{helvet}/d; \ s/\\usepackage\[utf8\]{inputenc}/\\usepackage[utf8x]{inputenc}/; \ s/\\institute{\(.*\)}/\\institute[LUGFI]{\1}/m' PDFLATEX := pdflatex PDFLATEXFLAGS := -halt-on-error -file-line-error # Verbosity flag (empty show nice messages, non-empty use make messages) # When used internal, $V expand to @ is nice messages should be printed, this # way it's easy to add $V in front of commands that should be silenced when # displaying the nice messages. override V := $(if $V,,@) # honour make -s flag override V := $(if $(findstring s,$(MAKEFLAGS)),,$V) targets := presentacion.pdf .PHONY: all all: $(targets) presentacion.pdf: $O/diff.pdf $O/merge.pdf %.pdf: $O/%.tex $(if $V,@echo "$(PDFLATEX) $< > $@") $V cd $O && $(PDFLATEX) $(PDFLATEXFLAGS) $( $@.log) $V cd $O && $(PDFLATEX) $(PDFLATEXFLAGS) $(> $@.log) $V mv $O/$@ $@ $O/%.tex: %.rst $(R2B) Makefile $(if $V,@echo "$(R2B) $< > $@") $V $(PYTHON) $(R2B) $(R2BFLAGS) $< | $(R2BFILTER) > $@ $O/%.pdf: %.pdf cp $< $@ .PHONY: clean clean: $(RM) -r $O .PHONY: clean-all clean-all: clean $(RM) $(targets) __dummy := $(shell mkdir -p $O/img)