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

Julian Elischer julian at freebsd.org
Tue Apr 19 03:43:24 UTC 2016


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 <bsd.own.mk>
>   
>   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 <bsd.own.mk>
>   
> -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 <src.opts.mk>
>   
> -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 <src.opts.mk>
>   
> -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 <src.opts.mk>
>   
> -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 <src.opts.mk>
>   
> -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 <src.opts.mk>
>   
> -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 <src.opts.mk>
>   
> -ELFTCDIR=	${.CURDIR}/../../contrib/elftoolchain
> +ELFTCDIR=	${.CURDIR:H:H}/contrib/elftoolchain
>   
>   .PATH: ${ELFTCDIR}/strings
>   
>
>



More information about the svn-src-head mailing list