Polish shared library build to reduce number of special hacks. In

particular, allow linking with arbitrary commands rather than only $(AR) or
$(LD), and treat C++ without hacks.

Add option to disable shared libraries.  This takes the place of the
BSD_SHLIB variable.  The regression test driver ignores the plpgsql test
if there are no shared libraries available.
This commit is contained in:
Peter Eisentraut 2000-10-23 21:44:12 +00:00
parent bc083d3d90
commit 7b021ce17c
10 changed files with 513 additions and 499 deletions

751
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -227,6 +227,14 @@ AC_DEFINE_UNQUOTED([DEF_MAXBACKENDS], [$with_maxbackends],
[The default soft limit on the number of concurrent connections, i.e., the default for the postmaster -N switch (--with-maxbackends)]) [The default soft limit on the number of concurrent connections, i.e., the default for the postmaster -N switch (--with-maxbackends)])
#
# Option to disable shared libraries
#
PGAC_ARG_BOOL(enable, shared, yes,
[ --disable-shared do not build shared libraries])
AC_SUBST(enable_shared)
# #
# C compiler # C compiler
# #

View File

@ -1,5 +1,5 @@
# -*-makefile-*- # -*-makefile-*-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.103 2000/10/21 22:36:11 petere Exp $ # $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.104 2000/10/23 21:43:56 petere Exp $
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets, # All PostgreSQL makefiles include this file and use the variables it sets,
@ -114,6 +114,7 @@ with_tcl = @with_tcl@
with_tk = @with_tk@ with_tk = @with_tk@
enable_odbc = @enable_odbc@ enable_odbc = @enable_odbc@
MULTIBYTE = @MULTIBYTE@ MULTIBYTE = @MULTIBYTE@
enable_shared = @enable_shared@
python_extmakefile = @python_extmakefile@ python_extmakefile = @python_extmakefile@
python_moduledir = @python_moduledir@ python_moduledir = @python_moduledir@
@ -206,11 +207,6 @@ host_cpu = @host_cpu@
HAVE_POSIX_SIGNALS= @HAVE_POSIX_SIGNALS@ HAVE_POSIX_SIGNALS= @HAVE_POSIX_SIGNALS@
HPUXMATHLIB= @HPUXMATHLIB@ HPUXMATHLIB= @HPUXMATHLIB@
# Ignore BSD_SHLIB if you're not using one of the BSD ports. But if you
# are, and it's one that doesn't have shared libraries (NetBSD/vax is an
# example of this), set BSD_SHLIB to null in Makefile.custom.
BSD_SHLIB= true
# This is mainly for use on FreeBSD, where we have both a.out and elf # This is mainly for use on FreeBSD, where we have both a.out and elf
# systems now. May be applicable to other systems to? # systems now. May be applicable to other systems to?
ELF_SYSTEM= @ELF_SYS@ ELF_SYSTEM= @ELF_SYS@

View File

