Add DTrace (SystemTap resp.) support for relevant platforms

This commit is contained in:
fhajny 2012-04-16 07:28:14 +00:00
parent 01da6dc29f
commit 5cb8d12543
2 changed files with 21 additions and 3 deletions

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.9 2012/04/12 12:14:12 asau Exp $
@comment $NetBSD: PLIST,v 1.10 2012/04/16 07:28:14 fhajny Exp $
bin/ct_run
bin/dialyzer
bin/epmd
@ -3481,6 +3481,7 @@ lib/erlang/lib/runtime_tools-${VERSION.runtime_tools}/include/observer_backend.h
lib/erlang/lib/runtime_tools-${VERSION.runtime_tools}/priv/lib/dyntrace.so
lib/erlang/lib/runtime_tools-${VERSION.runtime_tools}/priv/lib/trace_file_drv.so
lib/erlang/lib/runtime_tools-${VERSION.runtime_tools}/priv/lib/trace_ip_drv.so
${PLIST.dtrace}lib/erlang/lib/runtime_tools-${VERSION.runtime_tools}/priv/obj/dtrace_user.o
lib/erlang/lib/runtime_tools-${VERSION.runtime_tools}/priv/obj/dyntrace.o
lib/erlang/lib/runtime_tools-${VERSION.runtime_tools}/src/dbg.erl
lib/erlang/lib/runtime_tools-${VERSION.runtime_tools}/src/dyntrace.erl

View file

@ -1,4 +1,4 @@
# $NetBSD: options.mk,v 1.4 2011/04/14 19:34:07 asau Exp $
# $NetBSD: options.mk,v 1.5 2012/04/16 07:28:14 fhajny Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.erlang
PKG_SUPPORTED_OPTIONS= java erlang-hipe
@ -16,9 +16,14 @@ PKG_SUGGESTED_OPTIONS= # empty
PKG_SUGGESTED_OPTIONS+= erlang-hipe
.endif
.if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD" || \
${OPSYS} == "Linux"
PKG_SUPPORTED_OPTIONS+= dtrace
.endif
.include "../../mk/bsd.options.mk"
PLIST_VARS+= odbc
PLIST_VARS+= odbc dtrace
.if !empty(PKG_OPTIONS:Mjava)
USE_JAVA= yes
@ -51,6 +56,18 @@ CONFIGURE_ARGS+= --with-odbc=${BUILDLINK_PREFIX.unixodbc}
PLIST.odbc= yes
.endif
###
### DTrace support
###
.if !empty(PKG_OPTIONS:Mdtrace)
. if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD"
CONFIGURE_ARGS+= --with-dynamic-trace=dtrace
. elif ${OPSYS} == "Linux"
CONFIGURE_ARGS+= --with-dynamic-trace=systemtap
. endif
PLIST.dtrace= yes
.endif
# Help generate optional PLIST parts:
PRINT_PLIST_AWK+= {if ($$0 ~ /\/erlang\/lib\/hipe-${VERSION.hipe}\//) {$$0 = "$${PLIST.hipe}" $$0;}}
PRINT_PLIST_AWK+= {if ($$0 ~ /\/erlang\/lib\/odbc-${VERSION.odbc}\//) {$$0 = "$${PLIST.odbc}" $$0;}}