From d279dc7cd16fec8bc839bc962ed910263bf457ce Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 19 Sep 2013 10:21:51 +0100 Subject: [PATCH] goaljobs: Allow --package to specify OCaml packages. --- goaljobs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/goaljobs b/goaljobs index b7f929a..89e15e3 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;; @@ -137,8 +141,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"* -- 1.8.3.1