Debian Codegraph @

texmf-dist/doc/lualatex/ekdosis/samples/Makefile

raw
1 SHELL = bash
2 CMP = lualatex-dev
3 PWD = $(shell pwd)
4
5 exts := .tex .pdf -tei.xml
6 texsamples := $(basename $(wildcard $(PWD)/*.tex))
7 findopts := $(foreach ext,$(exts),-or -iname "*$(ext)")
8
9 define dosamples
10 $(CMP) --shell-escape $1 >/dev/null
11 $(CMP) --shell-escape $1 >/dev/null
12 $(CMP) --shell-escape $1 >/dev/null
13 $(CMP) --shell-escape $1 >/dev/null
14 endef
15
16 all: test
17 cp ../ekdosis.{lua,sty} .
18 $(foreach file,$(texsamples), $(call dosamples, $(file)))
19 rm -rf auto
20 find -iname "*~" -or -iname "*_out*.tex" | xargs rm -rf
21 find ./* -type f -iname "Makefile" $(findopts) > ls-R
22 rsync -aPr --files-from=ls-R . .backup
23 rm -rf *
24 cp -p -r .backup/* .
25 rm -rf .backup
26
27 test:
28 if [ ! -e ../ekdosis.sty ] || [ ! -e ../ekdosis.lua ] ;\
29 then echo "This Makefile cannot be invoked but recursively. Aborting." && exit 1 ;\
30 fi
31
32 .SILENT: test
33 .PHONY: all