Commits

ysulsky committed 77d8544

minor build fixes

Comments (0)

Files changed (5)

 glob:base/bin_prot/doc/README.txt
 glob:base/bin_prot/lib/META
 glob:base/bin_prot/lib/bin_prot.mlpack
+glob:base/bin_prot/lib/bin_prot.odocl
 glob:base/bin_prot/lib/libbin_prot.clib
 glob:base/bin_prot/lib/libbin_prot_stubs.clib
 glob:base/bin_prot/lib_test/example.pp.ml

base/bin_prot/.hgignore.in

 INSTALL
 configure
 lib/bin_prot.mlpack
+lib/bin_prot.odocl
 lib/libbin_prot.clib
 lib/libbin_prot_stubs.clib
 lib/META
 #!/usr/bin/env bash
 set -e -u -o pipefail
 
-. build-common.sh
+source $(dirname -- "$0")/../build-common.sh
+root=$(cd "$HERE"; hg root)
 
 function usage {
     echo "usage: ${BASH_SOURCE[0]} <dest-dir> [packages...]"
     setup.data
 )
 
-hgroot=$(hg root)
-
-cp "$hgroot/build-and-install" "$destdir/"
+cp "$root/build-and-install" "$destdir/"
 cat >"$destdir/build-common.sh" <<EOF
 #!/bin/bash
 
 EOF
 
 for dir in $packages; do
-    pushd "base/$dir"
+    pushd "$root/$BASE/$dir"
 
     ./oasis.sh
     name=$(oasis query name)
             cp -rp "$f" "$dest/$f"
         fi
     done
-    cp -p "$hgroot/licensing/"* "$dest/"
+    cp -p "$root/licensing/"* "$dest/"
 
     popd
 done
 cat >>"$destdir/build-common.sh" <<EOF
 )
 
-BASE=\$(dirname -- \$0)
+HERE=\$(cd "$(dirname -- "\$0")"; pwd);
+BASE=.
 EOF

build-and-install

     esac
 done
 
-tree=$(dirname -- "$0")
-
-cd "$tree"
-. build-common.sh
+source $(dirname -- "$0")/build-common.sh
+root="$HERE";
+cd "$root"
 
 if $uninstall; then
   rev_build_order=( )
           src=$(pwd)
           dest=$(mktemp -d -t ocaml-core-async.XXXXXX)
           mkdir -p "$dest/$BASE/async"
-          cp -rp "$tree/build-common.sh" "$dest/"
+          cp -rp "$root/build-common.sh" "$dest/"
           cp -rp lib oasis.sh "$dest/$BASE/async/"
           cd $dest/$BASE/async
           trap "rm -r '$dest'" EXIT
       (Array.to_list (Sys.readdir dir)))
 '
 
-HERE=$(dirname -- "$0")
-BASE=$HERE/base
+HERE=$(cd "$(dirname -- "$0")"; pwd);
+BASE=base