create_dummies: fix detection of out-of-tree build

Fix genodelabs/genode#4410
This commit is contained in:
Stefan Kalkowski 2022-01-06 16:33:20 +01:00 committed by Norman Feske
parent 59936c22c0
commit 144cc8ac54

View File

@ -119,7 +119,7 @@ ifneq ($(realpath $(LINUX_KERNEL_DIR)),)
# determine kernel source dir if an out-of-tree build directory is specified # determine kernel source dir if an out-of-tree build directory is specified
LINUX_SRC_DIR := $(LINUX_KERNEL_DIR) LINUX_SRC_DIR := $(LINUX_KERNEL_DIR)
ifneq ($(shell grep "Automatically generated by" $(LINUX_KERNEL_DIR)/Makefile),) ifneq ($(shell grep "^\# Automatically generated by" $(LINUX_KERNEL_DIR)/Makefile),)
LINUX_SRC_DIR := $(shell sed -n "/^include/s/.* \(.*\)\/Makefile/\\1/p" $(LINUX_KERNEL_DIR)/Makefile) LINUX_SRC_DIR := $(shell sed -n "/^include/s/.* \(.*\)\/Makefile/\\1/p" $(LINUX_KERNEL_DIR)/Makefile)
endif endif