Changeset 179111 in webkit


Ignore:
Timestamp:
Jan 26, 2015 3:12:24 AM (9 years ago)
Author:
commit-queue@webkit.org
Message:

[GTK] gtkdoc does not appear in DevHelp
https://bugs.webkit.org/show_bug.cgi?id=139369

.:

Patch by Michael Catanzaro <Michael Catanzaro> on 2015-01-26
Reviewed by Philippe Normand.

Expect the gtkdoc to be generated in folders named with the API version.

  • Source/PlatformGTK.cmake:

Source/WebCore:

Patch by Michael Catanzaro <Michael Catanzaro> on 2015-01-26
Reviewed by Philippe Normand.

  • PlatformGTK.cmake: Include the API version in the gtkdoc filenames.

Source/WebKit2:

Patch by Michael Catanzaro <Michael Catanzaro> on 2015-01-26
Reviewed by Philippe Normand.

  • PlatformGTK.cmake: Include the API version in the gtkdoc filenames.
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Renamed from Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt.
  • UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Renamed from Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk.types.

Tools:

Patch by Michael Catanzaro <Michael Catanzaro> and Carlos Garcia Campos <cgarcia@igalia.com> on 2015-01-26
Reviewed by Philippe Normand.

  • gtk/generate-gtkdoc: Create the generators in the main function

and use them to get the local cross renference dependencies. Also
pass the generator module name to webkitdom.write_doc_files().
(get_gtkdoc_module_paths): Receive a list of local cross reference
dependencies.
(get_generator_for_config): Set the main_sgml_file property of the
GtkDoc object from the configuration file.
(generate_documentation): Generate the documentation for the given
generator.
(generate_documentation_for_config): Deleted.

  • gtk/manifest.txt.in: Expect the API version in the gtkdoc filenames.
  • gtk/webkitdom.py:

(write_doc_files): Receive the module name used to build the
-sections.txt filename.

