X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/5925d4c0b5f1a1cade2c6123e2e8eec746560ef4..1846ada5d5a04c61bdbe38ba42180ac6d62c0dab:/include/quilt.mk?ds=inline diff --git a/include/quilt.mk b/include/quilt.mk index f07f4c524..d3233d823 100644 --- a/include/quilt.mk +++ b/include/quilt.mk @@ -12,6 +12,7 @@ ifeq ($(TARGET_BUILD),1) PKG_BUILD_DIR:=$(LINUX_DIR) endif PATCH_DIR?=./patches +FILES_DIR?=./files ifeq ($(MAKECMDGOALS),refresh) override QUILT=1 @@ -65,10 +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_PLATFORM_DIR)/files ]; then $(CP) $(GENERIC_PLATFORM_DIR)/files/* $(LINUX_DIR)/; fi - if [ -d ./files ]; then $(CP) ./files/* $(LINUX_DIR)/; 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 @@ -144,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; \ + 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)