kernel-defaults: fix external kernel build when user_headers is missing
authorMatt Merhar <mattmerhar@protonmail.com>
Fri, 26 Feb 2021 04:28:53 +0000 (23:28 -0500)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 23 May 2021 14:10:59 +0000 (16:10 +0200)
Use an 'if' so the absence of $(LINUX_DIR)/user_headers doesn't make the
line evaluate to false and cause the build to fail.

Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
(cherry picked from commit cc76e34c10e57cb1a4f7971268a77aad2f24c8ca)

include/kernel-defaults.mk

index e5a0ba367bffd5a09556a039d6c81940bed9dcd8..3aa1baa7610d95f88aea10e4896e12164bda8445 100644 (file)
@@ -43,7 +43,9 @@ else
                rmdir $(LINUX_DIR); \
        fi
        ln -s $(CONFIG_EXTERNAL_KERNEL_TREE) $(LINUX_DIR)
-       $(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] && rm -rf $(LINUX_DIR)/user_headers
+       if [ -d $(LINUX_DIR)/user_headers ]; then \
+               rm -rf $(LINUX_DIR)/user_headers; \
+       fi
   endef
 endif