From ea5d0e516262a5258c1c0a6083511ca9fbd1fa31 Mon Sep 17 00:00:00 2001 From: "andrew@webrtc.org" Date: Thu, 9 Aug 2012 17:37:03 +0000 Subject: [PATCH] Don't target top-level test gyps if include_tests==0 Also add the possibility to pass a flag to the gyp run during gclient hooks. Review URL: https://webrtc-codereview.appspot.com/729004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2582 4adac7df-926f-26a2-2b94-8c16560cd09d --- DEPS | 4 +++- webrtc.gyp | 12 +++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/DEPS b/DEPS index ce715a3296..3031a22b99 100644 --- a/DEPS +++ b/DEPS @@ -4,6 +4,7 @@ vars = { # Override root_dir in your .gclient's custom_vars to specify a custom root # folder name. "root_dir": "trunk", + "extra_gyp_flag": "-Dextra_gyp_flag=0", # Use this googlecode_url variable only if there is an internal mirror for it. # If you do not know, use the full path while defining your new deps entry. @@ -121,7 +122,8 @@ hooks = [ # A change to a .gyp, .gypi, or to GYP itself should run the generator. "pattern": ".", "action": ["python", Var("root_dir") + "/build/gyp_chromium", - "--depth=" + Var("root_dir"), Var("root_dir") + "/webrtc.gyp"], + "--depth=" + Var("root_dir"), Var("root_dir") + "/webrtc.gyp", + Var("extra_gyp_flag")], }, ] diff --git a/webrtc.gyp b/webrtc.gyp index 74173d0241..c729eb87ac 100644 --- a/webrtc.gyp +++ b/webrtc.gyp @@ -19,11 +19,17 @@ 'src/system_wrappers/source/system_wrappers.gyp:*', 'src/video_engine/video_engine.gyp:*', 'src/voice_engine/voice_engine.gyp:*', - 'src/test/metrics.gyp:*', - 'src/test/test.gyp:*', - 'tools/e2e_quality/e2e_quality.gyp:*', '<(webrtc_vp8_dir)/vp8.gyp:*' ], + 'conditions': [ + ['include_tests==1', { + 'dependencies': [ + 'src/test/metrics.gyp:*', + 'src/test/test.gyp:*', + 'tools/e2e_quality/e2e_quality.gyp:*', + ], + }], + ], }, ], }