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

Unified Diff: build/gyp_chromium

Issue 140763006: Use ~/.gyp/include.gypi in GN build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix error if .gyp doesn't exist Created 6 years, 11 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
« no previous file with comments | « no previous file | build/toolchain/linux/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/gyp_chromium
diff --git a/build/gyp_chromium b/build/gyp_chromium
index e316adfd65107eb5fdf238b660a0e204926f98c2..29dedc39d54368cb79db2dcd6f4d81282dfddc6b 100755
--- a/build/gyp_chromium
+++ b/build/gyp_chromium
@@ -129,6 +129,28 @@ def GetArgsStringForGN(supplemental_files):
"""Returns the args to pass to GN.
Based on a subset of the GYP variables that have been rewritten a bit."""
+ # Find the .gyp directory in the user's home directory.
+ home_dot_gyp = os.environ.get('GYP_CONFIG_DIR', None)
+ if home_dot_gyp:
+ home_dot_gyp = os.path.expanduser(home_dot_gyp)
+ if not home_dot_gyp:
+ home_vars = ['HOME']
+ if sys.platform in ('cygwin', 'win32'):
+ home_vars.append('USERPROFILE')
+ for home_var in home_vars:
+ home = os.getenv(home_var)
+ if home != None:
+ home_dot_gyp = os.path.join(home, '.gyp')
+ if not os.path.exists(home_dot_gyp):
+ home_dot_gyp = None
+ else:
+ break
+
+ if home_dot_gyp:
+ include_gypi = os.path.join(home_dot_gyp, "include.gypi")
+ if os.path.exists(include_gypi):
+ supplemental_files += [include_gypi]
+
vars_dict = GetGypVarsForGN(supplemental_files)
gn_args = ''
« no previous file with comments | « no previous file | build/toolchain/linux/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698