treewide: add ORIG_PATH variable
Add a variable that stores the original value of $PATH
in the host system's shell, before Make alters it.
This can be useful for when it is necessary
to ignore symlinks and programs made by the build system.
Define this new variable before all instances of
'export PATH:=' or similar.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
(cherry picked from commit d87a8aa148)
This commit is contained in:
committed by
Petr Štetiar
parent
145d485d51
commit
948dc515dc
@@ -11,6 +11,7 @@ TARGET_STAMP:=$(TMP_DIR)/info/.files-$(SCAN_TARGET).stamp
|
||||
FILELIST:=$(TMP_DIR)/info/.files-$(SCAN_TARGET)-$(SCAN_COOKIE)
|
||||
OVERRIDELIST:=$(TMP_DIR)/info/.overrides-$(SCAN_TARGET)-$(SCAN_COOKIE)
|
||||
|
||||
export ORIG_PATH:=$(if $(ORIG_PATH),$(ORIG_PATH),$(PATH))
|
||||
export PATH:=$(STAGING_DIR_HOST)/bin:$(PATH)
|
||||
|
||||
define feedname
|
||||
|
||||
@@ -50,6 +50,7 @@ space:= $(empty) $(empty)
|
||||
path:=$(subst :,$(space),$(PATH))
|
||||
path:=$(filter-out .%,$(path))
|
||||
path:=$(subst $(space),:,$(path))
|
||||
export ORIG_PATH:=$(if $(ORIG_PATH),$(ORIG_PATH),$(PATH))
|
||||
export PATH:=$(path)
|
||||
export STAGING_DIR_HOST:=$(if $(STAGING_DIR),$(abspath $(STAGING_DIR)/../host),$(TOPDIR)/staging_dir/host)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user