diff options
author | Ken Raeburn <raeburn@mit.edu> | 2002-09-14 02:45:50 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2002-09-14 02:45:50 +0000 |
commit | 40201aadec103327acfec591aee25a43f5531ed6 (patch) | |
tree | e32801f609418109c6fabe66b0b3e1f42f9ed5d2 /src/util | |
parent | 25935ea0f4fcd60eca8dba0371ea168fd729e908 (diff) | |
download | krb5-40201aadec103327acfec591aee25a43f5531ed6.zip krb5-40201aadec103327acfec591aee25a43f5531ed6.tar.gz krb5-40201aadec103327acfec591aee25a43f5531ed6.tar.bz2 |
Work out pathname for gcc fixincludes headers via "-print-libgcc-file-name" and
substitutions in depgen.sed at "make depend" time, and emit patterns into
depfix2.sed to strip them out of dependencies, instead of hard-coding pathnames
for Athena gcc installations we know about in depfix.sed.
Verify that gcc is being used, before trying to rebuild dependencies.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14861 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/ChangeLog | 5 | ||||
-rw-r--r-- | src/util/depfix.sed | 2 | ||||
-rw-r--r-- | src/util/depgen.sed | 21 |
3 files changed, 23 insertions, 5 deletions
diff --git a/src/util/ChangeLog b/src/util/ChangeLog index 5eb494b..cd604d5 100644 --- a/src/util/ChangeLog +++ b/src/util/ChangeLog @@ -1,5 +1,10 @@ 2002-09-13 Ken Raeburn <raeburn@mit.edu> + * depgen.sed: Now expects a fifth argument, the pathname for + libgcc. Replaces "libgcc" part with "include" and emits sed + patterns to discard any names starting with that prefix. + * depfix.sed: Drop handling of /mit/gnu and /mit/cygnus. + * Makefile.in (MY_SUBDIRS): Use MAYBE_DB_@DB_VERSION@. (MAYBE_DB_k5, MAYBE_DB_sys): New variables. diff --git a/src/util/depfix.sed b/src/util/depfix.sed index 6e8d4a4..3c5c081 100644 --- a/src/util/depfix.sed +++ b/src/util/depfix.sed @@ -32,8 +32,6 @@ s;^\([a-zA-Z0-9_\-]*\).o:;$(OUTPRE)\1.$(OBJEXT):; # gcc installation in some odd place, you may need to customize this) s;/usr/include/[^ ]* ;;g s;/usr/lib/[^ ]* ;;g -s;/mit/cygnus[^ ]* ;;g -s;/mit/gnu/[^ ]* ;;g # remove foo/../ sequences :dotdot diff --git a/src/util/depgen.sed b/src/util/depgen.sed index 86ed7ed..8547d7c 100644 --- a/src/util/depgen.sed +++ b/src/util/depgen.sed @@ -1,4 +1,4 @@ -# input srctop myfulldir srcdir buildtop +# input srctop myfulldir srcdir buildtop libgccfilename # something like ../../../../asrc/lib/krb5/asn.1/../../../ lib/krb5/asn.1 # # output a sequence of sed commands for recognizing and replacing srctop, @@ -13,7 +13,7 @@ # Output some mostly-fixed patterns first h -s|^\([^ ]*\) \([^ ]*\) \([^ ]*\) \([^ ]*\)$|# This file is automatically generated by depgen.sed, do not edit it.\ +s|^\([^ ]*\) \([^ ]*\) \([^ ]*\) \([^ ]*\) \([^ ]*\)$|# This file is automatically generated by depgen.sed, do not edit it.\ #\ # Parameters used to generate this instance:\ #\ @@ -21,16 +21,31 @@ s|^\([^ ]*\) \([^ ]*\) \([^ ]*\) \([^ ]*\)$|# This file is automatically generat # thisdir = \2\ # srcdir = \3\ # BUILDTOP = \4\ +# libgcc file name = \5\ #\ \ # First, remove redundant leading "//" and "./" ...\ s;///*;/;g\ -s; \\./; ;g\ +s; \\./; ;g|p +x + +h +s|^[^ ]* [^ ]* [^ ]* [^ ]* || +s|libgcc\.[^ ]*$|include| +s|\.|\\.|g +s|\([^ ][^ ]*\)|\ +# Remove gcc's include files resulting from "fixincludes";\ +# they're essentially system include files.\ +s;\1/[^ ]* ;;g\ +s;\1/[^ ]*$;;g\ \ # Recognize $(SRCTOP) and make it a variable reference.\ # (Is this step needed, given the substitutions below?)|p x +# Drop the last (possibly empty?) word, gcc's prefix. Then save four words. +s, [^ ]*$,, + h s/ .*$// s,\.,\\.,g |