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

Unified Diff: build/scan_sources.py

Issue 336993003: Fix untrusted.gypi to generate correct list of dependecies (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 6 years, 6 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/untrusted.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/scan_sources.py
===================================================================
--- build/scan_sources.py (revision 13368)
+++ build/scan_sources.py (working copy)
@@ -3,7 +3,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-from optparse import OptionParser
import os
import re
import sys
@@ -263,21 +262,26 @@
def DoMain(argv):
"""Entry point used by gyp's pymod_do_main feature."""
global debug
- parser = OptionParser()
- parser.add_option('-I', dest='includes', action='append',
- help='Set include path.')
- parser.add_option('-D', dest='debug', action='store_true',
- help='Enable debugging output.', default=False)
- (options, files) = parser.parse_args(argv)
- if options.debug:
- debug = True
-
resolver = Resolver()
- if options.includes:
- if not resolver.AddDirectories(options.includes):
- return (-1, None)
+ files = []
+ arg_type = ''
+ for arg in argv:
+ if arg in ['-I', '-S']:
+ arg_type = arg
+ elif arg == '-D':
+ debug = True
+ elif arg_type == '-I':
+ # Skip generated include directories. These files may not exist and
+ # there should be explicit dependency on the target that generates
+ # these files.
+ if arg.startswith('$!PRODUCT_DIR'):
+ continue
+ resolver.AddDirectories([arg])
+ elif arg_type == '-S':
+ files.append(arg)
+
workQ = WorkQueue(resolver)
for filename in files:
workQ.PushIfNew(filename)
« no previous file with comments | « no previous file | build/untrusted.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698