Commit e9721ba3 authored by Andreas Beckmann's avatar Andreas Beckmann

factor out LATEX_FLAGS

parent df901740
# This Makefile intentionally rebuilds everytime everything.
PDFLATEX ?= pdflatex PDFLATEX ?= pdflatex
XELATEX ?= xelatex XELATEX ?= xelatex
LUALATEX ?= lualatex LUALATEX ?= lualatex
LATEX_FLAGS ?= -halt-on-error -interaction=nonstopmode
export TEXINPUTS := $(CURDIR)/src//:$(TEXINPUTS) export TEXINPUTS := $(CURDIR)/src//:$(TEXINPUTS)
cmd%pdflatex = $(PDFLATEX) cmd%pdflatex = $(PDFLATEX) $(LATEX_FLAGS)
cmd%xelatex = $(XELATEX) cmd%xelatex = $(XELATEX) $(LATEX_FLAGS)
cmd%lualatex = $(LUALATEX) cmd%lualatex = $(LUALATEX) $(LATEX_FLAGS)
engines = pdflatex xelatex lualatex engines = pdflatex xelatex lualatex
targets = minimal minimal_handout tutorial many-pages targets = minimal minimal_handout tutorial many-pages
%/minimal: src %/minimal: src
@mkdir -p $(@D) @mkdir -p $(@D)
cd $(@D) && $(cmd%$*) -halt-on-error -interaction=nonstopmode ../../tutorial/minimal.tex cd $(@D) && $(cmd%$*) ../../tutorial/minimal.tex
%/minimal_handout: src %/minimal_handout: src
@mkdir -p $(@D) @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 %/tutorial: src %/minimal %/minimal_handout
@mkdir -p $(@D) @mkdir -p $(@D)
cd $(@D) && $(cmd%$*) -halt-on-error -interaction=nonstopmode ../../tutorial/tutorial.tex cd $(@D) && $(cmd%$*) ../../tutorial/tutorial.tex
%/many-pages: src %/many-pages: src
@mkdir -p $(@D) @mkdir -p $(@D)
cd $(@D) && $(cmd%$*) -halt-on-error -interaction=nonstopmode ../many-pages.tex cd $(@D) && $(cmd%$*) ../many-pages.tex
all: $(engines) 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