@ -6,7 +6,7 @@
# Copyright (c) 1998, Regents of the University of California # Copyright (c) 1998, Regents of the University of California
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.26 2000/10/20 21:03:38 petere Exp $ # $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.27 2000/10/23 21:43:56 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -51,154 +51,157 @@
# #
# Got that? Look at src/interfaces/libpq/Makefile for an example. # Got that? Look at src/interfaces/libpq/Makefile for an example.
ifndef cplusplus
COMPILER = $(CC)
else
COMPILER = $(CXX)
endif
# shlib is empty by default. If we know how to build a shared library
# it will contain the name of the file, otherwise it will remain
# empty. Thus `ifdef shlib' could be used in the containing make file
# to test whether shared libraries are available.
shlib :=
# For each platform we support shared libraries on, set shlib and # First, a few hacks for building *static* libraries.
# update flags as needed to build a shared lib. Note we depend on
# Makefile.global (or really Makefile.port) to supply DLSUFFIX and LINK.static = $(AR) $(AROPT)
# other symbols.
ifdef cplusplus
ifeq ($(PORTNAME), irix5)
ifneq ($(GXX), yes)
LINK.static = $(CXX) -ar -o
endif
endif
ifeq ($(PORTNAME), solaris)
ifneq ($(GXX), yes)
LINK.static = $(CXX) -xar -o
endif
endif
endif # cplusplus
ifeq ($(enable_shared), yes)
# For each platform we support shared libraries on, set shlib to the
# name of the library, LINK.shared to the command to link the library,
# and adjust SHLIB_LINK if necessary.
# Try to keep the sections in some kind of order, folks... # Try to keep the sections in some kind of order, folks...
# XXX fix Makefile.aix
ifneq ($(PORTNAME), aix)
ifndef cplusplus
override CFLAGS += $(CFLAGS_SL)
else
override CXXFLAGS += $(CFLAGS_SL)
endif
endif
ifeq ($(PORTNAME), aix) ifeq ($(PORTNAME), aix)
shlib := lib$(NAME)$(DLSUFFIX) shlib := lib$(NAME)$(DLSUFFIX)
SHLIB_LINK += -lc SHLIB_LINK += -lc
endif endif
ifeq ($(PORTNAME), openbsd) ifeq ($(PORTNAME), openbsd)
ifdef BSD_SHLIB
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
ifdef ELF_SYSTEM ifdef ELF_SYSTEM
LDFLAGS_SL := -x -Bshareable -soname $(shlib) LINK.shared = $(LD) -x -Bshareable -soname $(shlib)
else else
LDFLAGS_SL := -x -Bshareable -Bforcearchive LINK.shared = $(LD) -x -Bshareable -Bforcearchive
endif
override CFLAGS += $(CFLAGS_SL)
endif endif
endif endif
ifeq ($(PORTNAME), bsdi) ifeq ($(PORTNAME), bsdi)
ifdef BSD_SHLIB
ifeq ($(DLSUFFIX), .so)
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL += -shared -soname $(shlib) ifeq ($(DLSUFFIX), .so)
override CFLAGS += $(CFLAGS_SL) LINK.shared = $(LD) -shared -soname $(shlib)
endif endif
ifeq ($(DLSUFFIX), .o) ifeq ($(DLSUFFIX), .o)
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) LINK.shared = shlicc -O $(LDREL)
LD := shlicc
LDFLAGS_SL += -O $(LDREL)
override CFLAGS += $(CFLAGS_SL)
endif
endif endif
endif endif
ifeq ($(PORTNAME), freebsd) ifeq ($(PORTNAME), freebsd)
ifdef BSD_SHLIB
ifdef ELF_SYSTEM ifdef ELF_SYSTEM
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
LDFLAGS_SL := -x -shared -soname $(shlib) LINK.shared = $(LD) -x -shared -soname $(shlib)
else else
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL := -x -Bshareable -Bforcearchive LINK.shared = $(LD) -x -Bshareable -Bforcearchive
endif
override CFLAGS += $(CFLAGS_SL)
endif endif
endif endif
ifeq ($(PORTNAME), netbsd) ifeq ($(PORTNAME), netbsd)
ifdef BSD_SHLIB
soname := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) soname := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
ifdef ELF_SYSTEM ifdef ELF_SYSTEM
LD := $(CC) LINK.shared = $(COMPILER) -shared -Wl,-soname -Wl,$(soname)
LDFLAGS_SL := -shared -Wl,-soname -Wl,$(soname)
ifneq ($(SHLIB_LINK),) ifneq ($(SHLIB_LINK),)
LDFLAGS_SL += -Wl,-R$(libdir) LINK.shared += -Wl,-R$(libdir)
endif endif
else else
LDFLAGS_SL := -x -Bshareable -Bforcearchive LINK.shared = $(LD) -x -Bshareable -Bforcearchive
endif
override CFLAGS += $(CFLAGS_SL)
endif endif
endif endif
ifeq ($(PORTNAME), hpux) ifeq ($(PORTNAME), hpux)
# HPUX doesn't believe in version numbers for shlibs # HPUX doesn't believe in version numbers for shlibs
shlib := lib$(NAME)$(DLSUFFIX) shlib := lib$(NAME)$(DLSUFFIX)
LDFLAGS_SL := -b LINK.shared = $(LD) -b
override CFLAGS += $(CFLAGS_SL)
endif endif
ifeq ($(PORTNAME), irix5) ifeq ($(PORTNAME), irix5)
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
LDFLAGS_SL := -shared -rpath $(libdir) -set_version sgi$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) LINK.shared := $(COMPILER) -shared -rpath $(libdir) -set_version sgi$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
override CFLAGS += $(CFLAGS_SL)
endif endif
ifeq ($(PORTNAME), linux) ifeq ($(PORTNAME), linux)
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LD := $(CC) LINK.shared = $(COMPILER) -shared -Wl,-soname,$(shlib)
LDFLAGS_SL := -shared -Wl,-soname,$(shlib)
LDFLAGS_ODBC := -lm
override CFLAGS += $(CFLAGS_SL)
endif endif
ifeq ($(PORTNAME), solaris) ifeq ($(PORTNAME), solaris)
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL := -G LINK.shared = $(COMPILER) -G
SHLIB_LINK += -ldl -lsocket -lresolv -lnsl -lm -lc SHLIB_LINK += -ldl -lsocket -lresolv -lnsl -lm -lc
override CFLAGS += $(CFLAGS_SL)
endif endif
ifeq ($(PORTNAME), osf) ifeq ($(PORTNAME), osf)
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL += -shared -expect_unresolved '*' LINK.shared = $(LD) -shared -expect_unresolved '*'
endif endif
ifeq ($(PORTNAME), svr4) ifeq ($(PORTNAME), svr4)
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL := -G LINK.shared = $(LD) -G
override CFLAGS += $(CFLAGS_SL)
endif endif
ifeq ($(PORTNAME), univel) ifeq ($(PORTNAME), univel)
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL := -G -z text LINK.shared = $(LD) -G -z text
override CFLAGS += $(CFLAGS_SL)
ifeq ($(CXX), CC)
override CXXFLAGS += -Xw
COMPILE.cc = $(CXX) $(CXXFLAGS:ll,alloca=ll) $(CPPFLAGS) $(TARGET_ARCH) -c
endif
endif endif
ifeq ($(PORTNAME), unixware) ifeq ($(PORTNAME), unixware)
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL := -G -z text LINK.shared = $(LD) -G -z text
override CFLAGS += $(CFLAGS_SL)
ifeq ($(CXX), CC)
override CXXFLAGS += -Xw
COMPILE.cc = $(CXX) $(CXXFLAGS:ll,alloca=ll) $(CPPFLAGS) $(TARGET_ARCH) -c
endif
endif endif
ifeq ($(PORTNAME), win) ifeq ($(PORTNAME), win)
shlib := $(NAME)$(DLSUFFIX) shlib := $(NAME)$(DLSUFFIX)
ifdef cplusplus
SHLIB_LINK += --driver-name g++
endif
endif endif
ifeq ($(PORTNAME), beos) ifeq ($(PORTNAME), beos)
install-shlib-dep := install-shlib
shlib := lib$(NAME)$(DLSUFFIX) shlib := lib$(NAME)$(DLSUFFIX)
LDFLAGS_SL := -nostart -ltermcap -lstdc++.r4 -lbind -lsocket -L/boot/develop/lib/x86 LINK.shared = $(LD) -nostart
SHLIB_LINK += -ltermcap -lstdc++.r4 -lbind -lsocket -L/boot/develop/lib/x86
endif endif
# Note that in what follows, shlib is empty when not building a shared endif # enable_shared
# library.
## ##
@ -208,8 +211,6 @@ endif
.PHONY: all-lib .PHONY: all-lib
all-lib: lib$(NAME).a $(shlib) all-lib: lib$(NAME).a $(shlib)
# Rules to build regular and shared libraries
ifneq ($(PORTNAME), win) ifneq ($(PORTNAME), win)
ifndef LORDER ifndef LORDER
@ -218,22 +219,23 @@ endif
lib$(NAME).a: $(OBJS) lib$(NAME).a: $(OBJS)
ifdef MK_NO_LORDER ifdef MK_NO_LORDER
$(AR) $(AROPT) $@ $^ $(LINK.static) $@ $^
else else
$(AR) $(AROPT) $@ `$(LORDER) $^ | tsort` $(LINK.static) $@ `$(LORDER) $^ | tsort`
endif endif
$(RANLIB) $@ $(RANLIB) $@
endif # not win endif # not win
ifdef shlib ifeq ($(enable_shared), yes)
ifneq ($(PORTNAME), beos) ifneq ($(PORTNAME), beos)
ifneq ($(PORTNAME), win) ifneq ($(PORTNAME), win)
ifneq ($(PORTNAME), aix) ifneq ($(PORTNAME), aix)
# Normal case # Normal case
$(shlib): $(OBJS) $(shlib): $(OBJS)
$(LD) $(LDFLAGS_SL) -o $@ $(OBJS) $(SHLIB_LINK) $(LINK.shared) -o $@ $(OBJS) $(SHLIB_LINK)
# If we're using major and minor versions, then make a symlink to major-version-only. # If we're using major and minor versions, then make a symlink to major-version-only.
ifneq ($(shlib), lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)) ifneq ($(shlib), lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION))
rm -f lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) rm -f lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
@ -275,7 +277,8 @@ $(shlib): $(OBJS)
$(CC) -Xlinker -soname=$@ $(LDFLAGS_SL) -o $@ _APP_ $(OBJS) $(SHLIB_LINK) $(CC) -Xlinker -soname=$@ $(LDFLAGS_SL) -o $@ _APP_ $(OBJS) $(SHLIB_LINK)
endif # PORTNAME == beos endif # PORTNAME == beos
endif # shlib
endif # enable_shared
## ##
@ -288,7 +291,7 @@ install-lib: install-lib-static install-lib-shared
install-lib-static: lib$(NAME).a install-lib-static: lib$(NAME).a
$(INSTALL_DATA) $< $(DESTDIR)$(libdir)/lib$(NAME).a $(INSTALL_DATA) $< $(DESTDIR)$(libdir)/lib$(NAME).a
ifdef shlib ifeq ($(enable_shared), yes)
install-lib-shared: $(shlib) install-lib-shared: $(shlib)
$(INSTALL_SHLIB) $< $(DESTDIR)$(libdir)/$(shlib) $(INSTALL_SHLIB) $< $(DESTDIR)$(libdir)/$(shlib)
ifneq ($(PORTNAME), win) ifneq ($(PORTNAME), win)
@ -304,7 +307,7 @@ ifneq ($(shlib), lib$(NAME)$(DLSUFFIX))
endif endif
endif # not win endif # not win
endif # shlib endif # enable_shared
## ##
@ -314,11 +317,11 @@ endif # shlib
.PHONY: uninstall-lib .PHONY: uninstall-lib
uninstall-lib: uninstall-lib:
rm -f $(DESTDIR)$(libdir)/lib$(NAME).a rm -f $(DESTDIR)$(libdir)/lib$(NAME).a
ifdef shlib ifeq ($(enable_shared), yes)
rm -f $(DESTDIR)$(libdir)/lib$(NAME)$(DLSUFFIX) \ rm -f $(DESTDIR)$(libdir)/lib$(NAME)$(DLSUFFIX) \
$(DESTDIR)$(libdir)/lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) \ $(DESTDIR)$(libdir)/lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) \
$(DESTDIR)$(libdir)/lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) $(DESTDIR)$(libdir)/lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
endif # shlib endif # enable_shared
## ##
@ -328,7 +331,9 @@ endif # shlib
.PHONY: clean-lib .PHONY: clean-lib
clean-lib: clean-lib:
rm -f lib$(NAME).a rm -f lib$(NAME).a
ifeq ($(enable_shared), yes)
rm -f $(shlib) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) lib$(NAME)$(DLSUFFIX) rm -f $(shlib) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) lib$(NAME)$(DLSUFFIX)
endif
ifeq ($(PORTNAME), win) ifeq ($(PORTNAME), win)
rm -rf $(NAME).def rm -rf $(NAME).def
endif endif

