def update_docs(readme=True, makefiles=True):
if readme:<EOL><INDENT>_pandoc = get_external_executable("<STR_LIT>")<EOL>rst2markdown_github(os.path.join(_HERE, "<STR_LIT>"),<EOL>os.path.join(_HERE, "<STR_LIT>"),<EOL>pandoc=_pandoc)<EOL><DEDENT>if makefiles:<EOL><INDENT>_make = get_external_executable("<STR_LIT>")<EOL>project_makefile_dir = os.path.abspath(_HERE)<EOL>project_makefile_rst = os.path.join(<EOL>_HERE,<EOL>'<STR_LIT>',<EOL>'<STR_LIT:src>',<EOL>'<STR_LIT>')<EOL>docs_makefile_dir = os.path.join(_HERE, '<STR_LIT>', '<STR_LIT:src>')<EOL>docs_makefile_rst = os.path.join(<EOL>_HERE,<EOL>'<STR_LIT>',<EOL>'<STR_LIT:src>',<EOL>'<STR_LIT>')<EOL>help2rst_queue = [<EOL>(project_makefile_dir, [_make, "<STR_LIT>"], project_makefile_rst,<EOL>"<STR_LIT>"),<EOL>(docs_makefile_dir, [_make, "<STR_LIT>"], docs_makefile_rst,<EOL>"<STR_LIT>")]<EOL>for cwd, help_cmd, outfile, title in help2rst_queue:<EOL><INDENT>console_help2rst(<EOL>cwd,<EOL>help_cmd,<EOL>outfile,<EOL>title,<EOL>format_as_code=True)<EOL><DEDENT><DEDENT>
Update documentation (ready for publishing new release)

    Usually called by ``make docs``

    :param bool make_doc: generate DOC page from Makefile help messages