From 3d000cfc013158f56c0b088c9ee99b03938ef50b Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Fri, 21 Oct 2016 18:03:36 +0200 Subject: Split ninja target into runninja and buildninja in gyp_run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Small refactor to split the targets in makefile. Bootstrapping gn will need also ninja build. Change-Id: Id177a0189b79cf353b6bd27c4e087f4e960f56c2 Reviewed-by: Michael BrĂ¼ning --- tools/qmake/mkspecs/features/functions.prf | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'tools') diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf index d0a922f9c..fbd92b133 100644 --- a/tools/qmake/mkspecs/features/functions.prf +++ b/tools/qmake/mkspecs/features/functions.prf @@ -368,23 +368,24 @@ defineTest(use?) { return(false) } -defineReplace(buildNinja) { - +defineReplace(ninjaPath) { src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT") - out = $$shadowed($$absolute_path(ninja/ninja, $$src_3rd_party_dir)) win32: out = $${out}.exe - - # check if it is not already built - !exists($$out) { - mkpath($$dirname(out)) - ninja_configure = $$absolute_path(ninja/configure.py, $$src_3rd_party_dir) - system("cd $$system_quote($$system_path($$dirname(out))) && python $$system_quote($$system_path($$ninja_configure)) --bootstrap") - } - return($$out) } +defineReplace(buildNinja) { + out = $$ninjaPath() + # check if it is not already build + !exists($$out) { + mkpath($$dirname(out)) + src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT") + ninja_configure = $$absolute_path(ninja/configure.py, $$src_3rd_party_dir) + system("cd $$system_quote($$system_path($$dirname(out))) && python $$system_quote($$system_path($$ninja_configure)) --bootstrap") + } +} + defineTest(skipBuild) { skipBuildReason = "$$skipBuildReason $${EOL}$$1" export(skipBuildReason) -- cgit v1.2.3