change the way ./files* and the generic kernel files are applied. ./files now applies...
[openwrt/staging/mkresin.git] / include / quilt.mk
index 07bab8b440c3e8090ab9a811aeb4dd24a48df38d..c569231173ed63cc0ab0890ed330a7c0e2e524fc 100644 (file)
@@ -68,11 +68,8 @@ endef
 
 define Kernel/Patch/Default
        rm -rf $(PKG_BUILD_DIR)/patches; mkdir -p $(PKG_BUILD_DIR)/patches
-       if [ -d $(GENERIC_FILES_DIR) ]; then $(CP) $(GENERIC_FILES_DIR)/* $(LINUX_DIR)/; fi
-       if [ -d $(FILES_DIR) ]; then \
-               $(CP) $(FILES_DIR)/* $(LINUX_DIR)/; \
-               find $(LINUX_DIR)/ -name \*.rej | xargs rm -f; \
-       fi
+       $(CP) $(foreach fdir,$(GENERIC_FILES_DIR) $(FILES_DIR),$(fdir)/.) $(LINUX_DIR)/
+       find $(LINUX_DIR)/ -name \*.rej -or -name \*.orig | $(XARGS) rm -f
        $(call PatchDir,$(GENERIC_PATCH_DIR),generic/)
        $(call PatchDir,$(PATCH_DIR),platform/)
 endef
@@ -148,7 +145,7 @@ define Build/Quilt
   refresh: quilt-check
        @cd $(PKG_BUILD_DIR); quilt pop -a -f >/dev/null 2>/dev/null
        @cd $(PKG_BUILD_DIR); while quilt next 2>/dev/null >/dev/null && quilt push; do \
-               quilt refresh -p ab --no-index --quiltrc=/dev/null --no-timestamps; \
+               QUILT_DIFF_OPTS="-p" quilt refresh -p ab --no-index --quiltrc=/dev/null --no-timestamps; \
        done; ! quilt next 2>/dev/null >/dev/null
        $(Quilt/Refresh)