Makefile 673 Bytes
Newer Older
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
PDFLATEX		?= pdflatex
XELATEX			?= xelatex
LUALATEX		?= lualatex

export TEXINPUTS	:= $(CURDIR)/..//:$(TEXINPUTS)

cmd%pdflatex		 = $(PDFLATEX)
cmd%xelatex		 = $(XELATEX)
cmd%lualatex		 = $(LUALATEX)

engines			 = pdflatex xelatex lualatex
targets			 = minimal minimal_handout tutorial

%/minimal:
	@mkdir -p $(@D)
	cd $(@D) && $(cmd%$*) ../../minimal/minimal.tex

%/minimal_handout:
	@mkdir -p $(@D)
	cd $(@D) && $(cmd%$*) ../../minimal/minimal_handout.tex

%/tutorial:
	@mkdir -p $(@D)
	cd $(@D) && $(cmd%$*) ../../tutorial/tutorial.tex


all: $(engines)

$(foreach engine,$(engines),$(eval $(engine): $(patsubst %,$(engine)/%,$(targets))))


clean:
	$(RM) -r $(engines)