kernel: Fix kernel rebuilding
Commit 8ac7d31 introduced this issue.
Test: run `m installclean && m bootimage` and observe that
kernel image is built.
Change-Id: I41eb7cd2e5108bae8f4c40c0f9a300a8a3cc95a7
diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk
index fe6f385..11beccf 100644
--- a/build/tasks/kernel.mk
+++ b/build/tasks/kernel.mk
@@ -1,5 +1,5 @@
# Copyright (C) 2012 The CyanogenMod Project
-# (C) 2017-2020 The LineageOS Project
+# (C) 2017-2022 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -281,7 +281,7 @@
$(KERNEL_OUT):
mkdir -p $(KERNEL_OUT)
-$(KERNEL_CONFIG): $(ALL_KERNEL_DEFCONFIG_SRCS)
+$(KERNEL_CONFIG): $(KERNEL_OUT) $(ALL_KERNEL_DEFCONFIG_SRCS)
@echo "Building Kernel Config"
$(call make-kernel-target,VARIANT_DEFCONFIG=$(VARIANT_DEFCONFIG) SELINUX_DEFCONFIG=$(SELINUX_DEFCONFIG) $(KERNEL_DEFCONFIG))
$(hide) if [ ! -z "$(KERNEL_CONFIG_OVERRIDE)" ]; then \