diff options
author | Ken Raeburn <raeburn@mit.edu> | 2006-03-31 01:23:55 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2006-03-31 01:23:55 +0000 |
commit | 3509d03f75fa60408bad2109ca17425e20cad539 (patch) | |
tree | 00e15807d369b74f698ab7263304778963ad3fa2 | |
parent | 77a462feffe2b122814fd4c33ec63860275b25eb (diff) | |
download | krb5-3509d03f75fa60408bad2109ca17425e20cad539.tar.gz krb5-3509d03f75fa60408bad2109ca17425e20cad539.tar.xz krb5-3509d03f75fa60408bad2109ca17425e20cad539.zip |
* depfix.pl (uniquify): Sort dependencies, so little tweaks to include orders
don't change lots of makefiles.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17810 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/util/ChangeLog | 5 | ||||
-rw-r--r-- | src/util/depfix.pl | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/util/ChangeLog b/src/util/ChangeLog index 2659162f25..0b81219d48 100644 --- a/src/util/ChangeLog +++ b/src/util/ChangeLog @@ -1,3 +1,8 @@ +2006-03-30 Ken Raeburn <raeburn@mit.edu> + + * depfix.pl (uniquify): Sort dependencies, so little tweaks to + include orders don't change lots of makefiles. + 2006-03-11 Ken Raeburn <raeburn@mit.edu> * reconf: Put autoconf.stmp into include directory. diff --git a/src/util/depfix.pl b/src/util/depfix.pl index c4c233c670..7bfc5e4001 100644 --- a/src/util/depfix.pl +++ b/src/util/depfix.pl @@ -168,18 +168,24 @@ sub uniquify { # "gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)" # -- will sometimes emit duplicate header file names. local($_) = @_; + my(@sides) = split ": ", $_; + my($lhs) = ""; + if ($#sides == 1) { + $lhs = $sides[0] . ": "; + $_ = $sides[1]; + } my(@words) = split " ", $_; my($w); my($result) = ""; my(%seen); undef %seen; - foreach $w (@words) { + foreach $w (sort { $a cmp $b; } @words) { next if defined($seen{$w}); $seen{$w} = 1; if ($result ne "") { $result .= " "; } $result .= $w; } - return $result . " "; + return $lhs . $result . " "; } sub split_lines { |