From f84becc64ea3f4653a2ee95319dab0aeee7c4044 Mon Sep 17 00:00:00 2001 From: Timothy J Fontaine Date: Thu, 6 Jun 2013 10:48:24 -0700 Subject: [PATCH] build: make HAVE_DTRACE=0 should disable dtrace --- config-unix.mk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/config-unix.mk b/config-unix.mk index a7592591..90887305 100644 --- a/config-unix.mk +++ b/config-unix.mk @@ -31,7 +31,6 @@ RUNNER_SRC=test/runner-unix.c RUNNER_CFLAGS=$(CFLAGS) -I$(SRCDIR)/test RUNNER_LDFLAGS=-L"$(CURDIR)" -luv -HAVE_DTRACE= DTRACE_OBJS= DTRACE_HEADER= @@ -60,14 +59,16 @@ OBJS += src/inet.o OBJS += src/version.o ifeq (sunos,$(PLATFORM)) -HAVE_DTRACE=1 +HAVE_DTRACE ?= 1 CPPFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500 LDFLAGS+=-lkstat -lnsl -lsendfile -lsocket # Library dependencies are not transitive. OBJS += src/unix/sunos.o +ifeq (1, $(HAVE_DTRACE)) OBJS += src/unix/dtrace.o DTRACE_OBJS += src/unix/core.o endif +endif ifeq (aix,$(PLATFORM)) CPPFLAGS += -D_ALL_SOURCE -D_XOPEN_SOURCE=500 @@ -76,7 +77,7 @@ OBJS += src/unix/aix.o endif ifeq (darwin,$(PLATFORM)) -HAVE_DTRACE=1 +HAVE_DTRACE ?= 1 # dtrace(1) probes contain dollar signs on OS X. Mute the warnings they # generate but only when CC=clang, -Wno-dollar-in-identifier-extension # is a clang extension. @@ -107,7 +108,7 @@ endif ifeq (freebsd,$(PLATFORM)) ifeq ($(shell dtrace -l 1>&2 2>/dev/null; echo $$?),0) -HAVE_DTRACE=1 +HAVE_DTRACE ?= 1 endif LDFLAGS+=-lkvm OBJS += src/unix/freebsd.o