aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2016-08-15 16:50:58 +0200
committerRobert Alessi <alessi@robertalessi.net>2016-08-15 16:50:58 +0200
commita24d31f5dab8e66dcaf7b84a73658f4b88c9faf5 (patch)
tree1e3bbedd363d014e05d6d24285f2ad4d767ad9f7 /Makefile
downloadekdosis-a24d31f5dab8e66dcaf7b84a73658f4b88c9faf5.tar.gz
initial project version
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile53
1 files changed, 53 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..f90325c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,53 @@
1NAME = ekdosis
2SHELL = bash
3PWD = $(shell pwd)
4VERS = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//')
5LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL)
6UTREE = $(shell kpsewhich --var-value TEXMFHOME)
7all: $(NAME).pdf
8 test -e README.txt && mv README.txt README || exit 0
9$(NAME).pdf: $(NAME).dtx
10 lualatex -shell-escape -recorder -interaction=batchmode $(NAME).dtx >/dev/null
11 if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi
12 if [ -f $(NAME).idx ]; then makeindex -q -s gind.ist -o $(NAME).ind $(NAME).idx; fi
13 lualatex --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
14 lualatex --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
15clean:
16 rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,ins,log,out}
17 rm -f *~
18 rm -rf auto/
19# rm -f $(NAME)_*.{bib,lua}
20distclean: clean uninst
21 rm -f $(NAME).{pdf,sty,lua} README
22 rm -f *.zip *.tar.gz
23uninst:
24 rm -rf $(UTREE)/{tex,source,doc}/lualatex/$(NAME)
25inst: uninst all
26 mkdir -p $(UTREE)/{tex,source,doc}/lualatex/$(NAME)
27 cp $(NAME).dtx $(UTREE)/source/lualatex/$(NAME)
28 cp $(NAME).sty $(UTREE)/tex/lualatex/$(NAME)
29 cp $(NAME).lua $(UTREE)/tex/lualatex/$(NAME)
30 cp $(NAME).pdf $(UTREE)/doc/lualatex/$(NAME)
31#install: all
32# sudo mkdir -p $(LOCAL)/{tex,source,doc}/lualatex/$(NAME)
33# sudo cp $(NAME).dtx $(LOCAL)/source/lualatex/$(NAME)
34# sudo cp $(NAME).sty $(LOCAL)/tex/lualatex/$(NAME)
35# sudo cp $(NAME).pdf $(LOCAL)/doc/lualatex/$(NAME)
36zip: all
37 ln -sf . $(NAME)
38 zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README,$(NAME).{pdf,sty,lua}}
39 rm $(NAME)
40package: distclean all
41 mkdir $(NAME)/
42 cp README *.dtx *.pdf $(NAME)/
43 mkdir -p tex/lualatex/$(NAME)/
44 cp *.lua *.sty tex/lualatex/$(NAME)/
45 mkdir -p doc/lualatex/$(NAME)/
46 cp *.pdf doc/lualatex/$(NAME)/
47 mkdir -p source/lualatex/$(NAME)/
48 cp Makefile *.dtx source/lualatex/$(NAME)/
49 zip -r $(NAME).tds.zip tex doc source
50 rm -rf tex/ source/ doc/
51 tar czf $(NAME)-$(VERS).tar.gz $(NAME).tds.zip $(NAME)/
52 rm -rf $(NAME)/
53