X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=goaljobs;h=756d527d74adb9b1a0b395a00917f5971dd4bd71;hb=e9b165e44b70da20ffc8ef258b7bae80fba78b7a;hp=b7f929a0b3ab738906f41ce9bed4e8c0c0929e7c;hpb=109d0b711f20e61c0b23de0c8d871b32a8a4b716;p=goaljobs.git diff --git a/goaljobs b/goaljobs index b7f929a..756d527 100755 --- a/goaljobs +++ b/goaljobs @@ -18,7 +18,7 @@ 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 @@ -47,6 +47,10 @@ while true; do -o) output="$2" shift 2;; + --package) + passthru[i++]="-package" + passthru[i++]="$2" + shift 2;; --pkgdir) pkgdir="$2" shift 2;; @@ -118,7 +122,9 @@ echo "Goaljobs.init ()" >> $main 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. @@ -137,8 +143,8 @@ fi # 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"*