From patchwork Fri Dec 11 12:44:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Panu Matilainen X-Patchwork-Id: 9493 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id C35B78E7B; Fri, 11 Dec 2015 13:44:31 +0100 (CET) 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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