提交 6da980e2 编写于 作者: R Richard Levitte

Make sure the source file is included among the dependencies. This is

the norm for 'gcc -M' but not for 'makedepend', and is merely
introduced here to avoid commit wars.
上级 37f599bc
......@@ -14,11 +14,15 @@ my %files;
my $thisfile="";
while(<STDIN>) {
my ($dummy, $file,$deps)=/^((.*):)? (.*)$/;
my $origfile="";
$thisfile=$file if defined $file;
next if !defined $deps;
$origfile=$thisfile;
$origfile=~s/\.o$/.c/;
my @deps=split ' ',$deps;
@deps=grep(!/^\//,@deps);
@deps=grep(!/^\\$/,@deps);
@deps=grep(!/^$origfile$/,@deps);
push @{$files{$thisfile}},@deps;
}
......@@ -26,6 +30,9 @@ my $file;
foreach $file (sort keys %files) {
my $len=0;
my $dep;
my $origfile=$file;
$origfile=~s/\.o$/.c/;
push @{$files{$file}},$origfile;
foreach $dep (sort @{$files{$file}}) {
$len=0 if $len+length($dep)+1 >= 80;
if($len == 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册