From a24d31f5dab8e66dcaf7b84a73658f4b88c9faf5 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Mon, 15 Aug 2016 16:50:58 +0200 Subject: initial project version --- Makefile | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f90325c --- /dev/null +++ b/Makefile @@ -0,0 +1,53 @@ +NAME = ekdosis +SHELL = bash +PWD = $(shell pwd) +VERS = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//') +LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL) +UTREE = $(shell kpsewhich --var-value TEXMFHOME) +all: $(NAME).pdf + test -e README.txt && mv README.txt README || exit 0 +$(NAME).pdf: $(NAME).dtx + lualatex -shell-escape -recorder -interaction=batchmode $(NAME).dtx >/dev/null + if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi + if [ -f $(NAME).idx ]; then makeindex -q -s gind.ist -o $(NAME).ind $(NAME).idx; fi + lualatex --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null + lualatex --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null +clean: + rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,ins,log,out} + rm -f *~ + rm -rf auto/ +# rm -f $(NAME)_*.{bib,lua} +distclean: clean uninst + rm -f $(NAME).{pdf,sty,lua} README + rm -f *.zip *.tar.gz +uninst: + rm -rf $(UTREE)/{tex,source,doc}/lualatex/$(NAME) +inst: uninst all + mkdir -p $(UTREE)/{tex,source,doc}/lualatex/$(NAME) + cp $(NAME).dtx $(UTREE)/source/lualatex/$(NAME) + cp $(NAME).sty $(UTREE)/tex/lualatex/$(NAME) + cp $(NAME).lua $(UTREE)/tex/lualatex/$(NAME) + cp $(NAME).pdf $(UTREE)/doc/lualatex/$(NAME) +#install: all +# sudo mkdir -p $(LOCAL)/{tex,source,doc}/lualatex/$(NAME) +# sudo cp $(NAME).dtx $(LOCAL)/source/lualatex/$(NAME) +# sudo cp $(NAME).sty $(LOCAL)/tex/lualatex/$(NAME) +# sudo cp $(NAME).pdf $(LOCAL)/doc/lualatex/$(NAME) +zip: all + ln -sf . $(NAME) + zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README,$(NAME).{pdf,sty,lua}} + rm $(NAME) +package: distclean all + mkdir $(NAME)/ + cp README *.dtx *.pdf $(NAME)/ + mkdir -p tex/lualatex/$(NAME)/ + cp *.lua *.sty tex/lualatex/$(NAME)/ + mkdir -p doc/lualatex/$(NAME)/ + cp *.pdf doc/lualatex/$(NAME)/ + mkdir -p source/lualatex/$(NAME)/ + cp Makefile *.dtx source/lualatex/$(NAME)/ + zip -r $(NAME).tds.zip tex doc source + rm -rf tex/ source/ doc/ + tar czf $(NAME)-$(VERS).tar.gz $(NAME).tds.zip $(NAME)/ + rm -rf $(NAME)/ + -- cgit v1.2.3