From 1906f2132a0612a96822c095fae68bf24a27faa3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Fri, 7 Oct 2016 12:10:17 -0400
Subject: [PATCH] build: make swig once

Change-Id: Iff84f3554fd87087b2b2b2388d41cb2aa35c5488
Reviewed-by: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
---
 build-daemon.sh | 2 --
 compile.sh      | 4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/build-daemon.sh b/build-daemon.sh
index 30a30fea2..f516c3389 100755
--- a/build-daemon.sh
+++ b/build-daemon.sh
@@ -217,9 +217,7 @@ export RING_SRC_DIR="${RING_SRC_DIR}"
 export RING_BUILD_DIR="${RING_BUILD_DIR}"
 
 mkdir -p build-android-${TARGET_TUPLE}
-cd build-android-${TARGET_TUPLE}
 cd ${ANDROID_APP_DIR}
-./make-swig.sh
 
 if [ ! -f config.h ]; then
     echo "Bootstraping"
diff --git a/compile.sh b/compile.sh
index 893edf42f..894373615 100755
--- a/compile.sh
+++ b/compile.sh
@@ -6,6 +6,10 @@ if [ -z "$ANDROID_ABI" ]; then
     echo "ANDROID_ABI not provided, building for ${ANDROID_ABI}"
 fi
 
+pushd ring-android
+./make-swig.sh
+popd
+
 ANDROID_ABIS=""
 ANDROID_ABI_LIST="${ANDROID_ABI}"
 echo "Building ABIs: ${ANDROID_ABI_LIST}"
-- 
GitLab