Factor Remakefie and add more tests for parallel query composition.
[tatoo.git] / tools / ocamldriver.sh
index 792330c..0a51cb6 100644 (file)
@@ -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 `