Browse Source

build: filter out relative directory entries from $PATH

Signed-off-by: Felix Fietkau <[email protected]>

SVN-Revision: 48107
Felix Fietkau 10 years ago
parent
commit
dd537242a2
1 changed files with 7 additions and 0 deletions
  1. 7 0
      include/toplevel.mk

+ 7 - 0
include/toplevel.mk

@@ -39,6 +39,13 @@ unexport LPATH
 # make sure that a predefined CFLAGS variable does not disturb packages
 export CFLAGS=
 
+empty:=
+space:= $(empty) $(empty)
+path:=$(subst :,$(space),$(PATH))
+path:=$(filter-out .%,$(path))
+path:=$(subst $(space),:,$(path))
+export PATH:=$(path)
+
 unexport TAR_OPTIONS
 
 ifneq ($(shell $(HOSTCC) 2>&1 | grep clang),)