aboutsummaryrefslogtreecommitdiff
path: root/samples/Makefile
blob: 518ec87925a585dc614d377beea876536c149d65 (plain)
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
SHELL = bash
CMP   = lualatex-dev
PWD   = $(shell pwd)

exts := .tex .pdf -tei.xml
texsamples := $(basename $(wildcard $(PWD)/*.tex))
findopts := $(foreach ext,$(exts),-or -iname "*$(ext)")

define dosamples
	$(CMP) --shell-escape $1 >/dev/null
	$(CMP) --shell-escape $1 >/dev/null
	$(CMP) --shell-escape $1 >/dev/null
	$(CMP) --shell-escape $1 >/dev/null
endef


all:
	cp ../ekdosis.{lua,sty} .
	$(foreach file,$(texsamples), $(call dosamples, $(file)))
	rm -rf auto
	find -iname "*~" -or -iname "*_out*.tex" | xargs rm -rf
	find ./* -type f -iname "Makefile" $(findopts) > ls-R
	rsync -aPr --files-from=ls-R . .backup
	rm -rf *
	cp -p -r .backup/* .
	rm -rf .backup