1996-10-27 10:55:05 +01:00
|
|
|
#
|
2000-07-13 18:07:14 +02:00
|
|
|
# Makefile for utils
|
1996-10-27 10:55:05 +01:00
|
|
|
#
|
2010-09-20 22:08:53 +02:00
|
|
|
# src/backend/utils/Makefile
|
1996-10-27 10:55:05 +01:00
|
|
|
#
|
|
|
|
|
2006-07-15 05:33:14 +02:00
|
|
|
subdir = src/backend/utils
|
2000-07-13 18:07:14 +02:00
|
|
|
top_builddir = ../../..
|
2000-08-31 18:12:35 +02:00
|
|
|
include $(top_builddir)/src/Makefile.global
|
1998-04-06 02:32:26 +02:00
|
|
|
|
2008-02-19 11:30:09 +01:00
|
|
|
OBJS = fmgrtab.o
|
2007-02-09 16:56:00 +01:00
|
|
|
SUBDIRS = adt cache error fmgr hash init mb misc mmgr resowner sort time
|
2000-07-13 18:07:14 +02:00
|
|
|
|
2010-01-05 02:06:57 +01:00
|
|
|
# location of Catalog.pm
|
|
|
|
catalogdir = $(top_srcdir)/src/backend/catalog
|
|
|
|
|
2008-02-19 11:30:09 +01:00
|
|
|
include $(top_srcdir)/src/backend/common.mk
|
1998-07-24 05:32:46 +02:00
|
|
|
|
2008-03-17 20:44:41 +01:00
|
|
|
all: fmgroids.h probes.h
|
1996-11-02 03:03:50 +01:00
|
|
|
|
2000-07-13 18:07:14 +02:00
|
|
|
$(SUBDIRS:%=%-recursive): fmgroids.h
|
2000-06-07 18:27:00 +02:00
|
|
|
|
2010-01-05 02:06:57 +01:00
|
|
|
# see explanation in ../parser/Makefile
|
|
|
|
fmgroids.h: fmgrtab.c ;
|
|
|
|
|
|
|
|
fmgrtab.c: Gen_fmgrtab.pl $(catalogdir)/Catalog.pm $(top_srcdir)/src/include/catalog/pg_proc.h
|
|
|
|
$(PERL) -I $(catalogdir) $< $(top_srcdir)/src/include/catalog/pg_proc.h
|
2000-06-09 04:38:36 +02:00
|
|
|
|
2008-08-01 15:16:09 +02:00
|
|
|
ifneq ($(enable_dtrace), yes)
|
|
|
|
probes.h: Gen_dummy_probes.sed
|
|
|
|
endif
|
|
|
|
|
2008-03-17 20:44:41 +01:00
|
|
|
probes.h: probes.d
|
|
|
|
ifeq ($(enable_dtrace), yes)
|
2008-08-01 15:16:09 +02:00
|
|
|
$(DTRACE) -C -h -s $< -o $@.tmp
|
2008-03-17 20:44:41 +01:00
|
|
|
sed -e 's/POSTGRESQL_/TRACE_POSTGRESQL_/g' $@.tmp >$@
|
|
|
|
rm $@.tmp
|
|
|
|
else
|
|
|
|
sed -f $(srcdir)/Gen_dummy_probes.sed $< >$@
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2010-01-05 02:06:57 +01:00
|
|
|
# fmgroids.h and fmgrtab.c are in the distribution tarball, so they
|
|
|
|
# are not cleaned here.
|
1996-10-27 10:55:05 +01:00
|
|
|
clean:
|
2010-01-05 02:06:57 +01:00
|
|
|
rm -f probes.h
|
|
|
|
|
|
|
|
maintainer-clean: clean
|
|
|
|
rm -f fmgroids.h fmgrtab.c
|