-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
86 lines (66 loc) · 1.48 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
package = manochrome
prefix = /usr/local
datarootdir = $(prefix)/share
datadir = $(datarootdir)
mandir = $(datarootdir)/man
man1dir = $(mandir)/man1
man1files = manochrome.1 manopod2html.1
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
EXECUTABLES = manopod2html
packagedir = $(datadir)/$(package)
CSSDIR = $(packagedir)/css
JSDIR = $(packagedir)/js
SUBDIRS = $(packagedir) $(CSSDIR) $(JSDIR)
LCSS = ./css
LCSSFILES = $(LCSS)/manochrome_light.css \
$(LCSS)/manochrome_dark.css \
$(LCSS)/manochrome_monk.css
LJS = ./js
LJSFILES = $(LJS)/manochrome.js \
$(LJS)/init.js
all: subdirs lcssfiles ljsfiles executables man1pages
echo "Installation complete."
.PHONY: man1pages
man1pages:
for f in doc/man/man1/*; do \
cp $$f $(man1dir); \
done
.PHONY: executables $(EXECUTABLES)
executables: $(EXECUTABLES)
$(EXECUTABLES):
cp $@ $(bindir)
.PHONY: ljsfiles $(LJSFILES)
ljsfiles: $(LJSFILES)
$(LJSFILES):
cp $@ $(JSDIR)
.PHONY: lcssfiles $(LCSSFILES)
lcssfiles: $(LCSSFILES)
$(LCSSFILES):
cp $@ $(CSSDIR)
.PHONY: subdirs $(SUBDIRS)
subdirs: $(SUBDIRS)
$(SUBDIRS):
mkdir -p $@
$(CSSDIR): $(packagedir)
$(JSDIR): $(packagedir)
# Uninstall
.PHONY: uninstall
.IGNORE: uninstall
uninstall:
for f in $(JSDIR)/*; do \
rm $$f; \
done
for f in $(CSSDIR)/*; do \
rm $$f; \
done
rmdir $(CSSDIR)
rmdir $(JSDIR)
for f in $(EXECUTABLES); do \
rm $(bindir)/$$f; \
done
for f in $(man1files); do \
rm $(man1dir)/$$f; \
done
rmdir $(packagedir)
echo "Uninstall complete."