Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tools When building tools use a dedicated subdirectory for c...



details:   https://anonhg.NetBSD.org/src/rev/28971b692ad3
branches:  trunk
changeset: 365208:28971b692ad3
user:      jkoshy <jkoshy%NetBSD.org@localhost>
date:      Wed Apr 13 17:52:56 2022 +0000

description:
When building tools use a dedicated subdirectory for compiling
Elftoolchain code.

Build and install <sys/elfdefinitions.h> in ${TOOLDIR}/include.

This change prepares the ground for upgrading libelf and libdwarf to
their current Elftoolchain versions.

diffstat:

 tools/Makefile                         |   3 +-
 tools/elftoolchain/Makefile            |   5 ++++
 tools/elftoolchain/common/sys/Makefile |  41 ++++++++++++++++++++++++++++++++++
 3 files changed, 48 insertions(+), 1 deletions(-)

diffs (71 lines):

diff -r dc30ff8390d3 -r 28971b692ad3 tools/Makefile
--- a/tools/Makefile    Wed Apr 13 15:24:42 2022 +0000
+++ b/tools/Makefile    Wed Apr 13 17:52:56 2022 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.212 2021/11/14 15:48:02 skrll Exp $
+#      $NetBSD: Makefile,v 1.213 2022/04/13 17:52:56 jkoshy Exp $
 
 .include <bsd.own.mk>
 .include <bsd.endian.mk>
@@ -58,6 +58,7 @@
 
 DTRACE_BITS=
 .if ${MKDTRACE} != "no" || ${MKCTF} != "no"
+DTRACE_BITS+= .WAIT elftoolchain
 DTRACE_BITS+= .WAIT libelf
 DTRACE_BITS+= .WAIT libdwarf
 DTRACE_BITS+= .WAIT libctf
diff -r dc30ff8390d3 -r 28971b692ad3 tools/elftoolchain/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/elftoolchain/Makefile       Wed Apr 13 17:52:56 2022 +0000
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2022/04/13 17:52:56 jkoshy Exp $
+
+SUBDIR= common
+
+.include <bsd.subdir.mk>
diff -r dc30ff8390d3 -r 28971b692ad3 tools/elftoolchain/common/sys/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/elftoolchain/common/sys/Makefile    Wed Apr 13 17:52:56 2022 +0000
@@ -0,0 +1,41 @@
+#      $NetBSD: Makefile,v 1.1 2022/04/13 17:52:56 jkoshy Exp $
+
+.include <bsd.hostinit.mk>
+
+SRCDIR=        ${.CURDIR}/../../../../external/bsd/elftoolchain/dist/common/sys
+
+.PATH: ${SRCDIR}
+
+INCS=          elfdefinitions.h
+HOST_INCSDIR=  ${TOOLDIR}/include/sys
+
+elfdefinitions.h:      elfdefinitions.m4 elfconstants.m4
+       ${TOOL_M4} -I${SRCDIR} -D SRCDIR=${SRCDIR} ${M4FLAGS} \
+               elfdefinitions.m4 > ${.TARGET}
+
+.PHONY:        all clean clobber depend
+
+install: .PHONY ${HOST_INCSDIR} .WAIT includes
+
+${HOST_INCSDIR}:
+       ${_MKTARGET_INSTALL}
+       ${HOST_INSTALL_DIR} ${HOST_INCSDIR}
+
+.for _f in ${INCS}
+HOST_INCINSTFILES+= ${HOST_INCSDIR}/${_f}
+${HOST_INCSDIR}/${_f}: ${_f}
+       ${_MKTARGET_INSTALL}
+       ${HOST_INSTALL_FILE} ${.ALLSRC} ${.TARGET}
+.endfor
+
+includes: .PHONY ${HOST_INCSDIR} .WAIT ${HOST_INCINSTFILES}
+
+all dependall depend:  ${INCS}
+
+clean clobber:
+       rm -f ${INCS}
+
+cleandepend:
+       rm -f ${.OBJDIR}/.depend
+
+.include <bsd.obj.mk>



Home | Main Index | Thread Index | Old Index