Source
#! /usr/bin/env perl
# SPDX-License-Identifier: GPL-2.0
#
# Detect cycles in the header file dependency graph
# Vegard Nossum <vegardno@ifi.uio.no>
#
use ;
use ;
use :: ;
my $opt_all;
my @opt_include;
my $opt_graph;
&Getopt:::: (qw(bundling pass_through));
&GetOptions(
=> \&help,
=> \&version,
=> \$opt_all,
"I=s" => \@opt_include,
=> \$opt_graph,
);
push @opt_include, 'include';
my %deps = ();
my %linenos = ();
my @headers = grep { ($_) } @ARGV;
@headers); (
if($opt_graph) {
();
} else {
(@headers);
}
sub {
print "Usage: $0 [options] file...\n";
print "\n";
print "Options:\n";
print " --all\n";
print " --graph\n";
print "\n";
print " -I includedir\n";
print "\n";
print "To make nice graphs, try:\n";
print " $0 --graph include/linux/kernel.h | dot -Tpng -o graph.png\n";
exit;
}
sub {
print "headerdep version 2\n";
exit;
}
# Get a file name that is relative to our include paths
sub {
my $filename = shift;