From owner-svn-src-all@freebsd.org Tue Apr 19 03:43:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70E49B1432F; Tue, 19 Apr 2016 03:43:24 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 406A31D3D; Tue, 19 Apr 2016 03:43:23 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-252-92.lns20.per4.internode.on.net [121.45.252.92]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id u3J3hBJt015178 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 18 Apr 2016 20:43:16 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r298204 - in head: lib/libdwarf lib/libelf lib/libelftc usr.bin/addr2line usr.bin/cxxfilt usr.bin/elfcopy usr.bin/nm usr.bin/readelf usr.bin/size usr.bin/strings To: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201604181313.u3IDDxsK064810@repo.freebsd.org> From: Julian Elischer Message-ID: <5715A949.1020100@freebsd.org> Date: Tue, 19 Apr 2016 11:43:05 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <201604181313.u3IDDxsK064810@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2016 03:43:24 -0000 On 18/04/2016 9:13 PM, Ed Maste wrote: > Author: emaste > Date: Mon Apr 18 13:13:59 2016 > New Revision: 298204 > URL: https://svnweb.freebsd.org/changeset/base/298204 > > Log: > Replace ${CURDIR}/../.. with ${CURDIR:H:H} in elftoolchain and if the last component is '..' ? What our FreeBSD lacks are the $(abspath ... ) or $(realpath ...) operations from gnu make. Actually it lacks a LOT from gnu make. I'd love to see us import a lot of things from there that are genuinely useful (and a lot less cryptic). you could try make use of :tA in to make this more robust and useful. > > This produces a nicer path in debug info and build logs. > > MFC after: 1 week > Sponsored by: The FreeBSD Foundation > > Modified: > head/lib/libdwarf/Makefile > head/lib/libelf/Makefile > head/lib/libelftc/Makefile > head/usr.bin/addr2line/Makefile > head/usr.bin/cxxfilt/Makefile > head/usr.bin/elfcopy/Makefile > head/usr.bin/nm/Makefile > head/usr.bin/readelf/Makefile > head/usr.bin/size/Makefile > head/usr.bin/strings/Makefile > > Modified: head/lib/libdwarf/Makefile > ============================================================================== > --- head/lib/libdwarf/Makefile Mon Apr 18 11:39:41 2016 (r298203) > +++ head/lib/libdwarf/Makefile Mon Apr 18 13:13:59 2016 (r298204) > @@ -2,7 +2,7 @@ > .include > > PACKAGE=lib${LIB} > -TOP= ${.CURDIR}/../../contrib/elftoolchain > +TOP= ${.CURDIR:H:H}/contrib/elftoolchain > SRCDIR= ${TOP}/libdwarf > > .PATH: ${SRCDIR} > > Modified: head/lib/libelf/Makefile > ============================================================================== > --- head/lib/libelf/Makefile Mon Apr 18 11:39:41 2016 (r298203) > +++ head/lib/libelf/Makefile Mon Apr 18 13:13:59 2016 (r298204) > @@ -5,7 +5,7 @@ SHLIBDIR?= /lib > > .include > > -TOP= ${.CURDIR}/../../contrib/elftoolchain > +TOP= ${.CURDIR:H:H}/contrib/elftoolchain > SRCDIR= ${TOP}/libelf > > .PATH: ${SRCDIR} > > Modified: head/lib/libelftc/Makefile > ============================================================================== > --- head/lib/libelftc/Makefile Mon Apr 18 11:39:41 2016 (r298203) > +++ head/lib/libelftc/Makefile Mon Apr 18 13:13:59 2016 (r298204) > @@ -4,7 +4,7 @@ > PACKAGE=lib${LIB} > INTERNALLIB= > > -ELFTCDIR= ${.CURDIR}/../../contrib/elftoolchain > +ELFTCDIR= ${.CURDIR:H:H}/contrib/elftoolchain > > .PATH: ${ELFTCDIR}/libelftc > > > Modified: head/usr.bin/addr2line/Makefile > ============================================================================== > --- head/usr.bin/addr2line/Makefile Mon Apr 18 11:39:41 2016 (r298203) > +++ head/usr.bin/addr2line/Makefile Mon Apr 18 13:13:59 2016 (r298204) > @@ -2,7 +2,7 @@ > > .include > > -ELFTCDIR= ${.CURDIR}/../../contrib/elftoolchain > +ELFTCDIR= ${.CURDIR:H:H}/contrib/elftoolchain > ADDR2LINEDIR= ${ELFTCDIR}/addr2line > > .PATH: ${ADDR2LINEDIR} > > Modified: head/usr.bin/cxxfilt/Makefile > ============================================================================== > --- head/usr.bin/cxxfilt/Makefile Mon Apr 18 11:39:41 2016 (r298203) > +++ head/usr.bin/cxxfilt/Makefile Mon Apr 18 13:13:59 2016 (r298204) > @@ -2,7 +2,7 @@ > > .include > > -ELFTCDIR= ${.CURDIR}/../../contrib/elftoolchain > +ELFTCDIR= ${.CURDIR:H:H}/contrib/elftoolchain > SRCDIR= ${ELFTCDIR}/cxxfilt > > .PATH: ${SRCDIR} > > Modified: head/usr.bin/elfcopy/Makefile > ============================================================================== > --- head/usr.bin/elfcopy/Makefile Mon Apr 18 11:39:41 2016 (r298203) > +++ head/usr.bin/elfcopy/Makefile Mon Apr 18 13:13:59 2016 (r298204) > @@ -2,7 +2,7 @@ > > .include > > -ELFTCDIR= ${.CURDIR}/../../contrib/elftoolchain > +ELFTCDIR= ${.CURDIR:H:H}/contrib/elftoolchain > ELFCOPYDIR= ${ELFTCDIR}/elfcopy > > .PATH: ${ELFCOPYDIR} > > Modified: head/usr.bin/nm/Makefile > ============================================================================== > --- head/usr.bin/nm/Makefile Mon Apr 18 11:39:41 2016 (r298203) > +++ head/usr.bin/nm/Makefile Mon Apr 18 13:13:59 2016 (r298204) > @@ -2,7 +2,7 @@ > > .include > > -ELFTCDIR= ${.CURDIR}/../../contrib/elftoolchain > +ELFTCDIR= ${.CURDIR:H:H}/contrib/elftoolchain > NMDIR= ${ELFTCDIR}/nm > > .PATH: ${NMDIR} > > Modified: head/usr.bin/readelf/Makefile > ============================================================================== > --- head/usr.bin/readelf/Makefile Mon Apr 18 11:39:41 2016 (r298203) > +++ head/usr.bin/readelf/Makefile Mon Apr 18 13:13:59 2016 (r298204) > @@ -1,6 +1,6 @@ > # $FreeBSD$ > > -ELFTCDIR= ${.CURDIR}/../../contrib/elftoolchain > +ELFTCDIR= ${.CURDIR:H:H}/contrib/elftoolchain > READELFDIR= ${ELFTCDIR}/readelf > > .PATH: ${READELFDIR} > > Modified: head/usr.bin/size/Makefile > ============================================================================== > --- head/usr.bin/size/Makefile Mon Apr 18 11:39:41 2016 (r298203) > +++ head/usr.bin/size/Makefile Mon Apr 18 13:13:59 2016 (r298204) > @@ -2,7 +2,7 @@ > > .include > > -ELFTCDIR= ${.CURDIR}/../../contrib/elftoolchain > +ELFTCDIR= ${.CURDIR:H:H}/contrib/elftoolchain > SIZEDIR= ${ELFTCDIR}/size > > .PATH: ${SIZEDIR} > > Modified: head/usr.bin/strings/Makefile > ============================================================================== > --- head/usr.bin/strings/Makefile Mon Apr 18 11:39:41 2016 (r298203) > +++ head/usr.bin/strings/Makefile Mon Apr 18 13:13:59 2016 (r298204) > @@ -2,7 +2,7 @@ > > .include > > -ELFTCDIR= ${.CURDIR}/../../contrib/elftoolchain > +ELFTCDIR= ${.CURDIR:H:H}/contrib/elftoolchain > > .PATH: ${ELFTCDIR}/strings > > >