7 echo "$PROG [-inter] [-native] [-I dir .. -I dir] Module"
14 OCAMLWHERE=$(ocamlc -where)
18 dir=`echo "$2" | sed "s:^+:${OCAMLWHERE}/:"`
39 if test "$#" -eq 0; then break; fi
41 if test "$NATIVE" = "1"; then
48 for MODULE in $MODULES; do
49 module="$(echo ${MODULE} | sed -e 's:\(.*\):\l\1:')"
50 echo "$INCLUDES" | while read include; do
51 if test -z "$include"; then continue; fi
52 base="${include}/${module}"
53 if test \( "$INTER" = "1" \) -a \( -f "$base".mli \) ; then
54 ## if we want to depend only on cmi of a module
55 /bin/echo -n "${base}"."cmi "
56 elif test -f "$base".ml -o -f "$base".mly -o -f "$base".mll -o -f "$base".pack -o -f "$base".ml.str; then
57 ## else we depend on the implementation
58 /bin/echo -n "${base}"."${ext} "
60 elif test -f "${base}".mli; then
61 ## and fall back on depending on the cmi if the cmx is not available
62 ## (which prevents cross-module inlining in the case of cmx)
63 /bin/echo -n "${base}"."cmi "