svn rev #23314: trunk/src/ config/ util/

ghudson@MIT.EDU ghudson at MIT.EDU
Mon Nov 23 15:52:16 EST 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=23314
Commit By: ghudson
Log Message:
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.



Changed Files:
U   trunk/src/config/post.in
U   trunk/src/util/depfix.pl
Modified: trunk/src/config/post.in
===================================================================
--- trunk/src/config/post.in	2009-11-23 19:24:42 UTC (rev 23313)
+++ trunk/src/config/post.in	2009-11-23 20:52:16 UTC (rev 23314)
@@ -88,10 +88,8 @@
 # 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

Modified: trunk/src/util/depfix.pl
===================================================================
--- trunk/src/util/depfix.pl	2009-11-23 19:24:42 UTC (rev 23313)
+++ trunk/src/util/depfix.pl	2009-11-23 20:52:16 UTC (rev 23314)
@@ -27,7 +27,7 @@
   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 @@
 # 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 @@
     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 @@
     } 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 @@
     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;




More information about the cvs-krb5 mailing list