parameters: (tc_dst_inc, pepper_ver, tc_name)
docstring: Copies NaCl headers to expected locations in the toolchain.
docstring_summary: Copies NaCl headers to expected locations in the toolchain.
docstring_tokens: Copies NaCl headers to expected locations in the toolchain .
function: def InstallHeaders(tc_dst_inc, pepper_ver, tc_name):
    """Copies NaCl headers to expected locations in the toolchain."""
    tc_map = HEADER_MAP[tc_name]
    for filename in tc_map:
      src = os.path.join(NACL_DIR, tc_map[filename])
      dst = os.path.join(tc_dst_inc, filename)
      buildbot_common.MakeDir(os.path.dirname(dst))
      buildbot_common.CopyFile(src, dst)
  
    # Clean out per toolchain ppapi directory
    ppapi = os.path.join(tc_dst_inc, 'ppapi')
    buildbot_common.RemoveDir(ppapi)
  
    # Copy in c and c/dev headers
    buildbot_common.MakeDir(os.path.join(ppapi, 'c', 'dev'))
    buildbot_common.CopyDir(os.path.join(PPAPI_DIR, 'c', '*.h'),
            os.path.join(ppapi, 'c'))
    buildbot_common.CopyDir(os.path.join(PPAPI_DIR, 'c', 'dev', '*.h'),
            os.path.join(ppapi, 'c', 'dev'))
  
    # Run the generator to overwrite IDL files
    buildbot_common.Run([sys.executable, 'generator.py', '--wnone', '--cgen',
         '--release=M' + pepper_ver, '--verbose', '--dstroot=%s/c' % ppapi],
         cwd=os.path.join(PPAPI_DIR, 'generators'))
  
    # Remove private and trusted interfaces
    buildbot_common.RemoveDir(os.path.join(ppapi, 'c', 'private'))
    buildbot_common.RemoveDir(os.path.join(ppapi, 'c', 'trusted'))
  
    # Copy in the C++ headers
    buildbot_common.MakeDir(os.path.join(ppapi, 'cpp', 'dev'))
    buildbot_common.CopyDir(os.path.join(PPAPI_DIR, 'cpp','*.h'),
            os.path.join(ppapi, 'cpp'))
    buildbot_common.CopyDir(os.path.join(PPAPI_DIR, 'cpp', 'dev', '*.h'),
            os.path.join(ppapi, 'cpp', 'dev'))
    buildbot_common.MakeDir(os.path.join(ppapi, 'utility', 'graphics'))
    buildbot_common.CopyDir(os.path.join(PPAPI_DIR, 'utility','*.h'),
            os.path.join(ppapi, 'utility'))
    buildbot_common.CopyDir(os.path.join(PPAPI_DIR, 'utility', 'graphics', '*.h'),
            os.path.join(ppapi, 'utility', 'graphics'))
  
    # Copy in the gles2 headers
    buildbot_common.MakeDir(os.path.join(ppapi, 'gles2'))
    buildbot_common.CopyDir(os.path.join(PPAPI_DIR,'lib','gl','gles2','*.h'),
            os.path.join(ppapi, 'gles2'))
  
    # Copy the EGL headers
    buildbot_common.MakeDir(os.path.join(tc_dst_inc, 'EGL'))
    buildbot_common.CopyDir(
            os.path.join(PPAPI_DIR,'lib','gl','include','EGL', '*.h'),
            os.path.join(tc_dst_inc, 'EGL'))
  
    # Copy the GLES2 headers
    buildbot_common.MakeDir(os.path.join(tc_dst_inc, 'GLES2'))
    buildbot_common.CopyDir(
            os.path.join(PPAPI_DIR,'lib','gl','include','GLES2', '*.h'),
            os.path.join(tc_dst_inc, 'GLES2'))
  
    # Copy the KHR headers
    buildbot_common.MakeDir(os.path.join(tc_dst_inc, 'KHR'))
    buildbot_common.CopyDir(
            os.path.join(PPAPI_DIR,'lib','gl','include','KHR', '*.h'),
            os.path.join(tc_dst_inc, 'KHR'))
