summaryrefslogtreecommitdiffstats
path: root/src/config/post.in
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2001-09-06 09:43:33 +0000
committerKen Raeburn <raeburn@mit.edu>2001-09-06 09:43:33 +0000
commitd4996856eb0ea1695289f1b19c4d1d1bc559d388 (patch)
tree841d31d1a0d1acfe8a10ecee43b260a6d510ef20 /src/config/post.in
parent1f67efa4a5a2c9594e193496d5e3c4ca2e3a3da1 (diff)
downloadkrb5-d4996856eb0ea1695289f1b19c4d1d1bc559d388.tar.gz
krb5-d4996856eb0ea1695289f1b19c4d1d1bc559d388.tar.xz
krb5-d4996856eb0ea1695289f1b19c4d1d1bc559d388.zip
* 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
Diffstat (limited to 'src/config/post.in')
-rw-r--r--src/config/post.in29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/config/post.in b/src/config/post.in
index 8754dd9db0..370162b135 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 \