View File

@ -4,7 +4,7 @@
# #
# Copyright (c) 1994, Regents of the University of California # Copyright (c) 1994, Regents of the University of California
# #
# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.26 2000/10/20 21:04:12 petere Exp $ # $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.27 2000/10/23 21:43:57 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -20,28 +20,10 @@ override CPPFLAGS += -I$(libpq_srcdir)
OBJS = pgconnection.o pgdatabase.o pgtransdb.o pgcursordb.o pglobject.o OBJS = pgconnection.o pgdatabase.o pgtransdb.o pgcursordb.o pglobject.o
ifeq ($(PORTNAME), win)
SHLIB_LINK+= --driver-name g++ $(libpq)
else
SHLIB_LINK= $(libpq) SHLIB_LINK= $(libpq)
endif
# For CC on IRIX, must use CC as linker/archiver of C++ libraries # communicate with Makefile.shlib
ifeq ($(PORTNAME), irix5) cplusplus := yes
ifneq ($(GXX), yes)
AR := CC
AROPT := -ar -o
LD := CC
endif
endif
# Same for Solaris with native compiler
ifeq ($(PORTNAME), solaris)
ifneq ($(GXX), yes)
AR := CC
AROPT := -xar -o
LD := CC
endif
endif
all: all-lib all: all-lib
@ -49,9 +31,6 @@ all: all-lib
# Shared library stuff # Shared library stuff
include $(top_srcdir)/src/Makefile.shlib include $(top_srcdir)/src/Makefile.shlib
# Pull shared-lib CFLAGS into CXXFLAGS
override CXXFLAGS+= $(CFLAGS_SL)
.PHONY: examples .PHONY: examples
examples: examples:

