1 #-------------------------------------------------------------------------
5 # $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.37 2001/08/25 18:52:41 tgl Exp $
7 #-------------------------------------------------------------------------
9 subdir = src/backend/catalog
10 top_builddir = ../../..
11 include $(top_builddir)/src/Makefile.global
13 OBJS = catalog.o heap.o index.o indexing.o aclchk.o \
14 pg_aggregate.o pg_largeobject.o pg_operator.o pg_proc.o \
17 BKIFILES = postgres.bki postgres.description
19 all: SUBSYS.o $(BKIFILES)
22 $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
24 # Note: there are some undocumented dependencies on the ordering in which
25 # the catalog header files are assembled into postgres.bki. In particular,
26 # indexing.h had better be last.
28 POSTGRES_BKI_SRCS := $(addprefix $(top_srcdir)/src/include/catalog/,\
29 pg_proc.h pg_type.h pg_attribute.h pg_class.h \
30 pg_attrdef.h pg_relcheck.h pg_inherits.h pg_index.h \
31 pg_operator.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \
32 pg_language.h pg_largeobject.h pg_aggregate.h pg_statistic.h \
33 pg_rewrite.h pg_trigger.h pg_listener.h pg_description.h \
34 pg_database.h pg_shadow.h pg_group.h indexing.h \
37 pg_includes := $(sort -I$(top_srcdir)/src/include -I$(top_builddir)/src/include)
39 postgres.bki postgres.description: genbki.sh $(POSTGRES_BKI_SRCS) \
40 $(top_srcdir)/src/include/postgres_ext.h $(top_builddir)/src/include/pg_config.h
41 CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $< $(BKIOPTS) -o postgres $(pg_includes) $(POSTGRES_BKI_SRCS) --set-version=$(VERSION)
44 install-bki: $(BKIFILES) installdirs
45 $(INSTALL_DATA) postgres.bki $(DESTDIR)$(datadir)/postgres.bki
46 $(INSTALL_DATA) postgres.description $(DESTDIR)$(datadir)/postgres.description
49 $(mkinstalldirs) $(DESTDIR)$(datadir)
53 rm -f $(addprefix $(DESTDIR)$(datadir)/, $(BKIFILES))
57 rm -f SUBSYS.o $(OBJS) $(BKIFILES)