aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2002-04-05 06:19:28 +0000
committerNathan Scott <nathans@sgi.com>2002-04-05 06:19:28 +0000
commitaa08322b99510f8b95096e3a15dcc5d385e9e8d5 (patch)
treed7e76267f59331363633a4afe23596bb667524da
parent605cb845b9d081413af795380b4f70cc4322f3b3 (diff)
downloaddmapi-dev-aa08322b99510f8b95096e3a15dcc5d385e9e8d5.tar.gz
incorporate Andreas' makedepend realtive-path change everywhere.
-rw-r--r--include/buildrules14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/buildrules b/include/buildrules
index e4c6af2..4db3b28 100644
--- a/include/buildrules
+++ b/include/buildrules
@@ -66,10 +66,16 @@ $(_FORCE):
depend : $(CFILES) $(HFILES)
$(SUBDIRS_MAKERULE)
- touch dep
- $(MAKEDEPEND) -fdep -- $(CFLAGS) -- $(CFILES)
+ touch .dep
+ $(MAKEDEPEND) -f - -- $(CFLAGS) -- $(CFILES) | \
+ $(SED) -e 's,`pwd`,$(TOPDIR),g' \
+ -e 's, */[^ ]*,,g' \
+ -e '/^[^ ]*: *$$/d' \
+ -e '/^#.*/d' -e '/^ *$$/d' \
+ > .dep
+ test -s .dep || rm -f .dep
# Include dep, but only if it exists
-ifeq ($(shell test -f dep && echo dep), dep)
-include dep
+ifeq ($(shell test -f .dep && echo .dep), .dep)
+include .dep
endif