1996-10-27 10:55:05 +01:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
2002-03-22 22:34:44 +01:00
|
|
|
# Makefile for backend/catalog
|
1996-10-27 10:55:05 +01:00
|
|
|
#
|
2004-07-21 22:34:50 +02:00
|
|
|
# $PostgreSQL: pgsql/src/backend/catalog/Makefile,v 1.53 2004/07/21 20:34:45 momjian Exp $
|
1996-10-27 10:55:05 +01:00
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
2000-07-06 23:33:45 +02:00
|
|
|
subdir = src/backend/catalog
|
|
|
|
top_builddir = ../../..
|
2000-08-31 18:12:35 +02:00
|
|
|
include $(top_builddir)/src/Makefile.global
|
1996-10-27 10:55:05 +01:00
|
|
|
|
2002-07-12 20:43:19 +02:00
|
|
|
OBJS = catalog.o dependency.o heap.o index.o indexing.o namespace.o aclchk.o \
|
|
|
|
pg_aggregate.o pg_constraint.o pg_conversion.o pg_depend.o \
|
|
|
|
pg_largeobject.o pg_namespace.o pg_operator.o pg_proc.o pg_type.o
|
1996-10-27 10:55:05 +01:00
|
|
|
|
2001-06-12 07:55:50 +02:00
|
|
|
BKIFILES = postgres.bki postgres.description
|
2000-06-05 09:16:13 +02:00
|
|
|
|
|
|
|
all: SUBSYS.o $(BKIFILES)
|
1996-10-27 10:55:05 +01:00
|
|
|
|
|
|
|
SUBSYS.o: $(OBJS)
|
1999-12-13 23:35:27 +01:00
|
|
|
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
|
1996-10-27 10:55:05 +01:00
|
|
|
|
2001-06-12 07:55:50 +02:00
|
|
|
# Note: there are some undocumented dependencies on the ordering in which
|
|
|
|
# the catalog header files are assembled into postgres.bki. In particular,
|
|
|
|
# indexing.h had better be last.
|
1996-10-27 10:55:05 +01:00
|
|
|
|
2001-06-12 07:55:50 +02:00
|
|
|
POSTGRES_BKI_SRCS := $(addprefix $(top_srcdir)/src/include/catalog/,\
|
2000-07-06 23:33:45 +02:00
|
|
|
pg_proc.h pg_type.h pg_attribute.h pg_class.h \
|
2002-07-12 20:43:19 +02:00
|
|
|
pg_attrdef.h pg_constraint.h pg_inherits.h pg_index.h \
|
2000-07-06 23:33:45 +02:00
|
|
|
pg_operator.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \
|
2001-06-12 07:55:50 +02:00
|
|
|
pg_language.h pg_largeobject.h pg_aggregate.h pg_statistic.h \
|
2002-07-19 01:11:32 +02:00
|
|
|
pg_rewrite.h pg_trigger.h pg_listener.h pg_description.h pg_cast.h \
|
2002-07-11 09:39:28 +02:00
|
|
|
pg_namespace.h pg_conversion.h pg_database.h pg_shadow.h pg_group.h \
|
2004-07-21 22:34:50 +02:00
|
|
|
pg_tablespace.h pg_depend.h indexing.h \
|
2000-07-06 23:33:45 +02:00
|
|
|
)
|
|
|
|
|
2000-10-20 23:04:27 +02:00
|
|
|
pg_includes := $(sort -I$(top_srcdir)/src/include -I$(top_builddir)/src/include)
|
2000-07-06 23:33:45 +02:00
|
|
|
|
2003-08-01 18:12:32 +02:00
|
|
|
# see explanation in ../parser/Makefile
|
|
|
|
postgres.description: postgres.bki ;
|
|
|
|
|
|
|
|
postgres.bki: genbki.sh $(POSTGRES_BKI_SRCS) \
|
2003-04-07 00:45:23 +02:00
|
|
|
$(top_srcdir)/src/include/postgres_ext.h $(top_builddir)/src/include/pg_config_manual.h
|
2004-01-04 06:57:21 +01:00
|
|
|
AWK='$(AWK)' $(SHELL) $< $(pg_includes) --set-version=$(VERSION) -o postgres $(POSTGRES_BKI_SRCS)
|
2000-07-06 23:33:45 +02:00
|
|
|
|
2002-12-14 01:24:35 +01:00
|
|
|
.PHONY: install-data
|
|
|
|
install-data: $(BKIFILES) installdirs
|
2001-06-12 07:55:50 +02:00
|
|
|
$(INSTALL_DATA) postgres.bki $(DESTDIR)$(datadir)/postgres.bki
|
|
|
|
$(INSTALL_DATA) postgres.description $(DESTDIR)$(datadir)/postgres.description
|
2003-11-11 02:58:23 +01:00
|
|
|
$(INSTALL_DATA) $(srcdir)/system_views.sql $(DESTDIR)$(datadir)/system_views.sql
|
2003-01-13 21:37:18 +01:00
|
|
|
$(INSTALL_DATA) $(srcdir)/information_schema.sql $(DESTDIR)$(datadir)/information_schema.sql
|
2003-01-15 00:19:34 +01:00
|
|
|
$(INSTALL_DATA) $(srcdir)/sql_features.txt $(DESTDIR)$(datadir)/sql_features.txt
|
2000-07-06 23:33:45 +02:00
|
|
|
|
|
|
|
installdirs:
|
Support for DESTDIR make variable. This is used as in `make install
DESTDIR=/else/where' and prepends the value of DESTDIR to the full
installation paths (e.g., /else/where/usr/local/pgsql/bin). This allows
users to install the package into a location different from the one that
was configured and hard-coded into various scripts, e.g., for creating
binary packages.
DESTDIR is in many cases preferrable over `make install
prefix=/else/where' because
a) `prefix' affects the path that is hard-coded into the files, which can
lead to a `make install prefix=xxx' (as done by the regression test
driver) corrupting the files in the source tree with wrong paths.
b) it doesn't work at all if a directory was overridden to not depend on
`prefix', e.g., --sysconfdir=/etc.
(Updating the regression test driver to use DESTDIR is a separate
undertaking.)
See also autoconf@gnu.org, From: Akim Demaille <akim@epita.fr>, Date: 08
Sep 2000 12:48:59 +0200, Message-ID:
<mv4em2vb1lw.fsf@nostromo.lrde.epita.fr>, Subject: Re: HTML format
documentation.
2000-09-17 15:02:52 +02:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(datadir)
|
2000-07-06 23:33:45 +02:00
|
|
|
|
2002-12-14 01:24:35 +01:00
|
|
|
.PHONY: uninstall-data
|
|
|
|
uninstall-data:
|
2003-11-11 02:58:23 +01:00
|
|
|
rm -f $(addprefix $(DESTDIR)$(datadir)/, $(BKIFILES) system_views.sql information_schema.sql sql_features.txt)
|
1996-10-27 10:55:05 +01:00
|
|
|
|
2004-06-18 08:14:31 +02:00
|
|
|
clean:
|
2000-06-05 09:16:13 +02:00
|
|
|
rm -f SUBSYS.o $(OBJS) $(BKIFILES)
|