# include/depends.mk # define a dependency on a subtree # parameters: # 1: directory # 2: directory dependency # 3: find options define rdep $(foreach file,$(shell find $(1) -type f -not -name .\* -and -not -path \*.svn\* $(3)), $(2): $(file) ) ifneq ($(shell find $(1) -type f -not -name .\* -and -not -path \*.svn\* $(3) | md5s),$(shell cat $(1)/.dep_files)) $(2): $(1)/.dep_files endif $(1)/.dep_files: FORCE @find $(1) -type f -not -name .\* -and -not -path \*.svn\* $(3) | md5s > $$@ endef ------ in include/package.mk $(call rdep,${CURDIR},$(STAMP_PREPARED))