function_tokens: def InstallHeaders ( tc_dst_inc , pepper_ver , tc_name ) : tc_map = HEADER_MAP [ tc_name ] for filename in tc_map : src = os . path . join ( NACL_DIR , tc_map [ filename ] ) dst = os . path . join ( tc_dst_inc , filename ) buildbot_common . MakeDir ( os . path . dirname ( dst ) ) buildbot_common . CopyFile ( src , dst ) # Clean out per toolchain ppapi directory ppapi = os . path . join ( tc_dst_inc , 'ppapi' ) buildbot_common . RemoveDir ( ppapi ) # Copy in c and c/dev headers buildbot_common . MakeDir ( os . path . join ( ppapi , 'c' , 'dev' ) ) buildbot_common . CopyDir ( os . path . join ( PPAPI_DIR , 'c' , '*.h' ) , os . path . join ( ppapi , 'c' ) ) buildbot_common . CopyDir ( os . path . join ( PPAPI_DIR , 'c' , 'dev' , '*.h' ) , os . path . join ( ppapi , 'c' , 'dev' ) ) # Run the generator to overwrite IDL files buildbot_common . Run ( [ sys . executable , 'generator.py' , '--wnone' , '--cgen' , '--release=M' + pepper_ver , '--verbose' , '--dstroot=%s/c' % ppapi ] , cwd = os . path . join ( PPAPI_DIR , 'generators' ) ) # Remove private and trusted interfaces buildbot_common . RemoveDir ( os . path . join ( ppapi , 'c' , 'private' ) ) buildbot_common . RemoveDir ( os . path . join ( ppapi , 'c' , 'trusted' ) ) # Copy in the C++ headers buildbot_common . MakeDir ( os . path . join ( ppapi , 'cpp' , 'dev' ) ) buildbot_common . CopyDir ( os . path . join ( PPAPI_DIR , 'cpp' , '*.h' ) , os . path . join ( ppapi , 'cpp' ) ) buildbot_common . CopyDir ( os . path . join ( PPAPI_DIR , 'cpp' , 'dev' , '*.h' ) , os . path . join ( ppapi , 'cpp' , 'dev' ) ) buildbot_common . MakeDir ( os . path . join ( ppapi , 'utility' , 'graphics' ) ) buildbot_common . CopyDir ( os . path . join ( PPAPI_DIR , 'utility' , '*.h' ) , os . path . join ( ppapi , 'utility' ) ) buildbot_common . CopyDir ( os . path . join ( PPAPI_DIR , 'utility' , 'graphics' , '*.h' ) , os . path . join ( ppapi , 'utility' , 'graphics' ) ) # Copy in the gles2 headers buildbot_common . MakeDir ( os . path . join ( ppapi , 'gles2' ) ) buildbot_common . CopyDir ( os . path . join ( PPAPI_DIR , 'lib' , 'gl' , 'gles2' , '*.h' ) , os . path . join ( ppapi , 'gles2' ) ) # Copy the EGL headers buildbot_common . MakeDir ( os . path . join ( tc_dst_inc , 'EGL' ) ) buildbot_common . CopyDir ( os . path . join ( PPAPI_DIR , 'lib' , 'gl' , 'include' , 'EGL' , '*.h' ) , os . path . join ( tc_dst_inc , 'EGL' ) ) # Copy the GLES2 headers buildbot_common . MakeDir ( os . path . join ( tc_dst_inc , 'GLES2' ) ) buildbot_common . CopyDir ( os . path . join ( PPAPI_DIR , 'lib' , 'gl' , 'include' , 'GLES2' , '*.h' ) , os . path . join ( tc_dst_inc , 'GLES2' ) ) # Copy the KHR headers buildbot_common . MakeDir ( os . path . join ( tc_dst_inc , 'KHR' ) ) buildbot_common . CopyDir ( os . path . join ( PPAPI_DIR , 'lib' , 'gl' , 'include' , 'KHR' , '*.h' ) , os . path . join ( tc_dst_inc , 'KHR' ) )