2 * Copyright (c) 2015, Facebook, Inc.
5 * This source code is licensed under the BSD-style license found in the
6 * LICENSE file in the "hack" directory of this source tree. An additional grant
7 * of patent rights can be found in the PATENTS file in the same directory.
19 if os_type = "linux" then {
26 ccopt += [ "-DNO_LZ4" ]
29 requires = [ "unix" "str" "threads" ]
31 begin library "hh-third-party"
34 "third-party/core/caml.ml"
35 "third-party/core/commutative_group.ml"
36 "third-party/core/container.ml"
37 "third-party/core/core_printf.ml"
38 "third-party/core/monad.ml"
39 "third-party/core/polymorphic_compare.ml"
40 "third-party/core/poly.ml"
41 "third-party/core/core_list.ml"
42 "third-party/core/option.ml"
43 "third-party/core/result.ml"
44 "third-party/avl/monoidAvl.ml"
48 begin library "hh-fsnotify-linux"
49 if not (system = "linux" && os_type = "Unix") then enabled = false
52 "third-party/inotify/inotify_stubs.c"
53 "third-party/inotify/inotify.ml"
54 "fsnotify_linux/fsnotify.ml"
56 requires = [ "hh-utils-core" ]
59 begin library "hh-fsnotify-darwin"
60 if not (system = "macosx" && os_type = "Unix") then enabled = false
62 "-sectcreate" "-__text" "hhi" "%{ROOTPROJECT_FULL_SRC_DIR}%/bin/hhi.tar.gz"
63 "-framework" "CoreServices"
64 "-framework" "CoreFoundation"
67 "fsevents/fsevents_stubs.c"
68 "fsevents/fsevents.ml"
69 "fsnotify_darwin/fsnotify.ml"
71 requires += [ "ROOTPROJECT" ]
74 begin library "hh-fsnotify-win"
75 if not (os_type = "Win32") then enabled = false
76 requires += [ "ROOTPROJECT" ]
77 files = [ "fsnotify_win/fsnotify.ml" ]
80 begin library "hh-fsnotify"
81 if os_type = "Win32" then {
82 requires = [ "hh-fsnotify-win" ]
83 } else if system = "linux" then {
84 requires = [ "hh-fsnotify-linux" ]
86 requires = [ "hh-fsnotify-darwin" ]
90 begin library "hh-utils-core"
91 requires = [ "hh-third-party" ]
92 files = [ "utils/core.ml" ]
95 begin library "hh-utils-common"
96 requires += [ "hh-third-party" "hh-utils-core" "hh-fsnotify" ]
100 "utils/get_build_id.gen.c"
101 "utils/get_build_id.c"
104 "utils/handle_stubs.c"
110 "utils/relative_path.ml"
114 "utils/config_file.ml"
120 begin library "hh-utils"
121 requires += [ "hh-utils-common" ]
131 "utils/printSignal.ml"
135 "utils/exit_status.ml"
136 "utils/regexp_utils.ml"
137 "utils/php_escaping.ml"
141 begin library "hh-deps"
142 requires += [ "hh-third-party" "hh-utils" ]
145 "deps/typing_deps.ml"
149 begin library "hh-stubs"
150 requires += [ "hh-utils" ]
152 "stubs/eventLogger.ml"
153 "stubs/hackEventLogger.ml"
154 "stubs/filesToIgnore.ml"
155 "stubs/linting_service.ml"
156 "stubs/prologMain.ml"
159 "stubs/clientMessages.ml"
163 begin library "hh-heap"
164 requires += [ "hh-third-party" "hh-utils" "hh-stubs" ]
170 "heap/globalStorage.ml"
174 begin library "hh-globals"
175 requires += [ "hh-third-party" "hh-utils" ]
178 "globals/autocomplete.ml"
180 "globals/globalConfig.ml"
184 begin library "hh-procs"
185 requires += [ "hh-third-party" "hh-utils" "hh-heap" "hh-globals" ]
189 "procs/multiWorker.ml"
194 begin library "hh-parsing"
195 requires += [ "hh-third-party" "hh-utils" "hh-deps" "hh-heap"
196 "hh-globals" "hh-procs" ]
198 "parsing/namespace_env.ml"
200 "parsing/lexer_hack.mll"
201 "parsing/namespaces.ml"
202 "parsing/parser_heap.ml"
203 "parsing/parser_hack.ml"
204 "parsing/parsing_hooks.ml"
205 "parsing/ast_utils.ml"
206 "parsing/parsing_service.ml"
210 begin library "hh-typing-base"
211 requires += [ "hh-utils" "hh-parsing" ]
213 "naming/naming_special_names.ml"
214 "typing/typing_reason.ml"
215 "typing/typing_defs.ml"
216 "typing/typing_heap.ml"
217 "naming/naming_hooks.ml"
218 "naming/naming_ast_helpers.ml"
219 "naming/typecheckerOptions.ml"
225 begin library "hh-dfind"
226 requires += [ "hh-third-party" "hh-fsnotify" "hh-utils" ]
229 "dfind/dfindMaybe.ml"
230 "dfind/dfindAddFile.ml"
231 "dfind/dfindServer.ml"
236 begin library "hh-naming"
237 requires += [ "hh-typing-base" ]
240 "naming/naming_heap.ml"
241 "naming/nast_eval.ml"
242 "naming/attributes.ml"
243 "naming/nastVisitor.ml"
247 begin library "hh-typing"
248 requires += [ "hh-naming" ]
250 "typing/typing_env.ml"
251 "typing/typing_hooks.ml"
252 "typing/typing_print.ml"
253 "typing/typeVisitor.ml"
254 "typing/typing_dependent_type.ml"
255 "typing/typing_expand.ml"
256 "typing/typing_generic.ml"
257 "typing/typing_utils.ml"
258 "typing/typing_subst.ml"
259 "typing/typing_phase.ml"
260 "typing/typing_instantiate.ml"
261 "typing/typing_taccess.ml"
262 "typing/typing_structure.ml"
263 "typing/typing_tdef.ml"
264 "typing/typing_unification_env.ml"
265 "typing/typing_unify.ml"
266 "typing/typing_subtype.ml"
267 "typing/typing_ops.ml"
268 "typing/typing_suggest.ml"
269 "typing/typingEqualityCheck.ml"
270 "typing/typing_alias.ml"
271 "typing/typing_async.ml"
272 "typing/typing_enum.ml"
273 "typing/typing_hint.ml"
274 "typing/typing_extends.ml"
275 "typing/typing_exts.ml"
276 "typing/typing_lenv.ml"
277 "typing/typing_shapes.ml"
278 "typing/typing_variance.ml"
279 "typing/typing_sequencing.ml"
280 "typing/nastCheck.ml"
281 "typing/nast_terminality.ml"
282 "typing/nastInitCheck.ml"
284 "typing/typing_dynamic_yield.ml"
285 "typing/typing_inherit.ml"
286 "typing/typing_decl.ml"
287 "typing/typing_decl_service.ml"
288 "typing/typing_check_service.ml"
289 "typing/typing_check_utils.ml"
290 "typing/typing_compare.ml"
291 "typing/coverage_level.ml"
292 "typing/typing_redecl_service.ml"
293 "typing/typing_suggest_service.ml"
297 begin library "hh-search"
298 requires += [ "hh-utils" "hh-heap" "hh-parsing" ]
300 "search/searchUtils.ml"
301 "search/fuzzySearchService.ml"
302 "search/trieSearchService.ml"
303 "search/searchService.ml"
304 "search/hackSearchService.ml"
308 begin library "hh-stubs-ai"
309 requires += [ "hh-typing-base" ]
315 begin library "hh-socket"
316 requires += [ "hh-utils" ]
322 begin library "hh-hhi"
323 requires += [ "hh-globals" "hh-utils" ]
330 begin library "hh-server-base"
331 requires += [ "hh-third-party" "hh-utils" "hh-typing" "hh-search"
332 "hh-stubs" "hh-stubs-ai" "hh-socket" "hh-dfind" "hh-hhi" ]
334 "server/serverFiles.ml"
335 "server/serverConfig.ml"
336 "server/serverArgs.ml"
337 "server/serverEnv.ml"
338 "server/serverUtils.ml"
339 "server/argumentInfoService.ml"
340 "server/autocompleteService.ml"
341 "server/fileOutline.ml"
342 "server/serverIdeUtils.ml"
343 "server/findRefsService.ml"
344 "server/findUtils.ml"
345 "server/identifySymbolService.ml"
346 "server/inferAtPosService.ml"
347 "server/methodJumps.ml"
348 "server/serverArgumentInfo.ml"
349 "server/serverAutoComplete.ml"
350 "server/serverBuild.ml"
351 "server/serverCheckpoint.ml"
352 "server/serverColorFile.ml"
353 "server/serverCoverageMetric.ml"
354 "server/serverError.ml"
355 "server/serverFindRefs.ml"
356 "server/serverIdentifyFunction.ml"
357 "server/serverInferType.ml"
358 "server/serverLint.ml"
359 "server/serverRefactor.ml"
360 "server/serverSearch.ml"
361 "server/symbolUtils.ml"
362 "server/symbolFunCallService.ml"
363 "server/symbolTypeService.ml"
364 "server/symbolInfoService.ml"
365 "server/serverRpc.ml"
366 "server/serverTypeCheck.ml"
367 "server/serverCommand.ml"
368 "server/serverConvert.ml"
372 begin library "hh-server"
374 "hh-third-party" "hh-utils" "hh-typing"
375 "hh-search" "hh-stubs" "hh-stubs-ai"
376 "hh-socket" "hh-dfind" "hh-server-base"
379 "server/serverEnvBuild.ml"
380 "server/serverIdle.ml"
381 "server/serverInit.ml"
382 "server/serverMain.ml"
386 begin library "hh-client"
388 "hh-deps" "hh-heap" "hh-parsing"
389 "hh-globals" "hh-search" "hh-stubs"
390 "hh-socket" "hh-server-base"
393 "client/clientConnectSimple.ml"
394 "client/clientStop.ml"
395 "client/clientStart.ml"
396 "client/clientConnect.ml"
397 "client/clientLogCommand.ml"
398 "client/clientBuild.ml"
399 "client/clientEnv.ml"
400 "client/clientCommand.ml"
401 "client/clientArgs.ml"
402 "client/clientArgumentInfo.ml"
403 "client/clientAutocomplete.ml"
404 "client/clientCheckStatus.ml"
405 "client/colorFile.ml"
406 "client/clientColorFile.ml"
407 "client/clientCoverageMetric.ml"
408 "client/clientFindRefs.ml"
409 "client/clientLint.ml"
410 "client/clientMethodJumps.ml"
411 "client/clientOutline.ml"
412 "client/clientRefactor.ml"
413 "client/clientSearch.ml"
414 "client/clientSymbolInfo.ml"
415 "client/clientTypeAtPos.ml"
416 "client/clientCheck.ml"
417 "client/clientLogCommandUtils.ml"
418 "client/clientRestart.ml"
422 begin program "hh_client"
423 requires += [ "hh-client" ]
424 files = [ "hh_client.ml" ]
427 begin program "hh_server"
428 requires += [ "hh-server" ]
429 files = [ "hh_server.ml" ]
432 begin library "hh-emitter"
433 requires += [ "hh-naming" "hh-typing" ]
436 "emitter/emitter_core.ml"
437 "emitter/emitter_consts.ml"
438 "emitter/emitter_xhp.ml"
439 "emitter/emitter_expr.ml"
440 "emitter/emitter_lit.ml"
441 "emitter/emitter_stmt.ml"
442 "emitter/emitter_types.ml"
447 begin library "hh-format"
448 requires += [ "hh-typing-base" ]
450 "stubs/formatEventLogger.ml"
451 "format/format_hack.ml"
452 "format/format_diff.ml"
453 "format/format_mode.ml"
457 begin program "hh_format"
458 requires += [ "hh-format" "hh-client" ]
459 files = [ "hh_format.ml" ]
462 begin program "hh_single_type_check"
463 requires += [ "hh-client" "hh-emitter" ]
465 "hh_single_type_check.ml"