mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-19 22:43:22 +01:00
5472787377
Merge change from illumos: 1694 Add type-aware print() action This is a very nice feature implemented in upstream Dtrace. A complete description is available here: http://dtrace.org/blogs/eschrock/2011/10/26/your-mdb-fell-into-my-dtrace/ This change bumps the DT_VERS_* number to 1.9.0 in accordance to what is done in illumos. While here also include some minor cleanups to ease further merging and appease clang with a fix by Fabian Keil. Illumos Revisions: 13501:c3a7090dbc16 13483:f413e6c5d297 Reference: https://www.illumos.org/issues/1560 https://www.illumos.org/issues/1694 Tested by: Fabian Keil Obtained from: Illumos MFC after: 1 month
114 lines
2.9 KiB
Makefile
114 lines
2.9 KiB
Makefile
# $FreeBSD$
|
|
|
|
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/common
|
|
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libgen/common
|
|
|
|
LIB= dtrace
|
|
SRCS= dt_aggregate.c \
|
|
dt_as.c \
|
|
dt_buf.c \
|
|
dt_cc.c \
|
|
dt_cg.c \
|
|
dt_consume.c \
|
|
dt_decl.c \
|
|
dt_dis.c \
|
|
dt_dof.c \
|
|
dt_error.c \
|
|
dt_errtags.c \
|
|
dt_grammar.y \
|
|
dt_handle.c \
|
|
dt_ident.c \
|
|
dt_isadep.c \
|
|
dt_inttab.c \
|
|
dt_lex.l \
|
|
dt_link.c \
|
|
dt_list.c \
|
|
dt_map.c \
|
|
dt_module.c \
|
|
dt_names.c \
|
|
dt_open.c \
|
|
dt_options.c \
|
|
dt_parser.c \
|
|
dt_pcb.c \
|
|
dt_pid.c \
|
|
dt_pragma.c \
|
|
dt_print.c \
|
|
dt_printf.c \
|
|
dt_proc.c \
|
|
dt_program.c \
|
|
dt_provider.c \
|
|
dt_regset.c \
|
|
dt_string.c \
|
|
dt_strtab.c \
|
|
dt_subr.c \
|
|
dt_work.c \
|
|
dt_xlator.c \
|
|
gmatch.c
|
|
|
|
DSRCS= errno.d \
|
|
io.d \
|
|
psinfo.d \
|
|
signal.d \
|
|
unistd.d
|
|
|
|
WARNS?= 1
|
|
|
|
CFLAGS+= -I${.OBJDIR} -I${.CURDIR} \
|
|
-I${.CURDIR}/../../../sys/cddl/dev/dtrace/${MACHINE_ARCH} \
|
|
-I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
|
|
-I${.CURDIR}/../../../cddl/compat/opensolaris/include \
|
|
-I${OPENSOLARIS_USR_DISTDIR}/head \
|
|
-I${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common \
|
|
-I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \
|
|
-I${OPENSOLARIS_SYS_DISTDIR}/uts/common
|
|
|
|
#CFLAGS+= -DYYDEBUG
|
|
|
|
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
|
|
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel -DDIS_MEM
|
|
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/i386
|
|
.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/${MACHINE_ARCH}
|
|
.elif ${MACHINE_CPUARCH} == "sparc64"
|
|
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/sparc
|
|
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/sparc
|
|
.elif ${MACHINE_CPUARCH} == "mips"
|
|
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/mips
|
|
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/mips
|
|
.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/mips
|
|
.elif ${MACHINE_CPUARCH} == "powerpc"
|
|
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/powerpc
|
|
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/powerpc
|
|
.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/powerpc
|
|
.else
|
|
# temporary hack
|
|
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel
|
|
.endif
|
|
|
|
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
|
|
SRCS+= dis_tables.c
|
|
DSRCS+= regs_x86.d
|
|
.endif
|
|
|
|
LFLAGS+=-l
|
|
|
|
YFLAGS+=-d
|
|
|
|
CLEANFILES= dt_errtags.c dt_names.c
|
|
|
|
dt_errtags.c:
|
|
sh ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mkerrtags.sh < ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/dt_errtags.h > dt_errtags.c
|
|
|
|
dt_names.c:
|
|
sh ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mknames.sh < ${OPENSOLARIS_SYS_DISTDIR}/uts/common/sys/dtrace.h > dt_names.c
|
|
|
|
beforedepend: dt_errtags.c dt_names.c
|
|
|
|
beforeinstall:
|
|
.if !defined(LIBRARIES_ONLY) && exists(${DESTDIR}/usr/lib/dtrace)
|
|
.for file in ${DSRCS}
|
|
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} ${.CURDIR}/${file} ${DESTDIR}/usr/lib/dtrace
|
|
.endfor
|
|
.endif
|
|
|
|
.include <bsd.lib.mk>
|