From: SangYong Park Date: Thu, 15 Mar 2018 05:15:52 +0000 (+0900) Subject: Call bootstrap when needed X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dceb60b178ca1d299dee55ad15d00c5d7e76afd4;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Call bootstrap when needed bootstrap and build take a lot of times. bootstrap is not necessary without change build configuration. so do not call after bootstrap is called once. Change-Id: If17c5e2de9a8a6bb85de2bb9bd811b31a185a553 Signed-off-by: SangYong Park --- diff --git a/packaging/electron-efl.spec b/packaging/electron-efl.spec index cbc261fb9..67b8cef1d 100755 --- a/packaging/electron-efl.spec +++ b/packaging/electron-efl.spec @@ -82,12 +82,14 @@ DEFINE_ARGS+=" " %endif +%if "%{?skipbootstrap}" != "1" ./script/bootstrap.py \ --libcc_chromium_efl_path /usr/lib \ --define "${DEFINE_ARGS}" \ --dev \ --disable_clang \ -v +%endif ./script/build.py -c D diff --git a/tizen/script/build b/tizen/script/build index 7e8b86e98..5ef809cbd 100755 --- a/tizen/script/build +++ b/tizen/script/build @@ -122,6 +122,8 @@ def build_gbs(profile, force_bootstrap, verbose): print 'Build : profile=' + profile + ' architecture=' + arch command = ['gbs', '--conf', os.path.join(SCRIPT_PATH, 'gbs.conf'), 'build', '-P', profile, '--include-all', '-A', arch, '--incremental'] + if not force_bootstrap and not need_bootstrap(profile): + command.extend(['--define=skipbootstrap 1']) return True if subprocess.call(command) == 0 else False def find_architecture(profile): @@ -132,6 +134,15 @@ def find_architecture(profile): arch = arch if arch != 'ia32' else 'i586' return arch +def need_bootstrap(profile): + # TODO: condition improvement is necessary + if profile == 'desktop': + if os.path.isdir(os.path.join(ROOT_PATH, 'out')): + return False + elif os.path.isdir(os.path.join(ROOT_PATH, 'out.tizen', 'out')): + return False + return True + def build_desktop(chromium_path, force_bootstrap, verbose): if chromium_path is None: parent_path = os.path.dirname(ROOT_PATH) @@ -142,9 +153,10 @@ def build_desktop(chromium_path, force_bootstrap, verbose): else: chromium_path = os.path.abspath(chromium_path) - if not run_bootstrap(chromium_path, verbose): - print('Fail to run bootstrap script') - return False + if force_bootstrap or need_bootstrap('desktop'): + if not run_bootstrap(chromium_path, verbose): + print('Fail to run bootstrap script') + return False subprocess.call([os.path.join(ROOT_PATH, 'script', 'build.py'), '-c', 'D']) return True