parameters: (webkit_dir, version_file, output_dir)
return_statement: return 0
docstring: Given webkit's version file, emit a header file that we can use from
    within webkit_glue.cc.
docstring_summary: Given webkit's version file, emit a header file that we can use from
    within webkit_glue.cc.
docstring_tokens: Given webkit s version file emit a header file that we can use from within webkit_glue . cc .
function: def EmitVersionHeader(webkit_dir, version_file, output_dir):
    '''Given webkit's version file, emit a header file that we can use from
    within webkit_glue.cc.
    '''
  
    # See .gypi file for discussion of this workaround for the version file.
    assert version_file[0] == '/'
    version_file = version_file[1:]
  
    major, minor = ReadVersionFile(os.path.join(webkit_dir, version_file))
  
    webkit_revision = GetWebKitRevision(webkit_dir, version_file)
  
    fname = os.path.join(output_dir, "webkit_version.h")
    f = open(fname, 'wb')
    template = """// webkit_version.h
  // generated from %s
  
  #define WEBKIT_VERSION_MAJOR %d
  #define WEBKIT_VERSION_MINOR %d
  #define WEBKIT_SVN_REVISION "%s"
  """ % (version_file, major, minor, webkit_revision)
    f.write(template)
    f.close()
    return 0
function_tokens: def EmitVersionHeader ( webkit_dir , version_file , output_dir ) : # See .gypi file for discussion of this workaround for the version file. assert version_file [ 0 ] == '/' version_file = version_file [ 1 : ] major , minor = ReadVersionFile ( os . path . join ( webkit_dir , version_file ) ) webkit_revision = GetWebKitRevision ( webkit_dir , version_file ) fname = os . path . join ( output_dir , "webkit_version.h" ) f = open ( fname , 'wb' ) template = """// webkit_version.h
  // generated from %s
  
  #define WEBKIT_VERSION_MAJOR %d
  #define WEBKIT_VERSION_MINOR %d
  #define WEBKIT_SVN_REVISION "%s"
  """ % ( version_file , major , minor , webkit_revision ) f . write ( template ) f . close ( ) return 0