diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-04-15 18:28:24 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-04-15 18:28:24 +0000 |
commit | 18ff6224cb5b314f0729f29f3f95bf0d240708f1 (patch) | |
tree | 7473586bebff65d00f756649fd3d0746a1e11769 /include/depends.mk | |
parent | 3be35d749224eb82f0e4cae20471aeba2e8f5640 (diff) | |
download | upstream-18ff6224cb5b314f0729f29f3f95bf0d240708f1.tar.gz upstream-18ff6224cb5b314f0729f29f3f95bf0d240708f1.tar.bz2 upstream-18ff6224cb5b314f0729f29f3f95bf0d240708f1.zip |
clean up dependency handling for autorebuilds
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6956 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include/depends.mk')
-rw-r--r-- | include/depends.mk | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/depends.mk b/include/depends.mk new file mode 100644 index 0000000000..b74e535506 --- /dev/null +++ b/include/depends.mk @@ -0,0 +1,28 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# define a dependency on a subtree +# parameters: +# 1: directory +# 2: directory dependency +# 3: tempfile for file listings +# 4: find options + +FINDPARAMS := -type f -not -name ".*" -and -not -path "*.svn*" +define rdep + $(foreach file,$(shell find $(1) $(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 + + $(3): FORCE + @find $(1) $(FINDPARAMS) $(4) 2>/dev/null | md5s > $$@ + +endef |