2012-06-13 01:00:27 -07:00
|
|
|
ROOT=../..
|
2013-03-26 03:32:52 -07:00
|
|
|
OCAMLC=$(ROOT)/boot/ocamlrun $(ROOT)/ocamlc -I $(ROOT)/stdlib -I $(ROOT)/parsing -I $(ROOT)/utils -I $(ROOT)/tools -I $(ROOT)/typing -w A-4-9
|
2013-04-03 09:29:03 -07:00
|
|
|
COMMON=$(ROOT)/compilerlibs/ocamlcommon.cma
|
2012-06-13 01:00:27 -07:00
|
|
|
|
2012-11-08 06:27:22 -08:00
|
|
|
tracer.exe: tracer.ml
|
2013-04-03 09:29:03 -07:00
|
|
|
$(OCAMLC) -o $@ $(COMMON) $(ROOT)/tools/ast_mapper.cmo tracer.ml
|
2012-06-29 02:36:32 -07:00
|
|
|
|
2012-11-08 06:27:22 -08:00
|
|
|
ifdef.exe: ifdef.ml
|
2013-04-03 09:29:03 -07:00
|
|
|
$(OCAMLC) -o $@ $(COMMON) $(ROOT)/tools/ast_mapper.cmo ifdef.ml
|
2012-06-29 02:36:32 -07:00
|
|
|
|
2012-11-08 06:27:22 -08:00
|
|
|
js_syntax.exe: js_syntax.ml
|
2013-04-03 09:29:03 -07:00
|
|
|
$(OCAMLC) -o $@ $(COMMON) $(ROOT)/tools/ast_mapper.cmo js_syntax.ml
|
2012-07-24 05:48:39 -07:00
|
|
|
|
|
|
|
|
2012-06-13 01:00:27 -07:00
|
|
|
test_trace.exe: tracer.exe test_trace.ml
|
|
|
|
$(OCAMLC) -o test_trace.exe -ppx ./tracer.exe test_trace.ml
|
|
|
|
|
2012-06-29 02:36:32 -07:00
|
|
|
test_ifdef.exe: ifdef.exe test_ifdef.ml
|
|
|
|
$(OCAMLC) -o test_ifdef.exe -ppx ./ifdef.exe test_ifdef.ml
|
|
|
|
|
2012-07-24 05:48:39 -07:00
|
|
|
test_js.exe: js_syntax.exe test_js.ml
|
|
|
|
$(OCAMLC) -o test_ifdef.exe -i -ppx ./js_syntax.exe test_js.ml
|
|
|
|
|
2012-06-13 01:00:27 -07:00
|
|
|
clean:
|
|
|
|
rm -f *.exe *.cm*
|
2013-03-26 03:32:52 -07:00
|
|
|
|
|
|
|
|
|
|
|
.PHONY: minidoc
|
|
|
|
minidoc: minidoc.ml
|
2013-04-03 09:29:03 -07:00
|
|
|
$(OCAMLC) -custom -o minidoc.exe $(COMMON) minidoc.ml
|
2013-03-26 03:32:52 -07:00
|
|
|
$(OCAMLC) -c -bin-annot testdoc.mli
|
|
|
|
./minidoc.exe testdoc.cmti
|
2013-03-29 09:49:05 -07:00
|
|
|
|
2013-04-02 08:43:17 -07:00
|
|
|
.PHONY: lifter
|
2013-04-03 09:29:03 -07:00
|
|
|
lifter:
|
|
|
|
$(OCAMLC) -w +A-4 -custom -o genlifter.exe $(COMMON) genlifter.ml
|
2013-04-03 07:13:09 -07:00
|
|
|
./genlifter.exe -I ../../parsing -I ../../stdlib Parsetree.expression > ast_lifter.ml
|
|
|
|
$(OCAMLC) -c -w +A-17 ast_lifter.ml
|
2013-04-03 09:29:03 -07:00
|
|
|
$(OCAMLC) -c dumpast.ml
|
|
|
|
$(OCAMLC) -o dumpast.exe $(COMMON) ast_lifter.cmo dumpast.cmo
|
|
|
|
./dumpast.exe "fun x -> 1 + 3 * x" -p "x as y"
|
|
|
|
$(OCAMLC) -custom -o metaquot.exe -w +A-4 $(COMMON) ast_lifter.cmo metaquot.ml
|
|
|
|
$(OCAMLC) -custom -o metaquot_test.exe -w +A -ppx ./metaquot.exe $(COMMON) metaquot_test.ml
|
|
|
|
./metaquot_test.exe
|