1996-10-27 10:55:05 +01:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
2000-07-06 23:33:45 +02:00
|
|
|
# Makefile for catalog
|
1996-10-27 10:55:05 +01:00
|
|
|
#
|
2001-06-12 07:55:50 +02:00
|
|
|
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.35 2001/06/12 05:55:49 tgl 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
|
|
|
|
1998-01-05 19:43:18 +01:00
|
|
|
OBJS = catalog.o heap.o index.o indexing.o aclchk.o \
|
2000-10-24 03:38:44 +02:00
|
|
|
pg_aggregate.o pg_largeobject.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 \
|
2001-06-12 07:55:50 +02:00
|
|
|
pg_attrdef.h pg_relcheck.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 \
|
|
|
|
pg_rewrite.h pg_trigger.h pg_listener.h pg_description.h \
|
|
|
|
pg_database.h pg_shadow.h pg_group.h pg_log.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
|
|
|
|
2001-06-12 07:55:50 +02:00
|
|
|
postgres.bki postgres.description: genbki.sh $(POSTGRES_BKI_SRCS) \
|
2000-10-20 23:04:27 +02:00
|
|
|
$(top_srcdir)/src/include/postgres_ext.h $(top_builddir)/src/include/config.h
|
2001-06-12 07:55:50 +02:00
|
|
|
CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $< $(BKIOPTS) -o postgres $(pg_includes) $(POSTGRES_BKI_SRCS) --set-version=$(VERSION)
|
2000-07-06 23:33:45 +02:00
|
|
|
|
|
|
|
.PHONY: install-bki
|
|
|
|
install-bki: $(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
|
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
|
|
|
|
|
|
|
.PHONY: uninstall-bki
|
|
|
|
uninstall-bki:
|
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
|
|
|
rm -f $(addprefix $(DESTDIR)$(datadir)/, $(BKIFILES))
|
2000-06-05 09:16:13 +02:00
|
|
|
|
1996-10-27 10:55:05 +01:00
|
|
|
|
|
|
|
clean:
|
2000-06-05 09:16:13 +02:00
|
|
|
rm -f SUBSYS.o $(OBJS) $(BKIFILES)
|
1996-10-27 10:55:05 +01:00
|
|
|
|
2000-07-06 23:33:45 +02:00
|
|
|
|
|
|
|
depend dep:
|
|
|
|
$(CC) -MM $(CFLAGS) *.c >depend
|
|
|
|
|
1996-10-27 10:55:05 +01:00
|
|
|
ifeq (depend,$(wildcard depend))
|
|
|
|
include depend
|
|
|
|
endif
|