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
2004-12-30 Ken Raeburn <raeburn@mit.edu>
- * post.in (.depend): Delete blank lines in generated file.
+ * post.in (.depend): Delete blank lines in generated file. Don't
+ do target name munging here.
(DEP_CFG_VERIFY, DEP_VERIFY, depend-verify-*, .depend-verify-*,
.depfix2.sed): Move all the flag files to $(BUILDTOP) so there'll
be only one of each.
+ (.depfix2.sed): Pass extra value $(STLIBOBJS).
2004-12-17 Jeffrey Altman <jaltman@mit.edu>
# make variables happen in depfix.sed.
.depfix2.sed: $(BUILDTOP)/.depend-verify-gcc Makefile $(SRCTOP)/util/depgen.sed
x=`$(CC) -print-libgcc-file-name` ; \
- echo '$(SRCTOP)' '$(myfulldir)' '$(srcdir)' '$(BUILDTOP)' "$$x" | sed -f $(SRCTOP)/util/depgen.sed > .depfix2.tmp
+ echo '$(SRCTOP)' '$(myfulldir)' '$(srcdir)' '$(BUILDTOP)' "$$x" '$(STLIBOBJS)' | sed -f $(SRCTOP)/util/depgen.sed > .depfix2.tmp
mv -f .depfix2.tmp .depfix2.sed
-DEPLIBOBJNAMEFIX = sed -e 's;^\$$(OUTPRE)\([a-zA-Z0-9_\-]*\)\.\$$(OBJEXT):;\1.so \1.po &;'
-
# NOTE: This will also generate spurious $(OUTPRE) and $(OBJEXT)
# references in rules for non-library objects in a directory where
# library objects happen to be built. It's mostly harmless.
.depend: .d .depfix2.sed $(SRCTOP)/util/depfix.sed
sed -f .depfix2.sed < .d | sed -f $(SRCTOP)/util/depfix.sed | \
- (if test "x$(STLIBOBJS)" != "x"; then $(DEPLIBOBJNAMEFIX) ; else cat; fi ) | \
sed -e '/^$$/d' > .depend
depend-update-makefile: .depend depend-recurse
+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
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
-# 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,
# 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:\
#\
# 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|