mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Here's a patch that I discussed recently on pg95-dev that changes the
way one creates a database system. Parts that were in "make install" are not either in "make all" or initdb. Nothing goes in the PGDATA directory besides user data. Creating multiple database systems is easier. In addition to applying the patch, it is necessary to move the file libpq/pg_hba to backend/libpq/pg_hba.sample. Submitted by: Bryan Henderson <bryanh@giraffe.netgate.net>
This commit is contained in:
@ -7,94 +7,98 @@
|
||||
#
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.4 1996/08/28 23:02:43 scrappy Exp $
|
||||
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.5 1996/09/23 08:23:33 scrappy Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
LIB= pq
|
||||
|
||||
MKDIR= ../mk
|
||||
include $(MKDIR)/postgres.mk
|
||||
|
||||
CFLAGS+= -I$(srcdir)/backend/include \
|
||||
-I$(srcdir)/include \
|
||||
-I$(srcdir)/backend \
|
||||
-I$(CURDIR) \
|
||||
CFLAGS+= -I../backend/include \
|
||||
-I$../include \
|
||||
-I$../backend \
|
||||
-I. \
|
||||
|
||||
ifdef KRBVERS
|
||||
CFLAGS+= $(KRBFLAGS)
|
||||
endif
|
||||
|
||||
# dllist.c is found in backend/lib
|
||||
VPATH:= $(VPATH):$(srcdir)/backend/lib
|
||||
VPATH:= $(VPATH):../backend/lib
|
||||
|
||||
LIBSRCS= fe-auth.c fe-connect.c fe-exec.c fe-misc.c fe-lobj.c \
|
||||
dllist.c pqsignal.c
|
||||
ifeq ($(PORTNAME), next)
|
||||
VPATH:=$(VPATH):$(srcdir)/backend/port/$(PORTNAME)
|
||||
VPATH:=$(VPATH):../backend/port/$(PORTNAME)
|
||||
LIBSRCS+= getcwd.c putenv.c
|
||||
endif
|
||||
|
||||
all:: libpq.a postgres.h c.h
|
||||
|
||||
postgres.h: ../backend/include/postgres.h
|
||||
# Note: ../backend/include/postgres.h needs to be named something different
|
||||
# to avoid confusion with this thing we're building now.
|
||||
#
|
||||
# hardwire NAMEDATALEN and OIDNAMELEN into the postgres.h for this installation
|
||||
rm -f obj/postgres.h
|
||||
echo "#define NAMEDATALEN $(NAMEDATALEN)" >> obj/postgres.h
|
||||
echo "#define OIDNAMELEN $(OIDNAMELEN)" >> obj/postgres.h
|
||||
cat ../backend/include/postgres.h >> obj/postgres.h
|
||||
|
||||
c.h: ../backend/include/c.h
|
||||
rm -f obj/c.h
|
||||
echo "#undef PORTNAME" > obj/c.h
|
||||
echo "#define PORTNAME $(PORTNAME)" >> obj/c.h
|
||||
echo "#undef PORTNAME_$(PORTNAME)" >> obj/c.h
|
||||
echo "#define PORTNAME_$(PORTNAME)" >> obj/c.h
|
||||
cat ../backend/include/c.h >> obj/c.h
|
||||
|
||||
.PHONY: beforeinstall-headers install-headers
|
||||
|
||||
ifndef NO_BEFOREINSTL
|
||||
beforeinstall-headers:
|
||||
@-if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
|
||||
@-if [ ! -d $(HEADERDIR)/port ]; then mkdir $(HEADERDIR)/port; fi
|
||||
@-if [ ! -d $(HEADERDIR)/port/$(PORTNAME) ]; \
|
||||
@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
|
||||
@if [ ! -d $(HEADERDIR)/port ]; then mkdir $(HEADERDIR)/port; fi
|
||||
@if [ ! -d $(HEADERDIR)/port/$(PORTNAME) ]; \
|
||||
then mkdir $(HEADERDIR)/port/$(PORTNAME); fi
|
||||
@-if [ ! -d $(HEADERDIR)/include ]; \
|
||||
@if [ ! -d $(HEADERDIR)/include ]; \
|
||||
then mkdir $(HEADERDIR)/include; fi
|
||||
@-if [ ! -d $(HEADERDIR)/lib ]; \
|
||||
@if [ ! -d $(HEADERDIR)/lib ]; \
|
||||
then mkdir $(HEADERDIR)/lib; fi
|
||||
@-if [ ! -d $(HEADERDIR)/libpq ]; \
|
||||
@if [ ! -d $(HEADERDIR)/libpq ]; \
|
||||
then mkdir $(HEADERDIR)/libpq; fi
|
||||
@-if [ ! -d $(HEADERDIR)/utils ]; \
|
||||
@if [ ! -d $(HEADERDIR)/utils ]; \
|
||||
then mkdir $(HEADERDIR)/utils; fi
|
||||
else
|
||||
beforeinstall-headers: .dosomething
|
||||
endif
|
||||
|
||||
HEADERFILES = include/postgres.h \
|
||||
libpq/pqcomm.h \
|
||||
libpq/libpq-fs.h \
|
||||
lib/dllist.h \
|
||||
utils/geo-decls.h
|
||||
|
||||
ifeq ($(PORTNAME), hpux)
|
||||
HEADERFILES += port/hpux/fixade.h
|
||||
endif
|
||||
|
||||
|
||||
TEMPDIR=obj
|
||||
|
||||
install-headers: beforeinstall-headers
|
||||
@for i in ${HEADERFILES}; do \
|
||||
echo "Installing $(HEADERDIR)/$$i."; \
|
||||
$(INSTALL) $(INSTLOPTS) $(srcdir)/backend/$$i $(HEADERDIR)/$$i; \
|
||||
done
|
||||
install-headers: beforeinstall-headers postgres.h c.h
|
||||
$(INSTALL) $(INSTLOPTS) ../backend/include/postgres.h \
|
||||
$(HEADERDIR)/postgres.h
|
||||
$(INSTALL) $(INSTLOPTS) ../include/libpq/pqcomm.h \
|
||||
$(HEADERDIR)/libpq/pqcomm.h
|
||||
$(INSTALL) $(INSTLOPTS) ../include/libpq/libpq-fs.h \
|
||||
$(HEADERDIR)/libpq/libpq-fs.h
|
||||
$(INSTALL) $(INSTLOPTS) ../include/lib/dllist.h \
|
||||
$(HEADERDIR)/libpq/dllist.h
|
||||
$(INSTALL) $(INSTLOPTS) ../include/utils/geo-decls.h \
|
||||
$(HEADERDIR)/utils/geo-decls.h
|
||||
$(INSTALL) $(INSTLOPTS) libpq-fe.h $(HEADERDIR)/libpq-fe.h
|
||||
@mv -f $(HEADERDIR)/include/* $(HEADERDIR)
|
||||
@rmdir $(HEADERDIR)/include
|
||||
# XXX - installing fmgr.h depends on the backend being built
|
||||
$(INSTALL) $(INSTLOPTS) $(srcdir)/backend/$(objdir)/fmgr.h $(HEADERDIR)/fmgr.h
|
||||
@rm -f $(TEMPDIR)/c.h
|
||||
@echo "#undef PORTNAME" > $(TEMPDIR)/c.h
|
||||
@echo "#define PORTNAME $(PORTNAME)" >> $(TEMPDIR)/c.h
|
||||
@echo "#undef PORTNAME_$(PORTNAME)" >> $(TEMPDIR)/c.h
|
||||
@echo "#define PORTNAME_$(PORTNAME)" >> $(TEMPDIR)/c.h
|
||||
@cat $(srcdir)/backend/include/c.h >> $(TEMPDIR)/c.h
|
||||
$(INSTALL) $(INSTLOPTS) $(TEMPDIR)/c.h $(HEADERDIR)/c.h
|
||||
@rm -f $(TEMPDIR)/postgres.h
|
||||
# hardwire NAMEDATALEN and OIDNAMELEN into the postgres.h for this installation
|
||||
@echo "#define NAMEDATALEN $(NAMEDATALEN)" >> $(TEMPDIR)/postgres.h
|
||||
@echo "#define OIDNAMELEN $(OIDNAMELEN)" >> $(TEMPDIR)/postgres.h
|
||||
@cat $(srcdir)/backend/include/postgres.h >> $(TEMPDIR)/postgres.h
|
||||
$(INSTALL) $(INSTLOPTS) $(TEMPDIR)/postgres.h $(HEADERDIR)/postgres.h
|
||||
@rm -f $(TEMPDIR)/c.h $(TEMPDIR)/postgres.h
|
||||
ifeq ($(PORTNAME), hpux)
|
||||
$(INSTALL) $(INSTLOPTS) ../backend/port/hpux/fixade.h \
|
||||
$(HEADERDIR)/port/hpux/fixade.h
|
||||
endif
|
||||
$(INSTALL) $(INSTLOPTS) obj/c.h $(HEADERDIR)/c.h
|
||||
$(INSTALL) $(INSTLOPTS) obj/postgres.h $(HEADERDIR)/postgres.h
|
||||
|
||||
install:: install-headers
|
||||
|
||||
CLEANFILES+= c.h postgres.h
|
||||
|
||||
LIB= pq
|
||||
include $(MKDIR)/postgres.lib.mk
|
||||
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
#
|
||||
# Example config file for Postgres95 host based access
|
||||
#
|
||||
# Lines starting with "all" apply to all databases. Otherwise the first
|
||||
# column has to match the name of the database being connected to. Up to
|
||||
# ten config lines can apply to each database. Mask specifies bits that
|
||||
# aren't counted. After those bits are taken out, the connection address
|
||||
# must match the address in the middle column.
|
||||
#
|
||||
# <name> <address> <mask>
|
||||
#
|
||||
all 127.0.0.1 0.0.0.0
|
||||
|
Reference in New Issue
Block a user