]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
incorporate Andreas' makedepend realtive-path change everywhere.
authorNathan Scott <nathans@sgi.com>
Fri, 5 Apr 2002 06:19:28 +0000 (06:19 +0000)
committerNathan Scott <nathans@sgi.com>
Fri, 5 Apr 2002 06:19:28 +0000 (06:19 +0000)
include/buildrules

index e4c6af2b427796383f3a9b27b319ddc86eab731a..4db3b289b639fb2dd64ba8cefe72396073412836 100644 (file)
@@ -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