examplesdir = ${docdir}/examples
dist_examples_DATA = $(EXAMPLES:%=%.tex) $(EXAMPLES:%=%.pdf)

%.pdf:%.tex
	TEXINPUTS=..:${srcdir}:$${TEXINPUTS} xelatex -synctex=1 -interaction=nonstopmode $<

CLEANFILES = $(EXAMPLES:%=%.aux) $(EXAMPLES:%=%.pdf) $(EXAMPLES:%=%.log) $(EXAMPLES:%=%.synctex.gz) $(EXAMPLES:%=%.fdb_latexmk) $(EXAMPLES:%=%.fls) $(EXAMPLES:%=%.xdv)
MAINTAINERCLEANFILES = makefile.in

EXTRA_DIST = .latexmkrc
