summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGabriel Scherer <gabriel.scherer@gmail.com>2015-12-10 08:27:20 +0100
committerGabriel Scherer <gabriel.scherer@gmail.com>2015-12-11 13:36:28 +0100
commit2e8de3ff85a596a2d06ac59244658c1a9d84d7db (patch)
tree348c97cc46e1a4104c5f69b40867c46877509817 /Makefile
parent4a5f11ec5bbe4f048fbfaaa7dac3c59b307e9704 (diff)
downloadocaml-2e8de3ff85a596a2d06ac59244658c1a9d84d7db.tar.gz
Makefile: a 'runtop' target to build and run the toplevel
Pass the content of the TOPFLAGS variable as additional arguments, eg. TOPFLAGS="-dparsetree" make runtop
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 4899629ed0..0b62733671 100644
--- a/Makefile
+++ b/Makefile
@@ -334,6 +334,14 @@ ocaml: compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma \
partialclean::
rm -f ocaml
+RUNTOP=./byterun/ocamlrun ./ocaml -nostdlib -I stdlib -noinit $(TOPFLAGS)
+
+runtop:
+ $(MAKE) runtime
+ $(MAKE) coreall
+ $(MAKE) ocaml
+ @rlwrap --help 2>/dev/null && rlwrap $(RUNTOP) || $(RUNTOP)
+
# The native toplevel
ocamlnat: ocamlopt otherlibs/dynlink/dynlink.cmxa $(NATTOPOBJS:.cmo=.cmx)