head	1.53;
access;
symbols
	REL9_0_0:1.53
	REL9_1_ALPHA1:1.53
	REL9_0_RC1:1.53
	REL9_0_BETA4:1.53
	REL9_0_STABLE:1.53.0.14
	REL9_0_BETA3:1.53
	REL9_0_BETA2:1.53
	REL7_4_29:1.40.2.1
	REL8_0_25:1.44
	REL8_1_21:1.47
	REL8_2_17:1.50
	REL8_3_11:1.50
	REL8_4_4:1.53
	REL9_0_BETA1:1.53
	REL9_0_ALPHA5_BRANCH:1.53.0.12
	REL9_0_ALPHA5:1.53
	REL7_4_28:1.40.2.1
	REL8_0_24:1.44
	REL8_1_20:1.47
	REL8_2_16:1.50
	REL8_3_10:1.50
	REL8_4_3:1.53
	REL9_0_ALPHA4:1.53
	REL9_0_ALPHA4_BRANCH:1.53.0.10
	REL8_5_ALPHA3:1.53
	REL8_5_ALPHA3_BRANCH:1.53.0.8
	REL7_4_27:1.40.2.1
	REL8_0_23:1.44
	REL8_1_19:1.47
	REL8_2_15:1.50
	REL8_3_9:1.50
	REL8_4_2:1.53
	REL8_5_ALPHA2:1.53
	REL8_5_ALPHA2_BRANCH:1.53.0.6
	REL7_4_26:1.40.2.1
	REL8_0_22:1.44
	REL8_1_18:1.47
	REL8_2_14:1.50
	REL8_3_8:1.50
	REL8_4_1:1.53
	REL8_5_ALPHA1:1.53
	REL8_5_ALPHA1_BRANCH:1.53.0.4
	REL8_4_STABLE:1.53.0.2
	REL8_4_0:1.53
	REL8_4_RC2:1.53
	REL8_4_RC1:1.53
	REL8_4_BETA2:1.53
	REL8_4_BETA1:1.53
	REL7_4_25:1.40.2.1
	REL8_0_21:1.44
	REL8_1_17:1.47
	REL8_2_13:1.50
	REL8_3_7:1.50
	REL7_4_24:1.40.2.1
	REL8_0_20:1.44
	REL8_1_16:1.47
	REL8_2_12:1.50
	REL8_3_6:1.50
	REL7_4_23:1.40.2.1
	REL8_0_19:1.44
	REL8_1_15:1.47
	REL8_2_11:1.50
	REL8_3_5:1.50
	REL7_4_22:1.40.2.1
	REL8_0_18:1.44
	REL8_1_14:1.47
	REL8_2_10:1.50
	REL8_3_4:1.50
	REL7_4_21:1.40.2.1
	REL8_0_17:1.44
	REL8_1_13:1.47
	REL8_2_9:1.50
	REL8_3_3:1.50
	REL7_4_20:1.40.2.1
	REL8_0_16:1.44
	REL8_1_12:1.47
	REL8_2_8:1.50
	REL8_3_2:1.50
	REL8_2_7:1.50
	REL8_3_1:1.50
	REL8_3_STABLE:1.50.0.4
	REL8_3_0:1.50
	REL8_3_RC2:1.50
	REL7_3_21:1.38
	REL7_4_19:1.40.2.1
	REL8_0_15:1.44
	REL8_1_11:1.47
	REL8_2_6:1.50
	REL8_3_RC1:1.50
	REL8_3_BETA4:1.50
	REL8_3_BETA3:1.50
	REL8_3_BETA2:1.50
	REL8_3_BETA1:1.50
	REL7_3_20:1.38
	REL7_4_18:1.40.2.1
	REL8_0_14:1.44
	REL8_1_10:1.47
	REL8_2_5:1.50
	REL7_3_19:1.38
	REL7_4_17:1.40.2.1
	REL8_0_13:1.44
	REL8_1_9:1.47
	REL8_2_4:1.50
	REL8_0_12:1.44
	REL8_1_8:1.47
	REL8_2_3:1.50
	REL7_3_18:1.38
	REL7_4_16:1.40.2.1
	REL8_0_11:1.44
	REL8_1_7:1.47
	REL8_2_2:1.50
	REL8_0_10:1.44
	REL8_1_6:1.47
	REL8_2_1:1.50
	REL7_4_15:1.40.2.1
	REL7_3_17:1.38
	REL8_2_STABLE:1.50.0.2
	REL8_2_0:1.50
	REL8_2_RC1:1.50
	REL8_2_BETA3:1.50
	REL8_2_BETA2:1.50
	REL8_1_5:1.47
	REL8_0_9:1.44
	REL7_4_14:1.40.2.1
	REL7_3_16:1.38
	REL8_2_BETA1:1.50
	REL7_3_15:1.38
	REL7_4_13:1.40.2.1
	REL8_0_8:1.44
	REL8_1_4:1.47
	REL7_3_14:1.38
	REL7_4_12:1.40.2.1
	REL8_0_7:1.44
	REL8_1_3:1.47
	REL7_3_13:1.38
	REL7_4_11:1.40.2.1
	REL8_0_6:1.44
	REL8_1_2:1.47
	REL7_3_12:1.38
	REL7_4_10:1.40.2.1
	REL8_0_5:1.44
	REL8_1_1:1.47
	REL8_1_STABLE:1.47.0.2
	REL8_1_0:1.47
	REL8_1_0RC1:1.47
	REL8_1_0BETA4:1.47
	REL8_1_0BETA3:1.47
	REL7_3_11:1.38
	REL7_4_9:1.40.2.1
	REL8_0_4:1.44
	REL8_1_0BETA2:1.47
	REL8_1_0BETA1:1.47
	REL7_2_8:1.37
	REL7_3_10:1.38
	REL7_4_8:1.40.2.1
	REL8_0_3:1.44
	REL8_0_2:1.44
	REL7_2_7:1.37
	REL7_3_9:1.38
	REL7_4_7:1.40.2.1
	REL8_0_1:1.44
	REL8_0_STABLE:1.44.0.4
	REL8_0_0:1.44.0.2
	REL8_0_0RC5:1.44
	REL8_0_0RC4:1.44
	REL8_0_0RC3:1.44
	REL8_0_0RC2:1.44
	REL8_0_0RC1:1.43
	REL8_0_0BETA5:1.43
	REL8_0_0BETA4:1.43
	REL7_4_6:1.40.2.1
	REL7_3_8:1.38
	REL7_2_6:1.37
	REL8_0_0BETA3:1.43
	REL8_0_0BETA2:1.42
	REL7_2_5:1.37
	REL7_4_5:1.40.2.1
	REL7_3_7:1.38
	REL7_4_4:1.40.2.1
	REL8_0_0BETA1:1.42
	REL7_4_3:1.40.2.1
	REL7_4_2:1.40.2.1
	REL7_3_6:1.38
	REL7_4_1:1.40
	REL7_3_5:1.38
	REL7_4:1.40
	REL7_4_RC2:1.40
	REL7_4_STABLE:1.40.0.2
	REL7_4_RC1:1.40
	REL7_4_BETA5:1.40
	REL7_4_BETA4:1.40
	REL7_4_BETA3:1.39
	REL7_4_BETA2:1.39
	WIN32_DEV:1.39.0.2
	REL7_4_BETA1:1.39
	REL7_3_4:1.38
	REL7_3_2:1.38
	REL7_2_4:1.37
	REL7_3_STABLE:1.38.0.2
	REL7_2_3:1.37
	REL7_2_STABLE:1.37.0.2
	REL7_2:1.37
	REL7_2_RC2:1.37
	REL7_2_RC1:1.36
	REL7_2_BETA5:1.35
	REL7_2_BETA4:1.35
	REL7_2_BETA3:1.35
	REL7_2_BETA2:1.35
	REL7_2_BETA1:1.35
	REL7_1_2:1.26
	REL7_1_STABLE:1.26.0.2
	REL7_1_BETA:1.25
	REL7_1_BETA3:1.26
	REL7_1_BETA2:1.26
	REL7_1:1.26
	REL7_0_PATCHES:1.14.0.2
	REL7_0:1.12
	REL6_5_PATCHES:1.10.0.2
	REL6_5:1.10
	REL6_4:1.9.0.2
	release-6-3:1.1;
