- if [ -d $(GENERIC_PLATFORM_DIR)/files ]; then $(CP) $(GENERIC_PLATFORM_DIR)/files/* $(LINUX_DIR)/; fi
- if [ -d ./files ]; then $(CP) ./files/* $(LINUX_DIR)/; fi
- $(call PatchDir,$(GENERIC_PATCH_DIR),generic/)
- $(call PatchDir,$(PATCH_DIR),platform/)
+ $(if $(kernel_files),$(CP) $(kernel_files) $(LINUX_DIR)/)
+ find $(LINUX_DIR)/ -name \*.rej -or -name \*.orig | $(XARGS) rm -f
+ if [ -d $(GENERIC_PLATFORM_DIR)/patches$(if $(wildcard $(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER)) ]; then \
+ echo "generic patches directory is present. please move your patches to the pending directory" ; \
+ exit 1; \
+ fi
+ $(call PatchDir,$(PKG_BUILD_DIR),$(GENERIC_BACKPORT_DIR),generic-backport/)
+ $(call PatchDir,$(PKG_BUILD_DIR),$(GENERIC_PATCH_DIR),generic/)
+ $(call PatchDir,$(PKG_BUILD_DIR),$(GENERIC_HACK_DIR),generic-hack/)
+ $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR),platform/)