parameters: (params, root_makefile, makefile_name,
                                build_files)
docstring: Write the target to regenerate the Makefile.
docstring_summary: Write the target to regenerate the Makefile.
docstring_tokens: Write the target to regenerate the Makefile .
function: def WriteAutoRegenerationRule(params, root_makefile, makefile_name,
                                build_files):
    """Write the target to regenerate the Makefile."""
    options = params['options']
    # Sort to avoid non-functional changes to makefile.
    build_files = sorted([os.path.join('$(LOCAL_PATH)', f) for f in build_files])
    build_files_args = [gyp.common.RelativePath(filename, options.toplevel_dir)
                        for filename in params['build_files_arg']]
    build_files_args = [os.path.join('$(PRIVATE_LOCAL_PATH)', f)
                        for f in build_files_args]
    gyp_binary = gyp.common.FixIfRelativePath(params['gyp_binary'],
                                              options.toplevel_dir)
    makefile_path = os.path.join('$(LOCAL_PATH)', makefile_name)
    if not gyp_binary.startswith(os.sep):
      gyp_binary = os.path.join('.', gyp_binary)
    root_makefile.write('GYP_FILES := \\\n  %s\n\n' %
                        '\\\n  '.join(map(Sourceify, build_files)))
    root_makefile.write('%s: PRIVATE_LOCAL_PATH := $(LOCAL_PATH)\n' %
                        makefile_path)
    root_makefile.write('%s: $(GYP_FILES)\n' % makefile_path)
    root_makefile.write('\techo ACTION Regenerating $@\n\t%s\n\n' %
        gyp.common.EncodePOSIXShellList([gyp_binary, '-fandroid'] +
                                        gyp.RegenerateFlags(options) +
                                        build_files_args))
function_tokens: def WriteAutoRegenerationRule ( params , root_makefile , makefile_name , build_files ) : options = params [ 'options' ] # Sort to avoid non-functional changes to makefile. build_files = sorted ( [ os . path . join ( '$(LOCAL_PATH)' , f ) for f in build_files ] ) build_files_args = [ gyp . common . RelativePath ( filename , options . toplevel_dir ) for filename in params [ 'build_files_arg' ] ] build_files_args = [ os . path . join ( '$(PRIVATE_LOCAL_PATH)' , f ) for f in build_files_args ] gyp_binary = gyp . common . FixIfRelativePath ( params [ 'gyp_binary' ] , options . toplevel_dir ) makefile_path = os . path . join ( '$(LOCAL_PATH)' , makefile_name ) if not gyp_binary . startswith ( os . sep ) : gyp_binary = os . path . join ( '.' , gyp_binary ) root_makefile . write ( 'GYP_FILES := \\\n  %s\n\n' % '\\\n  ' . join ( map ( Sourceify , build_files ) ) ) root_makefile . write ( '%s: PRIVATE_LOCAL_PATH := $(LOCAL_PATH)\n' % makefile_path ) root_makefile . write ( '%s: $(GYP_FILES)\n' % makefile_path ) root_makefile . write ( '\techo ACTION Regenerating $@\n\t%s\n\n' % gyp . common . EncodePOSIXShellList ( [ gyp_binary , '-fandroid' ] + gyp . RegenerateFlags ( options ) + build_files_args ) )