-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (22 loc) · 990 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
PROGRAM_NAME = llrb
FIGURES_NAME = figures
DIST_FILES = $(PROGRAM_NAME).nw $(PROGRAM_NAME).ps $(PROGRAM_NAME).pdf $(PROGRAM_NAME).scm ${FIGURES_NAME}.mp LICENSE README
ROOT_NAME = "Left-leaning Red-Black Tree implementation"
all: $(PROGRAM_NAME)
$(FIGURES_NAME).%:
mpost $(FIGURES_NAME).mp
$(PROGRAM_NAME).scm: $(PROGRAM_NAME).nw
notangle -R$(ROOT_NAME) $(PROGRAM_NAME).nw > $(PROGRAM_NAME).scm
$(PROGRAM_NAME).tex: $(FIGURES_NAME).%
noweave -latex -index -delay $(PROGRAM_NAME).nw > $(PROGRAM_NAME).tex
$(PROGRAM_NAME).dvi: $(PROGRAM_NAME).tex
latex -quiet $(PROGRAM_NAME).tex && latex -quiet $(PROGRAM_NAME).tex
$(PROGRAM_NAME).ps: $(PROGRAM_NAME).dvi
dvips -q* $(PROGRAM_NAME).dvi
$(PROGRAM_NAME).pdf: $(PROGRAM_NAME).ps
ps2pdf $(PROGRAM_NAME).ps
dist:
tar -cf $(PROGRAM_NAME).tar $(DIST_FILES) Makefile && gzip $(PROGRAM_NAME).tar
clean:
-rm -f $(FIGURES_NAME).{1..7} $(FIGURES_NAME).{log,mpx} $(PROGRAM_NAME).{log,tex,aux,dvi,ps,pdf}
$(PROGRAM_NAME): $(DIST_FILES)