X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/647f6d6949bdb8e81b2d2b0cae5465a7b75b05d3..2f23c770ba8cc33ecef97b4894e65a202704be2c:/include/quilt.mk diff --git a/include/quilt.mk b/include/quilt.mk index 70bc84e4c..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 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 + $(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