X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=tools%2Focamlmoduledep.sh;h=befd4cdfd1b110a091b39017d2a0eb3ce1f195eb;hp=3bab18669ef3a3c5fe32d86f76f3284084d9a28e;hb=fa7e819743a4a6d008ec086dfdeb2e30df2da701;hpb=566b96d016a9b81cea73d019551af2ab60b54ca8 diff --git a/tools/ocamlmoduledep.sh b/tools/ocamlmoduledep.sh index 3bab186..befd4cd 100755 --- a/tools/ocamlmoduledep.sh +++ b/tools/ocamlmoduledep.sh @@ -10,6 +10,7 @@ usage() { INCLUDES="" MODULES="" NATIVE=0 +INTER=0 while true; do case $1 in -I) @@ -21,6 +22,9 @@ $2" -native) NATIVE=1 ;; + -inter) + INTER=1 + ;; [A-Z]*) MODULES="$MODULES $1" ;; @@ -44,7 +48,9 @@ for MODULE in $MODULES; do echo "$INCLUDES" | while read include; do base="$include/$module" if test -z "$include"; then continue; fi - if test -f "$base".ml -o -f "$base".mly -o -f "$base".mll -o -f "$base".pack; then + if test \( "$INTER" = "1" \) -a \( -f "$base".mli \) ; then + echo -n "$base"."cmi " + elif test -f "$base".ml -o -f "$base".mly -o -f "$base".mll -o -f "$base".pack; then echo -n "$base"."$ext " break elif test -f "$base".mli; then