Skip to content
Snippets Groups Projects
Commit 8738f902 authored by Alan Schmitt's avatar Alan Schmitt
Browse files

Makefile

parent e2df0a0f
No related branches found
No related tags found
No related merge requests found
......@@ -2,11 +2,11 @@
# requires: opam switch 4.02.1; eval `opam config env`
STD_DIR := stdlib_ml
STD_DIR := stdlib_ml
TEST_DIR := tests
ML_TESTS := $(wildcard $(TEST_DIR)/*.ml)
ML_LAMBDA := $(wildcard $(TEST_DIR)/lambda/*.ml)
ML_JSREF := $(wildcard $(TEST_DIR)/jsref/*.ml)
ML_JSREF := $(wildcard $(TEST_DIR)/jsref/*.ml) $(wildcard $(TEST_DIR)/jsref/*.mli)
OCAMLBUILD := ocamlbuild -j 4 -classic-display -use-ocamlfind
......@@ -47,13 +47,16 @@ tests/%.ml: tests/%.v
# ../../convert-ml-strings.pl tests/jsref/*.ml
# cd $(@D) && $(CURDIR)/../../ml-add-cstr-annots.pl *.ml
tests/%.mli.d: tests/%.mli
$(OCAMLDEP) -I $(<D) $< | $(DEPSED) > $@
tests/%.ml.d: tests/%.ml
$(OCAMLDEP) -I $(<D) $< | $(DEPSED) > $@
tests/%.cmi tests/%.unlog.js: tests/%.ml main.byte stdlib
tests/%.unlog.js: tests/%.ml main.byte stdlib
./main.byte -mode unlog -I $(<D) $<
tests/%.cmi tests/%.unlog.js: tests/%.mli stdlib
tests/%.cmi: tests/%.mli stdlib
ocamlc -I stdlib_ml -open Stdlib -I $(<D) $<
......@@ -75,6 +78,7 @@ DIRTY_EXTS := cmi,token.js,js,d
clean_tests:
rm -f $(TEST_DIR)/*.{$(DIRTY_EXTS)}
rm -f $(TEST_DIR)/lambda/*.{$(DIRTY_EXTS)}
rm -f $(TEST_DIR)/jsref/*.{$(DIRTY_EXTS)}
clean:
rm -rf _build
......@@ -93,6 +97,7 @@ endif
ifeq ($(MAKECMDGOALS),tests/jsref)
-include $(ML_JSREF:.ml=.ml.d)
-include $(ML_JSREF:.mli=.mli.d)
endif
......@@ -109,4 +114,4 @@ arthur: lineof.byte
# replace "char list" with strings.
# fix functor translation
# missing return in: funcdecl_name: function (x) { x.funcdecl_name},
# change extraction of: native_error_compare
\ No newline at end of file
# change extraction of: native_error_compare
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment