envsetup: Set INLINE_KERNEL_BUILDING based on TARGET_NO_KERNEL

Change-Id: I2404adf572bdafb91edc66a19a83a2696004b33f
diff --git a/envsetup.sh b/envsetup.sh
index 3259fd0..a2ccd17 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -546,6 +546,13 @@
     # Note this is the string "release", not the value of the variable.
     export TARGET_BUILD_TYPE=release
 
+    local no_kernel=$(_get_build_var_cached TARGET_NO_KERNEL)
+    if [[ "$no_kernel" == "true" ]]; then
+        unset INLINE_KERNEL_BUILDING
+    else
+        export INLINE_KERNEL_BUILDING=true
+    fi
+
     [[ -n "${ANDROID_QUIET_BUILD:-}" ]] || echo
 
     fixup_common_out_dir