Fix handling ignored headers
Ignored headers are typically listed as relative paths from the top-level source directories passed to gtkdoc-scan; for instance:
--ignore-headers=foo.h a/bar.h b/baz.h
The code in gtkdoc-scan will store this as a flat string, and do regular expression matching on each header file it scans.
The current code based on regular expression matching fails to deal with
relative paths, which means of the three headers listed in the example
above, only foo.h
will be detected; additionally, even if we remove
the relative path fragment from bar.h
and baz.h
, the regular
expression will not match files inside sub-directories, because each
source directory and header is validated as a full path, instead of a
relative one.
Since all ignored headers are relative to the top level source directories, we can create a list of absolute paths, and match each path we are scanning against them; this removes the brittle regular expression approach, and correctly matches ignored headers inside sub-directories.