diff options
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 26 |
1 files changed, 14 insertions, 12 deletions
@@ -1,4 +1,6 @@ | |||
1 | pkg=arabluatex | 1 | pkg=arabluatex |
2 | TEXMFDIR := $(shell kpsewhich -expand-var='$$TEXMFHOME') | ||
3 | HOMEDIR := $$HOME | ||
2 | 4 | ||
3 | sty: clean | 5 | sty: clean |
4 | lualatex $(pkg).ins | 6 | lualatex $(pkg).ins |
@@ -17,20 +19,20 @@ doc: clean sty | |||
17 | all: clean sty doc | 19 | all: clean sty doc |
18 | 20 | ||
19 | local: clean sty | 21 | local: clean sty |
20 | if [ ! -d "~/texmf/tex/lualatex/arabluatex" ]; then \ | 22 | if [ ! -d "$(TEXMFDIR)/tex/lualatex/arabluatex" ]; then \ |
21 | mkdir -p ~/texmf/tex/lualatex/arabluatex; \ | 23 | mkdir -p $(TEXMFDIR)/tex/lualatex/arabluatex; \ |
22 | fi | 24 | fi |
23 | cp $(pkg)*.{sty,lua} ~/texmf/tex/lualatex/arabluatex | 25 | cp $(pkg)*.{sty,lua} $(TEXMFDIR)/tex/lualatex/arabluatex |
24 | if [ ! -d "~/.emacs.d/auctex/auto" ]; then \ | 26 | if [ ! -d "$(HOMEDIR)/.emacs.d/auctex/auto" ]; then \ |
25 | mkdir -p ~/.emacs.d/auctex/auto; \ | 27 | mkdir -p $(HOMEDIR)/.emacs.d/auctex/auto; \ |
26 | fi | 28 | fi |
27 | cp $(pkg)*.el ~/.emacs.d/auctex/auto | 29 | cp $(pkg)*.el $(HOMEDIR)/.emacs.d/auctex/auto |
28 | 30 | ||
29 | auctex: clean | 31 | auctex: clean |
30 | if [ ! -d "~/.emacs.d/auctex/auto" ]; then \ | 32 | if [ ! -d "$(HOMEDIR)/.emacs.d/auctex/auto" ]; then \ |
31 | mkdir -p ~/.emacs.d/auctex/auto; \ | 33 | mkdir -p $(HOMEDIR)/.emacs.d/auctex/auto; \ |
32 | fi | 34 | fi |
33 | cp $(pkg)*.el ~/.emacs.d/auctex/auto | 35 | cp $(pkg)*.el $(HOMEDIR)/.emacs.d/auctex/auto |
34 | 36 | ||
35 | package: clean all | 37 | package: clean all |
36 | mkdir -p arabluatex/samples/ | 38 | mkdir -p arabluatex/samples/ |
@@ -47,12 +49,12 @@ package: clean all | |||
47 | tar czf arabluatex.tar.gz arabluatex.tds.zip arabluatex/ | 49 | tar czf arabluatex.tar.gz arabluatex.tds.zip arabluatex/ |
48 | 50 | ||
49 | clean: | 51 | clean: |
50 | rm -rf ~/texmf/tex/lualatex/arabluatex/ | 52 | rm -rf $(TEXMFDIR)/tex/lualatex/arabluatex/ |
51 | rm -rf ~/.emacs.d/auctex/auto/arabluatex*.el | 53 | rm -rf $(HOMEDIR)/.emacs.d/auctex/auto/arabluatex*.el |
52 | rm -rf tex/ doc/ source/ auto/ | 54 | rm -rf tex/ doc/ source/ auto/ |
53 | rm -rf arabluatex/ | 55 | rm -rf arabluatex/ |
54 | rm -rf saved/ TMP/ | 56 | rm -rf saved/ TMP/ |
55 | find ./samples/ | grep -v samples | grep -v ".*tex$$" | xargs rm -rf | 57 | find ./samples/ | grep -v "samples/$$" | grep -v ".*tex$$" | xargs rm -rf |
56 | mkdir saved | 58 | mkdir saved |
57 | cp *.{lua,ins,dtx,tex,el} makefile saved # .bib is in dtx | 59 | cp *.{lua,ins,dtx,tex,el} makefile saved # .bib is in dtx |
58 | rm *.* | 60 | rm *.* |