| OLD | NEW | 
| (Empty) |  | 
 |   1 #!/bin/sh | 
 |   2  | 
 |   3  | 
 |   4 outdir="v8/out/Debug" | 
 |   5 system=`uname -s` | 
 |   6 android_build=0 | 
 |   7  | 
 |   8 # the arguments are | 
 |   9 # [-a arch] [file1, ...] [-D outdir] -C dir ... | 
 |  10 # | 
 |  11 # -a if we are building for Android. arch target. | 
 |  12 # -D is the output directory to copy from | 
 |  13 # the rest is passed verbatim to make. | 
 |  14 if [ "$1" = "-a" ] ; then | 
 |  15     android_build=1 | 
 |  16     shift | 
 |  17     android_arch="$1" | 
 |  18     shift | 
 |  19 fi | 
 |  20 while [ "$1" != "-D" -a "$1" != "-C" ] ; do | 
 |  21     target="$target $1" | 
 |  22     shift | 
 |  23 done | 
 |  24 if [ "$1" = "-D" ] ; then | 
 |  25     shift | 
 |  26     outdir="$1" | 
 |  27     shift | 
 |  28 fi | 
 |  29  | 
 |  30 make $* && for t in $target ; do | 
 |  31     cp $outdir/$t . | 
 |  32     # When building for Android on Darwin we must execute ranlib | 
 |  33     if [ $android_build -eq 1 -a "$system" = "Darwin" ] ; then | 
 |  34         case "$android_arch" in | 
 |  35             arm64) | 
 |  36                 ${ANDROID_NDK_ROOT}/toolchains/aarch64-linux-android-4.9/prebuil
    t/darwin-x86_64/bin/aarch64-linux-android-ranlib $t | 
 |  37                 ;; | 
 |  38             arm) | 
 |  39                 ${ANDROID_NDK_ROOT}/toolchains/arm-linux-androideabi-4.9/prebuil
    t/darwin-x86_64/bin/arm-linux-androideabi-ranlib $t | 
 |  40                 ;; | 
 |  41             ia32) | 
 |  42                 ${ANDROID_NDK_ROOT}/toolchains/x86-4.9/prebuilt/darwin-x86_64/bi
    n/i686-linux-android-ranlib $t | 
 |  43                 ;; | 
 |  44             x64) | 
 |  45                 ${ANDROID_NDK_ROOT}/toolchains/x86_64-4.9/prebuilt/darwin-x86_64
    /bin/x86_64-linux-android-ranlib $t | 
 |  46                 ;; | 
 |  47             *) | 
 |  48                 echo "Unknown architecture $android_arch" | 
 |  49                 exit 255 | 
 |  50                 ;; | 
 |  51         esac | 
 |  52     fi | 
 |  53 done | 
| OLD | NEW |