From 6e74acbb4a71b77361f063c4902acfd126c402ae Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 15 Sep 2006 22:57:09 +0000 Subject: [PATCH] Make it easier to ignore additional directories, like, oh, say, local install paths for OpenLDAP. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18587 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/depfix.pl | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/util/depfix.pl b/src/util/depfix.pl index 7bfc5e400..473b649bb 100644 --- a/src/util/depfix.pl +++ b/src/util/depfix.pl @@ -54,6 +54,12 @@ $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 { my($x) = @_; $x = quotemeta($x); @@ -87,7 +93,7 @@ sub do_subs { local($_) = @_; s,\\$, \\,g; s, + \\$, \\,g; s,//+,/,g; s, \./, ,g; - if ($STLIBOBJS ne "") { + if ($extrasuffixes) { # Only care about the additional prefixes if we're building # shared libraries. s,^([a-zA-Z0-9_\-]*)\.o:,$1.so $1.po \$(OUTPRE)$1.\$(OBJEXT):,; @@ -95,8 +101,11 @@ sub do_subs { s,^([a-zA-Z0-9_\-]*)\.o:,\$(OUTPRE)$1.\$(OBJEXT):,; } # Drop GCC include files, they're basically system headers. - s,$libgccincdir/[^ ]* ,,go; - s,$libgccincdir/[^ ]*$,,go; + my ($x); + foreach $x (@ignoredirs) { + s,$x/[^ ]* ,,g; + s,$x/[^ ]*$,,g; + } # Recognize $(SRCTOP) and variants. my($srct) = $SRCTOP . "/"; $_ = strrep(" $srct", " \$(SRCTOP)/", $_); -- 2.26.2