diff options
author | Stephen Dolan <mu@netsoc.tcd.ie> | 2013-05-09 01:50:20 +0100 |
---|---|---|
committer | Stephen Dolan <mu@netsoc.tcd.ie> | 2013-05-09 01:50:20 +0100 |
commit | 282667bbd408824af6c6fdac46cd16530f591983 (patch) | |
tree | e0d9e97c367765656961f1d21715cfa1aef0b378 /build | |
parent | 63b689bf5430ba82bede270999371795a90a5f39 (diff) |
Script for cross-compiling jq binaries for other platforms.
Diffstat (limited to 'build')
-rwxr-xr-x | build/compile | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/build/compile b/build/compile new file mode 100755 index 00000000..7cfa94de --- /dev/null +++ b/build/compile @@ -0,0 +1,31 @@ +#!/bin/sh + +# This script is used to cross-compile binaries for +# platforms other than the current one + +# Usage: $0 <platformname> <configure options> +# <platformname> is arbitrary, it is the name +# of the directory which will be created to contain +# the output binaries. + +# e.g. $0 win32 --host=i686-w64-mingw32 + +set -e +cd `dirname "$0"` + +plat="$1" +[ -z "$plat" ] && exit 1 +shift + +[ -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 install-binaries +cd .. +rm -rf tmp
\ No newline at end of file |