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

Unified Diff: pylib/gyp/__init__.py

Issue 2122004: Add a flag to generate the Makefile in a different directory than... (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: '' Created 10 years, 7 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 | pylib/gyp/generator/make.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/__init__.py
===================================================================
--- pylib/gyp/__init__.py (revision 818)
+++ pylib/gyp/__init__.py (working copy)
@@ -265,6 +265,9 @@
help='do not read options from environment variables')
parser.add_option('--check', dest='check', action='store_true',
help='check format of gyp files')
+ parser.add_option('--toplevel-dir', dest='toplevel_dir', action='store',
+ default=None, metavar='DIR', type='path',
+ help='directory to use as the root of the source tree')
# --no-circular-check disables the check for circular relationships between
# .gyp files. These relationships should not exist, but they've only been
# observed to be harmful with the Xcode generator. Chromium's .gyp files
@@ -293,7 +296,7 @@
# TODO(thomasvl): add support for ~/.gyp/defaults
- (options, build_files_arg) = parser.parse_args(args)
+ options, build_files_arg = parser.parse_args(args)
build_files = build_files_arg
if not options.formats:
@@ -327,7 +330,7 @@
# Do an extra check to avoid work when we're not debugging.
if DEBUG_GENERAL in gyp.debug.keys():
DebugOutput(DEBUG_GENERAL, 'running with these options:')
- for (option, value) in options.__dict__.items():
+ for option, value in sorted(options.__dict__.items()):
if option[0] == '_':
continue
if isinstance(value, basestring):
@@ -370,6 +373,11 @@
'temporary Chromium feature that will be removed. Use ' + \
'--depth as a workaround.'
+ # If toplevel-dir is not set, we assume that depth is the root of our source
+ # tree.
+ if not options.toplevel_dir:
+ options.toplevel_dir = options.depth
+
# -D on the command line sets variable defaults - D isn't just for define,
# it's for default. Perhaps there should be a way to force (-F?) a
# variable's value so that it can't be overridden by anything else.
« no previous file with comments | « no previous file | pylib/gyp/generator/make.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698