locks; strict;
comment	@# @;


1.53
date	2008.10.02.08.11.11;	author petere;	state Exp;
branches;
next	1.52;

1.52
date	2008.10.01.22.38.56;	author petere;	state Exp;
branches;
next	1.51;

1.51
date	2008.04.07.14.15.58;	author petere;	state Exp;
branches;
next	1.50;

1.50
date	2006.07.21.00.24.04;	author tgl;	state Exp;
branches;
next	1.49;

1.49
date	2006.07.19.02.37.00;	author tgl;	state Exp;
branches;
next	1.48;

1.48
date	2005.12.09.21.19.36;	author petere;	state Exp;
branches;
next	1.47;

1.47
date	2005.05.24.17.07.41;	author tgl;	state Exp;
branches;
next	1.46;

1.46
date	2005.05.17.18.26.23;	author tgl;	state Exp;
branches;
next	1.45;

1.45
date	2005.05.14.17.55.22;	author tgl;	state Exp;
branches;
next	1.44;

1.44
date	2004.12.16.20.41.01;	author tgl;	state Exp;
branches;
next	1.43;

1.43
date	2004.09.14.03.21.27;	author tgl;	state Exp;
branches;
next	1.42;

1.42
date	2004.01.21.19.04.11;	author tgl;	state Exp;
branches;
next	1.41;

1.41
date	2003.11.29.19.52.13;	author pgsql;	state Exp;
branches;
next	1.40;

1.40
date	2003.09.27.19.35.32;	author tgl;	state Exp;
branches
	1.40.2.1;
next	1.39;

1.39
date	2002.12.30.17.19.54;	author tgl;	state Exp;
branches;
next	1.38;

1.38
date	2002.05.24.18.10.17;	author petere;	state Exp;
branches;
next	1.37;

1.37
date	2002.01.23.18.45.41;	author tgl;	state Exp;
branches;
next	1.36;

1.36
date	2002.01.21.03.27.46;	author tgl;	state Exp;
branches;
next	1.35;

1.35
date	2001.10.13.04.23.50;	author momjian;	state Exp;
branches;
next	1.34;

1.34
date	2001.09.16.16.11.11;	author petere;	state Exp;
branches;
next	1.33;

1.33
date	2001.05.11.23.38.06;	author petere;	state Exp;
branches;
next	1.32;

1.32
date	2001.05.09.21.42.29;	author momjian;	state Exp;
branches;
next	1.31;

1.31
date	2001.05.09.21.35.11;	author momjian;	state Exp;
branches;
next	1.30;

1.30
date	2001.05.09.20.30.09;	author momjian;	state Exp;
branches;
next	1.29;

1.29
date	2001.05.09.20.19.30;	author momjian;	state Exp;
branches;
next	1.28;

1.28
date	2001.05.09.20.08.08;	author momjian;	state Exp;
branches;
next	1.27;

1.27
date	2001.05.09.19.19.00;	author momjian;	state Exp;
branches;
next	1.26;

1.26
date	2000.12.15.18.50.35;	author petere;	state Exp;
branches;
next	1.25;

1.25
date	2000.11.03.20.27.40;	author petere;	state Exp;
branches;
next	1.24;

1.24
date	2000.10.20.21.04.17;	author petere;	state Exp;
branches;
next	1.23;

1.23
date	2000.09.17.13.02.52;	author petere;	state Exp;
branches;
next	1.22;

1.22
date	2000.08.31.16.12.17;	author petere;	state Exp;
branches;
next	1.21;

1.21
date	2000.07.17.01.26.42;	author tgl;	state Exp;
branches;
next	1.20;

1.20
date	2000.07.01.15.02.31;	author petere;	state Exp;
branches;
next	1.19;

1.19
date	2000.06.30.16.10.56;	author petere;	state Exp;
branches;
next	1.18;

1.18
date	2000.06.27.00.32.06;	author petere;	state Exp;
branches;
next	1.17;

1.17
date	2000.06.17.00.10.25;	author petere;	state Exp;
branches;
next	1.16;

1.16
date	2000.06.12.02.23.52;	author momjian;	state Exp;
branches;
next	1.15;

1.15
date	2000.05.29.05.45.54;	author tgl;	state Exp;
branches;
next	1.14;

1.14
date	2000.05.23.02.12.44;	author tgl;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	2000.05.22.23.56.44;	author momjian;	state Exp;
branches;
next	1.12;

1.12
date	2000.04.21.03.28.17;	author tgl;	state Exp;
branches;
next	1.11;

1.11
date	2000.03.08.01.58.46;	author momjian;	state Exp;
branches;
next	1.10;

