add optional version suffix to kernel files/ directories
authorFelix Fietkau <nbd@openwrt.org>
Mon, 28 Apr 2008 22:01:14 +0000 (22:01 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 28 Apr 2008 22:01:14 +0000 (22:01 +0000)
SVN-Revision: 10972

include/kernel.mk
include/quilt.mk
include/target.mk

index b413d8484081aee30ab5063ef7c5c05bc348b891..52355dcdd313d79a148ca92afbac7cab7bb7ba93 100644 (file)
@@ -31,6 +31,7 @@ else
   endif
 
   PATCH_DIR ?= ./patches$(shell [ -d "./patches-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
+  FILES_DIR ?= ./files$(shell [ -d "./files-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
   KERNEL_BUILD_DIR ?= $(BUILD_DIR_BASE)/linux-$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET))$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
   LINUX_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
 
index 95f81e7094f6ac1f025bb6cf52ef0b9b0973856e..c310fd99acd2081a572dc96f1a4be1dd0feeb3e2 100644 (file)
@@ -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
@@ -67,9 +68,9 @@ endef
 
 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)/; \
+       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
        $(call PatchDir,$(GENERIC_PATCH_DIR),generic/)
index ce842da7951e469d2f994d1b51ed313d5d1a7611..7010424b436f924c22d3b66ac45bfe0642fbaf08 100644 (file)
@@ -106,6 +106,7 @@ include $(INCLUDE_DIR)/kernel-version.mk
 
 GENERIC_PLATFORM_DIR := $(TOPDIR)/target/linux/generic-$(KERNEL)
 GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/patches$(shell [ -d "$(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
+GENERIC_FILES_DIR := $(GENERIC_PLATFORM_DIR)/files$(shell [ -d "$(GENERIC_PLATFORM_DIR)/files-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
 
 GENERIC_LINUX_CONFIG?=$(firstword $(wildcard $(GENERIC_PLATFORM_DIR)/config-$(KERNEL_PATCHVER) $(GENERIC_PLATFORM_DIR)/config-default))
 LINUX_CONFIG?=$(firstword $(wildcard $(foreach subdir,$(PLATFORM_DIR) $(PLATFORM_SUBDIR),$(subdir)/config-$(KERNEL_PATCHVER) $(subdir)/config-default)))