diff options
-rw-r--r-- | Makefile | 22 |
1 files changed, 15 insertions, 7 deletions
@@ -7,6 +7,9 @@ LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL) | |||
7 | UTREE = $(shell kpsewhich --var-value TEXMFHOME) | 7 | UTREE = $(shell kpsewhich --var-value TEXMFHOME) |
8 | HOMEDIR := $$HOME | 8 | HOMEDIR := $$HOME |
9 | 9 | ||
10 | exts := ins dtx el | ||
11 | findopts := $(foreach ext,$(exts),-or -iname "*.$(ext)") | ||
12 | |||
10 | all: sty $(NAME).pdf | 13 | all: sty $(NAME).pdf |
11 | test -e README.txt && mv README.txt README || exit 0 | 14 | test -e README.txt && mv README.txt README || exit 0 |
12 | 15 | ||
@@ -22,11 +25,16 @@ $(NAME).pdf: $(NAME).dtx | |||
22 | $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null | 25 | $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null |
23 | 26 | ||
24 | clean: | 27 | clean: |
25 | rm -rf _minted-* | 28 | rm -f $(NAME).bib $(PWD)/TMP/*.bib |
26 | rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,log,out,toc,pyg} | 29 | rm -rf .backup |
27 | rm -f *~ | 30 | find -iname "*~" -or -iname "*.pdf" | xargs rm -rf |
28 | rm -rf auto/ | 31 | find ./* -type f -iname "Makefile" $(findopts) > ls-R |
29 | # rm -f $(NAME)_*.{bib,lua} | 32 | # find ./* -type f -iname "*.tex" | grep '/samples/' >> ls-R |
33 | rsync -avPr --files-from=ls-R . .backup | ||
34 | rm -rf * | ||
35 | cp -p -r .backup/* . | ||
36 | rm -rf .backup | ||
37 | # pandoc -s README.md -o about.html | ||
30 | 38 | ||
31 | auctex: | 39 | auctex: |
32 | if [ ! -d "$(HOMEDIR)/.emacs.d/auctex/auto" ]; then \ | 40 | if [ ! -d "$(HOMEDIR)/.emacs.d/auctex/auto" ]; then \ |
@@ -35,8 +43,6 @@ auctex: | |||
35 | cp $(NAME)*.el $(HOMEDIR)/.emacs.d/auctex/auto | 43 | cp $(NAME)*.el $(HOMEDIR)/.emacs.d/auctex/auto |
36 | 44 | ||
37 | distclean: clean uninst | 45 | distclean: clean uninst |
38 | rm -f $(NAME).{pdf,sty,lua,ekd} $(NAME)-ex*.* README* | ||
39 | rm -f *.zip *.tar.gz | ||
40 | 46 | ||
41 | uninst: | 47 | uninst: |
42 | rm -rf $(UTREE)/{tex,source,doc}/lualatex/$(NAME) | 48 | rm -rf $(UTREE)/{tex,source,doc}/lualatex/$(NAME) |
@@ -78,3 +84,5 @@ package: distclean all | |||
78 | rm -rf tex/ source/ doc/ | 84 | rm -rf tex/ source/ doc/ |
79 | tar czf $(NAME)-$(VERS).tar.gz $(NAME).tds.zip $(NAME)/ | 85 | tar czf $(NAME)-$(VERS).tar.gz $(NAME).tds.zip $(NAME)/ |
80 | rm -rf $(NAME)/ | 86 | rm -rf $(NAME)/ |
87 | |||
88 | .PHONY: all clean distclean inst local uninst install uninstall zip package samples | ||