X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/da597e080b28be50974e9c64754cbc772a25469d..82bf9db5f0fe0e90881bdd0eaaf927cf1bc45c62:/include/quilt.mk diff --git a/include/quilt.mk b/include/quilt.mk index ffc5850d8..d3233d823 100644 --- a/include/quilt.mk +++ b/include/quilt.mk @@ -66,13 +66,11 @@ define Build/Patch/Default $(call PatchDir,$(PATCH_DIR),) endef +kernel_files=$(foreach fdir,$(GENERIC_FILES_DIR) $(FILES_DIR),$(fdir)/.) define Kernel/Patch/Default - $(if $(QUILT),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 + rm -rf $(PKG_BUILD_DIR)/patches; mkdir -p $(PKG_BUILD_DIR)/patches + $(if $(kernel_files),$(CP) $(kernel_files) $(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 +146,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)