+define stamp
+tmp/info/.stamp-$(1)-$(shell ls $(2)/*/Makefile $(5) | (md5sum || md5) 2>/dev/null | cut -d' ' -f1)
+endef
+
+STAMP_pkginfo=$(call stamp,pkginfo,package)
+STAMP_targetinfo=$(call stamp,targetinfo,target/linux)
+define scan_info
+
+$(STAMP_$(1)):
+ @mkdir -p tmp/info
+ @rm -f tmp/info/.stamp-$(1)*
+ @touch $$@
+
+$(foreach FILE,$(shell ls $(2)/*/Makefile $(5)),
+tmp/.$(1): $(FILE)
+$(FILE):
+)
+
+ifneq ($(5),)
+tmp/.$(1): $(shell ls $(5))