Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Unified Diff: build/gyp_chromium

Issue 206006: Force inclusion of build/common.gypi for all chromium gyp files. (Closed)
Patch Set: 2nd round of feedback Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/gyp_chromium
diff --git a/build/gyp_chromium b/build/gyp_chromium
new file mode 100644
index 0000000000000000000000000000000000000000..017d2980aa1d018ddb4942e1d1a71336b1d3e25c
--- /dev/null
+++ b/build/gyp_chromium
@@ -0,0 +1,37 @@
+#!/usr/bin/python
+
+# This script is wrapper for Chromium that adds some support for how GYP
+# is invoked by Chromium beyond what can be done it the gclient hooks.
+
+import glob
+import os
+import shlex
+import sys
+
+print 'Updating projects from gyp files...'
+
+try:
+ import gyp
+except ImportError, e:
+ sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), '../tools/gyp/pylib'))
+ import gyp
+
+if __name__ == '__main__':
+ args = sys.argv[1:]
+
+ # If we didn't get a file, check an env var, and then fall back to
+ # assuming 'src/build/all.gyp'
+ if len(args) == 0:
+ args += shlex.split(os.environ.get('CHROMIUM_GYP_FILE',
+ 'src/build/all.gyp'))
+
+ # Always include gyp_chromium.gypi
+ args += ['-I', os.path.join(os.path.dirname(sys.argv[0]),'common.gypi')]
+
+ # Optionally add supplemental .gypi files if present.
+ supplements = glob.glob('src/*/supplement.gypi')
+ for supplement in supplements:
+ args += ['-I', supplement]
+
+ # Off we go...
+ sys.exit(gyp.main(args))

Powered by Google App Engine
This is Rietveld 408576698