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