diff options
| author | Ken Raeburn <raeburn@mit.edu> | 2004-12-30 22:05:12 +0000 |
|---|---|---|
| committer | Ken Raeburn <raeburn@mit.edu> | 2004-12-30 22:05:12 +0000 |
| commit | b4c3d53a6e88ea597a165289fd858b36aba03215 (patch) | |
| tree | eb18e852390ee935815f8d39769246855bb2fd64 /src/util | |
| parent | 037f6ea97299a496f38914289f7b28474765d9fc (diff) | |
| download | krb5-b4c3d53a6e88ea597a165289fd858b36aba03215.tar.gz krb5-b4c3d53a6e88ea597a165289fd858b36aba03215.tar.xz krb5-b4c3d53a6e88ea597a165289fd858b36aba03215.zip | |
Do the target object file name hacking in "make depend" earlier, before the
line breaks are recomputed, instead of after. This will result in lots of
whitespace changes in dependencies in directories that build library object
files, but the final output is nicer (fewer long lines), and running "make
depend" uses one fewer invocation of sed (balancing out the extra one I added
in another checkin earlier today).
* config/post.in (.depend): Don't do target name munging here.
(.depfix2.sed): Pass extra value $(STLIBOBJS).
* util/depfix.sed: Don't change foo.o to $(OUTPRE)foo.$(OBJEXT) here.
* util/depgen.sed: Add new argument for STLIBOBJS. Do the OUTPRE/OBJEXT
substitution here, and if STLIBOBJS is non-empty, add foo.so and foo.po while
we're at it.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16986 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/ChangeLog | 7 | ||||
| -rw-r--r-- | src/util/depfix.sed | 3 | ||||
| -rw-r--r-- | src/util/depgen.sed | 25 |
3 files changed, 29 insertions, 6 deletions
diff --git a/src/util/ChangeLog b/src/util/ChangeLog index 5e792c8ac..0ecbec2e1 100644 --- a/src/util/ChangeLog +++ b/src/util/ChangeLog @@ -1,3 +1,10 @@ +2004-12-30 Ken Raeburn <raeburn@mit.edu> + + * depfix.sed: Don't change foo.o to $(OUTPRE)foo.$(OBJEXT) here. + * depgen.sed: Add new argument for STLIBOBJS. + Do the OUTPRE/OBJEXT substitution here, and if STLIBOBJS is + non-empty, add foo.so and foo.po while we're at it. + 2004-12-21 Tom Yu <tlyu@mit.edu> * def-check.pl: Check for PRIVATE or INTERNAL annotations in defs diff --git a/src/util/depfix.sed b/src/util/depfix.sed index 720706592..1db3b0c86 100644 --- a/src/util/depfix.sed +++ b/src/util/depfix.sed @@ -24,9 +24,6 @@ bFIRST s/$/ / s/ */ /g -# change foo.o -> $(OUTPRE)foo.$(OBJEXT) -s;^\([a-zA-Z0-9_\-]*\).o:;$(OUTPRE)\1.$(OBJEXT):; - # delete tcl-specific headers s;/[^ ]*/tcl\.h ;;g s;/[^ ]*/tclDecls\.h ;;g diff --git a/src/util/depgen.sed b/src/util/depgen.sed index 3d31db954..370ff5351 100644 --- a/src/util/depgen.sed +++ b/src/util/depgen.sed @@ -1,4 +1,4 @@ -# input srctop myfulldir srcdir buildtop libgccfilename +# input srctop myfulldir srcdir buildtop libgccfilename stlibobjs # something like ../../../../asrc/lib/krb5/asn.1/../../../ lib/krb5/asn.1 # # output a sequence of sed commands for recognizing and replacing srctop, @@ -18,11 +18,13 @@ # seems to omit some of the earlier intended output. I think we're # always doing the substitutions anyways, so always printing should be # fine. +# +# STLIBOBJS will usually be empty, or include spaces. # 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:\ #\ @@ -31,14 +33,31 @@ s|^\([^ ]*\) \([^ ]*\) \([^ ]*\) \([^ ]*\) \([^ ]*\)$|# This file is automatical # srcdir = \3\ # BUILDTOP = \4\ # libgcc file name = \5\ +# STLIBOBJS = \6\ #\ \ # First, remove redundant leading "//" and "./" ...\ s;///*;/;g\ -s; \\./; ;g| +s; \\./; ;g\ +\ +# change foo.o -> $(OUTPRE)foo.$(OBJEXT)\ +s;^\\([a-zA-Z0-9_\\-]*\\).o:;$(OUTPRE)\\1.$(OBJEXT):;| +p +x + +# If the STLIBOBJS argument is not empty, emit a pattern to +# change the target name into $(OUTPRE)foo.$(OBJEXT) foo.so foo.po. +h +s|^[^ ]* [^ ]* [^ ]* [^ ]* [^ ]* || +s|^..*$|\ +# Fix up target name for the various different objects we might build.\ +s;^\\\$(OUTPRE)\\([a-zA-Z0-9_\\-]*\\)\\.\\\$(OBJEXT):;\\1.so \\1.po \&;| p x +# Now throw away STLIBOBJS, we don't need it any more. +s|^\([^ ]* [^ ]* [^ ]* [^ ]* [^ ]*\) .*$|\1| + h s|^[^ ]* [^ ]* [^ ]* [^ ]* || s|libgcc\.[^ ]*$|include| |
