avoid rdep in the top level make process (subdir.mk) - it leaks too much memory and...
[openwrt/svn-archive/archive.git] / include / subdir.mk
index 28b01b6370c637cd74c78632ff34cda17fa8215d..0a3eff307ede504c6c931c38f7a764e211059cdb 100644 (file)
@@ -36,14 +36,10 @@ endef
 
 # Parameters: <subdir> <name> <target>
 define stampfile
-  $(1)/stamp-$(3):=$(STAGING_DIR)/stampfiles/.$(2)_$(3)
-  $(if $(__rdep_$(1)),,
-    $(call rdep,$(1),$$($(1)/stamp-$(3)),)
-    __rdep_$(1):=1
-  )
-
-  $$($(1)/stamp-$(3)):
-       @+$(MAKE) $$($(1)/flags-$(3)) $(1)/$(3)
+  $(1)/stamp-$(3):=$(STAGING_DIR)/stamp/.$(2)_$(3)
+  $$($(1)/stamp-$(3)): $(TMP_DIR)/.build
+       @+$(SCRIPT_DIR)/timestamp.pl -n $$($(1)/stamp-$(3)) $(1) || \
+               $(MAKE) $$($(1)/flags-$(3)) $(1)/$(3)
        @mkdir -p $$$$(dirname $$($(1)/stamp-$(3)))
        @touch $$($(1)/stamp-$(3))