*** Thomas Oltmann [2021-09-07 22:57]:
>For example, it is also able to properly recognize: [...]

I see, thanks!

However personally in C-projects I use https://include-what-you-use.org/
and h-extract.pl script to make depends only on local headers:

    whatever.do:
        [...]
        redo-ifchange `./h-extract.pl $src`

    h-extract.pl:
        #!/usr/bin/env perl
        # Extract all locally included header files (not <>-ones, but "")

        # hack, to badly exit if there is unexistent file
        $SIG{__WARN__} = sub { die @_ };

        map { $inc{$_} = 1 } @ARGV;
        while (<>) {
            /^#include "([^\/]+)"$/ and ($1 !~ /\.in$/) and $inc{$1} = 1;
        };
        print join " ", sort keys %inc;

-- 
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: CF60 E89A 5923 1E76 E263  6422 AE1A 8109 E498 57EF

Reply via email to