Commit 2069a3c0 authored by jvoung@google.com's avatar jvoung@google.com

Hide private IDL files from generator behind "--include_private" flag

until all the private IDL files can generate the correct .h files.

BUG= none
TEST= ./generator.py && ./generator.py --wnone --cgen --range=start,end --include_private --out private/ppb_flash_fullscreen.idl

R=noelallen@chromium.org,piman@chromium.org


Review URL: http://codereview.chromium.org/8760016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112373 0039d316-1c4b-4281-b951-d872f2087c98
parent 08f1c5ed
......@@ -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:]))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment