summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2005-12-22 05:08:11 +0000
committerKen Raeburn <raeburn@mit.edu>2005-12-22 05:08:11 +0000
commita2a85a79776e323461cfd6a0b60bd9c9bdd33c3f (patch)
treeff5f023246383b36e73c9e07177fd753e5b24f94 /src/util
parent7a8828eee4d27abe74974269c318211eed996116 (diff)
downloadkrb5-a2a85a79776e323461cfd6a0b60bd9c9bdd33c3f.tar.gz
krb5-a2a85a79776e323461cfd6a0b60bd9c9bdd33c3f.tar.xz
krb5-a2a85a79776e323461cfd6a0b60bd9c9bdd33c3f.zip
Looks like the current Red Hat gcc on Athena emits duplicates and "./foo.h",
neither of which we've properly addressed before. * depfix.pl (uniquify): New subroutine. (do_subs_2): Use it. (do_subs): Fix substitution pattern for " ./". git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17573 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util')
-rw-r--r--src/util/ChangeLog6
-rw-r--r--src/util/depfix.pl23
2 files changed, 28 insertions, 1 deletions
diff --git a/src/util/ChangeLog b/src/util/ChangeLog
index c3f031cef..a306f5d92 100644
--- a/src/util/ChangeLog
+++ b/src/util/ChangeLog
@@ -1,3 +1,9 @@
+2005-12-22 Ken Raeburn <raeburn@mit.edu>
+
+ * depfix.pl (uniquify): New subroutine.
+ (do_subs_2): Use it.
+ (do_subs): Fix substitution pattern for " ./".
+
2005-11-03 Tom Yu <tlyu@mit.edu>
* mkrel: Delete .svn directories to avoid pathname length bloat.
diff --git a/src/util/depfix.pl b/src/util/depfix.pl
index b17bf9fc2..09a15dd57 100644
--- a/src/util/depfix.pl
+++ b/src/util/depfix.pl
@@ -62,7 +62,7 @@ sub strrep {
sub do_subs {
local($_) = @_;
s,\\$, \\,g; s, + \\$, \\,g;
- s,//+,/,g; s, \\./, ,g;
+ s,//+,/,g; s, \./, ,g;
if ($STLIBOBJS ne "") {
# Only care about the additional prefixes if we're building
# shared libraries.
@@ -127,6 +127,8 @@ sub do_subs_2 {
s;\$\(BUILDTOP\)/include/ss/ss.h \$\(BUILDTOP\)/include/ss/ss_err.h ;\$(SS_DEPS) ;g;
s;\$\(BUILDTOP\)/include/db.h \$\(BUILDTOP\)/include/db-config.h ;\$(DB_DEPS) ;g;
+ $_ = &uniquify($_);
+
# Some krb4 dependencies should only be present if building with krb4
# enabled.
s;\$\(BUILDTOP\)/include/kerberosIV/krb_err.h ;\$(KRB_ERR_H_DEP) ;g;
@@ -137,6 +139,25 @@ sub do_subs_2 {
return $_;
}
+sub uniquify {
+ # Apparently some versions of gcc -- like
+ # "gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)"
+ # -- will sometimes emit duplicate header file names.
+ local($_) = @_;
+ my(@words) = split " ", $_;
+ my($w);
+ my($result) = "";
+ my(%seen);
+ undef %seen;
+ foreach $w (@words) {
+ next if defined($seen{$w});
+ $seen{$w} = 1;
+ if ($result ne "") { $result .= " "; }
+ $result .= $w;
+ }
+ return $result . " ";
+}
+
sub split_lines {
local($_) = @_;
s/(.{50}[^ ]*) /$1 \\\n /g;