tool/dde_linux: fix create_dummies for GNU Make 4.4

GNU Make 4.4 will pass TARGET to the sub-make of UNDEF_REFS where it can
be later used as link TARGET by Genode's build system. Before 4.4 TARGET
was undefined in the sub-make leading to the correct result.
This commit is contained in:
Sebastian Sumpf 2023-09-01 16:39:41 +02:00 committed by Christian Helmuth
parent bb51c113ca
commit b025ddcc8f

View File

@ -154,8 +154,10 @@ endif # LINUX_KERNEL_DIR specified
#
# Collect undefined references for target
#
UNDEF_REFS := $(sort $(subst `,,$(subst ',,$(shell make -C $(BUILD_DIR) $(TARGET) 2>&1 | grep " undefined reference to " | sed -e "s/.* reference to //"))))
# use 'env - ' to reset environment, especially TARGET because it will be used by Genode's build sytem
# during linking later on and not point to the actual build TARGET (GNU Make 4.4+)
#
UNDEF_REFS := $(sort $(subst `,,$(subst ',,$(shell env - PATH=$(PATH) make -C $(BUILD_DIR) $(TARGET) 2>&1 | grep " undefined reference to " | sed -e "s/.* reference to //"))))
define print_file_header
echo "/*" > $(2);