From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 90FE08E7A for ; Fri, 11 Dec 2015 13:44:29 +0100 (CET) Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 40CC84C50A; Fri, 11 Dec 2015 12:44:28 +0000 (UTC) Received: from sopuli.koti.laiskiainen.org.com (vpn1-4-166.ams2.redhat.com [10.36.4.166]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tBBCiQZJ009337; Fri, 11 Dec 2015 07:44:27 -0500 From: Panu Matilainen To: dev@dpdk.org Date: Fri, 11 Dec 2015 14:44:23 +0200 Message-Id: <37b46e91bdb51e6116df9a7edc2eb79206237f1c.1449837863.git.pmatilai@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 Subject: [dpdk-dev] [PATCH] scripts: fix relpath.sh output when $prefix is set in environment X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 12:44:29 -0000 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. Signed-off-by: Panu Matilainen --- scripts/relpath.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/relpath.sh b/scripts/relpath.sh index 7d2f48f..4ff4671 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 -- 2.5.0