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

Unified Diff: ppapi/generators/idl_parser.py

Issue 8760016: Hide private IDL files from generator behind "--include_private" flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/generators/idl_parser.py
diff --git a/ppapi/generators/idl_parser.py b/ppapi/generators/idl_parser.py
index cae12f37d834701c12218f8efb600afe288113fd..0b309e23ea6a51b63e47681ea161669d1137b4ce 100644
--- a/ppapi/generators/idl_parser.py
+++ b/ppapi/generators/idl_parser.py
@@ -45,6 +45,7 @@ Option('parse_debug', 'Debug parse reduction steps.')
Option('token_debug', 'Debug token generation.')
Option('dump_tree', 'Dump the tree.')
Option('srcroot', 'Working directory.', default=os.path.join('..', 'api'))
+Option('include_private', 'Include private IDL directory in default API paths.')
#
# ERROR_REMAP
@@ -1001,7 +1002,7 @@ def TestNamespaceFiles(filter):
InfoOut.Log("Passed namespace test.")
return errs
-default_dirs = ['.', 'trusted', 'dev', 'private']
+default_dirs = ['.', 'trusted', 'dev']
def ParseFiles(filenames):
parser = IDLParser()
filenodes = []
@@ -1009,7 +1010,10 @@ def ParseFiles(filenames):
if not filenames:
filenames = []
srcroot = GetOption('srcroot')
- for dirname in default_dirs:
+ dirs = default_dirs
+ if GetOption('include_private'):
+ dirs += ['private']
+ for dirname in dirs:
srcdir = os.path.join(srcroot, dirname, '*.idl')
srcdir = os.path.normpath(srcdir)
filenames += sorted(glob.glob(srcdir))
@@ -1047,4 +1051,3 @@ def Main(args):
if __name__ == '__main__':
sys.exit(Main(sys.argv[1:]))
-
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698