aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 12 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index e4e89a2..34e846c 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ PWD = $(shell pwd)
5VERS = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//') 5VERS = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//')
6LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL) 6LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL)
7UTREE = $(shell kpsewhich --var-value TEXMFHOME) 7UTREE = $(shell kpsewhich --var-value TEXMFHOME)
8HOMEDIR := $$HOME
8all: $(NAME).pdf 9all: $(NAME).pdf
9 test -e README.txt && mv README.txt README || exit 0 10 test -e README.txt && mv README.txt README || exit 0
10$(NAME).pdf: $(NAME).dtx 11$(NAME).pdf: $(NAME).dtx
@@ -14,23 +15,29 @@ $(NAME).pdf: $(NAME).dtx
14 $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null 15 $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
15 $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null 16 $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
16clean: 17clean:
18 rm -rf _minted-*
17 rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,log,out,toc,pyg} 19 rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,log,out,toc,pyg}
18 rm -f *~ 20 rm -f *~
19 rm -rf auto/ 21 rm -rf auto/
20# rm -f $(NAME)_*.{bib,lua} 22# rm -f $(NAME)_*.{bib,lua}
23auctex:
24 if [ ! -d "$(HOMEDIR)/.emacs.d/auctex/auto" ]; then \
25 mkdir -p $(HOMEDIR)/.emacs.d/auctex/auto; \
26 fi
27 cp $(NAME)*.el $(HOMEDIR)/.emacs.d/auctex/auto
21distclean: clean uninst 28distclean: clean uninst
22 rm -rf _minted-*
23 rm -f $(NAME).{pdf,sty,lua} README* 29 rm -f $(NAME).{pdf,sty,lua} README*
24 rm -f *.zip *.tar.gz 30 rm -f *.zip *.tar.gz
25uninst: 31uninst:
26 rm -rf $(UTREE)/{tex,source,doc}/lualatex/$(NAME) 32 rm -rf $(UTREE)/{tex,source,doc}/lualatex/$(NAME)
27inst: uninst all 33 rm -rf $(HOMEDIR)/.emacs.d/auctex/auto/$(NAME).{el,elc}
34inst: uninst auctex all
28 mkdir -p $(UTREE)/{tex,source,doc}/lualatex/$(NAME) 35 mkdir -p $(UTREE)/{tex,source,doc}/lualatex/$(NAME)
29 cp $(NAME).dtx $(UTREE)/source/lualatex/$(NAME) 36 cp $(NAME).dtx $(UTREE)/source/lualatex/$(NAME)
30 cp $(NAME).sty $(UTREE)/tex/lualatex/$(NAME) 37 cp $(NAME).sty $(UTREE)/tex/lualatex/$(NAME)
31 cp $(NAME).lua $(UTREE)/tex/lualatex/$(NAME) 38 cp $(NAME).lua $(UTREE)/tex/lualatex/$(NAME)
32 cp $(NAME).pdf $(UTREE)/doc/lualatex/$(NAME) 39 cp $(NAME).pdf $(UTREE)/doc/lualatex/$(NAME)
33local: uninst 40local: uninst auctex
34 $(CMP) $(NAME).ins 41 $(CMP) $(NAME).ins
35 mkdir -p $(UTREE)/{tex,source,doc}/lualatex/$(NAME) 42 mkdir -p $(UTREE)/{tex,source,doc}/lualatex/$(NAME)
36 cp $(NAME).sty $(UTREE)/tex/lualatex/$(NAME) 43 cp $(NAME).sty $(UTREE)/tex/lualatex/$(NAME)
@@ -42,7 +49,7 @@ local: uninst
42# sudo cp $(NAME).pdf $(LOCAL)/doc/lualatex/$(NAME) 49# sudo cp $(NAME).pdf $(LOCAL)/doc/lualatex/$(NAME)
43zip: all 50zip: all
44 ln -sf . $(NAME) 51 ln -sf . $(NAME)
45 zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README,$(NAME).{pdf,sty,lua}} 52 zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README,$(NAME).{pdf,sty,lua,el}}
46 rm $(NAME) 53 rm $(NAME)
47package: distclean all 54package: distclean all
48 mkdir $(NAME)/ 55 mkdir $(NAME)/
@@ -50,7 +57,7 @@ package: distclean all
50 mkdir -p tex/lualatex/$(NAME)/ 57 mkdir -p tex/lualatex/$(NAME)/
51 cp *.lua *.sty tex/lualatex/$(NAME)/ 58 cp *.lua *.sty tex/lualatex/$(NAME)/
52 mkdir -p doc/lualatex/$(NAME)/ 59 mkdir -p doc/lualatex/$(NAME)/
53 cp *.pdf doc/lualatex/$(NAME)/ 60 cp *.el *.pdf doc/lualatex/$(NAME)/
54 mkdir -p source/lualatex/$(NAME)/ 61 mkdir -p source/lualatex/$(NAME)/
55 cp Makefile *.dtx source/lualatex/$(NAME)/ 62 cp Makefile *.dtx source/lualatex/$(NAME)/
56 zip -r $(NAME).tds.zip tex doc source 63 zip -r $(NAME).tds.zip tex doc source