home
/
code
/
tiger.ml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add CLI options to execute different test suites
[tiger.ml.git]
/
compiler
/
Makefile
diff --git
a/compiler/Makefile
b/compiler/Makefile
index
24696cd
..
0cb89eb
100644
(file)
--- a/
compiler/Makefile
+++ b/
compiler/Makefile
@@
-1,13
+1,16
@@
MAKEFLAGS := --no-builtin-rules
MAKEFLAGS := --no-builtin-rules
-EXE_TYPE := byte # byte | native
-EXECUTABLES := tigerc tiger_tests
+DIR_TEST_CASES := ./testcases
+
+EXE_TYPE := native # byte | native
+EXECUTABLES := tigerc tigert
+OCAMLBUILD_FLAGS_PKGS := -pkg unix
OCAMLBUILD_FLAGS_DIRS := -I src/exe -I src/lib/tiger
OCAMLBUILD_FLAGS_DIRS := -I src/exe -I src/lib/tiger
-OCAMLBUILD_FLAGS_COMP := -cflags '-w A'
+OCAMLBUILD_FLAGS_COMP := -cflags '-
g -
w A'
OCAMLBUILD_FLAGS_YACC := -yaccflag '-v'
OCAMLBUILD := \
ocamlbuild \
OCAMLBUILD_FLAGS_YACC := -yaccflag '-v'
OCAMLBUILD := \
ocamlbuild \
-
-classic-display
\
+
$(OCAMLBUILD_FLAGS_PKGS)
\
$(OCAMLBUILD_FLAGS_COMP) \
$(OCAMLBUILD_FLAGS_DIRS) \
$(OCAMLBUILD_FLAGS_YACC)
$(OCAMLBUILD_FLAGS_COMP) \
$(OCAMLBUILD_FLAGS_DIRS) \
$(OCAMLBUILD_FLAGS_YACC)
@@
-16,6
+19,9
@@
OCAMLBUILD := \
all \
build \
clean \
all \
build \
clean \
+ test_all \
+ test_book \
+ test_micro \
test
all: clean
test
all: clean
@@
-31,5
+37,13
@@
clean:
@$(OCAMLBUILD) -clean
@rm -rf ./bin
@$(OCAMLBUILD) -clean
@rm -rf ./bin
-test: build
- @./bin/exe/tiger_tests
+test: test_all
+
+test_all: build
+ @./bin/exe/tigert all -dir $(DIR_TEST_CASES)
+
+test_book: build
+ @./bin/exe/tigert book -dir $(DIR_TEST_CASES)
+
+test_micro: build
+ @./bin/exe/tigert micro
This page took
0.038079 seconds
and
4
git commands to generate.