summaryrefslogtreecommitdiff
path: root/src/backend/Makefile
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2008-03-17 19:44:41 +0000
committerPeter Eisentraut <peter_e@gmx.net>2008-03-17 19:44:41 +0000
commita7b7b07af340c73adee9959edf260695591a9496 (patch)
treeed5c5cfd965970a04dcd597f2eb11c4e3895f8fd /src/backend/Makefile
parente7115a224a3f43764ce31fc4ed4dcb19d73b668f (diff)
downloadpostgresql-a7b7b07af340c73adee9959edf260695591a9496.tar.gz
Enable probes to work with Mac OS X Leopard and other OSes that will
support DTrace in the future. Switch from using DTRACE_PROBEn macros to the dynamically generated macros. Use "dtrace -h" to create a header file that contains the dynamically generated macros to be used in the source code instead of the DTRACE_PROBEn macros. A dummy header file is generated for builds without DTrace support. Author: Robert Lor <Robert.Lor@sun.com>
Diffstat (limited to 'src/backend/Makefile')
-rw-r--r--src/backend/Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/backend/Makefile b/src/backend/Makefile
index bb4064238b..597ec8d8eb 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/backend/Makefile,v 1.127 2008/02/26 14:42:27 petere Exp $
+# $PostgreSQL: pgsql/src/backend/Makefile,v 1.128 2008/03/17 19:44:40 petere Exp $
#
#-------------------------------------------------------------------------
@@ -20,9 +20,11 @@ SUBDIRS = access bootstrap catalog parser commands executor lib libpq \
include $(srcdir)/common.mk
+ifeq ($(PORTNAME), solaris)
ifeq ($(enable_dtrace), yes)
LOCALOBJS += utils/probes.o
endif
+endif
OBJS = $(SUBDIROBJS) $(LOCALOBJS) $(top_builddir)/src/port/libpgport_srv.a
@@ -103,7 +105,7 @@ endif
endif # aix
# Update the commonly used headers before building the subdirectories
-$(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/parse.h $(top_builddir)/src/include/utils/fmgroids.h
+$(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/parse.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/probes.h
# The postgres.o target is needed by the rule in Makefile.global that
@@ -122,6 +124,9 @@ $(srcdir)/parser/parse.h: parser/gram.y
utils/fmgroids.h: utils/Gen_fmgrtab.sh $(top_srcdir)/src/include/catalog/pg_proc.h
$(MAKE) -C utils fmgroids.h
+utils/probes.h: utils/probes.d
+ $(MAKE) -C utils probes.h
+
# Make symlinks for these headers in the include directory. That way
# we can cut down on the -I options. Also, a symlink is automatically
# up to date when we update the base file.
@@ -135,9 +140,15 @@ $(top_builddir)/src/include/utils/fmgroids.h: utils/fmgroids.h
cd $(dir $@) && rm -f $(notdir $@) && \
$(LN_S) ../../../$(subdir)/utils/fmgroids.h .
+$(top_builddir)/src/include/utils/probes.h: utils/probes.h
+ cd $(dir $@) && rm -f $(notdir $@) && \
+ $(LN_S) ../../../$(subdir)/utils/probes.h .
+
+ifeq ($(PORTNAME), solaris)
utils/probes.o: utils/probes.d $(SUBDIROBJS)
$(DTRACE) $(DTRACEFLAGS) -G -s $(call expand_subsys,$^) -o $@
+endif
##########################################################################