It seems like gcc does canonicalisation of file names. More
specifically, a starting './' is removed. makedepend doesn't do this, resulting in another possible commit war, so let's fix that by doing a poor mans canonicalisation of file names that gives the same effect as doing dependencies through gcc.
This commit is contained in:
parent
b30245dae0
commit
3009e9f9ef
@ -34,9 +34,11 @@ foreach $file (sort keys %files) {
|
|||||||
my $dep;
|
my $dep;
|
||||||
my $origfile=$file;
|
my $origfile=$file;
|
||||||
$origfile=~s/\.o$/.c/;
|
$origfile=~s/\.o$/.c/;
|
||||||
|
$file=~s/^\.\///;
|
||||||
push @{$files{$file}},$origfile;
|
push @{$files{$file}},$origfile;
|
||||||
my $prevdep="";
|
my $prevdep="";
|
||||||
foreach $dep (sort @{$files{$file}}) {
|
foreach $dep (sort @{$files{$file}}) {
|
||||||
|
$dep=~s/^\.\///;
|
||||||
next if $prevdep eq $dep; # to exterminate duplicates...
|
next if $prevdep eq $dep; # to exterminate duplicates...
|
||||||
$prevdep = $dep;
|
$prevdep = $dep;
|
||||||
$len=0 if $len+length($dep)+1 >= 80;
|
$len=0 if $len+length($dep)+1 >= 80;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user