View File

@ -2,7 +2,7 @@
# #
# GNUMakefile for psqlodbc (Postgres ODBC driver) # GNUMakefile for psqlodbc (Postgres ODBC driver)
# #
# $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile,v 1.5 2000/10/20 21:04:13 petere Exp $ # $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile,v 1.6 2000/10/23 21:43:58 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -23,15 +23,13 @@ OBJS = info.o bind.o columninfo.o connection.o convert.o drvconn.o \
pgtypes.o psqlodbc.o qresult.o results.o socket.o parse.o statement.o \ pgtypes.o psqlodbc.o qresult.o results.o socket.o parse.o statement.o \
gpps.o tuple.o tuplelist.o dlg_specific.o $(OBJX) gpps.o tuple.o tuplelist.o dlg_specific.o $(OBJX)
SHLIB_LINK= $(LD_FLAGS) SHLIB_LINK= -lm
all: all-lib all: all-lib
# Shared library stuff # Shared library stuff
include $(top_srcdir)/src/Makefile.shlib include $(top_srcdir)/src/Makefile.shlib
LDFLAGS_SL+= $(LDFLAGS_ODBC)
odbc_headers = isql.h isqlext.h iodbc.h odbc_headers = isql.h isqlext.h iodbc.h
odbc_includedir = $(includedir)/iodbc odbc_includedir = $(includedir)/iodbc

