On Sun, Feb 18, 2024 at 12:33 PM Bruno Haible <br...@clisp.org> wrote: > Collin Funk wrote: > > I attached a patch that seems to work alright. I'm not the greatest with > > GNU Make so it isn't very pretty. Feel free to modify it as much as you > > would like. > > > > Here is some sample output from Coreutils. One or two are real so I'll > > submit a patch there. > > > > [collin@debian coreutils]$ make sc_verify_absolute_include_headers > > verify_absolute_include_headers > > maint.mk: Use #include <sys/stat.h> instead of #include "sys/stat.h" in > > src/od.c > > maint.mk: Use #include <error.h> instead of #include "error.h" in src/od.c > > maint.mk: Use #include <getopt.h> instead of #include "getopt.h" in > > src/shuf.c > > maint.mk: Use #include <getopt.h> instead of #include "getopt.h" in > > src/stat.c > > maint.mk: Use #include <error.h> instead of #include "error.h" in > > src/system.h > > Very nice! I committed your patch, just at a different location in maint.mk > (near > the handling of <config.h>). > > Also, I added references to the Gnulib documentation: > > 2024-02-18 Bruno Haible <br...@clisp.org> > > maint.mk: Add more comments. > * top/maint.mk: Reference the Gnulib documentation where suitable.
Thank you both. I've just pushed an improvement. The new version runs grep only once rather than many times, and seems simpler. The output is like this, now (from gnu grep, which I've just fixed): src/grep.c:39:#include "error.h" src/grep.c:44:#include "getopt.h" src/grep.c:49:#include "search.h" src/kwsearch.c:22:#include "search.h" src/pcresearch.c:21:#include "search.h" src/searchutils.c:23:#include "search.h" maint.mk: Use #include <hdr.h>, not #include "hdr.h" for the above make: *** [maint.mk:615: sc_prefer_angle_bracket_headers] Error 1
gl_prefer_angle_bracket_headers.diff
Description: Binary data