Commit e9721ba3 authored by Andreas Beckmann's avatar Andreas Beckmann
Browse files

factor out LATEX_FLAGS

parent df901740
# This Makefile intentionally rebuilds everytime everything.
PDFLATEX ?= pdflatex
XELATEX ?= xelatex
LUALATEX ?= lualatex
LATEX_FLAGS ?= -halt-on-error -interaction=nonstopmode
export TEXINPUTS := $(CURDIR)/src//:$(TEXINPUTS)
cmd%pdflatex = $(PDFLATEX)
cmd%xelatex = $(XELATEX)
cmd%lualatex = $(LUALATEX)
cmd%pdflatex = $(PDFLATEX) $(LATEX_FLAGS)
cmd%xelatex = $(XELATEX) $(LATEX_FLAGS)
cmd%lualatex = $(LUALATEX) $(LATEX_FLAGS)
engines = pdflatex xelatex lualatex
targets = minimal minimal_handout tutorial many-pages
%/minimal: src
@mkdir -p $(@D)
cd $(@D) && $(cmd%$*) -halt-on-error -interaction=nonstopmode ../../tutorial/minimal.tex
cd $(@D) && $(cmd%$*) ../../tutorial/minimal.tex
%/minimal_handout: src
@mkdir -p $(@D)
cd $(@D) && $(cmd%$*) -halt-on-error -interaction=nonstopmode ../../tutorial/minimal_handout.tex
cd $(@D) && $(cmd%$*) ../../tutorial/minimal_handout.tex
%/tutorial: src %/minimal %/minimal_handout
@mkdir -p $(@D)
cd $(@D) && $(cmd%$*) -halt-on-error -interaction=nonstopmode ../../tutorial/tutorial.tex
cd $(@D) && $(cmd%$*) ../../tutorial/tutorial.tex
%/many-pages: src
@mkdir -p $(@D)
cd $(@D) && $(cmd%$*) -halt-on-error -interaction=nonstopmode ../many-pages.tex
cd $(@D) && $(cmd%$*) ../many-pages.tex
all: $(engines)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment