GNOME Bugzilla – Bug 657922
glob support for IGNORE_HFILES
Last modified: 2018-05-22 13:05:42 UTC
After declaring a private struct in one of my private header files: struct _notification { ... }; gtk-doc lists it as unused. Moreover, it lists it with '_' stripped: notification Is that actually expected?
Just a comment: if the entire header is private put /*<private_header>*/ there to tell gtk-doc to skip it. This is a consequence of struct _foo { }; being normally accompanied with typedef struct _foo foo; (for public structs). I don't know what would or would not break if gtk-doc stopped doing this.
Well, in my case struct _foo is mapped to Foo type. Maybe I should rename it to _Foo instead.
Michal, do you let gtk-doc scan that private header? Try adding the header to IGNORE_HFILE in Makefile.am. That can be a glob too, e.g. IGNORE_HFILE=*-private.h
Hm, IGNORE_HFILES seems even a better solution but I'm unable to get it working. I've got: HFILE_GLOB = $(top_srcdir)/lib/*.h I tried setting IGNORE_HFILES to *_.h, lib/*_.h and even $(top_srcdir)/lib/*_.h; neither works.
Sorry IGNORE_HFILES is not a glob. I'll see if I can make it one for 0.18. Right now it just matches the file part in all working directories. SO its better to do IGNORE_HFILES = file1_.h file2_.h
I have better experience with encoding the information that the header is private into the header itself because it can be then used by other scripts and tools.
Yeti, do you thing doing glob expansion would be useful in IGNORE_HFILES? It would be convenient and more portable than using $(shell ) in the makefile.
IMO it would since you want to distinguish between private and public headers just from looking at them. So if you have any system in it either the content or the name of the file encode it. While /*<private_header>*/ works for content, globs would work for names.
Michał, are you fine now?
(In reply to comment #9) > Michał, are you fine now? To be honest, I was looking for progress on the globs. Not that I really need this but it seems better that either all variables have explicit file lists or all of them use globs.
Created attachment 246027 [details] [review] allow wildcards in IGNORE_HFILES This would require to use a module like Text::Glob. Any other idea?
The whole IGNORE_HFILES feature is somewhat bad, as we'd still have doc rebuilds when ignored headers are changed. Ideally one could exclude the files already on the HFILE_GLOB.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk-doc/issues/18.