Author: emaste
Date: Thu Apr 21 12:58:29 2016
New Revision: 298401
URL: https://svnweb.freebsd.org/changeset/base/298401

Log:
  elftoolchain: Use ${SRCTOP} for the top of the FreeBSD tree
  
  It's provided by sys.mk so there's no need to derive it from ${.CURDIR}.
  
  Suggested by: ngie
  Sponsored by: The FreeBSD Foundation
  Differential Revision:        https://reviews.freebsd.org/D5998

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  Thu Apr 21 11:32:22 2016        (r298400)
+++ head/lib/libdwarf/Makefile  Thu Apr 21 12:58:29 2016        (r298401)
@@ -2,8 +2,8 @@
 .include <bsd.own.mk>
 
 PACKAGE=lib${LIB}
-TOP=   ${.CURDIR:H:H}/contrib/elftoolchain
-SRCDIR=        ${TOP}/libdwarf
+ELFTCDIR=${SRCTOP}/contrib/elftoolchain
+SRCDIR=        ${ELFTCDIR}/libdwarf
 
 .PATH: ${SRCDIR}
 
@@ -92,7 +92,7 @@ GENSRCS=      dwarf_pubnames.c dwarf_pubtypes
                dwarf_pro_vars.c
 CLEANFILES=    ${GENSRCS}
 CLEANDIRS=     sys
-CFLAGS+=       -I. -I${SRCDIR} -I${TOP}/common -I${TOP}/libelf
+CFLAGS+=       -I. -I${SRCDIR} -I${ELFTCDIR}/common -I${ELFTCDIR}/libelf
 
 sys/elf32.h sys/elf64.h sys/elf_common.h: ${.CURDIR}/../../sys/${.TARGET} 
.NOMETA
        mkdir -p ${.OBJDIR}/sys

Modified: head/lib/libelf/Makefile
==============================================================================
--- head/lib/libelf/Makefile    Thu Apr 21 11:32:22 2016        (r298400)
+++ head/lib/libelf/Makefile    Thu Apr 21 12:58:29 2016        (r298401)
@@ -5,8 +5,8 @@ SHLIBDIR?= /lib
 
 .include <bsd.own.mk>
 
-TOP=   ${.CURDIR:H:H}/contrib/elftoolchain
-SRCDIR=        ${TOP}/libelf
+ELFTCDIR=${SRCTOP}/contrib/elftoolchain
+SRCDIR=        ${ELFTCDIR}/libelf
 
 .PATH: ${SRCDIR}
 
@@ -80,7 +80,7 @@ SRCS+=        sys/elf32.h sys/elf64.h sys/elf_c
 GENSRCS=       libelf_fsize.c libelf_msize.c libelf_convert.c
 CLEANFILES=    ${GENSRCS}
 CLEANDIRS=     sys
-CFLAGS+=       -I. -I${SRCDIR} -I${TOP}/common
+CFLAGS+=       -I. -I${SRCDIR} -I${ELFTCDIR}/common
 
 sys/elf32.h sys/elf64.h sys/elf_common.h: ${.CURDIR}/../../sys/${.TARGET} 
.NOMETA
        mkdir -p ${.OBJDIR}/sys

Modified: head/lib/libelftc/Makefile
==============================================================================
--- head/lib/libelftc/Makefile  Thu Apr 21 11:32:22 2016        (r298400)
+++ head/lib/libelftc/Makefile  Thu Apr 21 12:58:29 2016        (r298401)
@@ -4,7 +4,7 @@
 PACKAGE=lib${LIB}
 INTERNALLIB=
 
-ELFTCDIR=      ${.CURDIR:H:H}/contrib/elftoolchain
+ELFTCDIR=      ${SRCTOP}/contrib/elftoolchain
 
 .PATH: ${ELFTCDIR}/libelftc
 

Modified: head/usr.bin/addr2line/Makefile
==============================================================================
--- head/usr.bin/addr2line/Makefile     Thu Apr 21 11:32:22 2016        
(r298400)
+++ head/usr.bin/addr2line/Makefile     Thu Apr 21 12:58:29 2016        
(r298401)
@@ -2,7 +2,7 @@
 
 .include <src.opts.mk>
 
