-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (32 loc) · 942 Bytes
/
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
DESTDIR ?= $(shell kpsewhich -var-value=TEXMFHOME)
INSTALLDIR = $(DESTDIR)/tex/latex/glossy
DOCDIR = $(DESTDIR)/doc/latex/glossy
INCS = glossy.sty
DOCS = glossy.pdf
TARGETS = $(addprefix $(INSTALLDIR)/,$(INCS)) $(addprefix $(DOCDIR)/,$(DOCS))
all: glossy.sty glossy.pdf
glossy.sty: glossy.ins glossy.dtx
@latex $<
@echo " → Temp files created"
glossy.pdf: glossy.dtx
@pdflatex $<
@makeindex -s gglo.ist -o glossy.gls glossy.glo
@makeindex -s gind.ist -o glossy.ind glossy.idx
@pdflatex $<
@echo " → Documentation created"
install: $(INSTALLDIR) $(DOCDIR) $(TARGETS)
@echo " → glossy installed to $(INSTALLDIR)"
$(INSTALLDIR) $(DOCDIR):
@mkdir -p $@
$(INSTALLDIR)/%.sty: %.sty
@cp $< $@
@echo " → Installed $@"
$(DOCDIR)/%.pdf: %.pdf
@cp $< $@
@echo " → Installed $@"
uninstall:
-@rm -Rf $(INSTALLDIR) $(DOCDIR)
@echo " → Removed glossy package"
clean:
-@rm `<.gitignore`
@echo " → Removed temp files"