1.10
date	98.12.13.23.46.49;	author tgl;	state Exp;
branches;
next	1.9;

1.9
date	98.10.18.19.41.00;	author tgl;	state Exp;
branches
	1.9.2.1;
next	1.8;

1.8
date	98.10.17.23.33.23;	author tgl;	state Exp;
branches;
next	1.7;

1.7
date	98.10.13.16.30.49;	author momjian;	state Exp;
branches;
next	1.6;

1.6
date	98.10.08.23.45.18;	author momjian;	state Exp;
branches;
next	1.5;

1.5
date	98.04.06.16.53.15;	author momjian;	state Exp;
branches;
next	1.4;

1.4
date	98.04.06.01.16.55;	author momjian;	state Exp;
branches;
next	1.3;

1.3
date	98.04.06.00.31.59;	author momjian;	state Exp;
branches;
next	1.2;

1.2
date	98.04.05.22.02.56;	author momjian;	state Exp;
branches;
next	1.1;

1.1
date	98.02.11.14.07.55;	author scrappy;	state Exp;
branches;
next	;

1.9.2.1
date	98.12.13.23.47.17;	author tgl;	state Exp;
branches;
next	;

1.14.2.1
date	2000.09.23.22.51.18;	author tgl;	state Exp;
branches;
next	;

1.40.2.1
date	2004.01.21.19.25.11;	author tgl;	state Exp;
branches;
next	;


desc
@@


1.53
log
@Update pg_regress calls in PL checks to handle vpath builds.
@
text
@#-------------------------------------------------------------------------
#
# Makefile for the pltcl shared object
#
# $PostgreSQL: pgsql/src/pl/tcl/Makefile,v 1.52 2008/10/01 22:38:56 petere Exp $
#
#-------------------------------------------------------------------------

subdir = src/pl/tcl
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global


override CPPFLAGS := $(TCL_INCLUDE_SPEC) $(CPPFLAGS)


# Find out whether Tcl was built as a shared library --- if not, we
# can't link a shared library that depends on it, and have to forget
# about building pltcl. In Tcl 8, tclConfig.sh sets TCL_SHARED_BUILD
# for us, but in older Tcl releases it doesn't. In that case we guess
# based on the name of the Tcl library.

ifndef TCL_SHARED_BUILD
ifneq (,$(findstring $(DLSUFFIX),$(TCL_LIB_FILE)))
TCL_SHARED_BUILD=1
else
TCL_SHARED_BUILD=0
endif
endif


SHLIB_LINK = $(TCL_LIB_SPEC)
ifneq ($(PORTNAME), win32)
SHLIB_LINK += $(TCL_LIBS) -lc
endif

NAME = pltcl
OBJS = pltcl.o

REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-language=pltcl
REGRESS = pltcl_setup pltcl_queries
# where to find psql for running the tests
PSQLDIR = $(bindir)

include $(top_srcdir)/src/Makefile.shlib

ifeq ($(TCL_SHARED_BUILD), 1)

all: all-lib
	$(MAKE) -C modules $@@

install: all installdirs install-lib
	$(MAKE) -C modules $@@

installdirs: installdirs-lib
	$(MAKE) -C modules $@@

uninstall: uninstall-lib
	$(MAKE) -C modules $@@

installcheck: submake
	$(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)

.PHONY: submake
submake:
	$(MAKE) -C $(top_builddir)/src/test/regress pg_regress$(X)

else # TCL_SHARED_BUILD = 0

# Provide dummy targets for the case where we can't build the shared library.
all:
	@@echo "*****"; \
	 echo "* Cannot build PL/Tcl because Tcl is not a shared library; skipping it."; \
	 echo "*****"

endif # TCL_SHARED_BUILD = 0

clean distclean maintainer-clean: clean-lib
	rm -f $(OBJS)
	rm -rf results
	rm -f regression.diffs regression.out
	$(MAKE) -C modules $@@
@


1.52
log
@Allow pg_regress to be run outside the build tree.  Look for input files
in both input and output dir, to handle vpath builds more simply.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/pl/tcl/Makefile,v 1.51 2008/04/07 14:15:58 petere Exp $
d62 1
a62 1
	$(top_builddir)/src/test/regress/pg_regress --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
@


1.51
log
@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.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/pl/tcl/Makefile,v 1.50 2006/07/21 00:24:04 tgl Exp $
a51 21
# When doing a VPATH build, copy over the .sql and .out files so that the
# test script can find them.  See comments in src/test/regress/GNUmakefile.
ifdef VPATH

ifneq ($(PORTNAME),win32)
abs_srcdir := $(shell cd $(srcdir) && pwd)
abs_builddir := $(shell pwd)
else
abs_srcdir := $(shell cd $(srcdir) && pwd -W)
abs_builddir := $(shell pwd -W)
endif

