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;;
declare -a pkg
if [ "$pkgdir" = "" ]; then
pkg[0]="-package"
- pkg[1]="goaljobs,goaljobs.syntax"
+ pkg[1]="goaljobs"
+ pkg[2]="-syntax"
+ pkg[3]="goaljobs"
else
# Get the dependencies manually. Note that calendar requires
# unix & str.
# 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"*