summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tikz-page/Makefile
blob: 79df540a65b65fe7e89af464f98d3382647b5f5f (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
##


export TEXMFHOME="~/texmf:"
PACKAGE = tikz-page

cleanext := $(wildcard *.dvi *.aux *.glo *.ilg *.ind *.toc *.hd *.idx *.listing *.log *.out _minted-*)

listings := $(wildcard $(PACKAGE)-*.tex wildcard $(PACKAGE)-*.md5 wildcard $(PACKAGE)-*.pdf)

objects := $(PACKAGE).sty $(PACKAGE).pdf

LATEX := $(shell which latex)
PDFLATEX := $(shell which pdflatex)
PANDOC := $(shell which pandoc)

CTANDIR := $(PACKAGE)
CTANDIST = Makefile README.md README \
	tikz-page.pdf tikz-page.dtx tikz-page.sty \
	example.png

all: $(objects) README

%.sty: %.dtx
	$(RM) -f $@
	$(LATEX) '\let\install=y\input{$<}'

%.pdf: %.dtx
	TEXMFHOME="~/texmf:" $(PDFLATEX) -shell-escape $<
	makeindex -s gind.ist $(PACKAGE).idx
	TEXMFHOME="~/texmf:" $(PDFLATEX) -shell-escape $<
	#$(PDFLATEX) -shell-escape $<

clean:
	$(RM) -fr $(cleanext) $(listings) $(PACKAGE).zip

distclean: clean
	$(RM) -f $(objects) README $(CTANDIR)

README: README.md
	$(PANDOC) -t plain -o $@ $<

CTAN: all README clean
	mkdir -p $(CTANDIR)
	cp $(CTANDIST) $(CTANDIR)
	zip -ll -q -r -X $(CTANDIR).zip $(CTANDIR)


.PHONY: %.dty