After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 310494 - *-sections.txt should be autogenerated / autoupdated
*-sections.txt should be autogenerated / autoupdated
Status: RESOLVED OBSOLETE
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2005-07-15 13:38 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2011-03-29 12:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (2.26 KB, patch)
2006-09-30 20:28 UTC, Yeti
committed Details | Review

Description Stefan Sauer (gstreamer, gtkdoc dev) 2005-07-15 13:38:21 UTC
moving from http://bugzilla.gnome.org/show_bug.cgi?id=124213

would be nice if gtk-doc could sort new documentation it lists in the unused
file into the section file. 
First idea is to check if the symbol prefix and see if there are other sysmbols
with this prefix somewhere.
Second idea is to have a list of source-files associated with each section:
<SECTION>
<SOURCES>
xyz.{c,h}
</SOURCES>
...
</SECTION>
Comment 1 Owen Taylor 2005-07-15 14:31:12 UTC
I think they are auto-generated when you first run the tool ... if they
don't already exist. (<foo>-decl-list.txt is basically the same thing as
<foo>-sections.txt in unsorted form.)

I'm skeptical about auto-updating of sections.txt ... most projects
I work on *don't* have sections.txt corresponding exactly to the header
files in ordering or even in division to sections, so it would be a
a real pain to have gtk-doc inserting stuff into the *wrong* place;
much more annyoying then having them in <foo>-unused.txt.

Maybe it could be done optionally in some fashion.
Comment 2 Yeti 2006-09-30 19:57:01 UTC
Owen, projects with sane header files (GLib & co. are encumbered with historical cruft and thus do not fall into this category) can have fully autogenerated *-sections.txt because headers naturaly form sections.  And in my opinion people should be encouraged to write header files that make sense, not to manually update monsters like *-sections.txt.

For example in my project (Gwyddion) _everything_ is generated, except *-docs.sgml and *-overrides.txt. To rebuild documentation I just nuke everything else, including *-sections.txt, *.types and templates, rebuid from scratch and that's it (yes, it currently needs some custom auxiliary tools like a 10line python script to generate *.types).  It would be nice if gtk-doc supported a less brutal approach, though.
Comment 3 Owen Taylor 2006-09-30 20:00:50 UTC
I'm sure you can figure out how to add some sort of command line option...
Comment 4 Yeti 2006-09-30 20:28:34 UTC
Created attachment 73713 [details] [review]
proposed patch

Well, my last two patches just sit in the bugzilla so I'm reluctant to make more.  Anyway, I recalled how much I hate Perl and here's a patch.  It adds an option --rebuild-sections which makes it write *-sections.txt even if it already exists.
Comment 5 Damon Chaplin 2006-10-15 14:46:35 UTC
I've committed the patch, though it doesn't fix all of this bug so I'll leave it open.
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2011-03-29 12:50:20 UTC
I am closing this, as I rather would like to proceed with the idea in bug #646094 to get rid of the section file.