-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
47 lines (37 loc) · 1.47 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
PROJNAME=beamerthemetamu
PROJVER=`git describe`
PROJTARBALL=$(PROJNAME)-$(PROJVER).tar.gz
THEMEDIR=theme
SAMPLEDIR=sample
THEMEFILES=beamercolorthemetamu.sty beamerinnerthemetamu.sty beamerouterthemetamu.sty beamerthemetamu.sty
SAMPLEFILES=beamerthemetamu.tex
BIBFILES=beamerthemetamu-refs.bib
AUXFILES=README.md Makefile
TEXMFHOME=`kpsewhich -var-value TEXMFHOME`
SAMPLE=$(PROJNAME)
LATEXMK=latexmk
.PHONY: dist install test ctan clean
dist:
tar -zcvf $(PROJTARBALL) --exclude='*~' $(THEMEDIR) $(SAMPLEDIR) $(AUXFILES)
install:
install -d "$(TEXMFHOME)/tex/latex/$(PROJNAME)/"
cd $(THEMEDIR) && install -t "$(TEXMFHOME)/tex/latex/$(PROJNAME)/" $(THEMEFILES)
install -d "$(TEXMFHOME)/doc/latex/$(PROJNAME)/"
cd $(SAMPLEDIR) && install -t "$(TEXMFHOME)/doc/latex/$(PROJNAME)/" $(SAMPLEFILES)
install -t "$(TEXMFHOME)/doc/latex/$(PROJNAME)/" $(AUXFILES)
install -d "$(TEXMFHOME)/bibtex/bib/$(PROJNAME)/"
cd $(SAMPLEDIR) && install -t "$(TEXMFHOME)/bibtex/bib/$(PROJNAME)/" $(BIBFILES)
test:
cd $(SAMPLEDIR) && \
find ../$(THEMEDIR)/ \( -name '*tamu.sty' -o -name 'tamu*.pdf' \) -exec cp '{}' ./ \; && \
$(LATEXMK) -C $(SAMPLE) && \
$(LATEXMK) $(SAMPLE)
$(PROJNAME).pdf: test
ctan: $(PROJNAME).pdf
ctanify --pkgname=$(PROJNAME) --notds --no-skip README.md $(THEMEDIR)/beamer*themetamu.sty $(SAMPLEDIR)/$(PROJNAME)*.{tex,pdf,bib}
clean:
cd $(SAMPLEDIR) && \
$(LATEXMK) -C $(SAMPLE) && \
rm -rf *tamu.sty tamu*.pdf
find . \( -name '*~' -o -name '*.swp' \) -delete
rm -rf *.tar.gz