diff options
author | Scott Mertz <scott@cyngn.com> | 2016-01-26 09:20:17 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-01-26 17:08:54 -0800 |
commit | 1b6aaec245bca0d95326698d7ff1c2c117d760e8 (patch) | |
tree | 0c69fc965cc2d43b9415f8f1c41ad87d954fe0d1 /core/tasks | |
parent | 30ca83f1a59075ef313675c5886aac978147e8e4 (diff) | |
download | build-1b6aaec245bca0d95326698d7ff1c2c117d760e8.zip build-1b6aaec245bca0d95326698d7ff1c2c117d760e8.tar.gz build-1b6aaec245bca0d95326698d7ff1c2c117d760e8.tar.bz2 |
build: force .config update if additional kernel config changes
This patch forces a regeneration of the .config if either the
contents of TARGET_KERNEL_ADDITIONAL_CONFIG changes or the value
of TARGET_KERNEL_ADDITIONAL_CONFIG changes.
OPO-360
Change-Id: Ide28be3fab01b9f9ad72aa9d8706131e2b9ac0c7
Diffstat (limited to 'core/tasks')
-rw-r--r-- | core/tasks/kernel.mk | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/core/tasks/kernel.mk b/core/tasks/kernel.mk index 763df73..4486044 100644 --- a/core/tasks/kernel.mk +++ b/core/tasks/kernel.mk @@ -86,6 +86,13 @@ endif ifneq ($(TARGET_KERNEL_ADDITIONAL_CONFIG),) KERNEL_ADDITIONAL_CONFIG := $(TARGET_KERNEL_ADDITIONAL_CONFIG) +KERNEL_ADDITIONAL_CONFIG_SRC := $(KERNEL_SRC)/arch/$(KERNEL_ARCH)/configs/$(KERNEL_ADDITIONAL_CONFIG) + ifeq ("$(wildcard $(KERNEL_ADDITIONAL_CONFIG_SRC))","") + $(warning TARGET_KERNEL_ADDITIONAL_CONFIG '$(TARGET_KERNEL_ADDITIONAL_CONFIG)' doesn't exist) + KERNEL_ADDITIONAL_CONFIG_SRC := /dev/null + endif +else + KERNEL_ADDITIONAL_CONFIG_SRC := /dev/null endif ## Do be discontinued in a future version. Notify builder about target @@ -228,7 +235,13 @@ $(KERNEL_OUT_STAMP): $(hide) mkdir -p $(KERNEL_MODULES_OUT) $(hide) touch $@ -$(KERNEL_CONFIG): $(KERNEL_OUT_STAMP) $(KERNEL_DEFCONFIG_SRC) +KERNEL_ADDITIONAL_CONFIG_OUT := $(KERNEL_OUT)/.additional_config + +.PHONY: force_additional_config +$(KERNEL_ADDITIONAL_CONFIG_OUT): force_additional_config + $(hide) cmp -s $(KERNEL_ADDITIONAL_CONFIG_SRC) $@ || cp $(KERNEL_ADDITIONAL_CONFIG_SRC) $@; + +$(KERNEL_CONFIG): $(KERNEL_OUT_STAMP) $(KERNEL_DEFCONFIG_SRC) $(KERNEL_ADDITIONAL_CONFIG_OUT) $(MAKE) $(MAKE_FLAGS) -C $(KERNEL_SRC) O=$(KERNEL_OUT) ARCH=$(KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) VARIANT_DEFCONFIG=$(VARIANT_DEFCONFIG) SELINUX_DEFCONFIG=$(SELINUX_DEFCONFIG) $(KERNEL_DEFCONFIG) $(hide) if [ ! -z "$(KERNEL_CONFIG_OVERRIDE)" ]; then \ echo "Overriding kernel config with '$(KERNEL_CONFIG_OVERRIDE)'"; \ |