-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
143 lines (103 loc) · 2.95 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Programmer: Bryan Jacob Bell
# Begun: 19 June 2024
# Modified: 22 July 2024
# File: Makefile
# Syntax: GNU make
# Description: makes executables
####################
## help
help:
@echo "Makefile provides the following options:"
@echo "make all Create tool executables"
@echo "make install Create bin directory and move tool executables"
@echo "make update Clean, pull repository, make all, make install"
@echo "make clean Uninstall bin directory and executables"
@echo ""
@echo "Tools can also be targeted individually: make ridkt"
@echo " (Only if bin doesn't exist) make bin"
@echo " make ridkt-move"
####################
## all
all: tools
####################
## install
install: bin move
####################
## update
update: clean pull \
all install
pull:
@git pull
####################
## clean
clean: uninstall
####################
## bin
BINDIR = bin
bin:
@echo "Making hum-parser/bin"
@echo ""
@echo "NOTE:"
@echo "Add path to hum-parser/bin to your environment file to run executables anywhere"
@echo ""
@mkdir $(BINDIR)
####################
## tools
tools: ridkt hum-type spine-arity visualize-htree autowedge
ridkt:
@echo "Making ridkt executable"
@raco exe tools/ridkt/ridkt.rkt
hum-type:
@echo "Making hum-type executable"
@raco exe tools/hum-type/hum-type.rkt
spine-arity:
@echo "Making spine-arity executable"
@raco exe tools/spine-arity/spine-arity.rkt
visualize-htree:
@echo "Making visualize-htree executable"
@raco exe tools/visualize-htree/visualize-htree.rkt
autowedge:
@echo "Making autowedge executable"
@raco exe tools/autowedge/autowedge.rkt
####################
## move
move: ridkt-move hum-type-move spine-arity-move \
visualize-htree-move autowedge-move
ridkt-move:
@echo "Moving ridkt executable to hum-parser/bin"
@mv tools/ridkt/ridkt $(BINDIR)
hum-type-move:
@echo "Moving hum-type executable to hum-parser/bin"
@mv tools/hum-type/hum-type $(BINDIR)
spine-arity-move:
@echo "Moving spine-arity executable to hum-parser/bin"
@mv tools/spine-arity/spine-arity $(BINDIR)
visualize-htree-move:
@echo "Moving visualize-htree executable to hum-parser/bin"
@mv tools/visualize-htree/visualize-htree $(BINDIR)
autowedge-move:
@echo "Moving autowedge executable to hum-parser/bin"
@mv tools/autowedge/autowedge $(BINDIR)
####################
## uninstall
uninstall: un-ridkt un-hum-type \
un-spine-arity un-visualize-htree \
un-autowedge un-bin
un-ridkt:
@echo "Uninstalling ridkt executable"
@rm bin/ridkt
un-hum-type:
@echo "Uninstalling hum-type executable"
@rm bin/hum-type
un-spine-arity:
@echo "Uninstalling spine-arity executable"
@rm bin/spine-arity
un-visualize-htree:
@echo "Uninstalling visualize-htree executable"
@rm bin/visualize-htree
un-autowedge:
@echo "Uninstalling autowedge executable"
@rm bin/autowedge
un-bin:
@echo "Uninstalling hum-parser/bin"
@rm -rf bin