2016-02-19 16:36:03 -08:00
|
|
|
# Portions Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
|
2016-03-03 07:59:12 +01:00
|
|
|
|
2016-05-22 01:23:48 +03:00
|
|
|
SHELL=bash -o pipefail
|
2016-05-09 14:08:55 -07:00
|
|
|
|
2017-11-01 00:42:39 -07:00
|
|
|
default: build
|
2016-03-03 07:59:12 +01:00
|
|
|
|
2017-10-30 22:40:16 -07:00
|
|
|
build:
|
2018-08-20 21:30:20 +01:00
|
|
|
dune build
|
2016-02-19 16:36:03 -08:00
|
|
|
|
|
|
|
|
install:
|
|
|
|
|
opam pin add reason . -y
|
|
|
|
|
|
2017-11-01 14:50:32 -07:00
|
|
|
# CI uses opam. Regular workflow needn't.
|
2020-05-27 03:07:56 -07:00
|
|
|
test-ci: install test-once-installed
|
2017-11-01 14:50:32 -07:00
|
|
|
|
2023-04-30 21:41:33 +02:00
|
|
|
test-once-installed: test
|
|
|
|
|
|
|
|
|
|
test:
|
|
|
|
|
esy dune runtest
|
|
|
|
|
|
|
|
|
|
test-watch:
|
|
|
|
|
esy dune runtest --watch
|
2016-02-19 16:36:03 -08:00
|
|
|
|
2018-01-31 22:13:55 +11:00
|
|
|
.PHONY: coverage
|
|
|
|
|
coverage:
|
|
|
|
|
find -iname "bisect*.out" -exec rm {} \;
|
2020-05-27 03:07:56 -07:00
|
|
|
make test-once-installed
|
2018-01-31 22:13:55 +11:00
|
|
|
bisect-ppx-report -ignore-missing-files -I _build/ -html coverage-after/ bisect*.out ./*/*/*/bisect*.out
|
|
|
|
|
find -iname "bisect*.out" -exec rm {} \;
|
|
|
|
|
|
2023-04-30 21:41:33 +02:00
|
|
|
testFormat: build test-once-installed
|
2017-11-04 20:52:16 +01:00
|
|
|
|
2018-05-31 07:45:47 +02:00
|
|
|
all_errors:
|
|
|
|
|
@ echo "Regenerate all the possible error states for Menhir."
|
|
|
|
|
@ echo "Warning: This will take a while and use a lot of CPU and memory."
|
|
|
|
|
@ echo "---"
|
|
|
|
|
menhir --explain --strict --unused-tokens src/reason-parser/reason_parser.mly --list-errors > src/reason-parser/reason_parser.messages.checked-in
|
|
|
|
|
|
2023-04-30 21:41:33 +02:00
|
|
|
clean:
|
2018-08-20 21:30:20 +01:00
|
|
|
dune clean
|
2017-11-01 01:46:19 -07:00
|
|
|
|
2023-04-30 21:41:33 +02:00
|
|
|
clean-for-ci:
|
2017-10-31 23:56:41 -07:00
|
|
|
rm -rf ./_build
|
2016-02-19 16:36:03 -08:00
|
|
|
|
2017-03-22 17:36:47 -07:00
|
|
|
.PHONY: build clean
|
2016-02-19 16:36:03 -08:00
|
|
|
|
2018-01-25 01:11:18 -08:00
|
|
|
# For publishing esy releases to npm
|
2023-04-30 21:41:33 +02:00
|
|
|
esy-prepublish: build
|
2018-01-25 01:11:18 -08:00
|
|
|
node ./scripts/esy-prepublish.js
|
|
|
|
|
|
2017-11-02 12:24:33 +08:00
|
|
|
all-supported-ocaml-versions:
|
|
|
|
|
# the --dev flag has been omitted here but should be re-introduced eventually
|
2018-08-20 21:30:20 +01:00
|
|
|
dune build @install @runtest --root .
|
2017-11-02 12:24:33 +08:00
|
|
|
|
|
|
|
|
.PHONY: all-supported-ocaml-versions
|
2023-04-30 21:41:33 +02:00
|
|
|
|
|
|
|
|
doc:
|
|
|
|
|
esy dune build @doc
|
|
|
|
|
|
|
|
|
|
.PHONY: doc
|