aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2019-03-12 19:29:26 +0100
committerRobert Alessi <alessi@robertalessi.net>2019-03-12 19:29:26 +0100
commit30f48bfd476c14cf4671e3504eb9d4367bfce99b (patch)
tree7df7e3ba49a1acbad8cbe8f712fae8ad420b85fc /Makefile
parent1c000b38db68ddd458d88923ad68e6624f622f48 (diff)
downloadicite-30f48bfd476c14cf4671e3504eb9d4367bfce99b.tar.gz
updated checksum. this is v1.1
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile70
1 files changed, 60 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 496bc14..8709733 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,12 @@ PWD = $(shell pwd)
4VERS = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//') 4VERS = $(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)
7
8exts := md bib ins dtx html
9extsi := tex
10findopts := $(foreach ext,$(exts),-or -iname "*.$(ext)")
11findoptsi := $(foreach ext,$(extsi),-or -iname "*.$(ext)")
12
7all: $(NAME).pdf 13all: $(NAME).pdf
8# test -e README.md || exit 0 14# test -e README.md || exit 0
9$(NAME).pdf: $(NAME).dtx 15$(NAME).pdf: $(NAME).dtx
@@ -16,47 +22,91 @@ $(NAME).pdf: $(NAME).dtx
16 if [ -f primary.idx ]; then texindy -M icite.xdy primary.idx >/dev/null; fi 22 if [ -f primary.idx ]; then texindy -M icite.xdy primary.idx >/dev/null; fi
17 lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null 23 lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
18 lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null 24 lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
25 if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi
26 cp $(PWD)/samples/*.bib $(PWD)/TMP
27 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex
28 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex
29 texindy $(PWD)/TMP/pr-sources.idx
30 biber $(PWD)/TMP/icite-biblatex
31 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex
32 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex
33 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex
34 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex
35 texindy $(PWD)/TMP/pr-sources.idx
36 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex
37 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex
38 mv TMP/*.pdf samples/
39
40samples:
41 if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi
42 cp $(PWD)/samples/*.bib $(PWD)/TMP
43 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex
44 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex
45 texindy $(PWD)/TMP/pr-sources.idx
46 biber $(PWD)/TMP/icite-biblatex
47 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex
48 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex
49 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex
50 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex
51 texindy $(PWD)/TMP/pr-sources.idx
52 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex
53 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex
54 mv TMP/*.pdf samples/
55
19lualatex: 56lualatex:
20 lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null 57 lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null
58
21clean: lualatex 59clean: lualatex
22 rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,log,out,toc,xdy,listing,bcf,bib,bbl,blg,run.xml} 60 rm -f $(NAME).bib $(PWD)/TMP/*.bib
23 rm -f loccit.* primary.* 61 rm -rf .backup
24 rm -f *~ 62 find -iname "*~" -or -iname "*.pdf" | xargs rm -rf
25 rm -rf auto/ 63 find ./* -type f -iname "Makefile" $(findopts) > ls-R
26distclean: clean uninst 64 find ./* -type f -iname "samples/*" $(findoptsi) >> ls-R
27 rm -rf _minted-* 65 rsync -avPr --files-from=ls-R . .backup
28 rm -f $(NAME).{pdf,sty} 66 rm -rf *
29 rm -f *.zip *.tar.gz 67 cp -p -r .backup/* .
68 rm -rf .backup
30 pandoc -s README.md -o about.html 69 pandoc -s README.md -o about.html
70
71distclean: clean uninst
72
31inst: uninst all 73inst: uninst all
32 mkdir -p $(UTREE)/{tex,source,doc}/latex/$(NAME) 74 mkdir -p $(UTREE)/{tex,source,doc}/latex/$(NAME)
33 cp $(NAME).dtx $(UTREE)/source/latex/$(NAME) 75 cp $(NAME).dtx $(UTREE)/source/latex/$(NAME)
34 cp $(NAME).sty $(UTREE)/tex/latex/$(NAME) 76 cp $(NAME).sty $(UTREE)/tex/latex/$(NAME)
35 cp $(NAME).pdf $(UTREE)/doc/latex/$(NAME) 77 cp $(NAME).pdf $(UTREE)/doc/latex/$(NAME)
78
36local: uninst 79local: uninst
37 lualatex $(NAME).ins 80 lualatex $(NAME).ins
38 mkdir -p $(UTREE)/{tex,source,doc}/latex/$(NAME) 81 mkdir -p $(UTREE)/{tex,source,doc}/latex/$(NAME)
39 cp $(NAME).sty $(UTREE)/tex/latex/$(NAME) 82 cp $(NAME).sty $(UTREE)/tex/latex/$(NAME)
83
40uninst: 84uninst:
41 rm -rf $(UTREE)/{tex,source,doc}/latex/$(NAME) 85 rm -rf $(UTREE)/{tex,source,doc}/latex/$(NAME)
86
42install: all 87install: all
43 sudo mkdir -p $(LOCAL)/{tex,source,doc}/latex/$(NAME) 88 sudo mkdir -p $(LOCAL)/{tex,source,doc}/latex/$(NAME)
44 sudo cp $(NAME).dtx $(LOCAL)/source/latex/$(NAME) 89 sudo cp $(NAME).dtx $(LOCAL)/source/latex/$(NAME)
45 sudo cp $(NAME).sty $(LOCAL)/tex/latex/$(NAME) 90 sudo cp $(NAME).sty $(LOCAL)/tex/latex/$(NAME)
46 sudo cp $(NAME).pdf $(LOCAL)/doc/latex/$(NAME) 91 sudo cp $(NAME).pdf $(LOCAL)/doc/latex/$(NAME)
92
47uninstall: 93uninstall:
48 rm -rf $(LOCAL)/{tex,source,doc}/latex/$(NAME) 94 rm -rf $(LOCAL)/{tex,source,doc}/latex/$(NAME)
95
49zip: all 96zip: all
50 ln -sf . $(NAME) 97 ln -sf . $(NAME)
51 zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README.md,$(NAME).{pdf,dtx,ins}} 98 zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{samples,README.md,$(NAME).{pdf,dtx,ins}}
52 rm $(NAME) 99 rm $(NAME)
100
53package: distclean all 101package: distclean all
54 mkdir $(NAME)/ 102 mkdir $(NAME)/
55 cp Makefile README.md $(NAME).{dtx,ins,pdf} $(NAME)/ 103 cp Makefile README.md $(NAME).{dtx,ins,pdf} $(NAME)/
104 cp -r samples/ $(NAME)/
56 mkdir -p tex/latex/$(NAME)/ 105 mkdir -p tex/latex/$(NAME)/
57 cp $(NAME).sty tex/latex/$(NAME)/ 106 cp $(NAME).sty tex/latex/$(NAME)/
58 mkdir -p doc/latex/$(NAME)/ 107 mkdir -p doc/latex/$(NAME)/
59 cp $(NAME).pdf doc/latex/$(NAME)/ 108 cp $(NAME).pdf doc/latex/$(NAME)/
109 cp -r samples/ doc/latex/$(NAME)/
60 mkdir -p source/latex/$(NAME)/ 110 mkdir -p source/latex/$(NAME)/
61 cp Makefile README.md $(NAME).{dtx,ins} source/latex/$(NAME)/ 111 cp Makefile README.md $(NAME).{dtx,ins} source/latex/$(NAME)/
62 zip -r $(NAME).tds.zip tex doc source 112 zip -r $(NAME).tds.zip tex doc source
@@ -64,4 +114,4 @@ package: distclean all
64 tar czf $(NAME)-$(VERS).tar.gz $(NAME).tds.zip $(NAME)/ 114 tar czf $(NAME)-$(VERS).tar.gz $(NAME).tds.zip $(NAME)/
65 rm -rf $(NAME)/ 115 rm -rf $(NAME)/
66 116
67.PHONY: all lualatex clean distclean inst local uninst install uninstall zip package 117.PHONY: all lualatex clean distclean inst local uninst install uninstall zip package samples