forked from links-lang/links
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
177 lines (150 loc) · 6.14 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
-include ./Makefile.config
OCAMLMAKEFILE = ./OCamlMakefile
PACKS=str deriving.syntax deriving.syntax.classes \
deriving.runtime lwt lwt.syntax lwt.unix cgi \
base64 cohttp cohttp.lwt unix websocket \
websocket.lwt websocket.cohttp ANSITerminal \
dynlink
export OCAMLFLAGS=-syntax camlp4o
PATH := $(PATH):deriving
THREADS = yes
ifdef PROF
OCAMLOPT := ocamlopt -p -inline 0
endif
#OCAMLYACC := menhir --infer --comment --explain --dump --log-grammar 1 --log-code 1 --log-automaton 2 --graph
OCAMLYACC := ocamlyacc -v
OCAMLFLAGS=-dtypes -w Ae-44-45-60 -g -cclib -lunix
#OCAMLDOCFLAGS=-pp deriving
# additional files to clean
TRASH=*.tmp *.output *.cache
# Other people's code.
OPC = unionfind.ml unionfind.mli \
getopt.ml getopt.mli PP.ml
SOURCES = $(OPC) \
multipart.ml \
notfound.ml \
utility.ml \
processTypes.mli processTypes.ml \
env.mli env.ml \
settings.mli settings.ml \
basicsettings.ml \
debug.mli debug.ml \
performance.mli performance.ml \
graph.ml \
types.mli types.ml \
constant.ml \
sourceCode.ml \
regex.ml \
sugartypes.ml \
parser.mly \
lexer.mli lexer.mll \
typeUtils.mli typeUtils.ml \
errors.mli errors.ml \
instantiate.mli instantiate.ml \
generalise.mli generalise.ml \
typevarcheck.mli typevarcheck.ml \
unify.mli unify.ml \
var.ml \
ir.mli ir.ml \
tables.ml \
closures.ml \
parse.mli parse.ml \
sugarTraversals.mli sugarTraversals.ml \
moduleUtils.mli moduleUtils.ml \
resolvePositions.mli resolvePositions.ml \
chaser.mli chaser.ml \
desugarModules.mli desugarModules.ml \
desugarDatatypes.mli desugarDatatypes.ml \
defaultAliases.ml \
requestData.mli requestData.ml \
value.mli value.ml \
eventHandlers.mli eventHandlers.ml \
xmlParser.mly xmlLexer.mll \
parseXml.mli parseXml.ml \
refineBindings.mli refineBindings.ml \
desugarLAttributes.mli desugarLAttributes.ml \
transformSugar.mli transformSugar.ml \
fixTypeAbstractions.mli fixTypeAbstractions.ml \
desugarPages.mli desugarPages.ml \
desugarFormlets.mli desugarFormlets.ml \
desugarRegexes.mli desugarRegexes.ml \
desugarFors.mli desugarFors.ml \
desugarDbs.mli desugarDbs.ml \
desugarFuns.mli desugarFuns.ml \
desugarProcesses.mli desugarProcesses.ml \
desugarInners.mli desugarInners.ml \
desugarCP.mli desugarCP.ml \
typeSugar.mli typeSugar.ml \
checkXmlQuasiquotes.ml \
frontend.ml \
dumpTypes.ml \
compilePatterns.ml \
websocketMessages.ml \
jsonparse.mly \
jsonlex.mll \
js.ml \
json.mli json.ml \
proc.mli proc.ml \
resolveJsonState.mli resolveJsonState.ml \
database.mli database.ml \
linksregex.ml \
lib.mli lib.ml \
sugartoir.mli sugartoir.ml \
loader.mli loader.ml \
irtojs.mli irtojs.ml \
query.mli query.ml \
queryshredding.ml \
webserver_types.mli webserver_types.ml \
webserver.mli \
evalir.ml \
buildTables.ml \
webif.mli webif.ml \
webserver.ml \
dynload.ml \
links.ml \
# TODO: get these working again
#
# test.ml \
# tests.ml \
RESULT = links
INCDIRS = $(EXTRA_INCDIRS)
LIBDIRS = $(EXTRA_LIBDIRS)
include $(OCAMLMAKEFILE)
.PHONY: tests
tests: $(RESULT)
@OCAMLRUNPARAM="" ./run-tests
fixmes:
@grep FIXME *.ml *.mli *.mly *.mll
.PHONY: docs docs-clean clean
docs:
cd doc && make
quick-help:
cd doc && make quick-help.html
docs-clean:
cd doc && make clean
prelude.links.cache: prelude.links links
@echo "Pre-compiling prelude..."
@./links -e 'print("Prelude compiled OK.")'
cache-clean:
-rm -f prelude.links.cache
byte-code: cache-clean
native-code: cache-clean
clean :: docs-clean cache-clean
.PHONY: install
install: nc
@echo "Installing Links to prefix $(LINKS_PREFIX)"
@echo "Installing Links to $(LINKS_BIN)"
install -d $(LINKS_BIN)
install links $(LINKS_BIN)/links
@echo "Installing prelude.links to $(LINKS_LIB)"
install -d $(LINKS_LIB)
install prelude.links $(LINKS_LIB)/prelude.links
@echo "Add environment variable binding LINKS_LIB=$(LINKS_LIB) to"
@echo "your environment to enable calling Links from any directory."
.PHONY: uninstall
uninstall:
@echo "Uninstalling Links from $(LINKS_PREFIX)"
@echo "Removing $(LINKS_BIN)/links"
rm -f $(LINKS_BIN)/links
@echo "Removing $(LINKS_LIB)/prelude.links"
rm -f $(LINKS_LIB)/prelude.links