Location:
trunk
Files:
10 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r179110 r179111  
     12015-01-26  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        [GTK] gtkdoc does not appear in DevHelp
     4        https://bugs.webkit.org/show_bug.cgi?id=139369
     5
     6        Reviewed by Philippe Normand.
     7
     8        Expect the gtkdoc to be generated in folders named with the API version.
     9
     10        * Source/PlatformGTK.cmake:
     11
    1122015-01-26  Zan Dobersek  <zdobersek@igalia.com>
    213
  • trunk/Source/PlatformGTK.cmake

    r178672 r179111  
    1010    WebKit2
    1111    "${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml"
    12     "${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt"
     12    "${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-${WEBKITGTK_API_VERSION}-sections.txt"
    1313)
    1414
    1515if (ENABLE_GTKDOC)
    16     install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkit2gtk/html/
     16    install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkit2gtk-${WEBKITGTK_API_VERSION}/html/
    1717            DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html/webkit2gtk-${WEBKITGTK_API_VERSION}"
    1818    )
    19     install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkitdomgtk/html/
     19    install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkitdomgtk-${WEBKITGTK_API_VERSION}/html/
    2020            DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html/webkitdomgtk-${WEBKITGTK_API_VERSION}"
    2121    )
  • trunk/Source/WebCore/ChangeLog

    r179105 r179111  
     12015-01-26  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        [GTK] gtkdoc does not appear in DevHelp
     4        https://bugs.webkit.org/show_bug.cgi?id=139369
     5
     6        Reviewed by Philippe Normand.
     7
     8        * PlatformGTK.cmake: Include the API version in the gtkdoc filenames.
     9
    1102015-01-25  Chris Dumez  <cdumez@apple.com>
    211
  • trunk/Source/WebCore/PlatformGTK.cmake

    r178310 r179111  
    808808
    809809file(WRITE ${CMAKE_BINARY_DIR}/gtkdoc-webkitdom.cfg
    810     "[webkitdomgtk]\n"
     810    "[webkitdomgtk-${WEBKITGTK_API_VERSION}]\n"
    811811    "pkgconfig_file=${WebKit2_PKGCONFIG_FILE}\n"
    812812    "namespace=webkit_dom\n"
     
    819819    "            ${WEBCORE_DIR}/bindings/gobject\n"
    820820    "headers=${GObjectDOMBindingsStable_INSTALLED_HEADERS}\n"
     821    "main_sgml_file=webkitdomgtk-docs.sgml\n"
    821822)
    822823
  • trunk/Source/WebKit2/ChangeLog

    r179087 r179111  
     12015-01-26  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        [GTK] gtkdoc does not appear in DevHelp
     4        https://bugs.webkit.org/show_bug.cgi?id=139369
     5
     6        Reviewed by Philippe Normand.
     7
     8        * PlatformGTK.cmake: Include the API version in the gtkdoc filenames.
     9        * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Renamed from Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt.
     10        * UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Renamed from Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk.types.
     11
    1122015-01-25  Timothy Horton  <timothy_horton@apple.com>
    213
  • trunk/Source/WebKit2/PlatformGTK.cmake

    r179007 r179111  
    938938
    939939file(WRITE ${CMAKE_BINARY_DIR}/gtkdoc-webkit2gtk.cfg
    940     "[webkit2gtk]\n"
     940    "[webkit2gtk-${WEBKITGTK_API_VERSION}]\n"
    941941    "pkgconfig_file=${WebKit2_PKGCONFIG_FILE}\n"
    942942    "namespace=webkit\n"
     
    950950    "            ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}\n"
    951951    "headers=${WebKit2GTK_ENUM_GENERATION_HEADERS} ${WebKit2WebExtension_INSTALLED_HEADERS}\n"
     952    "main_sgml_file=webkit2gtk-docs.sgml\n"
    952953)
    953954
  • trunk/Tools/ChangeLog

    r179109 r179111  
     12015-01-26  Michael Catanzaro  <mcatanzaro@igalia.com> and Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] gtkdoc does not appear in DevHelp
     4        https://bugs.webkit.org/show_bug.cgi?id=139369
     5
     6        Reviewed by Philippe Normand.
     7
     8        * gtk/generate-gtkdoc: Create the generators in the main function
     9        and use them to get the local cross renference dependencies. Also
     10        pass the generator module name to webkitdom.write_doc_files().
     11        (get_gtkdoc_module_paths): Receive a list of local cross reference
     12        dependencies.
     13        (get_generator_for_config): Set the main_sgml_file property of the
     14        GtkDoc object from the configuration file.
     15        (generate_documentation): Generate the documentation for the given
     16        generator.
     17        (generate_documentation_for_config): Deleted.
     18        * gtk/manifest.txt.in: Expect the API version in the gtkdoc filenames.
     19        * gtk/webkitdom.py:
     20        (write_doc_files): Receive the module name used to build the
     21        -sections.txt filename.
     22
    1232015-01-26  Commit Queue  <commit-queue@webkit.org>
    224
  • trunk/Tools/gtk/generate-gtkdoc

    r175793 r179111  
    4444        handler.setFormatter(logging.Formatter('%(message)s'))
    4545
    46 def get_gtkdoc_module_paths():
     46def get_gtkdoc_module_paths(cross_reference_deps):
    4747    dependent_packages = {
    4848        'glib-2.0' : ['glib', 'gobject', 'gio'],
     
    6060        for module in modules:
    6161            paths.append(os.path.join(prefix, html_dir, module))
    62     # This technically is not needed for the GObject DOM bindings documentation itself,
    63     # but adding it doesn't hurt and allows us to avoid a check here.
    64     paths.append(common.build_path('Documentation', 'webkitdomgtk', 'html'))
     62
     63    for local_dep in cross_reference_deps:
     64        paths.append(common.build_path('Documentation', local_dep, 'html'))
    6565    return paths
    6666
     
    9999    return filter(file_should_be_ignored, all_files)
    100100
    101 def get_generator_for_config(config_file, virtual_root):
     101def get_generator_for_config(config_file, virtual_root, cross_reference_deps = []):
    102102    if not os.path.isfile(config_file):
    103103        return None
     
    122122        'doc_dir': config.get(module_name, 'doc_dir'),
    123123        'output_dir': common.build_path('Documentation', module_name),
     124        'main_sgml_file': config.get(module_name, 'main_sgml_file'),
    124125        'source_dirs': source_dirs,
    125126        'headers': headers,
    126127        'cflags': " ".join(config.get(module_name, 'cflags').split()),
    127         'cross_reference_deps': get_gtkdoc_module_paths(),
     128        'cross_reference_deps': get_gtkdoc_module_paths(cross_reference_deps),
    128129        'ignored_files': files_to_ignore(source_dirs, headers),
    129130    })
     
    143144        print("Rebase did not happen, likely no documentation is present.")
    144145
    145 def generate_documentation_for_config(config_file):
    146     generator = get_generator_for_config(config_file, arguments.virtual_root)
    147     if not generator:
    148         print("{0} does not exist! Skipping that documentation.".format(os.path.basename(config_file)))
    149         return
    150 
     146def generate_documentation(generator):
    151147    if not arguments.rebase:
    152148        return generate_doc(generator, arguments.skip_html)
     
    198194    prepare_environment_for_gtkdoc_generation()
    199195
    200     webkitdom.write_doc_files()
    201     generate_documentation_for_config(common.build_path('gtkdoc-webkitdom.cfg'))
    202     saw_warnings = generate_documentation_for_config(common.build_path('gtkdoc-webkit2gtk.cfg'))
     196    webkitdom_generator = get_generator_for_config(common.build_path('gtkdoc-webkitdom.cfg'), arguments.virtual_root)
     197    if not webkitdom_generator:
     198        print("gtkdoc-webkitdom.cfg does not exist! Skipping that documentation")
     199        sys.exit(1)
     200    webkitdom.write_doc_files(webkitdom_generator.module_name)
     201    saw_warnings = generate_documentation(webkitdom_generator)
     202    if saw_warnings:
     203        sys.exit(saw_warnings)
     204
     205    webkit2_generator = get_generator_for_config(common.build_path('gtkdoc-webkit2gtk.cfg'), arguments.virtual_root, [webkitdom_generator.module_name])
     206    if not webkit2_generator:
     207        print("gtkdoc-webkit2gtk.cfg does not exist! Skipping that documentation")
     208        sys.exit(1)
     209    saw_warnings = generate_documentation(webkit2_generator)
    203210
    204211    sys.exit(saw_warnings)
  • trunk/Tools/gtk/manifest.txt.in

    r178672 r179111  
    103103file Tools/jhbuild/jhbuildutils.py
    104104
    105 directory ${CMAKE_BINARY_DIR}/Documentation/webkit2gtk/html Documentation/webkit2gtk/html
    106 directory ${CMAKE_BINARY_DIR}/Documentation/webkitdomgtk/html Documentation/webkitdomgtk/html
     105directory ${CMAKE_BINARY_DIR}/Documentation/webkit2gtk-${WEBKITGTK_API_VERSION}/html Documentation/webkit2gtk-${WEBKITGTK_API_VERSION}/html
     106directory ${CMAKE_BINARY_DIR}/Documentation/webkitdomgtk-${WEBKITGTK_API_VERSION}/html Documentation/webkitdomgtk-${WEBKITGTK_API_VERSION}/html
  • trunk/Tools/gtk/webkitdom.py

    r176919 r179111  
    208208
    209209
    210 def write_doc_files():
     210def write_doc_files(module_name):
    211211    doc_dir = common.build_path('DerivedSources', 'webkitdom', 'docs')
    212212
     
    218218            sys.exit(1)
    219219
    220     with open(os.path.join(doc_dir, 'webkitdomgtk-sections.txt'), 'w') as sections_file:
     220    with open(os.path.join(doc_dir, '%s-sections.txt' % module_name), 'w') as sections_file:
    221221        generator = WebKitDOMDocGeneratorSections(get_all_webkitdom_symbol_files(), sections_file)
    222222        generator.generate()
Note: See TracChangeset for help on using the changeset viewer.