Commit fa46164a authored by Julien Lopez's avatar Julien Lopez
Browse files

[TESTS][EVAL][MINOR] Better Makefile; eval fails to compile at this point.

parent ff766d4d
...@@ -3,17 +3,16 @@ ROOTDIR ?= ../.. ...@@ -3,17 +3,16 @@ ROOTDIR ?= ../..
SRCDIR ?= src SRCDIR ?= src
EXTDIR ?= $(SRCDIR)/externals EXTDIR ?= $(SRCDIR)/externals
# TODO: Improve this, we have to add twice an external file in this Makefile
INEXTFILES = misc/custom.ml misc/encodings.ml types/ident.ml\ INEXTFILES = misc/custom.ml misc/encodings.ml types/ident.ml\
compile/lambda.mli compile/lambda.ml misc/ns.ml misc/ns.mli misc/upool.ml\ compile/lambda.mli compile/lambda.ml misc/ns.ml misc/ns.mli misc/upool.ml\
misc/upool.mli types/sortedList.ml types/sortedList.mli types/compunit.ml\ misc/upool.mli types/sortedList.ml types/sortedList.mli types/compunit.ml\
types/compunit.mli types/types.mli types/types.ml types/compunit.mli types/types.mli types/types.ml runtime/eval.ml
EXTFILES = $(INEXTFILES:%=$(ROOTDIR)/%) EXTFILES = $(INEXTFILES:%=$(ROOTDIR)/%)
RM ?= rm -f RM ?= rm -f
OUT ?= main.native OUT ?= main.native
.PHONY: clean check test .PHONY: clean check test _import
all: _import all: _import
$(COMPILER) -use-ocamlfind $(OUT) $(COMPILER) -use-ocamlfind $(OUT)
...@@ -25,8 +24,7 @@ _import: ...@@ -25,8 +24,7 @@ _import:
@echo "done" @echo "done"
clean: clean:
$(RM) $(OUT) $(COMPILER) -clean
$(RM) -r _build
test $(EXTDIR) = "src" || test $(EXTDIR) = "." || $(RM) -r $(EXTDIR) test $(EXTDIR) = "src" || test $(EXTDIR) = "." || $(RM) -r $(EXTDIR)
check: test check: test
......
<src>: include <src>: include
<src/lambda*>: pp(camlp4orf.opt), package(camlp4.lib) <src/lambda*>: pp(camlp4orf.opt), package(camlp4.lib)
<src/main*>: pp(camlp4orf.opt), package(camlp4.lib) <src/main*>: pp(camlp4orf.opt), package(camlp4.lib)
<src/externals>: include
...@@ -16,4 +16,6 @@ let str = if Array.length Sys.argv > 1 then load_file Sys.argv.(1) ...@@ -16,4 +16,6 @@ let str = if Array.length Sys.argv > 1 then load_file Sys.argv.(1)
let expr = ExprParser.of_string str in let expr = ExprParser.of_string str in
printf "Original: %s\nExpr: " str; printf "Original: %s\nExpr: " str;
print_expr expr; print_expr expr;
printf "\nResult: %s\n" (expr_to_string expr) printf "\nResult: %s\n" (expr_to_string expr);
(*Eval.eval [||] [||] expr*)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment