Source: mesa Followup-For: Bug #972736 X-Debbugs-Cc: witold.bary...@gmail.com
I think a better approach, would be to use a trailing comms in the list "-Dvulkan-drivers=['amd','swrast',]" Does work. So doing: VULKAN_DRIVERS += 'intel', "-Dvulkan-drivers=[$(VULKAN_DRIVERS)]" would probably work. It requires each element of the list to be single quotes. Even nicer is just to use some Makefile magic, to convert list of words into ones with single quotes, then to convert spaces into commas. VULKAN_DRIVERS += amd VULKAN_DRIVERS += intel VULKAN_DRIVERS += swrast empty:= space := $(empty) $(empty) comma := , VULKAN_DRIVERS := $(patsubst %,'%',$(VULKAN_DRIVERS)) VULKAN_DRIVERS_LIST := $(subst $(space),$(comma),$(VULKAN_DRIVERS)) test: echo "[$(VULKAN_DRIVERS_LIST)]" $ make -s test ['amd','intel','swrast'] $ for empty list it give me this: $ make -s test [] $ Sweet! Maybe there is some shared function for Debian rules that already implement this for reuse. Cheers, Witold