aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2019-03-17 18:19:05 +0100
committerRobert Alessi <alessi@robertalessi.net>2019-03-17 18:19:05 +0100
commite4585f6ce56ce0d037a0f545f21f9c7d28767386 (patch)
tree7a51eef4e8de15c2b257280ba9b575c8794afd7e /Makefile
parent2feb69c215e1551dd845edba984fd26f1495ea9f (diff)
downloadicite-e4585f6ce56ce0d037a0f545f21f9c7d28767386.tar.gz
done documenting and added a section on icite and classics. new functions \AuthorTitleDelim and \TitlePageDelim
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile48
1 files changed, 22 insertions, 26 deletions
diff --git a/Makefile b/Makefile
index 028aea7..35bf3e4 100644
--- a/Makefile
+++ b/Makefile
@@ -6,13 +6,27 @@ LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL)
6UTREE = $(shell kpsewhich --var-value TEXMFHOME) 6UTREE = $(shell kpsewhich --var-value TEXMFHOME)
7 7
8exts := md bib ins dtx html 8exts := md bib ins dtx html
9extsi := tex 9texsamples := $(basename $(wildcard $(PWD)/samples/*.tex))
10findopts := $(foreach ext,$(exts),-or -iname "*.$(ext)") 10findopts := $(foreach ext,$(exts),-or -iname "*.$(ext)")
11findoptsi := $(foreach ext,$(extsi),-or -iname "*.$(ext)") 11
12
13# Look into this later
14# $(if $(wildcard $(PWD)/TMP/$(notdir $1).bcf),biber $(PWD)/TMP/$(notdir $1),)
15
16define dosamples
17 lualatex --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null
18 lualatex --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null
19 if [ -f $(PWD)/TMP/$(notdir $1)-primary.idx ]; \
20 then texindy -M $(PWD)/TMP/$(notdir $1).xdy $(PWD)/TMP/$(notdir $1)-primary.idx >/dev/null; fi
21 if [ -f $(PWD)/TMP/$(notdir $1).bcf ]; then biber $(PWD)/TMP/$(notdir $1) >/dev/null; fi
22 lualatex --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null
23 lualatex --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null
24endef
12 25
13all: $(NAME).pdf 26all: $(NAME).pdf
14# test -e README.md || exit 0 27# test -e README.md || exit 0
15$(NAME).pdf: $(NAME).dtx 28$(NAME).pdf: $(NAME).dtx
29 @ echo "Make documentation..."
16 lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null 30 lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null
17 biber $(NAME) >/dev/null 31 biber $(NAME) >/dev/null
18 lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null 32 lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null
@@ -22,35 +36,16 @@ $(NAME).pdf: $(NAME).dtx
22 if [ -f primary.idx ]; then texindy -M icite.xdy primary.idx >/dev/null; fi 36 if [ -f primary.idx ]; then texindy -M icite.xdy primary.idx >/dev/null; fi
23 lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null 37 lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
24 lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null 38 lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
39 @ echo "Make sample files..."
25 if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi 40 if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi
26 cp $(PWD)/samples/*.bib $(PWD)/TMP 41 cp $(PWD)/samples/*.bib $(PWD)/TMP
27 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex 42 $(foreach file,$(texsamples), $(call dosamples, $(file)))
28 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex
29 texindy -M $(PWD)/TMP/icite-biblatex.xdy $(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 -M $(PWD)/TMP/icite-nobiblatex.xdy $(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/ 43 mv TMP/*.pdf samples/
39 44
40samples: 45samples:
41 if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi 46 if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi
42 cp $(PWD)/samples/*.bib $(PWD)/TMP 47 cp $(PWD)/samples/*.bib $(PWD)/TMP
43 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex 48 $(foreach file,$(texsamples), $(call dosamples, $(file)))
44 lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex
45 texindy -M $(PWD)/TMP/icite-biblatex.xdy $(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 -M $(PWD)/TMP/icite-nobiblatex.xdy $(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/ 49 mv TMP/*.pdf samples/
55 50
56lualatex: 51lualatex:
@@ -109,9 +104,10 @@ package: distclean all
109 cp -r samples/ doc/latex/$(NAME)/ 104 cp -r samples/ doc/latex/$(NAME)/
110 mkdir -p source/latex/$(NAME)/ 105 mkdir -p source/latex/$(NAME)/
111 cp Makefile README.md $(NAME).{dtx,ins} source/latex/$(NAME)/ 106 cp Makefile README.md $(NAME).{dtx,ins} source/latex/$(NAME)/
112 zip -r $(NAME).tds.zip tex doc source 107 # zip -r $(NAME).tds.zip tex doc source
113 rm -rf tex/ source/ doc/ 108 rm -rf tex/ source/ doc/
114 tar czf $(NAME)-$(VERS).tar.gz $(NAME).tds.zip $(NAME)/ 109 # tar czf $(NAME)-$(VERS).tar.gz $(NAME).tds.zip $(NAME)/
110 tar czf $(NAME)-$(VERS).tar.gz $(NAME)/
115 rm -rf $(NAME)/ 111 rm -rf $(NAME)/
116 112
117.PHONY: all lualatex clean distclean inst local uninst install uninstall zip package samples 113.PHONY: all lualatex clean distclean inst local uninst install uninstall zip package samples