View File

@ -8,6 +8,7 @@ LDOUT=
LIBS= -lunix LIBS= -lunix
LDFLAGS= $(LIBS) LDFLAGS= $(LIBS)
enable_shared = no
DLSUFFIX = .so DLSUFFIX = .so
CFLAGS_SL = CFLAGS_SL =

View File

@ -2,7 +2,7 @@
# #
# Makefile for the plpgsql shared object # Makefile for the plpgsql shared object
# #
# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.8 2000/10/20 21:04:16 petere Exp $ # $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.9 2000/10/23 21:44:03 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -32,7 +32,7 @@ include $(top_srcdir)/src/Makefile.shlib
# rule and do this instead: # rule and do this instead:
install: installdirs all install: installdirs all
ifdef shlib ifeq ($(enable_shared), yes)
$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(libdir)/plpgsql$(DLSUFFIX) $(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(libdir)/plpgsql$(DLSUFFIX)
else else
@echo "*****"; \ @echo "*****"; \

View File

@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.28 2000/10/20 21:04:25 petere Exp $ # $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.29 2000/10/23 21:44:07 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -36,6 +36,7 @@ pg_regress: pg_regress.sh GNUmakefile
-e 's/@VERSION@/$(VERSION)/g' \ -e 's/@VERSION@/$(VERSION)/g' \
-e 's/@host_tuple@/$(host_tuple)/g' \ -e 's/@host_tuple@/$(host_tuple)/g' \
-e 's,@GMAKE@,$(MAKE),g' \ -e 's,@GMAKE@,$(MAKE),g' \
-e 's/@enable_shared@/$(enable_shared)/g' \
$< >$@ $< >$@
chmod a+x $@ chmod a+x $@

View File

@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.8 2000/10/22 22:15:09 petere Exp $ # $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.9 2000/10/23 21:44:12 petere Exp $
me=`basename $0` me=`basename $0`
: ${TMPDIR=/tmp} : ${TMPDIR=/tmp}
@ -73,6 +73,7 @@ libdir='@libdir@'
bindir='@bindir@' bindir='@bindir@'
datadir='@datadir@' datadir='@datadir@'
host_platform='@host_tuple@' host_platform='@host_tuple@'
enable_shared='@enable_shared@'
unset mode unset mode
unset schedule unset schedule
@ -406,17 +407,14 @@ fi
# Install the PL/pgSQL language in it # Install the PL/pgSQL language in it
# ---------- # ----------
case $host_platform in if [ "$enable_shared" = yes ]; then
*-*-qnx*) : ;;
*)
message "installing PL/pgSQL" message "installing PL/pgSQL"
"$bindir/createlang" -L "$libdir" $psql_options plpgsql $dbname "$bindir/createlang" -L "$libdir" $psql_options plpgsql $dbname
if [ $? -ne 0 ] && [ $? -ne 2 ]; then if [ $? -ne 0 ] && [ $? -ne 2 ]; then
echo "$me: createlang failed" echo "$me: createlang failed"
(exit 2); exit (exit 2); exit
fi fi
;; fi
esac
# ---------- # ----------
@ -436,6 +434,7 @@ cat /dev/null >"$diff_file"
lno=0 lno=0
( (
[ "$enable_shared" != yes ] && echo "ignore: plpgsql"
cat $schedule cat $schedule
for x in $extra_tests; do for x in $extra_tests; do
echo "test: $x" echo "test: $x"
@ -472,7 +471,7 @@ do
$PSQL -d "$dbname" <"$inputdir/sql/$1.sql" >"$outputdir/results/$1.out" 2>&1 $PSQL -d "$dbname" <"$inputdir/sql/$1.sql" >"$outputdir/results/$1.out" 2>&1
else else
# Start a parallel group # Start a parallel group
$ECHO_N "parallel group ($# tests): " $ECHO_C $ECHO_N "parallel group ($# tests): $ECHO_C"
for name do for name do
( $PSQL -d $dbname <"$inputdir/sql/$name.sql" >"$outputdir/results/$name.out" 2>&1 ( $PSQL -d $dbname <"$inputdir/sql/$name.sql" >"$outputdir/results/$name.out" 2>&1
$ECHO_N " $name$ECHO_C" $ECHO_N " $name$ECHO_C"