scripts: fix relpath.sh output when $prefix is set in environment
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 11 Dec 2015 12:44:23 +0000 (14:44 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 11 Dec 2015 23:34:57 +0000 (00:34 +0100)
commit08def3afcb135364d25c71de26ccf0876e1b90fd
tree7aca355492b13c0790ce0a02774cb6d09f88aabb
parentd0228ccbe227a65756c274c8a947b6965ece829b
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 <pmatilai@redhat.com>
scripts/relpath.sh