diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -5,6 +5,7 @@ PWD = $(shell pwd) | |||
5 | VERS = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//') | 5 | VERS = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//') |
6 | LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL) | 6 | LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL) |
7 | UTREE = $(shell kpsewhich --var-value TEXMFHOME) | 7 | UTREE = $(shell kpsewhich --var-value TEXMFHOME) |
8 | HOMEDIR := $$HOME | ||
8 | all: $(NAME).pdf | 9 | all: $(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 |
16 | clean: | 17 | clean: |
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} |
23 | auctex: | ||
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 | ||
21 | distclean: clean uninst | 28 | distclean: 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 |
25 | uninst: | 31 | uninst: |
26 | rm -rf $(UTREE)/{tex,source,doc}/lualatex/$(NAME) | 32 | rm -rf $(UTREE)/{tex,source,doc}/lualatex/$(NAME) |
27 | inst: uninst all | 33 | rm -rf $(HOMEDIR)/.emacs.d/auctex/auto/$(NAME).{el,elc} |
34 | inst: 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) |
33 | local: uninst | 40 | local: 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) |
43 | zip: all | 50 | zip: 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) |
47 | package: distclean all | 54 | package: 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 |