[tools] slightly rework the gcc-4.3 checks, thanks {Nico}
[openwrt.git] / include / quilt.mk
index 70bc84e..d3233d8 100644 (file)
@@ -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
This page took 0.020727 seconds and 4 git commands to generate.