Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad480c26 authored by Aaron Kling's avatar Aaron Kling Committed by Luca Stefani
Browse files

core/Makefile: Fix filenames with commas

Prior to this, any filenames with commas, for example device specific
nvrams or hcds compatible with the mainline kernel, would cause a build
failure because GNU make can't handle passing an argument with a comma
because comma is the delimiter.

To work around this pass the arguments via variables local to the rule.

Change-Id: I852b36d7194394389a63683fc8c68474f8323d9b
parent 7edeaad1
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3488,12 +3488,14 @@ endef
#   $(2): The partition's staging directory
#   $(3): Files to include in the partition
define write-partition-file-list
$(1): PRIVATE_FILES := $(subst $(2)/,,$(filter $(2)/%,$(3)))
$(1): PRIVATE_EXTRA_INSTALL_ZIPS := $(call relevant-extra-install-zips,$(filter $(2)/%,$(3)))
$(1): $$(HOST_OUT_EXECUTABLES)/extra_install_zips_file_list $(foreach p,$(call relevant-extra-install-zips,$(filter $(2)/%,$(3))),$(call word-colon,3,$(p)))
	@echo Writing $$@
	rm -f $$@
	echo -n > $$@
	$$(foreach f,$(subst $(2)/,,$(filter $(2)/%,$(3))),echo "$$(f)" >> $$@$$(newline))
	$$(HOST_OUT_EXECUTABLES)/extra_install_zips_file_list $(2) $(call relevant-extra-install-zips,$(filter $(2)/%,$(3))) >> $$@
	$$(foreach f,$$(PRIVATE_FILES),echo "$$(f)" >> $$@$$(newline))
	$$(HOST_OUT_EXECUTABLES)/extra_install_zips_file_list $(2) $$(PRIVATE_EXTRA_INSTALL_ZIPS) >> $$@
endef

# -----------------------------------------------------------------