test_files_src := $(wildcard $(srcdir)/sql/*.sql) $(wildcard $(srcdir)/expected/*.out)
test_files_build := $(patsubst $(srcdir)/%, $(abs_builddir)/%, $(test_files_src))

all: $(test_files_build)
$(test_files_build): $(abs_builddir)/%: $(srcdir)/%
	ln -s $< $@@

endif

@


1.50
log
@Ah, I finally realize why Magnus wanted to add a --bindir option to
pg_regress: there's no other way to cope with testing a relocated
installation.  Seems better to call it --psqldir though, since the
only thing we need to find in that case is psql.  It'd be better if
we could use find_other_exec, but that's not happening unless we are
willing to install pg_regress alongside psql, which seems unlikely
to happen.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/pl/tcl/Makefile,v 1.49 2006/07/19 02:37:00 tgl Exp $
d32 1
d34 1
a34 3
SHLIB_LINK = $(BE_DLLLIBS) $(TCL_LIB_SPEC) $(TCL_LIBS) -lc
else
SHLIB_LINK = $(TCL_LIB_SPEC) $(BE_DLLLIBS)
a37 2
SO_MAJOR_VERSION = 2
SO_MINOR_VERSION = 0
d73 1
a73 8
install: all installdirs
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
d76 1
a76 2
installdirs:
	$(mkinstalldirs) '$(DESTDIR)$(pkglibdir)'
d79 1
a79 2
uninstall:
	rm -f '$(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX)'
@


1.49
log
@Rewrite pg_regress as a C program instead of a shell script.
This allows it to be used on Windows without installing mingw
(though you do still need 'diff'), and opens the door to future
improvements such as message localization.
Magnus Hagander and Tom Lane.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/pl/tcl/Makefile,v 1.48 2005/12/09 21:19:36 petere Exp $
d45 2
d95 1
a95 1
	$(top_builddir)/src/test/regress/pg_regress $(REGRESS_OPTS) $(REGRESS)
@


1.48
log
@Allow installation into directories containing spaces in the name.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/pl/tcl/Makefile,v 1.47 2005/05/24 17:07:41 tgl Exp $
d93 1
a93 1
	$(SHELL) $(top_builddir)/src/test/regress/pg_regress $(REGRESS_OPTS) $(REGRESS)
d97 1
a97 1
	$(MAKE) -C $(top_builddir)/src/test/regress pg_regress
@


1.47
log
@Fix PL makefiles to support running regression tests in VPATH builds.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/pl/tcl/Makefile,v 1.46 2005/05/17 18:26:23 tgl Exp $
d76 1
a76 1
	$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX)
d85 1
a85 1
	$(mkinstalldirs) $(DESTDIR)$(pkglibdir)
d89 1
a89 1
	rm -f $(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX)
@


1.46
log
@Add a --dbname option to the pg_regress script, and use pl_regression
for testing PLs and contrib_regression for testing contrib, instead of
overwriting the core system's regression database as formerly done.
Andrew Dunstan
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/pl/tcl/Makefile,v 1.45 2005/05/14 17:55:22 tgl Exp $
d53 21
@


1.45
log
@Convert the existing regression test scripts for the various optional
PLs to use the standard pg_regress infrastructure.  No changes in the
tests themselves.  Andrew Dunstan
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/pl/tcl/Makefile,v 1.44 2004/12/16 20:41:01 tgl Exp $
d43 1
d72 1
a72 1
	$(SHELL) $(top_builddir)/src/test/regress/pg_regress --load-language=pltcl $(REGRESS)
@


1.44
log
@Cause configure --with-tcl to check for presence of <tcl.h>, as per
gripe from John Gray.  Also fix thinko in pltcl Makefile: if a special
Tcl include directory is specified, that ought to be searched first.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/pl/tcl/Makefile,v 1.43 2004/09/14 03:21:27 tgl Exp $
d43 2
d70 7
d89 2
@


1.43
log
@Make pltcl work on Win32.  Magnus Hagander
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql-server/src/pl/tcl/Makefile,v 1.42 2004/01/21 19:04:11 tgl Exp $
d14 1
a14 1
override CPPFLAGS += $(TCL_INCLUDE_SPEC)
@


1.42
log
@Fix bit-rot in support for building with --disable-shared.  This patch
gets us past 'make install', but initdb still fails for lack of conversion
libraries ...
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql-server/src/pl/tcl/Makefile,v 1.41 2003/11/29 19:52:13 pgsql Exp $
d32 1
d34 3
@


1.41
log
@
$Header: -> $PostgreSQL Changes ...
@
text
@d5 1
a5 1
# $PostgreSQL: /cvsroot/pgsql-server/src/pl/tcl/Makefile,v 1.40 2003/09/27 19:35:32 tgl Exp $
d47 1
d49 5
d69 1
a69 1
	 echo "* Cannot build pltcl because Tcl is not a shared library; skipping it."; \
@


1.40
log
@Adjust Darwin build to use the default 'two level namespace' linking
method.  Fix a number of places where shared libraries were linked without
mentioning all the libraries they depend on; the Darwin and AIX ports
are known to require this, and it doesn't seem to hurt any other supported
platforms.  (Hence, remove code in pl/tcl makefile that tried to avoid
mentioning other libs if not needed.)
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql-server/src/pl/tcl/Makefile,v 1.39 2002/12/30 17:19:54 tgl Exp $
@


1.40.2.1
log
@Back-patch repairs for --disable-shared support.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql-server/src/pl/tcl/Makefile,v 1.40 2003/09/27 19:35:32 tgl Exp $
a46 1
ifeq ($(enable_shared), yes)
a47 5
else
	@@echo "*****"; \
	 echo "* PL/Tcl was not installed due to lack of shared library support."; \
	 echo "*****"
endif
d63 1
a63 1
	 echo "* Cannot build PL/Tcl because Tcl is not a shared library; skipping it."; \
@


1.39
log
@Make use of TCL_INCLUDE_SPEC if available (it's new in Tcl 8.4, too bad
it took 'em this long to realize it's needed...)
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql-server/src/pl/tcl/Makefile,v 1.38 2002/05/24 18:10:17 petere Exp $
d14 1
a14 1
override CPPFLAGS := $(CPPFLAGS) $(TCL_INCLUDE_SPEC)
d32 1
a32 18
# The following attempts to figure out what libraries need to be
# linked with pltcl.  The information comes from the tclConfig.sh
# file, but it's mostly bogus.  This just might work.

ifneq ($(TCL_SHLIB_LD_LIBS),)
# link command for a shared lib must mention shared libs it uses
SHLIB_LINK = $(TCL_LIB_SPEC) $(TCL_LIBS) -lc
else
ifeq ($(PORTNAME), hpux)
# link command for a shared lib must mention shared libs it uses,
# even though Tcl doesn't think so...
SHLIB_LINK = $(TCL_LIB_SPEC) $(TCL_LIBS) -lc
else
# link command for a shared lib must NOT mention shared libs it uses
SHLIB_LINK = $(TCL_LIB_SPEC)
endif
endif

@


1.38
log
@Change PL/Tcl build to use configured compiler and Makefile.shlib
system, not Tcl-provided one.

Make sure export file, if any, is cleaned.

Tcl configuration is now read directly in configure and recorded in
Makefile.global.  This eliminates some duplicate efforts and allows
for easier hand-editing of the results, if necessary.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.37 2002/01/23 18:45:41 tgl Exp $
d12 3
@


1.37
log
@Clean up Red Hat Tcl RPM brain-damage in a more reliable way: fix the
value of TCL_SHLIB_LD in the shell script that creates Makefile.tcldefs,
rather than trying to persude gmake to do it.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.36 2002/01/21 03:27:46 tgl Exp $
a12 1
-include Makefile.tcldefs
d29 3
a31 7
# Change following to how shared library that contains references to
# libtcl must get built on your system. Since these definitions come
# from the tclConfig.sh script, they should work if the shared build
# of tcl was successful on this system. However, tclConfig.sh lies to
# us a little bit (at least in versions 7.6 through 8.0.4) --- it
# doesn't mention -lc in TCL_LIBS, but you still need it on systems
# that want to hear about dependent libraries...
d35 1
a35 1
SHLIB_EXTRA_LIBS=$(TCL_LIBS) -lc
d40 1
a40 1
SHLIB_EXTRA_LIBS=$(TCL_LIBS) -lc
d43 1
a43 1
SHLIB_EXTRA_LIBS=
a46 2
%$(TCL_SHLIB_SUFFIX): %.o
	$(TCL_SHLIB_LD) -o $@@ $< $(TCL_LIB_SPEC) $(SHLIB_EXTRA_LIBS)
d48 4
d53 1
a53 29
CC = $(TCL_CC)

# Since we are using Tcl's choice of C compiler, which might not be
# the same one selected for Postgres, do NOT use CFLAGS from
# Makefile.global. Instead use TCL's CFLAGS plus necessary -I
# directives.

# Can choose either TCL_CFLAGS_OPTIMIZE or TCL_CFLAGS_DEBUG here, as
# needed
override CPPFLAGS += $(TCL_DEFS)
override CFLAGS = $(TCL_CFLAGS_OPTIMIZE) $(TCL_SHLIB_CFLAGS)


#
# DLOBJS is the dynamically-loaded object file.
#
DLOBJS= pltcl$(DLSUFFIX)

INFILES= $(DLOBJS) 

#
# plus exports files
#
ifdef EXPSUFF
INFILES+= $(DLOBJS:.o=$(EXPSUFF))
endif


# Provide dummy targets for the case where we can't build the shared library.
d57 1
a57 1
all: $(INFILES)
a59 2
pltcl$(DLSUFFIX): pltcl.o

d61 1
a61 1
	$(INSTALL_SHLIB) $(DLOBJS) $(DESTDIR)$(pkglibdir)/$(DLOBJS)
d69 1
a69 1
	rm -f $(DESTDIR)$(pkglibdir)/$(DLOBJS)
d74 2
a75 1
all install:
d82 2
a83 5
Makefile.tcldefs: mkMakefile.tcldefs.sh
	$(SHELL) $< '$(TCL_CONFIG_SH)' '$@@'

clean distclean maintainer-clean:
	rm -f $(INFILES) pltcl.o Makefile.tcldefs
@


1.36
log
@Suppress bogus soname switch that RedHat RPMs put into tclConfig.sh.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.35 2001/10/13 04:23:50 momjian Exp $
a50 4

# Suppress bogus soname switch that RedHat RPMs put into tclConfig.sh
override TCL_SHLIB_LD := $(shell echo "$(TCL_SHLIB_LD)" | sed 's/-Wl,-soname[^ ]*//')

@


1.35
log
@Attached patch for unconditional enabling of pltcl-unknown support.

Enabling this feature adds very light overhead of 1 select from pg_class on
first using of pl/tcl in backend if unknown suppport is really unused.
But pl/tcl with this support has very improved functionality.

Patch includes changes to documentation.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.34 2001/09/16 16:11:11 petere Exp $
d51 4
@


1.34
log
@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.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.33 2001/05/11 23:38:06 petere Exp $
a88 1
ifeq ($(enable_pltcl_unknown), yes)
a89 1
endif
a94 1
ifeq ($(enable_pltcl_unknown), yes)
a95 1
endif
a98 1
ifeq ($(enable_pltcl_unknown), yes)
a99 1
endif
a102 1
ifeq ($(enable_pltcl_unknown), yes)
a103 1
endif
a118 1
ifeq ($(enable_pltcl_unknown), yes)
a119 1
endif
@


1.33
log
@Cleanups of pltcl unknown thingy.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.32 2001/05/09 21:42:29 momjian Exp $
d96 1
a96 1
	$(INSTALL_SHLIB) $(DLOBJS) $(DESTDIR)$(libdir)/$(DLOBJS)
d102 1
a102 1
	$(mkinstalldirs) $(DESTDIR)$(libdir)
d108 1
a108 1
	rm -f $(DESTDIR)$(libdir)/$(DLOBJS)
@


1.32
log
@Wow, I am getting good at this Makefile stuff.  Peter may be OK with it.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.31 2001/05/09 21:35:11 momjian Exp $
a68 11
# Uncomment the following to enable the unknown command lookup on the
# first of all calls to the call handler. See the doc in the modules
# directory about details.

ifeq ($(enable_pltcl_unknown), yes)
override CPPFLAGS+= -DPLTCL_UNKNOWN_SUPPORT
TCL_UNKNOWN_MODS=	modules/pltcl_loadmod \
			modules/pltcl_delmod \
			modules/pltcl_listmod
endif

d88 4
a91 19
all: $(INFILES) $(TCL_UNKNOWN_MODS)

modules/pltcl_loadmod: modules/pltcl_loadmod.in \
	$(top_builddir)/src/Makefile.global
	sed -e 's,@@TCLSH@@,$(TCLSH),g' \
	  $< >$@@
	chmod a+x $@@

modules/pltcl_delmod: modules/pltcl_delmod.in \
	$(top_builddir)/src/Makefile.global
	sed -e 's,@@TCLSH@@,$(TCLSH),g' \
	  $< >$@@
	chmod a+x $@@

modules/pltcl_listmod: modules/pltcl_listmod.in \
	$(top_builddir)/src/Makefile.global
	sed -e 's,@@TCLSH@@,$(TCLSH),g' \
	  $< >$@@
	chmod a+x $@@
d98 1
a98 8
	$(INSTALL_SCRIPT) modules/pltcl_loadmod \
		$(DESTDIR)$(bindir)/pltcl_loadmod
	$(INSTALL_SCRIPT) modules/pltcl_delmod \
		$(DESTDIR)$(bindir)/pltcl_delmod
	$(INSTALL_SCRIPT) modules/pltcl_listmod \
		$(DESTDIR)$(bindir)/pltcl_listmod
	$(INSTALL_DATA) modules/unknown.pltcl \
		$(DESTDIR)$(datadir)/unknown.pltcl
d103 3
d109 3
d113 1
a113 1
else
d119 2
a120 1
endif
d126 4
a129 1
	rm -f $(INFILES) pltcl.o Makefile.tcldefs modules/pltcl_listmod modules/pltcl_loadmod modules/pltcl_delmod
@


1.31
log
@I think I got the pltcl Makefile unknown rules working properly.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.30 2001/05/09 20:30:09 momjian Exp $
d75 3
d99 1
a99 8
ifeq ($(enable_pltcl_unknown), no)
all: $(INFILES)
else
all: $(INFILES) \
	modules/pltcl_loadmod \
	modules/pltcl_delmod \
	modules/pltcl_listmod
endif
@


1.30
log
@More cleanups to generate tcl unknown from Makefile.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.29 2001/05/09 20:19:30 momjian Exp $
d96 26
a121 12
all: $(INFILES) tcl_unknown

tcl_unknown: $(top_builddir)/src/Makefile.global \
	modules/pltcl_loadmod.in \
	modules/pltcl_delmod.in \
	modules/pltcl_listmod.in
ifeq ($(enable_pltcl_unknown), yes)
	sed -e 's,@@TCLSH@@,$(TCLSH),g' modules/pltcl_loadmod.in > modules/pltcl_loadmod
	sed -e 's,@@TCLSH@@,$(TCLSH),g' modules/pltcl_delmod.in > modules/pltcl_delmod
	sed -e 's,@@TCLSH@@,$(TCLSH),g' modules/pltcl_listmod.in > modules/pltcl_listmod
	chmod a+x modules/pltcl_loadmod modules/pltcl_delmod modules/pltcl_listmod
endif
@


1.29
log
@Make tcl unknown configure from Makefile, not configure.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.28 2001/05/09 20:08:08 momjian Exp $
d103 3
a105 3
	sed -e 's/@@TCLSH@@/$(TCLSH)/g' modules/pltcl_loadmod.in > modules/pltcl_loadmod
	sed -e 's/@@TCLSH@@/$(TCLSH)/g' modules/pltcl_delmod.in > modules/pltcl_delmod
	sed -e 's/@@TCLSH@@/$(TCLSH)/g' modules/pltcl_listmod.in > modules/pltcl_listmod
@


1.28
log
@More --enable-pltcl-unknown renames.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.27 2001/05/09 19:19:00 momjian Exp $
d96 12
a107 1
all: $(INFILES)
@


1.27
log
@This patch adds a new configure option --with-pltcl-unknown which
enables pltcl unknown support.


Also it adds substituting of tclsh with tclsh that was by configure in
pltcl_*mod scripts. For example, On freebsd, tclsh can be called
tclsh8.2 or
tclsh8.3 depending on installed version of Tcl.

After patching files
  src/pl/tcl/modules/pltcl_listmod
  src/pl/tcl/modules/pltcl_loadmod
  src/pl/tcl/modules/pltcl_delmod
must be renamed(copied,repocopied) to
  src/pl/tcl/modules/pltcl_listmod.in
  src/pl/tcl/modules/pltcl_loadmod.in
  src/pl/tcl/modules/pltcl_delmod.in

seva@@sevasoft.kiev.ua
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.26 2000/12/15 18:50:35 petere Exp $
d73 1
a73 1
ifeq ($(with_pltcl_unknown), yes)
d102 1
a102 1
ifeq ($(with_pltcl_unknown), yes)
@


1.26
log
@List .o file explicitly as dependency, to work around a gmake bug
(intermediate .o file gets deleted and rebuild on next make invocation).
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.25 2000/11/03 20:27:40 petere Exp $
d73 3
a75 2
#override CPPFLAGS+= -DPLTCL_UNKNOWN_SUPPORT

d102 10
d131 1
a131 1
	rm -f $(INFILES) pltcl.o Makefile.tcldefs
@


1.25
log
@Add global .SECONDARY: target to not allow make to delete intermediate
target files in implicit rule chains.  That might have been a cool idea
but it seems to be too buggy to work, as it caused spurious recompiles in
several places.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.24 2000/10/20 21:04:17 petere Exp $
d96 2
@


1.24
log
@Add support for VPATH builds, that is, building somewhere else than in the
source directory.  This involves mostly makefiles using $(srcdir) when they
might have used ".".  (Regression tests don't work with this, yet.)

Sort out usage of CPPFLAGS, CFLAGS (and CXXFLAGS).  Add "override" keyword
in most places, to preserve necessary flags even when the user overrode the
flags.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.23 2000/09/17 13:02:52 petere Exp $
a89 4
# Prevent removal of pltcl.o, being an intermediate file.  This would
# not be wrong in general, but for some reason the next make run will
# not realize this and rebuild it.
.SECONDARY: pltcl.o
d118 1
a118 1
	rm -f $(INFILES) *.o Makefile.tcldefs
@


1.23
log
@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.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.22 2000/08/31 16:12:17 petere Exp $
d65 2
a66 5
CFLAGS= $(TCL_CFLAGS_OPTIMIZE)

CFLAGS+= $(TCL_SHLIB_CFLAGS) $(TCL_DEFS)

CFLAGS+= -I$(top_srcdir)/src/include $(INCLUDES)
d73 1
a73 1
#CFLAGS+= -DPLTCL_UNKNOWN_SUPPORT
d90 4
@


1.22
log
@Fix relative path references so that make knowns which dependencies refer
to one another. Sort out builddir vs srcdir variable namings. Remove some
now obsoleted make variables.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.21 2000/07/17 01:26:42 tgl Exp $
d101 1
a101 1
	$(INSTALL_SHLIB) $(DLOBJS) $(libdir)/$(DLOBJS)
d104 1
a104 1
	$(mkinstalldirs) $(libdir)
d107 1
a107 1
	rm -f $(libdir)/$(DLOBJS)
@


1.21
log
@pltcl seems to be broken on HPUX with recent Tcl versions, because
link needs to specify -lc but doesn't.  Quick hack to make it better.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.20 2000/07/01 15:02:31 petere Exp $
d11 1
a11 1
include ../../Makefile.global
@


1.20
log
@A little bit of clean-up/bug fix in Tcl build. Handle gracefully cases
where someone wants to build these but hasn't configured for Tcl.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.19 2000/06/30 16:10:56 petere Exp $
d42 5
d49 1
@


1.19
log
@Fixes for Solaris/cc suggested by <pgsql-hackers@@thewrittenword.com>

Don't use DISABLE_COMPLEX_MACRO on Solaris. Don't define the
replacement function in the header file. Use -KPIC, not -K PIC.
Use CC to link C++ libraries, not ld/ar.

Eliminate file not found warnings in tcl build code.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.18 2000/06/27 00:32:06 petere Exp $
a110 1

d112 1
a112 4
	$(SHELL) $<

mkMakefile.tcldefs.sh: mkMakefile.tcldefs.sh.in $(top_builddir)/config.status
	cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@@ CONFIG_HEADERS= ./config.status
d114 1
a114 2

clean:
a115 3

distclean maintainer-clean: clean
	rm -f mkMakefile.tcldefs.sh
@


1.18
log
@Makefile cleanup for bin and pl subtrees. They should now support
all the standard semantics. Also get rid of Makefile.in's on the
way and instead declare all variables in Makefile.global.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.17 2000/06/17 00:10:25 petere Exp $
d13 1
a13 1
include Makefile.tcldefs
@


1.17
log
@Remove fmgrstamp-h business -- not needed and confusing

Add options to configure to automatically build for Kerberos
support; no more editing of make files.
@
text
@d3 1
a3 2
# Makefile
#    Makefile for the pltcl shared object
d5 1
a5 2
# IDENTIFICATION
#    $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.16 2000/06/12 02:23:52 momjian Exp $
d9 3
a11 5
#
# Tell make where the postgresql sources live
#
SRCDIR= ../../../src
include $(SRCDIR)/Makefile.global
a12 5
#
# Include definitions from the tclConfig.sh file
# NOTE: GNU make will make this file automatically if it doesn't exist,
# using the make rule that appears below.  Cute, eh?
#
d15 6
a20 8
#
# Find out whether Tcl was built as a shared library --- if not,
# we can't link a shared library that depends on it, and have to
# forget about building pltcl.
# In Tcl 8, tclConfig.sh sets TCL_SHARED_BUILD for us, but in
# older Tcl releases it doesn't.  In that case we guess based on
# the name of the Tcl library.
#
d30 7
a36 8
# Change following to how shared library that contains
# references to libtcl must get built on your system.
# Since these definitions come from the tclConfig.sh script,
# they should work if the shared build of tcl was successful
# on this system.  However, tclConfig.sh lies to us a little bit
# (at least in versions 7.6 through 8.0.4) --- it doesn't mention -lc
# in TCL_LIBS, but you still need it on systems that want to hear about
# dependent libraries...
d46 1
a46 1
%$(TCL_SHLIB_SUFFIX):	%.o
d52 4
a55 3
# Since we are using Tcl's choice of C compiler, which might not be the
# same one selected for Postgres, do NOT use CFLAGS from Makefile.global.
# Instead use TCL's CFLAGS plus necessary -I directives.
d57 2
a58 1
# Can choose either TCL_CFLAGS_OPTIMIZE or TCL_CFLAGS_DEBUG here, as needed
d63 7
a69 7
CFLAGS+= -I$(SRCDIR)/include $(INCLUDES)
        
#
# Uncomment the following to enable the unknown command lookup
# on the first of all calls to the call handler. See the doc
# in the modules directory about details.
#
d88 3
a90 1
ifeq ($(TCL_SHARED_BUILD),1)
a91 3
#
# Build the shared lib
#
d94 2
a95 2
install: all
	$(INSTALL) $(INSTL_SHLIB_OPTS) $(DLOBJS) $(LIBDIR)/$(DLOBJS)
d97 2
a98 1
else
d100 2
a101 5
#
# Oops, can't build it
#
all:
	@@echo "Cannot build pltcl because Tcl is not a shared library; skipping it."
d103 1
a103 2
install:
	@@echo "Cannot build pltcl because Tcl is not a shared library; skipping it."
d105 4
a110 4
#
# Make targets that are still valid when we can't build pltcl
# should be below here.
#
d113 5
a117 1
	/bin/sh ./mkMakefile.tcldefs.sh
a118 3
#
# Clean 
#
d120 1
a120 2
	rm -f $(INFILES) *.o
	rm -f Makefile.tcldefs
d122 2
a123 1
dep depend:
@


1.16
log
@>> What happened to the patch I sent regarding the bug in the TCL
>> Makefile where the make bombs if "." is not in the builder's path?
>> The last I checked, it wasn't applied and the fix is very easy
>> (explicitly use "./" to call the script).

 SL Baur
@
text
@d7 1
a7 1
#    $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.15 2000/05/29 05:45:54 tgl Exp $
d73 1
a73 1
CFLAGS+= -I$(SRCDIR)/include $(PGSQL_INCLUDES)
@


1.15
log
@Generated header files parse.h and fmgroids.h are now copied into
the src/include tree, so that -I backend is no longer necessary anywhere.
Also, clean up some bit rot in contrib tree.
@
text
@d7 1
a7 1
#    $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.14 2000/05/23 02:12:44 tgl Exp $
d127 1
a127 1
	/bin/sh mkMakefile.tcldefs.sh
@


1.14
log
@Transmit -I switches selected by configure (particularly those from
--with-includes) to makefiles for pltcl and plperl, so that these
switches will be used even though we do not want other top-level
CFLAGS.  Ain't it fun trying to support multiple-compiler platforms?
@
text
@d7 1
a7 1
#    $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.13 2000/05/22 23:56:44 momjian Exp $
d73 1
a73 1
CFLAGS+= -I$(SRCDIR)/include -I$(SRCDIR)/backend $(PGSQL_INCLUDES)
@


1.14.2.1
log
@Back-patch fix for '.' not in PATH at build time, per SL Baur.
@
text
@d7 1
a7 1
#    $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.14 2000/05/23 02:12:44 tgl Exp $
d127 1
a127 1
	/bin/sh ./mkMakefile.tcldefs.sh
@


1.13
log
@Irix fixes from Murad Nayal
@
text
@d7 1
a7 1
#    $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.12 2000/04/21 03:28:17 tgl Exp $
d69 1
a69 1
CFLAGS+= $(TCL_CFLAGS_OPTIMIZE)
d73 1
a73 1
CFLAGS+= -I$(SRCDIR)/include -I$(SRCDIR)/backend
@


1.12
log
@pltcl didn't work well at all when Tcl had been built with a different
compiler than the one selected to build Postgres with.  It was trying
to feed Postgres-compiler switches to Tcl's compiler.  (Seen this before
with the perl5 interface...) Fix to use only CFLAGS taken from Tcl's
configure information, plus -I which is pretty universal.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.11 2000/03/08 01:58:46 momjian Exp $
d69 1
a69 1
CFLAGS= $(TCL_CFLAGS_OPTIMIZE)
@


1.11
log
@I've made a diff against the 7.0beta1 tree that accomplishes several things:

        1) adds NetBSD shared lib support on both ELF and a.out platforms

        2) replaces "-L$(LIBPQDIR) -lpq" with "$(LIBPQ)" defined in
           Makefile.global.  This makes it much easier to build stuff in
           the source tree after you've already installed the libraries.

        3) adds TEMPLATEDIR in Makefile.global that indicates where the
           database templates are stored.  This separates the template files
           from real libraries that are installed in $(LIBDIR).
        4) changes include order of <readline/readline.h> and <readline.h>.
           The latest GNU readline installs its headers under a readline
           subdirectory.

