summaryrefslogtreecommitdiffstats
path: root/tools/qmake/mkspecs/features/functions.prf
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@theqtcompany.com>2016-10-20 13:09:01 +0200
committerMichal Klocek <michal.klocek@qt.io>2016-11-11 10:52:57 +0000
commite70b59112104b72e794c20f7c715482809780d32 (patch)
treeb4956f3146412d490127738a7166873f7f2341da /tools/qmake/mkspecs/features/functions.prf
parentda27d9e35e23719a828d563998741da8c6f40bc1 (diff)
Add out of source builds for ninja bootstrap
Instead of coping the src ninja files to shadow dir, do out of source build. Change-Id: I00c577e5def66c0415681deab63b7c7947a39200 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tools/qmake/mkspecs/features/functions.prf')
-rw-r--r--tools/qmake/mkspecs/features/functions.prf21
1 files changed, 5 insertions, 16 deletions
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index 94aa617e7..374152940 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -264,28 +264,17 @@ defineReplace(findOrBuildNinja) {
!exists($$out) {
src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT")
- out = $$shadowed($$absolute_path("ninja/ninja", "$$src_3rd_party_dir"))
+ out = $$shadowed($$absolute_path(ninja/ninja, $$src_3rd_party_dir))
win32: out = $${out}.exe
- out = $$system_path($$out)
# If we did not find ninja, then we bootstrap it.
!exists($$out) {
- # If we are making a shadow build, copy the ninja sources to the build directory.
- !equals(PWD, $${OUT_PWD}) {
- log("Build directory is different from source directory - copying ninja sources to the build tree...")
- shadow_3rd_party_path = $$system_path($$shadowed($$src_3rd_party_dir))
-
- !exists($$dirname(out)): mkpath($$dirname(out))
- copy_dir_files {
- system("$$QMAKE_COPY_DIR $$system_quote($$system_path($$absolute_path("ninja", "$$src_3rd_party_dir"))) $$system_quote($$dirname(out))")
- } else {
- system("$$QMAKE_COPY_DIR $$system_quote($$system_path($$absolute_path("ninja", "$$src_3rd_party_dir"))) $$system_quote($$shadow_3rd_party_path)")
- }
- }
- system("cd $$system_quote($$dirname(out)) && python configure.py --bootstrap")
+ 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)
+ return($$system_path($$out))
}
defineTest(skipBuild) {