build: Fix PATH shell export 85/42085/2
authorRenato Botelho do Couto <[email protected]>
Thu, 2 Jan 2025 17:54:15 +0000 (17:54 +0000)
committerMatthew Smith <[email protected]>
Mon, 6 Jan 2025 16:05:13 +0000 (16:05 +0000)
When $(wildcard /usr/lib*/ccache) returns more than one directory, they
are separated by space and it ends up setting only first one to PATH
variable while the rest of the string is just throwed to bash and it
ends up breaking the build.  This change replaces space by colon to keep
desired PATH string syntax.

Type: fix
Change-Id: I94ba3465a46fa3c4fbb50c9668f0afd97e8c4f91
Signed-off-by: Renato Botelho do Couto <[email protected]>
build-root/Makefile

index df4434d..b62a671 100644 (file)
@@ -317,7 +317,7 @@ endif
 
 BUILD_ENV =                                                                            \
     export CCACHE_DIR=$(CCACHE_DIR) ;                                  \
-    export PATH=$(wildcard /usr/lib*/ccache):$(TOOL_INSTALL_DIR)/bin:$${PATH} ;                \
+    export PATH=$$(echo $(wildcard /usr/lib*/ccache) | tr ' ' ':'):$(TOOL_INSTALL_DIR)/bin:$${PATH} ;          \
     $(if $(call configure_var_fn,PATH), export PATH=$${PATH}:$(call configure_var_fn,PATH);,)  \
     export PATH="`echo $${PATH} | sed -e s/[.]://`" ;                                  \
     $(if $(not_native),export CONFIG_SITE=$(MU_BUILD_ROOT_DIR)/config.site ;,) \