summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-03-05 18:02:18 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-07 18:19:31 +0100
commit7e78765a0ced3ee5dd831d47925270037e39feb2 (patch)
tree06789f868a2e9f6061a1f1133fc4bd6143df2c2d
parent3c2af9e9e5fe6f90dfa3d4a58bd30d60e0e211a8 (diff)
Use the shadow build directory for the ninja output
The gyp/ninja build is moved from out/(Debug|Release) to src/core/(Debug|Release). The ninja build as well as generated gyp files and python intermediate files all stay in the source tree for the moment. Change-Id: I6948380c45896540fe508238ceef9fe48e41f5af Reviewed-by: Zoltan Arvai <zarvai@inf.u-szeged.hu> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
-rw-r--r--src/core/core.pro4
-rw-r--r--src/core/core_module.pro2
-rw-r--r--src/core/gyp_run.pro8
-rwxr-xr-xtools/buildscripts/gyp_qtwebengine18
-rw-r--r--tools/qmake/mkspecs/features/functions.prf5
5 files changed, 14 insertions, 23 deletions
diff --git a/src/core/core.pro b/src/core/core.pro
index 5f0c3c29d..31a9c17f7 100644
--- a/src/core/core.pro
+++ b/src/core/core.pro
@@ -24,7 +24,7 @@ SUBDIRS += core_gyp_generator \
gyp_run \
core_module
-REPACK_DIR = $$getOutDir()/$$getConfigDir()/gen/repack
+REPACK_DIR = $$OUT_PWD/$$getConfigDir()/gen/repack
locales.files = $$REPACK_DIR/qtwebengine_locales
locales.CONFIG += no_check_exist
locales.path = $$[QT_INSTALL_TRANSLATIONS]
@@ -40,7 +40,7 @@ win32 {
PLUGIN_PREFIX =
}
-plugins.files = $$getOutDir()/$$getConfigDir()/$${PLUGIN_PREFIX}ffmpegsumo$${PLUGIN_EXTENSION}
+plugins.files = $$OUT_PWD/$$getConfigDir()/$${PLUGIN_PREFIX}ffmpegsumo$${PLUGIN_EXTENSION}
plugins.CONFIG += no_check_exist
plugins.path = $$[QT_INSTALL_PLUGINS]/qtwebengine
diff --git a/src/core/core_module.pro b/src/core/core_module.pro
index 22d3d8646..23503e32e 100644
--- a/src/core/core_module.pro
+++ b/src/core/core_module.pro
@@ -5,7 +5,7 @@ QT += qml quick
QT_PRIVATE += qml-private quick-private gui-private core-private
# Look for linking information produced by gyp for our target according to core_generated.gyp
-!include($$getOutDir()/$$getConfigDir()/$${TARGET}_linking.pri) {
+!include($$OUT_PWD/$$getConfigDir()/$${TARGET}_linking.pri) {
error("Could not find the linking information that gyp should have generated.")
}
diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro
index 830844fe8..5ef289b1b 100644
--- a/src/core/gyp_run.pro
+++ b/src/core/gyp_run.pro
@@ -61,19 +61,19 @@ cross_compile {
win32 {
# Libvpx build needs additional search path on Windows.
git_chromium_src_dir = $$system("git config qtwebengine.chromiumsrcdir")
-GYP_ARGS += "-D qtwe_chromium_obj_dir=\"$$getOutDir()/$$getConfigDir()/obj/$$git_chromium_src_dir\""
+GYP_ARGS += "-D qtwe_chromium_obj_dir=\"$$OUT_PWD/$$getConfigDir()/obj/$$git_chromium_src_dir\""
# Use path from environment for perl, bison and gperf instead of values set in WebKit's core.gypi.
GYP_ARGS += "-D perl_exe=\"perl.exe\" -D bison_exe=\"bison.exe\" -D gperf_exe=\"gperf.exe\""
}
!build_pass {
- message(Running gyp_qtwebengine $${GYP_ARGS}...)
- !system("python $$QTWEBENGINE_ROOT/tools/buildscripts/gyp_qtwebengine $${GYP_ARGS}"): error("-- running gyp_qtwebengine failed --")
+ message("Running gyp_qtwebengine \"$$OUT_PWD\" $${GYP_ARGS}...")
+ !system("python $$QTWEBENGINE_ROOT/tools/buildscripts/gyp_qtwebengine \"$$OUT_PWD\" $${GYP_ARGS}"): error("-- running gyp_qtwebengine failed --")
}
ninja.target = invoke_ninja
-ninja.commands = $$findOrBuildNinja() \$\(NINJAFLAGS\) -C $$getOutDir()/$$getConfigDir()
+ninja.commands = $$findOrBuildNinja() \$\(NINJAFLAGS\) -C "$$OUT_PWD/$$getConfigDir()"
QMAKE_EXTRA_TARGETS += ninja
build_pass:build_all:default_target.target = all
diff --git a/tools/buildscripts/gyp_qtwebengine b/tools/buildscripts/gyp_qtwebengine
index 884f57b27..12a6427d8 100755
--- a/tools/buildscripts/gyp_qtwebengine
+++ b/tools/buildscripts/gyp_qtwebengine
@@ -68,16 +68,12 @@ def additional_include_files(args=[]):
return result
-# TODO: later we probably want to hook that up with qmake to allow shadow builds. (Might not play nice with the rest of chromium though)
-def get_output_dir():
- outdir = os.path.join(root_dir, "out") # Hardcode for now
- if not os.path.isdir(outdir):
- os.mkdir(outdir)
-
- return outdir
-
if __name__ == '__main__':
- args = sys.argv[1:]
+ output_dir = sys.argv[1]
+ if not os.path.isdir(output_dir):
+ os.mkdir(output_dir)
+
+ args = sys.argv[2:]
# On Mac we want to override CXX and CC that is provided with
# the Chromium GYP environment.
@@ -139,8 +135,8 @@ if __name__ == '__main__':
# Trigger Qt-specific build conditions.
args.extend(['-D', 'use_qt=1'])
# Tweak the output location and format (hardcode ninja for now if not set)
- args.extend(['--generator-output', os.path.abspath(get_output_dir())])
- args.extend(['-Goutput_dir='+ os.path.abspath(get_output_dir())])
+ args.extend(['--generator-output', os.path.abspath(output_dir)])
+ args.extend(['-Goutput_dir='+ os.path.abspath(output_dir)])
if not os.environ.get('GYP_GENERATORS'):
args.extend(['--format=ninja'])
if "QTWEBENGINE_GYP_DEBUG" in os.environ:
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index 46d43be96..0814e8b4f 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -8,11 +8,6 @@ defineReplace(toGypTargetType) {
return("none")
}
-defineReplace(getOutDir) {
- # FIXME: rely on env variable in here and in the gyp_qtwebengine script, à la WEBKITOUTPUTDIR
- return("$$QTWEBENGINE_ROOT/out")
-}
-
defineReplace(getConfigDir) {
CONFIG(release, debug|release):return("Release")
return("Debug")