strip the kernel version suffix from target directories, except for brcm-2.4 (the...
[openwrt/openwrt.git] / include / subdir.mk
index 217d6bc3768c2a2755e4dd56b8cf4e33f79e4915..40a06ed9e13ab33533bb0af35d86463f99d9ff43 100644 (file)
@@ -37,13 +37,9 @@ endef
 # Parameters: <subdir> <name> <target>
 define stampfile
   $(1)/stamp-$(3):=$(STAGING_DIR)/stamp/.$(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)): $(TMP_DIR)/.build
+       @+$(SCRIPT_DIR)/timestamp.pl -n $$($(1)/stamp-$(3)) $(1) $(4) || \
+               $(MAKE) $$($(1)/flags-$(3)) $(1)/$(3)
        @mkdir -p $$$$(dirname $$($(1)/stamp-$(3)))
        @touch $$($(1)/stamp-$(3))