Repository : ssh://git@open-mesh.org/openwrt-feed-batman-adv
On branch : master
commit 98b30da81ea58b8403cced6c062ea15a44485971 Author: Marek Lindner lindner_marek@yahoo.de Date: Wed May 4 14:08:09 2011 +0000
batman-adv-devel: check if patches directory exists before trying to apply patches
98b30da81ea58b8403cced6c062ea15a44485971 batman-adv-devel/Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/batman-adv-devel/Makefile b/batman-adv-devel/Makefile index 6fc245e..382e58b 100644 --- a/batman-adv-devel/Makefile +++ b/batman-adv-devel/Makefile @@ -79,12 +79,20 @@ endef $(eval $(call Download,batctl))
EXTRACT_BATCTL = tar xzf "$(DL_DIR)/$(PKG_BATCTL_FNAME)" -C "$(BUILD_DIR)/$(PKG_NAME)" -PATCH_BATCTL = $(PATCH) "$(PKG_BATCTL_BUILD_DIR)" "$(PATCH_DIR)" "*batctl*" +PATCH_BATCTL = $(call Build/DoPatch,"$(PKG_BATCTL_BUILD_DIR)","$(PATCH_DIR)","*batctl*") BUILD_BATCTL = $(MAKE) -C $(PKG_BATCTL_BUILD_DIR) $(MAKE_BATCTL_ARGS) endif
+define Build/DoPatch + @if [ -d "$(2)" ]; then \ + if [ "$$$$(ls $(2) | grep -Ec $(3))" -gt 0 ]; then \ + $(PATCH) "$(1)" "$(2)" "$(3)"; \ + fi; \ + fi +endef + define Build/Patch - $(PATCH) "$(PKG_BUILD_DIR)" "$(PATCH_DIR)" "*batman*" + $(call Build/DoPatch,"$(PKG_BUILD_DIR)","$(PATCH_DIR)","*batman*") $(EXTRACT_BATCTL) $(PATCH_BATCTL) endef