Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 7375b109 authored by Tom Marshall's avatar Tom Marshall Committed by Rashed Abdel-Tawab
Browse files

build: Switch kernel header inclusion

The build is switching to the target INSTALLED_KERNEL_HEADERS to
declare dependencies on kernel headers.

Change-Id: I913e74681b02dfcf1eaed3d1e47ff4ab2300b12d
parent faa93d15
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -33,12 +33,19 @@ endif

my_soong_problems :=

# The proper dependency for kernel headers is INSTALLED_KERNEL_HEADERS.
# However, there are many instances of the old style dependencies in the
# source tree.  Fix them up and warn the user.
ifneq (,$(findstring $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr,$(LOCAL_ADDITIONAL_DEPENDENCIES)))
  LOCAL_ADDITIONAL_DEPENDENCIES := $(patsubst $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr,INSTALLED_KERNEL_HEADERS,$(LOCAL_ADDITIONAL_DEPENDENCIES))
endif

# Many qcom modules don't correctly set a dependency on the kernel headers. Fix it for them,
# but warn the user.
ifneq (,$(findstring $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include,$(LOCAL_C_INCLUDES)))
  ifeq (,$(findstring $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr,$(LOCAL_ADDITIONAL_DEPENDENCIES)))
  ifeq (,$(findstring INSTALLED_KERNEL_HEADERS,$(LOCAL_ADDITIONAL_DEPENDENCIES)))
    $(warning $(LOCAL_MODULE) uses kernel headers, but does not depend on them!)
    LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
    LOCAL_ADDITIONAL_DEPENDENCIES += INSTALLED_KERNEL_HEADERS
  endif
endif