From 7e78765a0ced3ee5dd831d47925270037e39feb2 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Wed, 5 Mar 2014 18:02:18 +0100 Subject: 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 Reviewed-by: Andras Becsi --- tools/buildscripts/gyp_qtwebengine | 18 +++++++----------- tools/qmake/mkspecs/features/functions.prf | 5 ----- 2 files changed, 7 insertions(+), 16 deletions(-) (limited to 'tools') 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") -- cgit v1.2.3