In addition to applying the patch below the following files need to be copied:

        backend/port/dynloader:
                bsd.h -> netbsd.h
                bsd.c -> netbsd.c
        include/port:
                bsd.h -> netbsd.h
        makefiles:
                Makefile.bsd -> Makefile.netbsd

It would be great to see this incorporated into the source tree before
the 7.0 release is cut.

        Thanks!

     -- Johnny C. Lam <lamj@@stat.cmu.edu>
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.10 1998/12/13 23:46:49 tgl Exp $
d62 13
a82 10
CC = $(TCL_CC)
CFLAGS+= -I$(LIBPQDIR) -I$(SRCDIR)/include $(TCL_SHLIB_CFLAGS)

# For fmgr.h
CFLAGS+= -I$(SRCDIR)/backend

CFLAGS+= $(TCL_DEFS)

LDADD+= $(LIBPQ)
        
@


1.10
log
@Build pltcl.so correctly on platforms that want dependent
shared libraries to be listed in the link command.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.9 1998/10/18 19:41:00 tgl Exp $
d78 1
a78 1
LDADD+= -L$(LIBPQDIR) -lpq
@


1.9
log
@Clean up shared makefile install procedures.
Get the permissions right, don't overwrite real files with symlinks, etc.
plpgsql and odbc still aren't fully up to speed, but at least they don't crash and burn...
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.8 1998/10/17 23:33:23 tgl Exp $
d41 2
a42 2
# Change following to how shared library that contain
# correct references to libtcl must get built on your system.
d45 13
a57 2
# on this system.
#
d59 1
a59 1
	$(TCL_SHLIB_LD) -o $@@ $< $(TCL_SHLIB_LD_LIBS) $(TCL_LIB_SPEC) $(TCL_LIBS)
