diff options
author | Robert Alessi <alessi@robertalessi.net> | 2019-02-22 17:42:43 +0100 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2019-02-22 17:42:43 +0100 |
commit | c5bea9766e3cd202e8aa1f4c790b8ac53ff81cba (patch) | |
tree | 365ff28e5961b1ae2f087d7d786e3ea287b3161e /Makefile | |
download | icite-c5bea9766e3cd202e8aa1f4c790b8ac53ff81cba.tar.gz |
initial commit
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..072d5fd --- /dev/null +++ b/Makefile | |||
@@ -0,0 +1,32 @@ | |||
1 | NAME = icite | ||
2 | SHELL = bash | ||
3 | PWD = $(shell pwd) | ||
4 | VERS = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//') | ||
5 | LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL) | ||
6 | UTREE = $(shell kpsewhich --var-value TEXMFHOME) | ||
7 | all: $(NAME).pdf | ||
8 | test -e README.txt && mv README.txt README || exit 0 | ||
9 | $(NAME).pdf: $(NAME).dtx | ||
10 | pdflatex -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 | pdflatex --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null | ||
14 | pdflatex --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null | ||
15 | clean: | ||
16 | rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,ins,log,out} | ||
17 | distclean: clean | ||
18 | rm -f $(NAME).{pdf,sty} README | ||
19 | inst: all | ||
20 | mkdir -p $(UTREE)/{tex,source,doc}/latex/$(NAME) | ||
21 | cp $(NAME).dtx $(UTREE)/source/latex/$(NAME) | ||
22 | cp $(NAME).sty $(UTREE)/tex/latex/$(NAME) | ||
23 | cp $(NAME).pdf $(UTREE)/doc/latex/$(NAME) | ||
24 | install: all | ||
25 | sudo mkdir -p $(LOCAL)/{tex,source,doc}/latex/$(NAME) | ||
26 | sudo cp $(NAME).dtx $(LOCAL)/source/latex/$(NAME) | ||
27 | sudo cp $(NAME).sty $(LOCAL)/tex/latex/$(NAME) | ||
28 | sudo cp $(NAME).pdf $(LOCAL)/doc/latex/$(NAME) | ||
29 | zip: all | ||
30 | ln -sf . $(NAME) | ||
31 | zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README,$(NAME).{pdf,dtx}} | ||
32 | rm $(NAME) | ||