From b595dee62f2bfae2ed7bf78ac127090aee84fc35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9onard=20G=C3=A9rard?= Date: Sun, 27 Jun 2010 18:54:05 +0200 Subject: [PATCH] Small usefull heptc wrapper. --- heptc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 heptc diff --git a/heptc b/heptc new file mode 100755 index 0000000..52f0ef0 --- /dev/null +++ b/heptc @@ -0,0 +1,21 @@ +#!/bin/bash + +#Small wrapper to deal with compilation of the compiler and the stdlib. + +COMPILER=heptc.byte +COMPILER_DIR=compiler +HEPTC=$COMPILER_DIR/$COMPILER + +if [ ! -x $HEPTC ] #compile the compiler +then + cd compiler + ocamlbuild $COMPILER + cd - +fi + +if [ ! -e lib/pervasives.epci ] #compile the stdlib +then + $HEPTC -nopervasives lib/pervasives.epi +fi + +$HEPTC -stdlib lib "$@" #call the compiler with the passed arguments.