From 5c30e741059c2e2fe0c0ee747dd01a2f91569b87 Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 9 May 2007 22:47:01 +0000 Subject: fix recursive dependencies on build directories - should lead to fewer spontaneous rebuilds git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7151 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- include/depends.mk | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'include/depends.mk') diff --git a/include/depends.mk b/include/depends.mk index 07345a399..1e01d35f8 100644 --- a/include/depends.mk +++ b/include/depends.mk @@ -11,18 +11,19 @@ # 3: tempfile for file listings # 4: find options -FINDPARAMS := -type f -not -name ".*" -and -not -path "*.svn*" +DEP_FINDPARAMS := -type f -not -name ".*" -and -not -path "*.svn*" define rdep - $(foreach file,$(shell find $(1) $(FINDPARAMS) -and -not -path "*:*" $(4)), + $(foreach file,$(shell find $(1) $(DEP_FINDPARAMS) -and -not -path "*:*" $(4)), $(2): $(file) $(file): ; ) - ifneq ($(shell find $(1) $(FINDPARAMS) $(4) 2>/dev/null | md5s),$(shell cat $(3) 2>/dev/null)) - $(2): $(3) - endif + ifneq ($(3),) + ifneq ($$(shell find $(1) $(DEP_FINDPARAMS) $(4) 2>/dev/null | md5s),$(if $(3),$(shell cat $(3) 2>/dev/null))) + $(2): $(3) + endif - $(3): FORCE - @-find $(1) $(FINDPARAMS) $(4) 2>/dev/null | md5s > $$@ - + $(3): FORCE + @-find $(1) $(DEP_FINDPARAMS) $(4) 2>/dev/null | md5s > $$@ + endif endef -- cgit v1.2.3