From: Arnaud Renevier Date: Thu, 12 Mar 2015 17:52:40 +0000 (-0700) Subject: Allow building content shell when xwalk directory is absent X-Git-Tag: submit/tizen/20201118.160233~1077 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e19f7b25d08ecb0e16425b1e2666a593f3a53c22;p=platform%2Fframework%2Fweb%2Fchromium-efl.git Allow building content shell when xwalk directory is absent 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 --- diff --git a/tizen_src/build/common.sh b/tizen_src/build/common.sh index 04277f4..b5d3384 100755 --- a/tizen_src/build/common.sh +++ b/tizen_src/build/common.sh @@ -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 } diff --git a/tizen_src/build/gyp_chromiumefl b/tizen_src/build/gyp_chromiumefl index 48a2bb9..759a105 100755 --- a/tizen_src/build/gyp_chromiumefl +++ b/tizen_src/build/gyp_chromiumefl @@ -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)]) diff --git a/tizen_src/build/gyp_chromiumefl.sh b/tizen_src/build/gyp_chromiumefl.sh index 64ff98f..24c142f 100755 --- a/tizen_src/build/gyp_chromiumefl.sh +++ b/tizen_src/build/gyp_chromiumefl.sh @@ -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=$?