Skip to content

Commit

Permalink
Build all boot targets in make hacking (ocaml-flambda#1133)
Browse files Browse the repository at this point in the history
* Build all boot targets in `make hacking`

Currently, `make hacking` builds only `ocamlopt` (the boot version). Adding the
other targets doesn't add much compile time and makes life easier if you're
making changes that will propagate out to them - for instance, changes to file
formats usually break `ocamlobjinfo`.

* Also update `make hacking-runtest`
  • Loading branch information
lukemaurer authored Feb 21, 2023
1 parent aefceb7 commit aa9cd1d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ci-coverage: boot-runtest coverage

.PHONY: hacking-runtest
hacking-runtest: _build/_bootinstall
$(dune) build $(ws_boot) $(coverage_dune_flags) -w boot_ocamlopt.exe @runtest
$(dune) build $(ws_boot) $(coverage_dune_flags) -w $(boot_targets) @runtest

# Only needed for running the test tools by hand; runtest will take care of
# building them using Dune
Expand Down
16 changes: 9 additions & 7 deletions ocaml/Makefile.common-jst
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@ endef
.DEFAULT_GOAL := compiler
.PHONY: boot-compiler boot-runtest runtime-stdlib compiler runtest

boot_targets = \
$(boot_ocamlc) \
$(boot_ocamlopt) \
$(boot_ocamlmklib) \
$(boot_ocamldep) \
$(boot_ocamlobjinfo)

boot-compiler: _build/_bootinstall
$(dune) build $(ws_boot) $(coverage_dune_flags) \
$(boot_ocamlc) \
$(boot_ocamlopt) \
$(boot_ocamlmklib) \
$(boot_ocamldep) \
$(boot_ocamlobjinfo)
$(dune) build $(ws_boot) $(coverage_dune_flags) $(boot_targets)

boot-runtest: boot-compiler
$(dune) runtest $(ws_boot) $(coverage_dune_flags) --force
Expand Down Expand Up @@ -303,4 +305,4 @@ test-one: install_for_test
# This target is like a polling version of upstream "make ocamlopt"
.PHONY: hacking
hacking: _build/_bootinstall
$(dune) build $(ws_boot) -w $(boot_ocamlopt)
$(dune) build $(ws_boot) -w $(boot_targets)

0 comments on commit aa9cd1d

Please sign in to comment.