@


1.9.2.1
log
@Build pltcl.so correctly on platforms that want dependent
shared libraries to be listed in the link command.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.9 1998/10/18 19:41:00 tgl Exp $
d41 2
a42 2
# Change following to how shared library that contains
# references to libtcl must get built on your system.
d45 2
a46 13
# on this system.  However, tclConfig.sh lies to us a little bit
# (at least in versions 7.6 through 8.0.4) --- it doesn't mention -lc
# in TCL_LIBS, but you still need it on systems that want to hear about
# dependent libraries...

ifneq ($(TCL_SHLIB_LD_LIBS),)
# link command for a shared lib must mention shared libs it uses
SHLIB_EXTRA_LIBS=$(TCL_LIBS) -lc
else
# link command for a shared lib must NOT mention shared libs it uses
SHLIB_EXTRA_LIBS=
endif

d48 1
a48 1
	$(TCL_SHLIB_LD) -o $@@ $< $(TCL_LIB_SPEC) $(SHLIB_EXTRA_LIBS)
@


1.8
log
@Add code to pltcl's Makefile to cope with the situation where
libtcl has been installed as a non-shared library.  pltcl cannot be
built in that situation; we want to do nothing and let the overall Postgres
build complete, rather than failing.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.7 1998/10/13 16:30:49 momjian Exp $
d92 1
a92 1
	$(INSTALL) $(INSTL_LIB_OPTS) $(DLOBJS) $(LIBDIR)/$(DLOBJS)
