mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Install dynamically loadable modules into a private subdirectory
under libdir, for a cleaner separation in the installation layout and compatibility with binary packaging standards. Point backend's default search location there. The contrib modules are also installed in the said location, giving them the benefit of the default search path as well. No changes in user interface nevertheless.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
# -*-makefile-*-
|
||||
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.136 2001/08/29 19:14:39 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.137 2001/09/16 16:11:09 petere Exp $
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# All PostgreSQL makefiles include this file and use the variables it sets,
|
||||
@ -80,10 +80,20 @@ endif
|
||||
endif
|
||||
|
||||
libdir := @libdir@
|
||||
pkglibdir = $(libdir)/postgresql
|
||||
pkglibdir = $(libdir)
|
||||
ifeq "$(findstring pgsql, $(pkglibdir))" ""
|
||||
ifeq "$(findstring postgres, $(pkglibdir))" ""
|
||||
override pkglibdir := $(pkglibdir)/postgresql
|
||||
endif
|
||||
endif
|
||||
|
||||
includedir := @includedir@
|
||||
pkgincludedir = $(includedir)/postgresql
|
||||
pkgincludedir = $(includedir)
|
||||
ifeq "$(findstring pgsql, $(pkgincludedir))" ""
|
||||
ifeq "$(findstring postgres, $(pkgincludedir))" ""
|
||||
override pkgincludedir := $(pkgincludedir)/postgresql
|
||||
endif
|
||||
endif
|
||||
includedir_server = $(pkgincludedir)/server
|
||||
includedir_internal = $(pkgincludedir)/internal
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
# Copyright (c) 1994, Regents of the University of California
|
||||
#
|
||||
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.73 2001/06/02 18:25:17 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.74 2001/09/16 16:11:10 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -136,28 +136,36 @@ ifeq ($(enable_nls), yes)
|
||||
$(MAKE) -C po $@
|
||||
endif
|
||||
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(datadir)
|
||||
ifeq ($(enable_nls), yes)
|
||||
$(MAKE) -C po $@
|
||||
endif
|
||||
|
||||
install-bin: postgres $(POSTGRES_IMP) installdirs
|
||||
$(INSTALL_PROGRAM) postgres$(X) $(DESTDIR)$(bindir)/postgres$(X)
|
||||
@rm -f $(DESTDIR)$(bindir)/postmaster
|
||||
ln -s postgres$(X) $(DESTDIR)$(bindir)/postmaster
|
||||
ifeq ($(MAKE_EXPORTS), true)
|
||||
$(INSTALL_DATA) $(POSTGRES_IMP) $(DESTDIR)$(libdir)/$(POSTGRES_IMP)
|
||||
$(INSTALL_DATA) $(POSTGRES_IMP) $(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)
|
||||
endif
|
||||
|
||||
.PHONY: install-bin
|
||||
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)
|
||||
ifeq ($(PORTNAME), win)
|
||||
ifeq ($(MAKE_DLL), true)
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(MAKE_EXPORTS), true)
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkglibdir)
|
||||
endif
|
||||
ifeq ($(enable_nls), yes)
|
||||
$(MAKE) -C po $@
|
||||
endif
|
||||
|
||||
##########################################################################
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(bindir)/postgres$(X) $(DESTDIR)$(bindir)/postmaster
|
||||
ifeq ($(MAKE_EXPORTS), true)
|
||||
rm -f $(DESTDIR)$(libdir)/$(POSTGRES_IMP)
|
||||
rm -f $(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)
|
||||
endif
|
||||
ifeq ($(PORTNAME), win)
|
||||
ifeq ($(MAKE_DLL), true)
|
||||
|
@ -4,7 +4,7 @@
|
||||
# Makefile for utils/fmgr
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/utils/fmgr/Makefile,v 1.11 2001/05/17 17:44:18 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/utils/fmgr/Makefile,v 1.12 2001/09/16 16:11:11 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -14,7 +14,7 @@ include $(top_builddir)/src/Makefile.global
|
||||
|
||||
OBJS = dfmgr.o fmgr.o
|
||||
|
||||
override CPPFLAGS += -DLIBDIR=\"$(libdir)\" -DDLSUFFIX=\"$(DLSUFFIX)\"
|
||||
override CPPFLAGS += -DPKGLIBDIR=\"$(pkglibdir)\" -DDLSUFFIX=\"$(DLSUFFIX)\"
|
||||
|
||||
|
||||
all: SUBSYS.o
|
||||
@ -22,12 +22,5 @@ all: SUBSYS.o
|
||||
SUBSYS.o: $(OBJS)
|
||||
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
|
||||
|
||||
depend dep:
|
||||
$(CC) -MM $(CFLAGS) *.c >depend
|
||||
|
||||
clean:
|
||||
rm -f SUBSYS.o $(OBJS)
|
||||
|
||||
ifeq (depend,$(wildcard depend))
|
||||
include depend
|
||||
endif
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.50 2001/05/19 09:01:10 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.51 2001/09/16 16:11:11 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -224,8 +224,8 @@ file_exists(const char *name)
|
||||
#endif
|
||||
|
||||
/* Example format: "/usr/local/pgsql/lib" */
|
||||
#ifndef LIBDIR
|
||||
#error "LIBDIR needs to be defined to compile this file."
|
||||
#ifndef PKGLIBDIR
|
||||
#error "PKGLIBDIR needs to be defined to compile this file."
|
||||
#endif
|
||||
|
||||
|
||||
@ -297,7 +297,7 @@ substitute_libpath_macro(const char * name)
|
||||
macroname_len = strcspn(name + 1, "/") + 1;
|
||||
|
||||
if (strncmp(name, "$libdir", macroname_len)==0)
|
||||
replacement = LIBDIR;
|
||||
replacement = PKGLIBDIR;
|
||||
else
|
||||
elog(ERROR, "invalid macro name in dynamic library path");
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Header: /cvsroot/pgsql/src/bin/pg_config/Makefile,v 1.2 2001/08/28 14:20:28 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/src/bin/pg_config/Makefile,v 1.3 2001/09/16 16:11:11 petere Exp $
|
||||
|
||||
subdir = src/bin/pg_config
|
||||
top_builddir = ../../..
|
||||
@ -12,6 +12,7 @@ pg_config: pg_config.sh $(top_builddir)/config.status $(top_builddir)/src/Makefi
|
||||
-e 's,@includedir@,$(includedir),g' \
|
||||
-e 's,@includedir_server@,$(includedir_server),g' \
|
||||
-e 's,@libdir@,$(libdir),g' \
|
||||
-e 's,@pkglibdir@,$(pkglibdir),g' \
|
||||
-e "s,@configure@,$$configure,g" \
|
||||
-e 's,@version@,$(VERSION),g' \
|
||||
$< >$@
|
||||
|
@ -7,7 +7,7 @@
|
||||
# Author: Peter Eisentraut <peter_e@gmx.net>
|
||||
# Public domain
|
||||
|
||||
# $Header: /cvsroot/pgsql/src/bin/pg_config/Attic/pg_config.sh,v 1.4 2001/08/28 14:20:28 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/src/bin/pg_config/Attic/pg_config.sh,v 1.5 2001/09/16 16:11:11 petere Exp $
|
||||
|
||||
me=`basename $0`
|
||||
|
||||
@ -16,13 +16,14 @@ val_bindir='@bindir@'
|
||||
val_includedir='@includedir@'
|
||||
val_includedir_server='@includedir_server@'
|
||||
val_libdir='@libdir@'
|
||||
val_pkglibdir='@pkglibdir@'
|
||||
val_configure="@configure@"
|
||||
val_version='@version@'
|
||||
|
||||
help="\
|
||||
$me provides information about the installed version of PostgreSQL.
|
||||
|
||||
Usage: $me --bindir | --includedir | --includedir-server | --libdir | --configure | --version
|
||||
Usage: $me --bindir | --includedir | --includedir-server | --libdir | --pkglibdir | --configure | --version
|
||||
|
||||
Operation modes:
|
||||
--bindir show location of user executables
|
||||
@ -30,6 +31,7 @@ Operation modes:
|
||||
interfaces
|
||||
--includedir-server show location of C header files for the server
|
||||
--libdir show location of object code libraries
|
||||
--pkglibdir show location of dynamically loadable modules
|
||||
--configure show options given to 'configure' script when
|
||||
PostgreSQL was built
|
||||
--version show the PostgreSQL version and exit
|
||||
@ -55,6 +57,7 @@ do
|
||||
--includedir-server)
|
||||
show="$show \$val_includedir_server";;
|
||||
--libdir) show="$show \$val_libdir";;
|
||||
--pkglibdir) show="$show \$val_pkglibdir";;
|
||||
--configure) show="$show \$val_configure";;
|
||||
|
||||
--version) echo "PostgreSQL $val_version"
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Header: /cvsroot/pgsql/src/pl/plperl/GNUmakefile,v 1.7 2001/08/26 23:54:41 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/src/pl/plperl/GNUmakefile,v 1.8 2001/09/16 16:11:11 petere Exp $
|
||||
|
||||
subdir = src/pl/plperl
|
||||
top_builddir = ../../..
|
||||
@ -13,17 +13,17 @@ all: Makefile
|
||||
$(MAKE) -f $< all VPATH=$(VPATH)
|
||||
|
||||
Makefile: Makefile.PL
|
||||
plperl_installdir='$$(DESTDIR)$(libdir)' \
|
||||
plperl_installdir='$$(DESTDIR)$(pkglibdir)' \
|
||||
$(PERL) $< $(makefile_pl_flags) INC='-I$(srcdir) $(filter -I%, $(CPPFLAGS))'
|
||||
|
||||
install: all installdirs
|
||||
$(MAKE) -f Makefile install DESTDIR='$(DESTDIR)'
|
||||
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkglibdir)
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(libdir)/plperl$(DLSUFFIX)
|
||||
rm -f $(DESTDIR)$(pkglibdir)/plperl$(DLSUFFIX)
|
||||
|
||||
clean distclean maintainer-clean:
|
||||
-[ -f Makefile ] && $(MAKE) -f Makefile clean
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Makefile for the plpgsql shared object
|
||||
#
|
||||
# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.17 2001/08/21 16:25:21 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.18 2001/09/16 16:11:11 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -20,8 +20,8 @@ SO_MAJOR_VERSION= 1
|
||||
SO_MINOR_VERSION= 0
|
||||
|
||||
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
|
||||
|
||||
override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
|
||||
rpath :=
|
||||
|
||||
OBJS = pl_parse.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o
|
||||
|
||||
@ -46,7 +46,7 @@ include $(top_srcdir)/src/Makefile.shlib
|
||||
|
||||
install: installdirs all
|
||||
ifeq ($(enable_shared), yes)
|
||||
$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(libdir)/plpgsql$(DLSUFFIX)
|
||||
$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(pkglibdir)/plpgsql$(DLSUFFIX)
|
||||
else
|
||||
@echo "*****"; \
|
||||
echo "* PL/pgSQL was not installed due to lack of shared library support."; \
|
||||
@ -54,10 +54,10 @@ else
|
||||
endif
|
||||
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkglibdir)
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(libdir)/plpgsql$(DLSUFFIX)
|
||||
rm -f $(DESTDIR)$(pkglibdir)/plpgsql$(DLSUFFIX)
|
||||
|
||||
pl_handler.o pl_comp.o pl_exec.o pl_funcs.o: plpgsql.h $(srcdir)/pl.tab.h
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Header: /cvsroot/pgsql/src/pl/plpython/Makefile,v 1.9 2001/08/27 00:29:49 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/src/pl/plpython/Makefile,v 1.10 2001/09/16 16:11:11 petere Exp $
|
||||
|
||||
subdir = src/pl/plpython
|
||||
top_builddir = ../../..
|
||||
@ -17,8 +17,8 @@ endif
|
||||
ifneq (,$(findstring yes, $(shared_libpython)$(allow_nonpic_in_shlib)))
|
||||
|
||||
override CPPFLAGS := -I$(srcdir) $(python_includespec) $(CPPFLAGS)
|
||||
|
||||
override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
|
||||
rpath :=
|
||||
|
||||
NAME = plpython
|
||||
SO_MAJOR_VERSION = 0
|
||||
@ -33,13 +33,13 @@ include $(top_srcdir)/src/Makefile.shlib
|
||||
all: all-lib
|
||||
|
||||
install: all installdirs
|
||||
$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(libdir)/plpython$(DLSUFFIX)
|
||||
$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(pkglibdir)/plpython$(DLSUFFIX)
|
||||
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkglibdir)
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(libdir)/plpython$(DLSUFFIX)
|
||||
rm -f $(DESTDIR)$(pkglibdir)/plpython$(DLSUFFIX)
|
||||
|
||||
clean distclean maintainer-clean: clean-lib
|
||||
rm -f $(OBJS)
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Makefile for the pltcl shared object
|
||||
#
|
||||
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.33 2001/05/11 23:38:06 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.34 2001/09/16 16:11:11 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -93,19 +93,19 @@ endif
|
||||
pltcl$(DLSUFFIX): pltcl.o
|
||||
|
||||
install: all installdirs
|
||||
$(INSTALL_SHLIB) $(DLOBJS) $(DESTDIR)$(libdir)/$(DLOBJS)
|
||||
$(INSTALL_SHLIB) $(DLOBJS) $(DESTDIR)$(pkglibdir)/$(DLOBJS)
|
||||
ifeq ($(enable_pltcl_unknown), yes)
|
||||
$(MAKE) -C modules $@
|
||||
endif
|
||||
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkglibdir)
|
||||
ifeq ($(enable_pltcl_unknown), yes)
|
||||
$(MAKE) -C modules $@
|
||||
endif
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(libdir)/$(DLOBJS)
|
||||
rm -f $(DESTDIR)$(pkglibdir)/$(DLOBJS)
|
||||
ifeq ($(enable_pltcl_unknown), yes)
|
||||
$(MAKE) -C modules $@
|
||||
endif
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.34 2001/04/04 21:15:56 tgl Exp $
|
||||
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.35 2001/09/16 16:11:11 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -34,6 +34,7 @@ all: pg_regress
|
||||
pg_regress: pg_regress.sh GNUmakefile
|
||||
sed -e 's,@bindir@,$(bindir),g' \
|
||||
-e 's,@libdir@,$(libdir),g' \
|
||||
-e 's,@pkglibdir@,$(pkglibdir),g' \
|
||||
-e 's,@datadir@,$(datadir),g' \
|
||||
-e 's/@VERSION@/$(VERSION)/g' \
|
||||
-e 's/@host_tuple@/$(host_tuple)/g' \
|
||||
|
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.21 2001/05/27 09:59:30 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.22 2001/09/16 16:11:11 petere Exp $
|
||||
|
||||
me=`basename $0`
|
||||
: ${TMPDIR=/tmp}
|
||||
@ -70,6 +70,7 @@ fi
|
||||
: ${outputdir=.}
|
||||
|
||||
libdir='@libdir@'
|
||||
pkglibdir='@pkglibdir@'
|
||||
bindir='@bindir@'
|
||||
datadir='@datadir@'
|
||||
host_platform='@host_tuple@'
|
||||
@ -271,6 +272,7 @@ then
|
||||
|
||||
bindir=$temp_install/install/$bindir
|
||||
libdir=$temp_install/install/$libdir
|
||||
pkglibdir=$temp_install/install/$pkglibdir
|
||||
datadir=$temp_install/install/$datadir
|
||||
PGDATA=$temp_install/data
|
||||
|
||||
@ -450,7 +452,7 @@ fi
|
||||
|
||||
if [ "$enable_shared" = yes ]; then
|
||||
message "installing PL/pgSQL"
|
||||
"$bindir/createlang" -L "$libdir" $psql_options plpgsql $dbname
|
||||
"$bindir/createlang" -L "$pkglibdir" $psql_options plpgsql $dbname
|
||||
if [ $? -ne 0 ] && [ $? -ne 2 ]; then
|
||||
echo "$me: createlang failed"
|
||||
(exit 2); exit
|
||||
|
Reference in New Issue
Block a user