-ELFTCDIR=      ${.CURDIR:H:H}/contrib/elftoolchain
+ELFTCDIR=      ${SRCTOP}/contrib/elftoolchain
 ADDR2LINEDIR=  ${ELFTCDIR}/addr2line
 
 .PATH: ${ADDR2LINEDIR}

Modified: head/usr.bin/cxxfilt/Makefile
==============================================================================
--- head/usr.bin/cxxfilt/Makefile       Thu Apr 21 11:32:22 2016        
(r298400)
+++ head/usr.bin/cxxfilt/Makefile       Thu Apr 21 12:58:29 2016        
(r298401)
@@ -2,7 +2,7 @@
 
 .include <src.opts.mk>
 
-ELFTCDIR=      ${.CURDIR:H:H}/contrib/elftoolchain
+ELFTCDIR=      ${SRCTOP}/contrib/elftoolchain
 SRCDIR=                ${ELFTCDIR}/cxxfilt
 
 .PATH: ${SRCDIR}

Modified: head/usr.bin/elfcopy/Makefile
==============================================================================
--- head/usr.bin/elfcopy/Makefile       Thu Apr 21 11:32:22 2016        
(r298400)
+++ head/usr.bin/elfcopy/Makefile       Thu Apr 21 12:58:29 2016        
(r298401)
@@ -2,7 +2,7 @@
 
 .include <src.opts.mk>
 
-ELFTCDIR=      ${.CURDIR:H:H}/contrib/elftoolchain
+ELFTCDIR=      ${SRCTOP}/contrib/elftoolchain
 ELFCOPYDIR=    ${ELFTCDIR}/elfcopy
 
 .PATH: ${ELFCOPYDIR}

Modified: head/usr.bin/nm/Makefile
==============================================================================
--- head/usr.bin/nm/Makefile    Thu Apr 21 11:32:22 2016        (r298400)
+++ head/usr.bin/nm/Makefile    Thu Apr 21 12:58:29 2016        (r298401)
@@ -2,7 +2,7 @@
 
 .include <src.opts.mk>
 
-ELFTCDIR=      ${.CURDIR:H:H}/contrib/elftoolchain
+ELFTCDIR=      ${SRCTOP}/contrib/elftoolchain
 NMDIR=         ${ELFTCDIR}/nm
 
 .PATH: ${NMDIR}

Modified: head/usr.bin/readelf/Makefile
==============================================================================
--- head/usr.bin/readelf/Makefile       Thu Apr 21 11:32:22 2016        
(r298400)
+++ head/usr.bin/readelf/Makefile       Thu Apr 21 12:58:29 2016        
(r298401)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-ELFTCDIR=      ${.CURDIR:H:H}/contrib/elftoolchain
+ELFTCDIR=      ${SRCTOP}/contrib/elftoolchain
 READELFDIR=    ${ELFTCDIR}/readelf
 
 .PATH: ${READELFDIR}

Modified: head/usr.bin/size/Makefile
==============================================================================
--- head/usr.bin/size/Makefile  Thu Apr 21 11:32:22 2016        (r298400)
+++ head/usr.bin/size/Makefile  Thu Apr 21 12:58:29 2016        (r298401)
@@ -2,7 +2,7 @@
 
 .include <src.opts.mk>
 
-ELFTCDIR=      ${.CURDIR:H:H}/contrib/elftoolchain
+ELFTCDIR=      ${SRCTOP}/contrib/elftoolchain
 SIZEDIR=       ${ELFTCDIR}/size
 
 .PATH: ${SIZEDIR}

Modified: head/usr.bin/strings/Makefile
==============================================================================
--- head/usr.bin/strings/Makefile       Thu Apr 21 11:32:22 2016        
(r298400)
+++ head/usr.bin/strings/Makefile       Thu Apr 21 12:58:29 2016        
(r298401)
@@ -2,7 +2,7 @@
 
 .include <src.opts.mk>
 
-ELFTCDIR=      ${.CURDIR:H:H}/contrib/elftoolchain
+ELFTCDIR=      ${SRCTOP}/contrib/elftoolchain
 
 .PATH: ${ELFTCDIR}/strings
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to