@


1.7
log
@Remove TCL_LIB,TCL_INCDIR,TK_LIB,TK_INCDIR.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.6 1998/10/08 23:45:18 momjian Exp $
a16 1

d19 2
d24 17
d83 3
d91 22
a112 1
Makefile.tcldefs:
d119 1
a119 1
	rm -f $(INFILES)
a120 3

install: all
	$(INSTALL) $(INSTL_LIB_OPTS) $(DLOBJS) $(LIBDIR)/$(DLOBJS)
@


1.6
log
@I have had a few problems with the PL stuff recently committed.  The
following patches fix the problems (i.e., all regression tests pass)
in what I hope to be a platform-independent fashion.  The accomplish
the following:

Brook Milligan
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.5 1998/04/06 16:53:15 momjian Exp $
a22 9

#
# Uncomment the following to force a specific version of the
# Tcl shared library to be used.
#
#TCL_LIB_SPEC=-L/usr/lib -ltcl8.0


#
@


1.5
log
@DESTDIR removed, again.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.4 1998/04/06 01:16:55 momjian Exp $
d80 1
a80 1
	./mkMakefile.tcldefs
@


1.4
log
@Re-introduce $DISTDIR.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.3 1998/04/06 00:31:59 momjian Exp $
d90 1
a90 1
	$(INSTALL) $(INSTL_LIB_OPTS) $(DLOBJS) $(DESTDIR)$(LIBDIR)/$(DLOBJS)
