Skip to content

Commit

Permalink
It seems like gcc does canonicalisation of file names. More
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
levitte committed Oct 10, 2001
1 parent b30245d commit 3009e9f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions util/clean-depend.pl
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@
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;
Expand Down

0 comments on commit 3009e9f

Please sign in to comment.