aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2009-11-23 20:52:16 +0000
committerGreg Hudson <ghudson@mit.edu>2009-11-23 20:52:16 +0000
commit5761ae0613b4c2cf79c995bffd5421690575ca52 (patch)
treefa02ff7f53fb4b5b97e795d1d6efebd8eb99f505
parentc64cae69c04d86c3807574c4547de752f0dcea1d (diff)
downloadkrb5-5761ae0613b4c2cf79c995bffd5421690575ca52.zip
krb5-5761ae0613b4c2cf79c995bffd5421690575ca52.tar.gz
krb5-5761ae0613b4c2cf79c995bffd5421690575ca52.tar.bz2
Simplify depfix.pl by assuming that all files outside of the source
and build directory (after substitutions) are external headers which should not be tracked. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23314 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/config/post.in4
-rw-r--r--src/util/depfix.pl28
2 files changed, 5 insertions, 27 deletions
diff --git a/src/config/post.in b/src/config/post.in
index d5d2967..9c03e73 100644
--- a/src/config/post.in
+++ b/src/config/post.in
@@ -88,10 +88,8 @@ depend-dependencies:
# references in rules for non-library objects in a directory where
# library objects happen to be built. It's mostly harmless.
.depend: .d $(top_srcdir)/util/depfix.pl
- x=`$(CC) -print-libgcc-file-name` ; \
perl $(top_srcdir)/util/depfix.pl '$(top_srcdir)' '$(mydir)' \
- '$(srcdir)' '$(BUILDTOP)' "$$x" '$(STLIBOBJS)' \
- < .d > .depend
+ '$(srcdir)' '$(BUILDTOP)' '$(STLIBOBJS)' < .d > .depend
# Temporarily keep the rule for removing the dependency line eater
# until we're sure we've gotten everything converted and excised the
diff --git a/src/util/depfix.pl b/src/util/depfix.pl
index 8351885..4dec887 100644
--- a/src/util/depfix.pl
+++ b/src/util/depfix.pl
@@ -27,7 +27,7 @@ eval 'exec perl -S $0 ${1+"$@"}'
if 0;
$0 =~ s/^.*?(\w+)[\.\w+]*$/$1/;
-# Input: srctop thisdir srcdir buildtop libgccfilename stlibobjs
+# Input: srctop thisdir srcdir buildtop stlibobjs
# Notes: myrelativedir is something like "lib/krb5/asn.1" or ".".
# stlibobjs will usually be empty, or include spaces.
@@ -38,10 +38,9 @@ $0 =~ s/^.*?(\w+)[\.\w+]*$/$1/;
# thisdir = util/et
# srcdir = ../../../util/et
# BUILDTOP = ../..
-# libgcc file name = /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/libgcc.a
# STLIBOBJS = error_message.o et_name.o com_err.o
-my($top_srcdir,$thisdir,$srcdir,$BUILDTOP,$libgccpath,$STLIBOBJS) = @ARGV;
+my($top_srcdir,$thisdir,$srcdir,$BUILDTOP,$STLIBOBJS) = @ARGV;
if (0) {
print STDERR "top_srcdir = $top_srcdir\n";
@@ -49,15 +48,8 @@ if (0) {
print STDERR "STLIBOBJS = $STLIBOBJS\n";
}
-$libgccincdir = $libgccpath;
-$libgccincdir =~ s,libgcc\.[^ ]*$,include,;
-$libgccincdir = quotemeta($libgccincdir);
#$srcdirpat = quotemeta($srcdir);
-# Tweak here if you need to ignore additional directories.
-#my(@ignoredirs) = ( $libgccincdir, "/var/raeburn/openldap/Install/include" );
-my(@ignoredirs) = ( $libgccincdir );
-
my($extrasuffixes) = ($STLIBOBJS ne "");
sub my_qm {
@@ -100,12 +92,6 @@ sub do_subs {
} else {
s,^([a-zA-Z0-9_\-]*)\.o:,\$(OUTPRE)$1.\$(OBJEXT):,;
}
- # Drop GCC include files, they're basically system headers.
- my ($x);
- foreach $x (@ignoredirs) {
- s,$x/[^ ]* ,,g;
- s,$x/[^ ]*$,,g;
- }
# Recognize $(top_srcdir) and variants.
my($srct) = $top_srcdir . "/";
$_ = strrep(" $srct", " \$(top_srcdir)/", $_);
@@ -140,14 +126,8 @@ sub do_subs_2 {
s/$/ /;
# Remove excess spaces.
s/ */ /g;
- # Delete Tcl-specific headers.
- s;/[^ ]*/tcl\.h ;;g;
- s;/[^ ]*/tclDecls\.h ;;g;
- s;/[^ ]*/tclPlatDecls\.h ;;g;
- # Delete system-specific or compiler-specific files.
- s;/os/usr/include/[^ ]* ;;g;
- s;/usr/include/[^ ]* ;;g;
- s;/usr/lib/[^ ]* ;;g;
+ # Delete headers external to the source and build tree.
+ s; /[^ ]*;;g;
# Remove foo/../ sequences.
while (m/\/[a-z][a-z0-9_.\-]*\/\.\.\//) {
s//\//g;