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:
Richard Levitte 2001-10-10 08:27:28 +00:00
parent b30245dae0
commit 3009e9f9ef

View File

@ -34,9 +34,11 @@ foreach $file (sort keys %files) {
my $dep;
my $origfile=$file;
$origfile=~s/\.o$/.c/;
$file=~s/^\.\///;
push @{$files{$file}},$origfile;
my $prevdep="";
foreach $dep (sort @{$files{$file}}) {
$dep=~s/^\.\///;
next if $prevdep eq $dep; # to exterminate duplicates...
$prevdep = $dep;
$len=0 if $len+length($dep)+1 >= 80;