X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=tools%2Focamldriver.sh;h=0a51cb6b49f32ab36f0417fc9d8d5f549e4fe84e;hp=792330c02dbdfb7037062029fae2cf00bd16cd13;hb=fa7e819743a4a6d008ec086dfdeb2e30df2da701;hpb=566b96d016a9b81cea73d019551af2ab60b54ca8 diff --git a/tools/ocamldriver.sh b/tools/ocamldriver.sh index 792330c..0a51cb6 100644 --- a/tools/ocamldriver.sh +++ b/tools/ocamldriver.sh @@ -19,6 +19,18 @@ if test "$PACKDIR"; then fi fi +if test "$EXT" = i; then + if test -f ${base}.mli; then + $REMAKE ${base}.mli; + fi + + modules=`$OCAMLDEP -modules ${base}.ml | cut -f 2- -d ':'` + objects=`tools/ocamlmoduledep.sh -inter $NATIVE $PACKINCLUDE -I $SRC $modules` + $REMAKE $objects + $COMPILE -o ${target} -c $PACKINCLUDE ${base}.mli + exit 0 +fi + if test "$DOPACK"; then modules=`cat ${base}.pack` objects=`echo $modules | xargs tools/ocamlmoduledep.sh $NATIVE $PACKINCLUDE -I $SRC `