aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile36
1 files changed, 22 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 237b560..da0eb07 100644
--- a/Makefile
+++ b/Makefile
@@ -5,24 +5,28 @@ VERS = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//')
5LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL) 5LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL)
6UTREE = $(shell kpsewhich --var-value TEXMFHOME) 6UTREE = $(shell kpsewhich --var-value TEXMFHOME)
7all: $(NAME).pdf 7all: $(NAME).pdf
8 test -e README.txt && mv README.txt README || exit 0 8# test -e README.md || exit 0
9$(NAME).pdf: $(NAME).dtx 9$(NAME).pdf: $(NAME).dtx
10 lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null 10 lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null
11 biber $(NAME) >/dev/null 11 biber $(NAME) >/dev/null
12 if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi 12 if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi
13 if [ -f $(NAME).idx ]; then makeindex -q -s gind.ist -o $(NAME).ind $(NAME).idx; fi 13 if [ -f $(NAME).idx ]; then makeindex -q -s gind.ist -o $(NAME).ind $(NAME).idx; fi
14 texindy loccit.idx >/dev/null 14 if [ -f loccit.idx ]; then texindy -M icite.xdy loccit.idx >/dev/null; fi
15 if [ -f primary.idx ]; then texindy -M icite.xdy primary.idx >/dev/null; fi
15 lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null 16 lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
16 lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null 17 lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
17clean: 18lualatex:
18 rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,log,out,toc,listing,bcf,bib,bbl,blg,run.xml} 19 lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null
19 rm -f loccit.* 20clean: lualatex
21 rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,log,out,toc,xdy,listing,bcf,bib,bbl,blg,run.xml}
22 rm -f loccit.* primary.*
20 rm -f *~ 23 rm -f *~
21 rm -rf auto/ 24 rm -rf auto/
22distclean: clean uninst 25distclean: clean uninst
23 rm -rf _minted-* 26 rm -rf _minted-*
24 rm -f $(NAME).{pdf,sty} README 27 rm -f $(NAME).{pdf,sty}
25 rm -f *.zip *.tar.gz 28 rm -f *.zip *.tar.gz
29 pandoc -s README.md -o about.html
26inst: uninst all 30inst: uninst all
27 mkdir -p $(UTREE)/{tex,source,doc}/latex/$(NAME) 31 mkdir -p $(UTREE)/{tex,source,doc}/latex/$(NAME)
28 cp $(NAME).dtx $(UTREE)/source/latex/$(NAME) 32 cp $(NAME).dtx $(UTREE)/source/latex/$(NAME)
@@ -34,25 +38,29 @@ local: uninst
34 cp $(NAME).sty $(UTREE)/tex/latex/$(NAME) 38 cp $(NAME).sty $(UTREE)/tex/latex/$(NAME)
35uninst: 39uninst:
36 rm -rf $(UTREE)/{tex,source,doc}/latex/$(NAME) 40 rm -rf $(UTREE)/{tex,source,doc}/latex/$(NAME)
37#install: all 41install: all
38# sudo mkdir -p $(LOCAL)/{tex,source,doc}/latex/$(NAME) 42 sudo mkdir -p $(LOCAL)/{tex,source,doc}/latex/$(NAME)
39# sudo cp $(NAME).dtx $(LOCAL)/source/latex/$(NAME) 43 sudo cp $(NAME).dtx $(LOCAL)/source/latex/$(NAME)
40# sudo cp $(NAME).sty $(LOCAL)/tex/latex/$(NAME) 44 sudo cp $(NAME).sty $(LOCAL)/tex/latex/$(NAME)
41# sudo cp $(NAME).pdf $(LOCAL)/doc/latex/$(NAME) 45 sudo cp $(NAME).pdf $(LOCAL)/doc/latex/$(NAME)
46uninstall:
47 rm -rf $(LOCAL)/{tex,source,doc}/latex/$(NAME)
42zip: all 48zip: all
43 ln -sf . $(NAME) 49 ln -sf . $(NAME)
44 zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README,$(NAME).{pdf,dtx}} 50 zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README.md,$(NAME).{pdf,dtx,ins}}
45 rm $(NAME) 51 rm $(NAME)
46package: distclean all 52package: distclean all
47 mkdir $(NAME)/ 53 mkdir $(NAME)/
48 cp README $(NAME).{dtx,ins,pdf} $(NAME)/ 54 cp Makefile README.md $(NAME).{dtx,ins,pdf} $(NAME)/
49 mkdir -p tex/latex/$(NAME)/ 55 mkdir -p tex/latex/$(NAME)/
50 cp $(NAME).sty tex/latex/$(NAME)/ 56 cp $(NAME).sty tex/latex/$(NAME)/
51 mkdir -p doc/latex/$(NAME)/ 57 mkdir -p doc/latex/$(NAME)/
52 cp $(NAME).pdf doc/latex/$(NAME)/ 58 cp $(NAME).pdf doc/latex/$(NAME)/
53 mkdir -p source/latex/$(NAME)/ 59 mkdir -p source/latex/$(NAME)/
54 cp Makefile README $(NAME).{dtx,ins} source/latex/$(NAME)/ 60 cp Makefile README.md $(NAME).{dtx,ins} source/latex/$(NAME)/
55 zip -r $(NAME).tds.zip tex doc source 61 zip -r $(NAME).tds.zip tex doc source
56 rm -rf tex/ source/ doc/ 62 rm -rf tex/ source/ doc/
57 tar czf $(NAME)-$(VERS).tar.gz $(NAME).tds.zip $(NAME)/ 63 tar czf $(NAME)-$(VERS).tar.gz $(NAME).tds.zip $(NAME)/
58 rm -rf $(NAME)/ 64 rm -rf $(NAME)/
65
66.PHONY: all clean lualatex distclean inst local uninst install uninstall zip package