aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2019-02-22 17:42:43 +0100
committerRobert Alessi <alessi@robertalessi.net>2019-02-22 17:42:43 +0100
commitc5bea9766e3cd202e8aa1f4c790b8ac53ff81cba (patch)
tree365ff28e5961b1ae2f087d7d786e3ea287b3161e /Makefile
downloadicite-c5bea9766e3cd202e8aa1f4c790b8ac53ff81cba.tar.gz
initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile32
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 @@
1NAME = icite
2SHELL = bash
3PWD = $(shell pwd)
4VERS = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//')
5LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL)
6UTREE = $(shell kpsewhich --var-value TEXMFHOME)
7all: $(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
15clean:
16 rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,ins,log,out}
17distclean: clean
18 rm -f $(NAME).{pdf,sty} README
19inst: 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)
24install: 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)
29zip: all
30 ln -sf . $(NAME)
31 zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README,$(NAME).{pdf,dtx}}
32 rm $(NAME)