Commit 46e76373 authored by Peter Eisentraut's avatar Peter Eisentraut

Implement a few changes to how shared libraries and dynamically loadable

modules are built.  Foremost, it creates a solid distinction between these two
types of targets based on what had already been implemented and duplicated in
ad hoc ways before.  Specifically,

- Dynamically loadable modules no longer get a soname.  The numbers previously
set in the makefiles were dummy numbers anyway, and the presence of a soname
upset a few packaging tools, so it is nicer not to have one.

- The cumbersome detour taken on installation (build a libfoo.so.0.0.0 and
then override the rule to install foo.so instead) is removed.

- Lots of duplicated code simplified.
parent 8deafd6f
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# Makefile for src/backend/snowball # Makefile for src/backend/snowball
# #
# $PostgreSQL: pgsql/src/backend/snowball/Makefile,v 1.5 2008/03/18 16:24:50 petere Exp $ # $PostgreSQL: pgsql/src/backend/snowball/Makefile,v 1.6 2008/04/07 14:15:58 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -77,11 +77,7 @@ else ...@@ -77,11 +77,7 @@ else
VPATH = $(srcdir)/libstemmer VPATH = $(srcdir)/libstemmer
endif endif
SHLIB_LINK := $(BE_DLLLIBS)
NAME := dict_snowball NAME := dict_snowball
SO_MAJOR_VERSION := 0
SO_MINOR_VERSION := 0
rpath = rpath =
all: all-shared-lib $(SQLSCRIPT) all: all-shared-lib $(SQLSCRIPT)
...@@ -116,10 +112,7 @@ else ...@@ -116,10 +112,7 @@ else
echo "-- No language-specific snowball dictionaries, for lack of shared library support" > $@ echo "-- No language-specific snowball dictionaries, for lack of shared library support" > $@
endif endif
install: all installdirs install: all installdirs install-lib
ifeq ($(enable_shared), yes)
$(INSTALL_SHLIB) $(shlib) '$(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX)'
endif
$(INSTALL_DATA) $(SQLSCRIPT) '$(DESTDIR)$(datadir)' $(INSTALL_DATA) $(SQLSCRIPT) '$(DESTDIR)$(datadir)'
@set -e; \ @set -e; \
set $(LANGUAGES) ; \ set $(LANGUAGES) ; \
...@@ -131,11 +124,10 @@ endif ...@@ -131,11 +124,10 @@ endif
fi \ fi \
done done
installdirs: installdirs: installdirs-lib
$(mkinstalldirs) '$(DESTDIR)$(pkglibdir)' '$(DESTDIR)$(datadir)' '$(DESTDIR)$(datadir)/$(DICTDIR)' $(mkinstalldirs) '$(DESTDIR)$(datadir)' '$(DESTDIR)$(datadir)/$(DICTDIR)'
uninstall: uninstall: uninstall-lib
rm -f '$(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX)'
rm -f '$(DESTDIR)$(datadir)/$(SQLSCRIPT)' rm -f '$(DESTDIR)$(datadir)/$(SQLSCRIPT)'
@set -e; \ @set -e; \
set $(LANGUAGES) ; \ set $(LANGUAGES) ; \
......
SRCS += $(NAME).c SRCS += $(NAME).c
OBJS += $(NAME).o OBJS += $(NAME).o
SHLIB_LINK := $(BE_DLLLIBS)
SO_MAJOR_VERSION := 0
SO_MINOR_VERSION := 0
rpath = rpath =
all: all-shared-lib all: all-shared-lib
include $(top_srcdir)/src/Makefile.shlib include $(top_srcdir)/src/Makefile.shlib
install: all installdirs install: all installdirs install-lib
ifeq ($(enable_shared), yes)
$(INSTALL_SHLIB) $(shlib) '$(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX)'
endif
installdirs: installdirs: installdirs-lib
$(mkinstalldirs) '$(DESTDIR)$(pkglibdir)'
uninstall: uninstall: uninstall-lib
rm -f '$(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX)'
clean distclean maintainer-clean: clean-lib clean distclean maintainer-clean: clean-lib
rm -f $(OBJS) rm -f $(OBJS)
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group # Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California # Portions Copyright (c) 1994, Regents of the University of California
# #
# $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/Makefile,v 1.39 2008/02/26 06:41:23 petere Exp $ # $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/Makefile,v 1.40 2008/04/07 14:15:58 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -16,7 +16,6 @@ include $(top_builddir)/src/Makefile.global ...@@ -16,7 +16,6 @@ include $(top_builddir)/src/Makefile.global
NAME= ecpg_compat NAME= ecpg_compat
SO_MAJOR_VERSION= 3 SO_MAJOR_VERSION= 3
SO_MINOR_VERSION= 1 SO_MINOR_VERSION= 1
DLTYPE= library
override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \ override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
-I$(libpq_srcdir) -I$(top_srcdir)/src/include/utils $(CPPFLAGS) -I$(libpq_srcdir) -I$(top_srcdir)/src/include/utils $(CPPFLAGS)
...@@ -42,8 +41,7 @@ snprintf.c: % : $(top_srcdir)/src/port/% ...@@ -42,8 +41,7 @@ snprintf.c: % : $(top_srcdir)/src/port/%
install: all installdirs install-lib install: all installdirs install-lib
installdirs: installdirs: installdirs-lib
$(mkinstalldirs) '$(DESTDIR)$(libdir)'
uninstall: uninstall-lib uninstall: uninstall-lib
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group # Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California # Portions Copyright (c) 1994, Regents of the University of California
# #
# $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.58 2008/03/21 16:10:23 meskes Exp $ # $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.59 2008/04/07 14:15:58 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -16,7 +16,6 @@ include $(top_builddir)/src/Makefile.global ...@@ -16,7 +16,6 @@ include $(top_builddir)/src/Makefile.global
NAME= ecpg NAME= ecpg
SO_MAJOR_VERSION= 6 SO_MAJOR_VERSION= 6
SO_MINOR_VERSION= 1 SO_MINOR_VERSION= 1
DLTYPE= library
override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \ override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
-I$(libpq_srcdir) -I$(top_builddir)/src/port $(CPPFLAGS) -I$(libpq_srcdir) -I$(top_builddir)/src/port $(CPPFLAGS)
...@@ -63,8 +62,7 @@ $(top_builddir)/src/port/pg_config_paths.h: ...@@ -63,8 +62,7 @@ $(top_builddir)/src/port/pg_config_paths.h:
install: all installdirs install-lib install: all installdirs install-lib
installdirs: installdirs: installdirs-lib
$(mkinstalldirs) '$(DESTDIR)$(libdir)'
uninstall: uninstall-lib uninstall: uninstall-lib
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group # Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California # Portions Copyright (c) 1994, Regents of the University of California
# #
# $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.41 2008/02/26 06:41:24 petere Exp $ # $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.42 2008/04/07 14:15:58 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -16,7 +16,6 @@ include $(top_builddir)/src/Makefile.global ...@@ -16,7 +16,6 @@ include $(top_builddir)/src/Makefile.global
NAME= pgtypes NAME= pgtypes
SO_MAJOR_VERSION= 3 SO_MAJOR_VERSION= 3
SO_MINOR_VERSION= 1 SO_MINOR_VERSION= 1
DLTYPE= library
override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \ override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
-I$(top_srcdir)/src/include/utils -I$(libpq_srcdir) $(CPPFLAGS) -I$(top_srcdir)/src/include/utils -I$(libpq_srcdir) $(CPPFLAGS)
...@@ -48,8 +47,7 @@ pgstrcasecmp.c rint.c snprintf.c: % : $(top_srcdir)/src/port/% ...@@ -48,8 +47,7 @@ pgstrcasecmp.c rint.c snprintf.c: % : $(top_srcdir)/src/port/%
install: all installdirs install-lib install: all installdirs install-lib
installdirs: installdirs: installdirs-lib
$(mkinstalldirs) '$(DESTDIR)$(libdir)'
uninstall: uninstall-lib uninstall: uninstall-lib
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group # Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California # Portions Copyright (c) 1994, Regents of the University of California
# #
# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.164 2008/03/05 05:39:11 tgl Exp $ # $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.165 2008/04/07 14:15:58 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -18,7 +18,6 @@ include $(top_builddir)/src/Makefile.global ...@@ -18,7 +18,6 @@ include $(top_builddir)/src/Makefile.global
NAME= pq NAME= pq
SO_MAJOR_VERSION= 5 SO_MAJOR_VERSION= 5
SO_MINOR_VERSION= 2 SO_MINOR_VERSION= 2
DLTYPE= library
override CPPFLAGS := -DFRONTEND -I$(srcdir) $(CPPFLAGS) -I$(top_builddir)/src/port override CPPFLAGS := -DFRONTEND -I$(srcdir) $(CPPFLAGS) -I$(top_builddir)/src/port
ifneq ($(PORTNAME), win32) ifneq ($(PORTNAME), win32)
...@@ -111,8 +110,8 @@ install: all installdirs install-lib ...@@ -111,8 +110,8 @@ install: all installdirs install-lib
$(INSTALL_DATA) $(srcdir)/pqexpbuffer.h '$(DESTDIR)$(includedir_internal)' $(INSTALL_DATA) $(srcdir)/pqexpbuffer.h '$(DESTDIR)$(includedir_internal)'
$(INSTALL_DATA) $(srcdir)/pg_service.conf.sample '$(DESTDIR)$(datadir)/pg_service.conf.sample' $(INSTALL_DATA) $(srcdir)/pg_service.conf.sample '$(DESTDIR)$(datadir)/pg_service.conf.sample'
installdirs: installdirs: installdirs-lib
$(mkinstalldirs) '$(DESTDIR)$(libdir)' '$(DESTDIR)$(includedir)' '$(DESTDIR)$(includedir_internal)' $(mkinstalldirs) '$(DESTDIR)$(includedir)' '$(DESTDIR)$(includedir_internal)'
uninstall: uninstall-lib uninstall: uninstall-lib
rm -f '$(DESTDIR)$(includedir)/libpq-fe.h' '$(DESTDIR)$(includedir_internal)/libpq-int.h' '$(DESTDIR)$(includedir_internal)/pqexpbuffer.h' '$(DESTDIR)$(datadir)/pg_service.conf.sample' rm -f '$(DESTDIR)$(includedir)/libpq-fe.h' '$(DESTDIR)$(includedir_internal)/libpq-int.h' '$(DESTDIR)$(includedir_internal)/pqexpbuffer.h' '$(DESTDIR)$(datadir)/pg_service.conf.sample'
......
# PGXS: PostgreSQL extensions makefile # PGXS: PostgreSQL extensions makefile
# $PostgreSQL: pgsql/src/makefiles/pgxs.mk,v 1.11 2007/10/16 15:59:59 tgl Exp $ # $PostgreSQL: pgsql/src/makefiles/pgxs.mk,v 1.12 2008/04/07 14:15:58 petere Exp $
# This file contains generic rules to build many kinds of simple # This file contains generic rules to build many kinds of simple
# extension modules. You only need to set a few variables and include # extension modules. You only need to set a few variables and include
...@@ -80,10 +80,6 @@ all: $(PROGRAM) $(DATA_built) $(SCRIPTS_built) $(addsuffix $(DLSUFFIX), $(MODULE ...@@ -80,10 +80,6 @@ all: $(PROGRAM) $(DATA_built) $(SCRIPTS_built) $(addsuffix $(DLSUFFIX), $(MODULE
ifdef MODULE_big ifdef MODULE_big
# shared library parameters # shared library parameters
NAME = $(MODULE_big) NAME = $(MODULE_big)
SO_MAJOR_VERSION= 0
SO_MINOR_VERSION= 0
SHLIB_LINK += $(BE_DLLLIBS)
include $(top_srcdir)/src/Makefile.shlib include $(top_srcdir)/src/Makefile.shlib
...@@ -121,9 +117,6 @@ endif # DOCS ...@@ -121,9 +117,6 @@ endif # DOCS
ifdef PROGRAM ifdef PROGRAM
$(INSTALL_PROGRAM) $(PROGRAM)$(X) '$(DESTDIR)$(bindir)' $(INSTALL_PROGRAM) $(PROGRAM)$(X) '$(DESTDIR)$(bindir)'
endif # PROGRAM endif # PROGRAM
ifdef MODULE_big
$(INSTALL_SHLIB) $(shlib) '$(DESTDIR)$(pkglibdir)/$(MODULE_big)$(DLSUFFIX)'
endif # MODULE_big
ifdef SCRIPTS ifdef SCRIPTS
@for file in $(addprefix $(srcdir)/, $(SCRIPTS)); do \ @for file in $(addprefix $(srcdir)/, $(SCRIPTS)); do \
echo "$(INSTALL_SCRIPT) $$file '$(DESTDIR)$(bindir)'"; \ echo "$(INSTALL_SCRIPT) $$file '$(DESTDIR)$(bindir)'"; \
...@@ -137,6 +130,10 @@ ifdef SCRIPTS_built ...@@ -137,6 +130,10 @@ ifdef SCRIPTS_built
done done
endif # SCRIPTS_built endif # SCRIPTS_built
ifdef MODULE_big
install: install-lib
endif # MODULE_big
installdirs: installdirs:
ifneq (,$(DATA)$(DATA_built)) ifneq (,$(DATA)$(DATA_built))
...@@ -145,7 +142,7 @@ endif ...@@ -145,7 +142,7 @@ endif
ifneq (,$(DATA_TSEARCH)) ifneq (,$(DATA_TSEARCH))
$(mkinstalldirs) '$(DESTDIR)$(datadir)/tsearch_data' $(mkinstalldirs) '$(DESTDIR)$(datadir)/tsearch_data'
endif endif
ifneq (,$(MODULES)$(MODULE_big)) ifneq (,$(MODULES))
$(mkinstalldirs) '$(DESTDIR)$(pkglibdir)' $(mkinstalldirs) '$(DESTDIR)$(pkglibdir)'
endif endif
ifdef DOCS ifdef DOCS
...@@ -157,6 +154,10 @@ ifneq (,$(PROGRAM)$(SCRIPTS)$(SCRIPTS_built)) ...@@ -157,6 +154,10 @@ ifneq (,$(PROGRAM)$(SCRIPTS)$(SCRIPTS_built))
$(mkinstalldirs) '$(DESTDIR)$(bindir)' $(mkinstalldirs) '$(DESTDIR)$(bindir)'
endif endif
ifdef MODULE_big
installdirs: installdirs-lib
endif # MODULE_big
uninstall: uninstall:
ifneq (,$(DATA)$(DATA_built)) ifneq (,$(DATA)$(DATA_built))
...@@ -174,9 +175,6 @@ endif ...@@ -174,9 +175,6 @@ endif
ifdef PROGRAM ifdef PROGRAM
rm -f '$(DESTDIR)$(bindir)/$(PROGRAM)$(X)' rm -f '$(DESTDIR)$(bindir)/$(PROGRAM)$(X)'
endif endif
ifdef MODULE_big
rm -f '$(DESTDIR)$(pkglibdir)/$(MODULE_big)$(DLSUFFIX)'
endif
ifdef SCRIPTS ifdef SCRIPTS
rm -f $(addprefix '$(DESTDIR)$(bindir)'/, $(SCRIPTS)) rm -f $(addprefix '$(DESTDIR)$(bindir)'/, $(SCRIPTS))
endif endif
...@@ -184,6 +182,10 @@ ifdef SCRIPTS_built ...@@ -184,6 +182,10 @@ ifdef SCRIPTS_built
rm -f $(addprefix '$(DESTDIR)$(bindir)'/, $(SCRIPTS_built)) rm -f $(addprefix '$(DESTDIR)$(bindir)'/, $(SCRIPTS_built))
endif endif
ifdef MODULE_big
uninstall: uninstall-lib
endif # MODULE_big
clean: clean:
ifdef MODULES ifdef MODULES
......
# Makefile for PL/Perl # Makefile for PL/Perl
# $PostgreSQL: pgsql/src/pl/plperl/GNUmakefile,v 1.33 2007/12/01 15:30:09 adunstan Exp $ # $PostgreSQL: pgsql/src/pl/plperl/GNUmakefile,v 1.34 2008/04/07 14:15:58 petere Exp $
subdir = src/pl/plperl subdir = src/pl/plperl
top_builddir = ../../.. top_builddir = ../../..
...@@ -32,12 +32,10 @@ rpathdir = $(perl_archlibexp)/CORE ...@@ -32,12 +32,10 @@ rpathdir = $(perl_archlibexp)/CORE
NAME = plperl NAME = plperl
SO_MAJOR_VERSION = 0
SO_MINOR_VERSION = 0
OBJS = plperl.o spi_internal.o SPI.o OBJS = plperl.o spi_internal.o SPI.o
SHLIB_LINK = $(perl_embed_ldflags) $(BE_DLLLIBS) SHLIB_LINK = $(perl_embed_ldflags)
REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-language=plperl REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-language=plperl
REGRESS = plperl plperl_trigger plperl_shared plperl_elog REGRESS = plperl plperl_trigger plperl_shared plperl_elog
...@@ -73,20 +71,11 @@ $(test_files_build): $(abs_builddir)/%: $(srcdir)/% ...@@ -73,20 +71,11 @@ $(test_files_build): $(abs_builddir)/%: $(srcdir)/%
endif endif
install: all installdirs install: all installdirs install-lib
ifeq ($(enable_shared), yes)
$(INSTALL_SHLIB) $(shlib) '$(DESTDIR)$(pkglibdir)/plperl$(DLSUFFIX)'
else
@echo "*****"; \
echo "* PL/Perl was not installed due to lack of shared library support."; \
echo "*****"
endif
installdirs: installdirs: installdirs-lib
$(mkinstalldirs) '$(DESTDIR)$(pkglibdir)'
uninstall: uninstall: uninstall-lib
rm -f '$(DESTDIR)$(pkglibdir)/plperl$(DLSUFFIX)'
installcheck: submake installcheck: submake
$(top_builddir)/src/test/regress/pg_regress --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS) $(top_builddir)/src/test/regress/pg_regress --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# Makefile for the plpgsql shared object # Makefile for the plpgsql shared object
# #
# $PostgreSQL: pgsql/src/pl/plpgsql/src/Makefile,v 1.31 2007/07/15 22:18:24 tgl Exp $ # $PostgreSQL: pgsql/src/pl/plpgsql/src/Makefile,v 1.32 2008/04/07 14:15:58 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -12,11 +12,9 @@ include $(top_builddir)/src/Makefile.global ...@@ -12,11 +12,9 @@ include $(top_builddir)/src/Makefile.global
# Shared library parameters # Shared library parameters
NAME= plpgsql NAME= plpgsql
SO_MAJOR_VERSION= 1
SO_MINOR_VERSION= 0
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
SHLIB_LINK = $(filter -lintl, $(LIBS)) $(BE_DLLLIBS) SHLIB_LINK = $(filter -lintl, $(LIBS))
rpath = rpath =
OBJS = pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o OBJS = pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o
...@@ -27,26 +25,12 @@ all: all-lib ...@@ -27,26 +25,12 @@ all: all-lib
include $(top_srcdir)/src/Makefile.shlib include $(top_srcdir)/src/Makefile.shlib
# In order to use Makefile.shlib, we allow it to build a static install: installdirs all install-lib
# library libplpgsql.a, which we just ignore, as well as a shared
# library that it will insist on naming $(shlib). We don't want to
# call it that when installed, however, so we ignore the install-shlib
# rule and do this instead:
install: installdirs all installdirs: installdirs-lib
ifeq ($(enable_shared), yes)
$(INSTALL_SHLIB) $(shlib) '$(DESTDIR)$(pkglibdir)/plpgsql$(DLSUFFIX)'
else
@echo "*****"; \
echo "* PL/pgSQL was not installed due to lack of shared library support."; \
echo "*****"
endif
installdirs: uninstall: uninstall-lib
$(mkinstalldirs) '$(DESTDIR)$(pkglibdir)'
uninstall:
rm -f '$(DESTDIR)$(pkglibdir)/plpgsql$(DLSUFFIX)'
# Force these dependencies to be known even without dependency info built: # Force these dependencies to be known even without dependency info built:
pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o: plpgsql.h $(srcdir)/pl.tab.h pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o: plpgsql.h $(srcdir)/pl.tab.h
......
# $PostgreSQL: pgsql/src/pl/plpython/Makefile,v 1.28 2007/02/10 04:26:24 tgl Exp $ # $PostgreSQL: pgsql/src/pl/plpython/Makefile,v 1.29 2008/04/07 14:15:58 petere Exp $
subdir = src/pl/plpython subdir = src/pl/plpython
top_builddir = ../../.. top_builddir = ../../..
...@@ -37,8 +37,6 @@ override CPPFLAGS := -I$(srcdir) $(python_includespec) $(CPPFLAGS) ...@@ -37,8 +37,6 @@ override CPPFLAGS := -I$(srcdir) $(python_includespec) $(CPPFLAGS)
rpathdir = $(python_libdir) rpathdir = $(python_libdir)
NAME = plpython NAME = plpython
SO_MAJOR_VERSION = 0
SO_MINOR_VERSION = 0
OBJS = plpython.o OBJS = plpython.o
...@@ -56,7 +54,7 @@ python${pytverstr}.def: $(WD)/system32/python${pytverstr}.dll ...@@ -56,7 +54,7 @@ python${pytverstr}.def: $(WD)/system32/python${pytverstr}.dll
endif endif
SHLIB_LINK = $(BE_DLLLIBS) $(python_libspec) $(python_additional_libs) SHLIB_LINK = $(python_libspec) $(python_additional_libs)
REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-language=plpythonu REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-language=plpythonu
REGRESS = plpython_schema plpython_populate plpython_function plpython_test plpython_error plpython_drop REGRESS = plpython_schema plpython_populate plpython_function plpython_test plpython_error plpython_drop
...@@ -89,20 +87,11 @@ $(test_files_build): $(abs_builddir)/%: $(srcdir)/% ...@@ -89,20 +87,11 @@ $(test_files_build): $(abs_builddir)/%: $(srcdir)/%
endif endif
install: all installdirs install: all installdirs install-lib
ifeq ($(enable_shared), yes)
$(INSTALL_SHLIB) $(shlib) '$(DESTDIR)$(pkglibdir)/plpython$(DLSUFFIX)'
else
@echo "*****"; \
echo "* PL/Python was not installed due to lack of shared library support."; \
echo "*****"
endif
installdirs: installdirs: installdirs-lib
$(mkinstalldirs) '$(DESTDIR)$(pkglibdir)'
uninstall: uninstall: uninstall-lib
rm -f '$(DESTDIR)$(pkglibdir)/plpython$(DLSUFFIX)'
installcheck: submake installcheck: submake
$(top_builddir)/src/test/regress/pg_regress --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS) $(top_builddir)/src/test/regress/pg_regress --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# Makefile for the pltcl shared object # Makefile for the pltcl shared object
# #
# $PostgreSQL: pgsql/src/pl/tcl/Makefile,v 1.50 2006/07/21 00:24:04 tgl Exp $ # $PostgreSQL: pgsql/src/pl/tcl/Makefile,v 1.51 2008/04/07 14:15:58 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -29,15 +29,12 @@ endif ...@@ -29,15 +29,12 @@ endif
endif endif
SHLIB_LINK = $(TCL_LIB_SPEC)
ifneq ($(PORTNAME), win32) ifneq ($(PORTNAME), win32)
SHLIB_LINK = $(BE_DLLLIBS) $(TCL_LIB_SPEC) $(TCL_LIBS) -lc SHLIB_LINK += $(TCL_LIBS) -lc
else
SHLIB_LINK = $(TCL_LIB_SPEC) $(BE_DLLLIBS)
endif endif
NAME = pltcl NAME = pltcl
SO_MAJOR_VERSION = 2
SO_MINOR_VERSION = 0
OBJS = pltcl.o OBJS = pltcl.o
REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-language=pltcl REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-language=pltcl
...@@ -73,22 +70,13 @@ $(test_files_build): $(abs_builddir)/%: $(srcdir)/% ...@@ -73,22 +70,13 @@ $(test_files_build): $(abs_builddir)/%: $(srcdir)/%
endif endif
install: all installdirs install: all installdirs install-lib
ifeq ($(enable_shared), yes)
$(INSTALL_SHLIB) $(shlib) '$(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX)'
else
@echo "*****"; \
echo "* PL/Tcl was not installed due to lack of shared library support."; \
echo "*****"
endif
$(MAKE) -C modules $@ $(MAKE) -C modules $@
installdirs: installdirs: installdirs-lib
$(mkinstalldirs) '$(DESTDIR)$(pkglibdir)'
$(MAKE) -C modules $@ $(MAKE) -C modules $@
uninstall: uninstall: uninstall-lib
rm -f '$(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX)'
$(MAKE) -C modules $@ $(MAKE) -C modules $@
installcheck: submake installcheck: submake
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group # Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California # Portions Copyright (c) 1994, Regents of the University of California
# #
# $PostgreSQL: pgsql/src/test/regress/GNUmakefile,v 1.72 2008/03/18 16:24:50 petere Exp $ # $PostgreSQL: pgsql/src/test/regress/GNUmakefile,v 1.73 2008/04/07 14:15:58 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -77,18 +77,11 @@ uninstall: ...@@ -77,18 +77,11 @@ uninstall:
# Build dynamically-loaded object file for CREATE FUNCTION ... LANGUAGE C. # Build dynamically-loaded object file for CREATE FUNCTION ... LANGUAGE C.
NAME = regress NAME = regress
SO_MAJOR_VERSION= 0
SO_MINOR_VERSION= 0
OBJS = regress.o OBJS = regress.o
SHLIB_LINK = $(BE_DLLLIBS)
include $(top_srcdir)/src/Makefile.shlib include $(top_srcdir)/src/Makefile.shlib
all: $(NAME)$(DLSUFFIX) all: all-lib
$(NAME)$(DLSUFFIX): $(shlib)
rm -f $(NAME)$(DLSUFFIX)
$(LN_S) $(shlib) $(NAME)$(DLSUFFIX)
# Test input and expected files. These are created by pg_regress itself, so we # Test input and expected files. These are created by pg_regress itself, so we
# don't have a rule to create them. We do need rules to clean them however. # don't have a rule to create them. We do need rules to clean them however.
...@@ -169,7 +162,7 @@ bigcheck: all ...@@ -169,7 +162,7 @@ bigcheck: all
clean distclean maintainer-clean: clean-lib clean distclean maintainer-clean: clean-lib
# things built by `all' target # things built by `all' target
rm -f $(NAME)$(DLSUFFIX) $(OBJS) rm -f $(OBJS)
$(MAKE) -C $(contribdir)/spi clean $(MAKE) -C $(contribdir)/spi clean
rm -f $(output_files) $(input_files) pg_regress_main.o pg_regress.o pg_regress$(X) rm -f $(output_files) $(input_files) pg_regress_main.o pg_regress.o pg_regress$(X)
# things created by various check targets # things created by various check targets
......
...@@ -9,15 +9,13 @@ ...@@ -9,15 +9,13 @@
# to build using the surrounding source tree. # to build using the surrounding source tree.
# #
# IDENTIFICATION # IDENTIFICATION
# $PostgreSQL: pgsql/src/tutorial/Makefile,v 1.20 2007/06/26 22:05:04 tgl Exp $ # $PostgreSQL: pgsql/src/tutorial/Makefile,v 1.21 2008/04/07 14:15:58 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
MODULES = complex funcs MODULES = complex funcs
DATA_built = advanced.sql basics.sql complex.sql funcs.sql syscat.sql DATA_built = advanced.sql basics.sql complex.sql funcs.sql syscat.sql
SHLIB_LINK = $(BE_DLLLIBS)
ifdef NO_PGXS ifdef NO_PGXS
subdir = src/tutorial subdir = src/tutorial
top_builddir = ../.. top_builddir = ../..
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment