From d4996856eb0ea1695289f1b19c4d1d1bc559d388 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Thu, 6 Sep 2001 09:43:33 +0000 Subject: [PATCH] * post.in (depfix2.sed): New target, generates a sed script that'll do a better job of identifying possible $(SRCTOP) uses. (.depend): Use it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13731 dc483132-0cff-0310-8789-dd5450dbe970 --- src/config/ChangeLog | 6 ++++++ src/config/post.in | 29 ++++++++++++++--------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/config/ChangeLog b/src/config/ChangeLog index cb813492e..d850e593f 100644 --- a/src/config/ChangeLog +++ b/src/config/ChangeLog @@ -1,3 +1,9 @@ +2001-09-06 Ken Raeburn + + * post.in (depfix2.sed): New target, generates a sed script + that'll do a better job of identifying possible $(SRCTOP) uses. + (.depend): Use it. + 2001-09-01 Ken Raeburn * post.in (.d): Run compiler as a separate target from sed diff --git a/src/config/post.in b/src/config/post.in index 8754dd9db..370162b13 100644 --- a/src/config/post.in +++ b/src/config/post.in @@ -15,21 +15,20 @@ check-windows:: touch .d ; \ fi -.depend: .d $(SRCTOP)/util/depfix.sed - r=`echo "$(SRCTOP)" | sed \ - -e ':loop' \ - -e '\;/[a-z][a-z0-9_\-]*/\.\./;{' \ - -e 's;/[a-z][a-z0-9_\-]*/\.\./;/;g' \ - -e 'bloop' \ - -e '}' \ - -e 's;/[a-z][a-z0-9_\-]*/\.\.$$;;g'` ; \ - sed < .d \ - -e 's; \./; ;g' \ - -e 's; $(SRCTOP)/; $$(SRCTOP)/;g' \ - -e 's; $(srcdir)/; $$(srcdir)/;g' \ - -e "s; $$r/"'; $$(SRCTOP)/;g' \ - -e 's; $(BUILDTOP)/; $$(BUILDTOP)/;g' | \ - sed -f $(SRCTOP)/util/depfix.sed > .depend +# Generate a script for dropping in the appropriate make variables, using +# directory-specific parameters. General substitutions independent of local +# make variables happen in depfix.sed. +depfix2.sed: Makefile $(SRCTOP)/util/depgen.sed + echo 's; \./; ;g' >> depfix2.tmp + echo 's; $(SRCTOP)/; $$(SRCTOP)/;g' >> depfix2.tmp + echo 's; $(srcdir)/; $$(srcdir)/;g' >> depfix2.tmp + echo 's; $$(srcdir)/\.\./; $(srcdir)/../;g' >> depfix2.tmp + echo '$(SRCTOP)' | sed -f $(SRCTOP)/util/depgen.sed >> depfix2.tmp + echo 's; $(BUILDTOP)/; $$(BUILDTOP)/;g' >> depfix2.tmp + mv -f depfix2.tmp depfix2.sed + +.depend: .d depfix2.sed $(SRCTOP)/util/depfix.sed + sed -f depfix2.sed < .d | sed -f $(SRCTOP)/util/depfix.sed > .depend depend-postrecurse:: .depend if test -n "$(SRCS)" ; then \ -- 2.26.2