parameters: ()
docstring: Create make project files.
docstring_summary: Create make project files.
docstring_tokens: Create make project files .
function: def create_make_projects():
    """ Create make project files. """
    makefile = os.path.join(src_dir, 'Makefile')
    makefile_tmp = ''
    if path_exists(makefile):
      # Back up the existing Makefile
      makefile_tmp = makefile + '.cef_bak'
      copy_file(makefile, makefile_tmp, options.quiet)
  
    # Generate make project files
    sys.stdout.write('Generating make project files...')
    os.environ['GYP_GENERATORS'] = 'make'
    gyper = [ 'python', 'tools/gyp_cef', os.path.relpath(os.path.join(output_dir, 'cefclient.gyp'), cef_dir) ]
    RunAction(cef_dir, gyper);
  
    # Copy the resulting Makefile to the destination directory
    copy_file(makefile, output_dir, options.quiet)
  
    remove_file(makefile, options.quiet)
    if makefile_tmp != '':
      # Restore the original Makefile
      move_file(makefile_tmp, makefile, options.quiet)
  
    # Fix the output directory path in Makefile and all .mk files.
    find = os.path.relpath(output_dir, src_dir)
    files = [os.path.join(output_dir, 'Makefile')]
    for file in get_files(os.path.join(output_dir, '*.mk')):
      files.append(file)
    for file in files:
      data = read_file(file)
      data = data.replace(find, '.')
      data = data.replace('/./', '/')
      if os.path.basename(file) == 'Makefile':
        # remove the quiet_cmd_regen_makefile section
        pos = str.find(data, 'quiet_cmd_regen_makefile')
        if pos >= 0:
          epos = str.find(data, '#', pos)
          if epos >= 0:
            data = data[0:pos] + data[epos:]
      write_file(file, data)
function_tokens: def create_make_projects ( ) : makefile = os . path . join ( src_dir , 'Makefile' ) makefile_tmp = '' if path_exists ( makefile ) : # Back up the existing Makefile makefile_tmp = makefile + '.cef_bak' copy_file ( makefile , makefile_tmp , options . quiet ) # Generate make project files sys . stdout . write ( 'Generating make project files...' ) os . environ [ 'GYP_GENERATORS' ] = 'make' gyper = [ 'python' , 'tools/gyp_cef' , os . path . relpath ( os . path . join ( output_dir , 'cefclient.gyp' ) , cef_dir ) ] RunAction ( cef_dir , gyper ) # Copy the resulting Makefile to the destination directory copy_file ( makefile , output_dir , options . quiet ) remove_file ( makefile , options . quiet ) if makefile_tmp != '' : # Restore the original Makefile move_file ( makefile_tmp , makefile , options . quiet ) # Fix the output directory path in Makefile and all .mk files. find = os . path . relpath ( output_dir , src_dir ) files = [ os . path . join ( output_dir , 'Makefile' ) ] for file in get_files ( os . path . join ( output_dir , '*.mk' ) ) : files . append ( file ) for file in files : data = read_file ( file ) data = data . replace ( find , '.' ) data = data . replace ( '/./' , '/' ) if os . path . basename ( file ) == 'Makefile' : # remove the quiet_cmd_regen_makefile section pos = str . find ( data , 'quiet_cmd_regen_makefile' ) if pos >= 0 : epos = str . find ( data , '#' , pos ) if epos >= 0 : data = data [ 0 : pos ] + data [ epos : ] write_file ( file , data )