Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: wrap_make

Issue 29537638: Issue 6226 - Use mesonbuild as a build system (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Support NDK r16b Created April 25, 2018, 10:01 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « meson.build ('k') | wrap_make_gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: wrap_make
===================================================================
new file mode 100755
--- /dev/null
+++ b/wrap_make
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+
+outdir="v8/out/Debug"
+system=`uname -s`
+android_build=0
+
+# the arguments are
+# [-a arch] [file1, ...] [-D outdir] -C dir ...
+#
+# -a if we are building for Android. arch target.
+# -D is the output directory to copy from
+# the rest is passed verbatim to make.
+if [ "$1" = "-a" ] ; then
+ android_build=1
+ shift
+ android_arch="$1"
+ shift
+fi
+while [ "$1" != "-D" -a "$1" != "-C" ] ; do
+ target="$target $1"
+ shift
+done
+if [ "$1" = "-D" ] ; then
+ shift
+ outdir="$1"
+ shift
+fi
+
+make $* && for t in $target ; do
+ cp $outdir/$t .
+ # When building for Android on Darwin we must execute ranlib
+ if [ $android_build -eq 1 -a "$system" = "Darwin" ] ; then
+ case "$android_arch" in
+ arm64)
+ ${ANDROID_NDK_ROOT}/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/bin/aarch64-linux-android-ranlib $t
+ ;;
+ arm)
+ ${ANDROID_NDK_ROOT}/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ranlib $t
+ ;;
+ ia32)
+ ${ANDROID_NDK_ROOT}/toolchains/x86-4.9/prebuilt/darwin-x86_64/bin/i686-linux-android-ranlib $t
+ ;;
+ x64)
+ ${ANDROID_NDK_ROOT}/toolchains/x86_64-4.9/prebuilt/darwin-x86_64/bin/x86_64-linux-android-ranlib $t
+ ;;
+ *)
+ echo "Unknown architecture $android_arch"
+ exit 255
+ ;;
+ esac
+ fi
+done
« no previous file with comments | « meson.build ('k') | wrap_make_gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld