unset CDPATH
-TEMP=`getopt -o 'gI:o:' --long 'help,pkgdir:' -n goaljobs -- "$@"`
+TEMP=`getopt -o 'gI:o:' --long 'help,package:,pkgdir:' -n goaljobs -- "$@"`
if [ $? -ne 0 ]; then
echo "goaljobs: could not parse command line arguments"
exit 1
-o)
output="$2"
shift 2;;
+ --package)
+ passthru[i++]="-package"
+ passthru[i++]="$2"
+ shift 2;;
--pkgdir)
pkgdir="$2"
shift 2;;
# Compile the input file(s).
echo \
-ocamlfind $best "${passthru[@]}" "${pkg[@]}" "$@" $main -o "$output"
-ocamlfind $best "${passthru[@]}" "${pkg[@]}" "$@" $main -o "$output"
+ocamlfind $best "${passthru[@]}" "${pkg[@]}" "$@" $main -linkpkg -o "$output"
+ocamlfind $best "${passthru[@]}" "${pkg[@]}" "$@" $main -linkpkg -o "$output"
mainbase="$(echo $main | sed s,\.ml$,,)"
rm -f "$mainbase"*