From: Panu Matilainen Date: Fri, 11 Dec 2015 12:44:23 +0000 (+0200) Subject: scripts: fix relpath.sh output when $prefix is set in environment X-Git-Tag: spdx-start~7787 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=08def3afcb135364d25c71de26ccf0876e1b90fd;p=dpdk.git scripts: fix relpath.sh output when $prefix is set in environment When relpath.sh is called from install target with prefix set, eg "make install DESTDIR=/tmp/dpdk-root prefix=/usr", the prefix from the environment leaks to relpath.sh internal helper variable and causes incorrect symlinks to be generated in sdk $(targetdir): include -> /usr../../../include/dpdk lib -> /usr../../../lib Initialize the local variable to empty to avoid side-effects from environment. Fixes: 6b62a72a70d0 ("mk: install a standard cutomizable tree") Signed-off-by: Panu Matilainen --- diff --git a/scripts/relpath.sh b/scripts/relpath.sh index 7d2f48f9bb..4ff4671e93 100755 --- a/scripts/relpath.sh +++ b/scripts/relpath.sh @@ -61,6 +61,8 @@ right2=${REL2#*/} prev_right2=$REL2 prev_left2= +prefix= + while [ "${right1}" != "" -a "${right2}" != "" ]; do if [ "$left1" != "$left2" ]; then