Allow building content shell when xwalk directory is absent
authorArnaud Renevier <a.renevier@samsung.com>
Thu, 12 Mar 2015 17:52:40 +0000 (10:52 -0700)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
Currently, it's not possible to build anything if xwalk directory is not
present. It would be great if we could, because xwalk is on a separate
repository, and might not always be available.

This patch sources gyp xwalk related files only if they are to be used.
Instead of passing xwalk.gyp path to gyp_chromiumefl, a flag --xwalk is
now passed. If and only if set, gyp_chromiumefl will source xwalk.gyp
and other xwalk related gyp files.

Change-Id: I872985cbe25a684cb8e325173e21a1a09cff313b
Signed-off-by: Arnaud Renevier <a.renevier@samsung.com>
tizen_src/build/common.sh
tizen_src/build/gyp_chromiumefl
tizen_src/build/gyp_chromiumefl.sh

index 04277f4..b5d3384 100755 (executable)
@@ -131,7 +131,11 @@ function parseHostBuildScriptParams() {
 
 function hostGypChromiumEfl() {
   if [[ $SKIP_GYP == 0 ]]; then
-    ${TOPDIR}/tizen_src/build/gyp_chromiumefl.sh $@
+    local XWALK_ARG=""
+    if [[ $BUILD_XWALK == 1 ]]; then
+      XWALK_ARG="--xwalk"
+    fi
+    ${TOPDIR}/tizen_src/build/gyp_chromiumefl.sh $XWALK_ARG $@
   fi
 }
 
index 48a2bb9..759a105 100755 (executable)
@@ -6,7 +6,11 @@ import subprocess
 import sys
 
 top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
-xwalk_dir = os.path.join(top_dir, '..', 'xwalk')
+if '--xwalk' in sys.argv:
+  xwalk_dir = os.path.join(top_dir, '..', 'xwalk')
+  sys.argv.remove('--xwalk')
+else:
+  xwalk_dir = None
 chrome_src = os.environ.get('CHROME_SRC')
 if chrome_src:
   chrome_src = os.path.abspath(chrome_src)
@@ -79,7 +83,8 @@ def additional_include_files(args=[]):
       result.append(path)
 
   # Include xwalk common.gypi to effect chromium source tree.
-  AddInclude(os.path.join(xwalk_dir, 'build', 'common.gypi'))
+  if xwalk_dir:
+    AddInclude(os.path.join(xwalk_dir, 'build', 'common.gypi'))
 
   # Always include common.gypi.
   AddInclude(os.path.join(script_dir, 'common.gypi'))
@@ -127,7 +132,9 @@ if __name__ == '__main__':
 
   if not gyp_file_specified:
       args.append(os.path.join(top_dir, 'ewk', 'chromium-ewk.gyp'))
-      args.append(os.path.join(xwalk_dir, 'xwalk.gyp'))
+
+  if xwalk_dir:
+    args.append(os.path.join(xwalk_dir, 'xwalk.gyp'))
 
   args.extend(['-I' + i for i in additional_include_files(args)])
 
index 64ff98f..24c142f 100755 (executable)
@@ -189,8 +189,7 @@ done
 
 ${TOPDIR}/tizen_src/build/gyp_chromiumefl \
     ${_GYP_ARGS} \
-    ${TOPDIR}/tizen_src/ewk/chromium-ewk.gyp \
-    ${TOPDIR}/xwalk/xwalk.gyp
+    ${TOPDIR}/tizen_src/ewk/chromium-ewk.gyp
 
 ret=$?