Commit 44501292 authored by POTTIER Francois's avatar POTTIER Francois

Moved the calc demo to ocamlbuild.

parent 284ed1cd
calc
lexer.ml
parser.ml
parser.mli
*.cmi
*.cmo
*.cmx
*.o
*.d
calc.native
_build
# Add --table on the next line to use Menhir's table-based back-end.
PGFLAGS := --infer
GENERATED := parser.ml parser.mli lexer.ml
MODULES := parser lexer calc
EXECUTABLE := calc
OCAMLDEPWRAPPER := ../ocamldep.wrapper
include ../Makefile.shared
include ../Makefile.auto
.PHONY: all clean test
# Find Menhir.
ifndef MENHIR
MENHIR := $(shell ../find-menhir.sh)
endif
MENHIRFLAGS := --infer
OCAMLBUILD := ocamlbuild -use-ocamlfind -use-menhir -menhir "$(MENHIR) $(MENHIRFLAGS)"
MAIN := calc
all:
$(OCAMLBUILD) $(MAIN).native
clean:
$(OCAMLBUILD) -clean
test: all
@echo "The following command should print 42:"
echo "(1 + 2 * 10) * 2" | ./$(MAIN).native
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