summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/lualatex/ekdosis/samples/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/lualatex/ekdosis/samples/Makefile')
-rw-r--r--Master/texmf-dist/doc/lualatex/ekdosis/samples/Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/lualatex/ekdosis/samples/Makefile b/Master/texmf-dist/doc/lualatex/ekdosis/samples/Makefile
new file mode 100644
index 00000000000..8cb7a982cdd
--- /dev/null
+++ b/Master/texmf-dist/doc/lualatex/ekdosis/samples/Makefile
@@ -0,0 +1,33 @@
+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: test
+ 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
+
+test:
+ if [ ! -e ../ekdosis.sty ] || [ ! -e ../ekdosis.lua ] ;\
+ then echo "This Makefile cannot be invoked but recursively. Aborting." && exit 1 ;\
+ fi
+
+.SILENT: test
+.PHONY: all