aboutsummaryrefslogtreecommitdiffstats
path: root/include/toplevel.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-03 23:13:03 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-01-03 23:13:03 +0000
commitdd537242a22ac0ce430005b36491508101d72138 (patch)
tree220ed308c1b15d6f282024f2b71f606a4222a5f7 /include/toplevel.mk
parent6a90baf2bf5799cfcec9912bdd5c670603e5314a (diff)
downloadupstream-dd537242a22ac0ce430005b36491508101d72138.tar.gz
upstream-dd537242a22ac0ce430005b36491508101d72138.tar.bz2
upstream-dd537242a22ac0ce430005b36491508101d72138.zip
build: filter out relative directory entries from $PATH
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48107
Diffstat (limited to 'include/toplevel.mk')
-rw-r--r--include/toplevel.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/toplevel.mk b/include/toplevel.mk
index c8f342b48f..0b5ac2686f 100644
--- a/include/toplevel.mk
+++ b/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),)