]> granicus.if.org Git - jq/commitdiff
Partial revamp of `scripts/crosscompile`
authorNicolas Williams <nico@cryptonector.com>
Wed, 18 Jun 2014 21:29:37 +0000 (16:29 -0500)
committerNicolas Williams <nico@cryptonector.com>
Wed, 18 Jun 2014 21:29:37 +0000 (16:29 -0500)
Fix #430.

scripts/crosscompile

index b307e6d640b6168bcb58b38dee406fda2118772e..8d88bb298b09cf30021f12e5bb2da857ba6f545e 100755 (executable)
@@ -22,16 +22,21 @@ plat="$1"
 [ -z "$plat" ] && exit 1
 shift
 
+case "$plat" in
+*/*) echo "platform name must not be a path"; exit 1;;
+*..*) echo "platform name must not be a path"; exit 1;;
+*) plat=$PWD/$plat;;
+esac
+
 [ -d "$plat" ] || mkdir "$plat"
 rm -rf "$plat/tmp"
 mkdir "$plat/tmp"
 cd "$plat/tmp"
-mkdir install_other
-../../../configure \
-    --prefix="`pwd`/install_other" \
-    --bindir="`pwd`/.." \
-    "$@"
-make "$jobs" install-binaries
-cd ..
+../../../configure "$@"
+make "$jobs" DESTDIR=$plat install
+set -x
+for jq in `find . -type f \( -name jq -o -name jq.exe \) -print`; do
+    cp "$jq" ..
+done
 rm -rf tmp