summaryrefslogtreecommitdiff
path: root/src/backend/utils/Makefile
blob: faa7664b2fa87857bb0f88882cc2d2a6ea410555 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#
# Makefile for utils
#
# $PostgreSQL$
#

subdir = src/backend/utils
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global

OBJS        = fmgrtab.o
SUBDIRS     = adt cache error fmgr hash init mb misc mmgr resowner sort time

include $(top_srcdir)/src/backend/common.mk

all: fmgroids.h probes.h

$(SUBDIRS:%=%-recursive): fmgroids.h

fmgroids.h fmgrtab.c: Gen_fmgrtab.sh $(top_srcdir)/src/include/catalog/pg_proc.h
	AWK='$(AWK)' $(SHELL) $< $(top_srcdir)/src/include/catalog/pg_proc.h

ifneq ($(enable_dtrace), yes)
probes.h: Gen_dummy_probes.sed
endif

probes.h: probes.d
ifeq ($(enable_dtrace), yes)
	$(DTRACE) -C -h -s $< -o [email protected]
	sed -e 's/POSTGRESQL_/TRACE_POSTGRESQL_/g' [email protected] >$@
	rm [email protected]
else
	sed -f $(srcdir)/Gen_dummy_probes.sed $< >$@
endif


clean:
	rm -f fmgroids.h fmgrtab.c probes.h