@


1.3
log
@Hi,

Attached you'll find a (big) patch that fixes make dep and make
depend in all Makefiles where I found it to be appropriate.

It also removes the dependency in Makefile.global for NAMEDATALEN
and OIDNAMELEN by making backend/catalog/genbki.sh and bin/initdb/initdb.sh
a little smarter.

This no longer requires initdb.sh that is turned into initdb with
a sed script when installing Postgres, hence initdb.sh should be
renamed to initdb (after the patch has been applied :-) )

This patch is against the 6.3 sources, as it took a while to
complete.

Please review and apply,

Cheers,

Jeroen van Vianen
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.2 1998/04/05 22:02:56 momjian Exp $
d90 1
a90 1
	$(INSTALL) $(INSTL_LIB_OPTS) $(DLOBJS) $(LIBDIR)/$(DLOBJS)
@


1.2
log
@Remove DISTDIR.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/pl/tcl/Makefile,v 1.1 1998/02/11 14:07:55 scrappy Exp $
d92 1
@


1.1
log
@From: Jan Wieck <jwieck@@debis.com>

    A few minutes ago I sent down the PL/Tcl  directory  to  this
    list.  Look at it and reuse anything that might help to build
    PL/perl.  I really hope that PL/perl and PL/Tcl appear in the
    6.3 distribution. I'll do whatever I can to make this happen.
@
text
@d7 1
a7 1
#    $Header: $
d90 1
a90 1
	$(INSTALL) $(INSTL_LIB_OPTS) $(DLOBJS) $(DESTDIR)$(LIBDIR)/$(DLOBJS)
@
