head	1.35;
access;
symbols
	REL9_0_0:1.35
	REL9_1_ALPHA1:1.35
	REL9_0_RC1:1.35
	REL9_0_BETA4:1.35
	REL9_0_STABLE:1.35.0.8
	REL9_0_BETA3:1.35
	REL9_0_BETA2:1.35
	REL7_4_29:1.23.6.1
	REL8_0_25:1.26
	REL8_1_21:1.26
	REL8_2_17:1.29
	REL8_3_11:1.31
	REL8_4_4:1.33
	REL9_0_BETA1:1.35
	REL9_0_ALPHA5_BRANCH:1.35.0.6
	REL9_0_ALPHA5:1.35
	REL7_4_28:1.23.6.1
	REL8_0_24:1.26
	REL8_1_20:1.26
	REL8_2_16:1.29
	REL8_3_10:1.31
	REL8_4_3:1.33
	REL9_0_ALPHA4:1.35
	REL9_0_ALPHA4_BRANCH:1.35.0.4
	REL8_5_ALPHA3:1.35
	REL8_5_ALPHA3_BRANCH:1.35.0.2
	REL7_4_27:1.23.6.1
	REL8_0_23:1.26
	REL8_1_19:1.26
	REL8_2_15:1.29
	REL8_3_9:1.31
	REL8_4_2:1.33
	REL8_5_ALPHA2:1.34
	REL8_5_ALPHA2_BRANCH:1.34.0.2
	REL7_4_26:1.23.6.1
	REL8_0_22:1.26
	REL8_1_18:1.26
	REL8_2_14:1.29
	REL8_3_8:1.31
	REL8_4_1:1.33
	REL8_5_ALPHA1:1.33
	REL8_5_ALPHA1_BRANCH:1.33.0.4
	REL8_4_STABLE:1.33.0.2
	REL8_4_0:1.33
	REL8_4_RC2:1.33
	REL8_4_RC1:1.33
	REL8_4_BETA2:1.33
	REL8_4_BETA1:1.33
	REL7_4_25:1.23.6.1
	REL8_0_21:1.26
	REL8_1_17:1.26
	REL8_2_13:1.29
	REL8_3_7:1.31
	REL7_4_24:1.23.6.1
	REL8_0_20:1.26
	REL8_1_16:1.26
	REL8_2_12:1.29
	REL8_3_6:1.31
	REL7_4_23:1.23.6.1
	REL8_0_19:1.26
	REL8_1_15:1.26
	REL8_2_11:1.29
	REL8_3_5:1.31
	REL7_4_22:1.23.6.1
	REL8_0_18:1.26
	REL8_1_14:1.26
	REL8_2_10:1.29
	REL8_3_4:1.31
	REL7_4_21:1.23.6.1
	REL8_0_17:1.26
	REL8_1_13:1.26
	REL8_2_9:1.29
	REL8_3_3:1.31
	REL7_4_20:1.23.6.1
	REL8_0_16:1.26
	REL8_1_12:1.26
	REL8_2_8:1.29
	REL8_3_2:1.31
	REL8_2_7:1.29
	REL8_3_1:1.31
	REL8_3_STABLE:1.31.0.2
	REL8_3_0:1.31
	REL8_3_RC2:1.31
	REL7_3_21:1.23
	REL7_4_19:1.23.6.1
	REL8_0_15:1.26
	REL8_1_11:1.26
	REL8_2_6:1.29
	REL8_3_RC1:1.31
	REL8_3_BETA4:1.31
	REL8_3_BETA3:1.31
	REL8_3_BETA2:1.31
	REL8_3_BETA1:1.31
	REL7_3_20:1.23
	REL7_4_18:1.23.6.1
	REL8_0_14:1.26
	REL8_1_10:1.26
	REL8_2_5:1.29
	REL7_3_19:1.23
	REL7_4_17:1.23.6.1
	REL8_0_13:1.26
	REL8_1_9:1.26
	REL8_2_4:1.29
	REL8_0_12:1.26
	REL8_1_8:1.26
	REL8_2_3:1.29
	REL7_3_18:1.23
	REL7_4_16:1.23.6.1
	REL8_0_11:1.26
	REL8_1_7:1.26
	REL8_2_2:1.29
	REL8_0_10:1.26
	REL8_1_6:1.26
	REL8_2_1:1.29
	REL7_4_15:1.23.6.1
	REL7_3_17:1.23
	REL8_2_STABLE:1.29.0.2
	REL8_2_0:1.29
	REL8_2_RC1:1.29
	REL8_2_BETA3:1.29
	REL8_2_BETA2:1.29
	REL8_1_5:1.26
	REL8_0_9:1.26
	REL7_4_14:1.23.6.1
	REL7_3_16:1.23
	REL8_2_BETA1:1.29
	REL7_3_15:1.23
	REL7_4_13:1.23.6.1
	REL8_0_8:1.26
	REL8_1_4:1.26
	REL7_3_14:1.23
	REL7_4_12:1.23.6.1
	REL8_0_7:1.26
	REL8_1_3:1.26
	REL7_3_13:1.23
	REL7_4_11:1.23.6.1
	REL8_0_6:1.26
	REL8_1_2:1.26
	REL7_3_12:1.23
	REL7_4_10:1.23.6.1
	REL8_0_5:1.26
	REL8_1_1:1.26
	REL8_1_STABLE:1.26.0.6
	REL8_1_0:1.26
	REL8_1_0RC1:1.26
	REL8_1_0BETA4:1.26
	REL8_1_0BETA3:1.26
	REL7_3_11:1.23
	REL7_4_9:1.23.6.1
	REL8_0_4:1.26
	REL8_1_0BETA2:1.26
	REL8_1_0BETA1:1.26
	REL7_2_8:1.20
	REL7_3_10:1.23
	REL7_4_8:1.23.6.1
	REL8_0_3:1.26
	REL8_0_2:1.26
	REL7_2_7:1.20
	REL7_3_9:1.23
	REL7_4_7:1.23.6.1
	REL8_0_1:1.26
	REL8_0_STABLE:1.26.0.4
	REL8_0_0:1.26.0.2
	REL8_0_0RC5:1.26
	REL8_0_0RC4:1.26
	REL8_0_0RC3:1.26
	REL8_0_0RC2:1.26
	REL8_0_0RC1:1.26
	REL8_0_0BETA5:1.26
	REL8_0_0BETA4:1.26
	REL7_4_6:1.23.6.1
	REL7_3_8:1.23
	REL7_2_6:1.20
	REL8_0_0BETA3:1.26
	REL8_0_0BETA2:1.26
	REL7_2_5:1.20
	REL7_4_5:1.23.6.1
	REL7_3_7:1.23
	REL7_4_4:1.23.6.1
	REL8_0_0BETA1:1.26
	REL7_4_3:1.23.6.1
	REL7_4_2:1.23.6.1
	REL7_3_6:1.23
	REL7_4_1:1.23
	REL7_3_5:1.23
	REL7_4:1.23
	REL7_4_RC2:1.23
	REL7_4_STABLE:1.23.0.6
	REL7_4_RC1:1.23
	REL7_4_BETA5:1.23
	REL7_4_BETA4:1.23
	REL7_4_BETA3:1.23
	REL7_4_BETA2:1.23
	WIN32_DEV:1.23.0.4
	REL7_4_BETA1:1.23
	REL7_3_4:1.23
	REL7_3_2:1.23
	REL7_2_4:1.20
	REL7_3_STABLE:1.23.0.2
	REL7_2_3:1.20
	REL7_2_STABLE:1.20.0.2
	REL7_2:1.20
	REL7_2_RC2:1.20
	REL7_2_RC1:1.20
	REL7_2_BETA5:1.20
	REL7_2_BETA4:1.20
	REL7_2_BETA3:1.20
	REL7_2_BETA2:1.19
	REL7_2_BETA1:1.19
	REL7_1_2:1.13
	REL7_1_STABLE:1.13.0.2
	REL7_1_BETA:1.9
	REL7_1_BETA3:1.9
	REL7_1_BETA2:1.9
	REL7_1:1.13;
locks; strict;
comment	@# @;


1.35
date	2009.11.12.00.13.00;	author tgl;	state Exp;
branches;
next	1.34;

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

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

1.32
date	2008.04.07.14.15.58;	author petere;	state Exp;
branches;
next	1.31;

1.31
date	2007.07.15.22.18.24;	author tgl;	state Exp;
branches;
next	1.30;

1.30
date	2007.02.09.15.56.00;	author petere;	state Exp;
branches;
next	1.29;

1.29
date	2006.03.07.01.03.12;	author tgl;	state Exp;
branches;
next	1.28;

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

1.27
date	2005.12.09.21.19.36;	author petere;	state Exp;
branches;
next	1.26;

1.26
date	2004.06.03.19.21.31;	author tgl;	state Exp;
branches;
next	1.25;

1.25
date	2004.02.10.07.26.25;	author tgl;	state Exp;
branches;
next	1.24;

1.24
date	2003.11.29.19.52.12;	author pgsql;	state Exp;
branches;
next	1.23;

1.23
date	2002.11.01.22.52.34;	author tgl;	state Exp;
branches
	1.23.6.1;
next	1.22;

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

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

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

1.19
date	2001.10.09.04.15.38;	author tgl;	state Exp;
branches;
next	1.18;

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

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

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

1.15
date	2001.05.25.04.24.33;	author momjian;	state Exp;
branches;
next	1.14;

1.14
date	2001.05.24.22.33.18;	author momjian;	state Exp;
branches;
next	1.13;

1.13
date	2001.04.04.21.15.56;	author tgl;	state Exp;
branches;
next	1.12;

1.12
date	2001.02.20.19.20.29;	author petere;	state Exp;
branches;
next	1.11;

1.11
date	2001.02.10.22.31.42;	author petere;	state Exp;
branches;
next	1.10;

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

1.9
date	2000.10.23.21.44.03;	author petere;	state Exp;
branches;
next	1.8;

1.8
date	2000.10.20.21.04.16;	author petere;	state Exp;
branches;
next	1.7;

1.7
date	2000.09.17.13.02.52;	author petere;	state Exp;
branches;
next	1.6;

1.6
date	2000.08.28.11.53.23;	author petere;	state Exp;
branches;
next	1.5;

1.5
date	2000.07.19.16.30.24;	author petere;	state Exp;
branches;
next	1.4;

1.4
date	2000.06.28.18.30.16;	author petere;	state Exp;
branches;
next	1.3;

1.3
date	2000.06.27.00.32.01;	author petere;	state Exp;
branches;
next	1.2;

1.2
date	98.10.08.23.45.16;	author momjian;	state dead;
branches;
next	1.1;

1.1
date	98.09.25.15.50.02;	author momjian;	state Exp;
branches;
next	;

1.23.6.1
date	2004.02.10.07.26.48;	author tgl;	state Exp;
branches;
next	;


desc
@@


1.35
log
@Remove plpgsql's separate lexer (finally!), in favor of using the core lexer
directly.  This was a lot of trouble, but should be worth it in terms of
not having to keep the plpgsql lexer in step with core anymore.  In addition
the handling of keywords is significantly better-structured, allowing us to
de-reserve a number of words that plpgsql formerly treated as reserved.
@
text
@#-------------------------------------------------------------------------
#
# Makefile for the plpgsql shared object
#
# $PostgreSQL: pgsql/src/pl/plpgsql/src/Makefile,v 1.34 2009/08/28 20:26:19 petere Exp $
#
#-------------------------------------------------------------------------

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

# Shared library parameters
NAME= plpgsql

override CPPFLAGS := -I. -I$(srcdir) $(CPPFLAGS)
SHLIB_LINK = $(filter -lintl, $(LIBS))
rpath =

OBJS = pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o pl_scanner.o

all: all-lib

# Shared library stuff
include $(top_srcdir)/src/Makefile.shlib


install: installdirs all install-lib

installdirs: installdirs-lib

uninstall: uninstall-lib


# 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 pl_scanner.o: plpgsql.h pl_gram.h

# See notes in src/backend/parser/Makefile about the following two rules

pl_gram.h: pl_gram.c ;

pl_gram.c: gram.y
ifdef BISON
	$(BISON) -d $(BISONFLAGS) -o $@@ $<
else
	@@$(missing) bison $< $@@
endif

distprep: pl_gram.h pl_gram.c

# pl_gram.c and pl_gram.h are in the distribution tarball,
# so they are not cleaned here.
clean distclean: clean-lib
	rm -f $(OBJS)

maintainer-clean: clean
	rm -f pl_gram.c pl_gram.h
@


1.34
log
@Derived files that are shipped in the distribution used to be built in the
source directory even for out-of-tree builds.  They are now alsl built in
the build tree.  This should be more convenient for certain developers'
workflows, and shouldn't really break anything else.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/pl/plpgsql/src/Makefile,v 1.33 2008/08/29 13:02:33 petere Exp $
d20 1
a20 1
OBJS = pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o
d36 1
a36 4
pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o: plpgsql.h pl_gram.h

# pl_scan is compiled as part of pl_gram
pl_gram.o: pl_scan.c
d49 1
a49 12
# Because we use %option case-insensitive, flex's results could vary
# depending on what the compile-time locale setting is.  Hence, force
# it to see LC_CTYPE=C to ensure consistent build results.

pl_scan.c: scan.l
ifdef FLEX
	LC_CTYPE=C $(FLEX) $(FLEXFLAGS) -o'$@@' $<
else
	@@$(missing) flex $< $@@
endif

distprep: pl_scan.c pl_gram.h pl_gram.c
d51 1
a51 1
# pl_gram.c, pl_gram.h, and pl_scan.c are in the distribution tarball,
d57 1
a57 1
	rm -f pl_gram.c pl_gram.h pl_scan.c
@


1.33
log
@Remove all traces that suggest that a non-Bison yacc might be supported, and
change build system to use only Bison.  Simplify build rules, make file names
uniform.  Don't build the token table header file where it is not needed.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/pl/plpgsql/src/Makefile,v 1.32 2008/04/07 14:15:58 petere Exp $
d16 1
a16 1
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
d36 1
a36 1
pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o: plpgsql.h $(srcdir)/pl_gram.h
d39 1
a39 1
pl_gram.o: $(srcdir)/pl_scan.c
d43 1
a43 1
$(srcdir)/pl_gram.h: $(srcdir)/pl_gram.c ;
d45 1
a45 1
$(srcdir)/pl_gram.c: gram.y
d56 1
a56 1
$(srcdir)/pl_scan.c: scan.l
d63 1
a63 1
distprep: $(srcdir)/pl_scan.c $(srcdir)/pl_gram.h $(srcdir)/pl_gram.c
d71 1
a71 1
	rm -f $(srcdir)/pl_gram.c $(srcdir)/pl_gram.h $(srcdir)/pl_scan.c
@


1.32
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/plpgsql/src/Makefile,v 1.31 2007/07/15 22:18:24 tgl Exp $
d36 1
a36 1
pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o: plpgsql.h $(srcdir)/pl.tab.h
d43 1
a43 1
$(srcdir)/pl_gram.c: $(srcdir)/pl.tab.h ;
d45 3
a47 5
$(srcdir)/pl.tab.h: gram.y
ifdef YACC
	$(YACC) -d $(YFLAGS) $<
	mv -f y.tab.c $(srcdir)/pl_gram.c
	mv -f y.tab.h $(srcdir)/pl.tab.h
d63 1
a63 1
distprep: $(srcdir)/pl_scan.c $(srcdir)/pl.tab.h $(srcdir)/pl_gram.c
d65 1
a65 1
# pl_gram.c, pl.tab.h, and pl_scan.c are in the distribution tarball,
a68 2
# And the garbage that might have been left behind by partial build:
	@@rm -f y.tab.h y.tab.c y.output lex.yy.c
d71 1
a71 1
	rm -f $(srcdir)/pl_gram.c $(srcdir)/pl.tab.h $(srcdir)/pl_scan.c
@


1.31
log
@Because plpgsql's scanner uses %option case-insensitive, flex's results could
theoretically vary depending on what the compile-time locale setting is.
Hence, force it to see LC_CTYPE=C to ensure consistent build results.
(It's likely that this makes no difference in practice, since our
specification for "identifier" surely includes both ends of any possible
uppercase/lowercase pair anyway.  But it should silence warnings about
ambiguous character classes that are reported by some buildfarm members.)
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/pl/plpgsql/src/Makefile,v 1.30 2007/02/09 15:56:00 petere Exp $
a14 2
SO_MAJOR_VERSION= 1
SO_MINOR_VERSION= 0
d17 1
a17 1
SHLIB_LINK = $(filter -lintl, $(LIBS)) $(BE_DLLLIBS)
d28 3
a30 14
# In order to use Makefile.shlib, we allow it to build a static
# 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
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
d32 1
a32 2
installdirs:
	$(mkinstalldirs) '$(DESTDIR)$(pkglibdir)'
a33 2
uninstall:
	rm -f '$(DESTDIR)$(pkglibdir)/plpgsql$(DLSUFFIX)'
@


1.30
log
@Replace useless uses of := by = in makefiles.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/pl/plpgsql/src/Makefile,v 1.29 2006/03/07 01:03:12 tgl Exp $
d70 4
d76 1
a76 1
	$(FLEX) $(FLEXFLAGS) -o'$@@' $<
@


1.29
log
@Make all our flex and bison files use %option prefix or %name-prefix
(respectively) to rename yylex and related symbols.  Some were doing
it this way already, while others used not-too-reliable sed hacks in
the Makefiles.  It's all nice and consistent now.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/pl/plpgsql/src/Makefile,v 1.28 2006/01/05 01:56:30 momjian Exp $
d20 1
a20 1
rpath :=
@


1.28
log
@Remove QNX port.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/pl/plpgsql/src/Makefile,v 1.27 2005/12/09 21:19:36 petere Exp $
d51 1
d57 1
a57 2
# Note: Since the yacc and lex files are shipped in the distribution,
# they must be generated in the srcdir (as opposed to builddir).
d64 2
a65 3
	sed -e 's/yy/plpgsql_yy/g' -e 's/YY/PLPGSQL_YY/g' < y.tab.c > $(srcdir)/pl_gram.c
	sed -e 's/yy/plpgsql_yy/g' -e 's/YY/PLPGSQL_YY/g' < y.tab.h > $(srcdir)/pl.tab.h
	rm -f y.tab.c y.tab.h
d72 1
a72 1
	$(FLEX) $(FLEXFLAGS) -Pplpgsql_base_yy -o'$@@' $<
d84 1
a84 1
	@@rm -f y.tab.c y.tab.h lex.yy.c
@


1.27
log
@Allow installation into directories containing spaces in the name.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/pl/plpgsql/src/Makefile,v 1.26 2004/06/03 19:21:31 tgl Exp $
a23 1
ifneq ($(PORTNAME), qnx4)
a24 6
else
all:
	@@echo "*****"
	@@echo "* PL/pgSQL was not built due to library manager problems."
	@@echo "*****"
endif
@


1.26
log
@plpgsql hasn't needed -Wno-error for a good long while.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql-server/src/pl/plpgsql/src/Makefile,v 1.25 2004/02/10 07:26:25 tgl Exp $
d45 1
a45 1
	$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(pkglibdir)/plpgsql$(DLSUFFIX)
d53 1
a53 1
	$(mkinstalldirs) $(DESTDIR)$(pkglibdir)
d56 1
a56 1
	rm -f $(DESTDIR)$(pkglibdir)/plpgsql$(DLSUFFIX)
@


1.25
log
@Repair missing inclusions of -lintl for shared libraries.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql-server/src/pl/plpgsql/src/Makefile,v 1.24 2003/11/29 19:52:12 pgsql Exp $
a11 4

ifeq ($(GCC), yes)
override CFLAGS+= -Wno-error
endif
@


1.24
log
@
$Header: -> $PostgreSQL Changes ...
@
text
@d5 1
a5 1
# $PostgreSQL: /cvsroot/pgsql-server/src/pl/plpgsql/src/Makefile,v 1.23 2002/11/01 22:52:34 tgl Exp $
d23 1
a23 1
SHLIB_LINK = $(BE_DLLLIBS)
@


1.23
log
@Arrange to compile flex output files as inclusions into other files
(usually bison output files), not as standalone files.  This hack
works around flex's insistence on including <stdio.h> before we are
able to include postgres.h; postgres.h will already be read before
the compiler starts to read the flex output file.  Needed for largefile
support on some platforms.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql-server/src/pl/plpgsql/src/Makefile,v 1.22 2002/09/05 18:28:46 petere Exp $
@


1.23.6.1
log
@Repair missing inclusions of -lintl for shared libraries.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql-server/src/pl/plpgsql/src/Makefile,v 1.23 2002/11/01 22:52:34 tgl Exp $
d23 1
a23 1
SHLIB_LINK = $(filter -lintl, $(LIBS)) $(BE_DLLLIBS)
@


1.22
log
@Assorted fixes for Cygwin:

Eliminate the mysterious games that the Cygwin build plays with the linker
flag variables.  DLLLIBS is gone, use SHLIB_LINK like everyone else.
Detect cygipc in configure, after the linker flags are set up, otherwise
configure might not work at all.

Make sure everything is covered by make clean.

Fix the build of the new conversion procedure modules.

Add new DLLIMPORT markers where required.

Finally, the compiler complains if we use an explicit
-I/usr/local/include, so don't do that.  Curiously, -L/usr/local/lib is
still necessary.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql-server/src/pl/plpgsql/src/Makefile,v 1.21 2002/08/30 00:28:41 tgl Exp $
d26 1
a26 1
OBJS = pl_gram.o pl_scan.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o
d62 4
a65 1
pl_gram.o pl_scan.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o: plpgsql.h $(srcdir)/pl.tab.h
@


1.21
log
@PL/pgSQL functions can return sets.  Neil Conway's patch, modified so
that the functionality is available to anyone via ReturnSetInfo, rather
than hard-wiring it to PL/pgSQL.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql-server/src/pl/plpgsql/src/Makefile,v 1.20 2001/11/16 16:32:33 petere Exp $
d23 1
a23 1
override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
@


1.20
log
@Make the yacc rules safe for parallel make.  See discussion on pgsql-patches
and comment in src/backend/parser/Makefile for the technical details.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.19 2001/10/09 04:15:38 tgl Exp $
d81 1
a81 1
	$(FLEX) -i $(FLEXFLAGS) -Pplpgsql_base_yy -o'$@@' $<
@


1.19
log
@Change plpgsql to depend on main parser's type-declaration grammar,
rather than having its own somewhat half-baked notion of what a type
declaration looks like.  This is necessary now to ensure that plpgsql
will think a 'timestamp' variable has the same semantics as 'timestamp'
does in the main SQL grammar; and it should avoid divergences in future.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.18 2001/09/16 16:11:11 petere Exp $
d67 3
a69 1
$(srcdir)/pl_gram.c $(srcdir)/pl.tab.h: gram.y
@


1.18
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/plpgsql/src/Makefile,v 1.17 2001/08/21 16:25:21 petere Exp $
d26 1
a26 1
OBJS = pl_parse.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o
d62 1
a62 4
pl_handler.o pl_comp.o pl_exec.o pl_funcs.o: plpgsql.h $(srcdir)/pl.tab.h

pl_parse.o: $(srcdir)/pl_gram.c $(srcdir)/pl_scan.c plpgsql.h
	$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@@ $<
d79 1
a79 3
	$(FLEX) -i -l $(FLEXFLAGS) $<
	sed -e 's/yy/plpgsql_yy/g' -e 's/YY/PLPGSQL_YY/g' < lex.yy.c > $@@
	rm -f lex.yy.c
d86 2
d90 1
@


1.17
log
@Add -Wno-error because of "unclean" flex output.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.16 2001/05/25 04:26:21 momjian Exp $
a22 1

d24 1
d49 1
a49 1
	$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(libdir)/plpgsql$(DLSUFFIX)
d57 1
a57 1
	$(mkinstalldirs) $(DESTDIR)$(libdir)
d60 1
a60 1
	rm -f $(DESTDIR)$(libdir)/plpgsql$(DLSUFFIX)
@


1.16
log
@Another Makefile fix for qnx patch.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.15 2001/05/25 04:24:33 momjian Exp $
d12 4
@


1.15
log
@Fix tabs in Makefile.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.14 2001/05/24 22:33:18 momjian Exp $
d24 1
a24 1
ifeq ($(PORTNAME), qnx4)
d28 3
a30 3
	@@echo "*****"; \
	echo "* PL/pgSQL was not built due to library manager problems."; \
	echo "*****"
@


1.14
log
@Back out qnx plpgsql/Makefile change and move to src/Makefile.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.13 2001/04/04 21:15:56 tgl Exp $
d28 3
a30 3
      @@echo "*****"; \
       echo "* PL/pgSQL was not built due to library manager problems."; \
       echo "*****"
@


1.13
log
@Fix/cleanup DLLLIBS handling for Cygwin port.  If it works it's to
Jason Tishler's credit, if it's broken it's my fault ...
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.12 2001/02/20 19:20:29 petere Exp $
d24 1
d26 6
@


1.12
log
@Make sure -L and -I's for our source tree are always before system include
or library directories on the command line.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.11 2001/02/10 22:31:42 petere Exp $
d19 2
@


1.11
log
@Only look for bison as YACC; other yaccs need to be selected explicitly.
When no suitable YACC is configured, supply useful informational messages
to users.  (Same way flex has been handled for a while.)
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.10 2001/02/09 01:05:42 tgl Exp $
d18 1
a18 1
override CPPFLAGS += -I$(srcdir)
@


1.10
log
@Remove no-longer-needed mklang script; now superseded by createlang.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.9 2000/10/23 21:44:03 petere Exp $
d58 1
d63 3
@


1.9
log
@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.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.8 2000/10/20 21:04:16 petere Exp $
a73 4
mklang.sql: mklang.sql.in
	sed -e 's%__libdir__%$(libdir)%g' -e 's%__DLSUFFIX__%$(DLSUFFIX)%g' < $< > $@@


d75 1
a75 1
	rm -f $(OBJS) mklang.sql
@


1.8
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/plpgsql/src/Makefile,v 1.7 2000/09/17 13:02:52 petere Exp $
d35 1
a35 1
ifdef shlib
@


1.7
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/plpgsql/src/Makefile,v 1.6 2000/08/28 11:53:23 petere Exp $
d18 1
a18 1
CPPFLAGS += -I$(srcdir)
@


1.6
log
@New configure test for flex, which recognizes only flex but does so in all
incarnations (I hope). When an acceptable flex version is not found, print
instructive error messages from both configure and the makefiles, so that
users can continue building anyway.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.5 2000/07/19 16:30:24 petere Exp $
d36 1
a36 1
	$(INSTALL_SHLIB) $(shlib) $(libdir)/plpgsql$(DLSUFFIX)
d44 1
a44 1
	$(mkinstalldirs) $(libdir)
d47 1
a47 1
	rm -f $(libdir)/plpgsql$(DLSUFFIX)
@


1.5
log
@Add distprep target to take some of the job of the release_prep script.
The latter updated accordingly. Also add `dist' and `distcheck' targets
to play with, but caveat packager.

Updated backend/bootstrap and backend/parser makefile to make them
marginally builddir aware and fix the usual set of things.

Add rule to automatically remake config.h dependent on config.h.in and
config.status. (Adopted from Autoconf manual and about every other
package.) On a good day we should now have a complete and accurate set
of dependencies throughout everything.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.4 2000/06/28 18:30:16 petere Exp $
a62 1
# Assuming flex here for -i and -l options, since scan.l requires flex anyway.
d64 2
a65 1
	$(LEX) $(LFLAGS) -i -l $<
d68 3
a70 1

d79 2
a80 1
	rm -f *.o y.tab.c y.tab.h lex.yy.c mklang.sql
@


1.4
log
@Makefile cleanup for interface tree. Now essentially with all the
standard targets and behaviour. Replaced Makefile.in's with
Makefile's and declared the respective variables in Makefile.global.

maintainer-clean target now available at top level, although it does
not work in the backend tree yet.

Cleanup pass over Makefile.shlib, renamed some targets and variables.
The shared library symlink tests are now done by make, not the shell.

ecpg: Remove one warning in sloppy flex output.

PL/Perl and Perl interface: the MakeMaker documentation is confusing,
the realclean target *does* "delete derived files", but it also
uninstalls them. Don't use that.

The submake targets in the various bin directories that update libpq
should `make all', not `make libpq.a'. That is a) unportable, and
b) doesn't build the shared library.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.3 2000/06/27 00:32:01 petere Exp $
d68 3
@


1.3
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/plpgsql/src/Makefile.in,v 1.26 2000/06/20 16:40:10 petere Exp $
d22 3
a24 1
# Shared library stuff, also default `all' target
d73 2
a74 2
clean distclean: clean-shlib
	rm -f lib$(NAME).a *.o y.tab.c y.tab.h lex.yy.c mklang.sql
@


1.2
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
@d3 1
a3 2
# Makefile
#    Makefile for the plpgsql shared object
d5 1
a5 2
# IDENTIFICATION
#    $Header: /usr/local/cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.1 1998/09/25 15:50:02 momjian Exp $
d9 3
a11 18
#
# Tell make where the postgresql sources live
#
SRCDIR= ../../..

#
# Include the global and port specific Makefiles
#
include $(SRCDIR)/Makefile.global
include $(SRCDIR)/Makefile.port

CFLAGS+= -I$(LIBPQDIR) -I$(SRCDIR)/include
LFLAGS+= -i -l

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

LDADD+= -L$(LIBPQDIR) -lpq
d13 4
a16 8
#
# DLOBJ is the dynamically-loaded object file.
#
DLOBJ= plpgsql$(DLSUFFIX)

OBJS=	pl_parse.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o

ALL=	$(DLOBJ)
d18 1
a18 4
#
# Build the shared object
#
all: $(ALL)
d20 1
a20 1
$(DLOBJ):	$(OBJS)
d22 2
a23 6
#
# Clean 
#
clean:
	rm -f $(ALL)
	rm -f *.o y.tab.h pl.tab.h pl_gram.c gram.c pl_scan.c scan.c
a24 2
install: all
	$(INSTALL) $(INSTL_LIB_OPTS) $(DLOBJ) $(DESTDIR)$(LIBDIR)/$(DLOBJ)
d26 5
a30 2
$(DLOBJ):	$(OBJS)
	$(CC) -shared -o $@@ $(OBJS)
d32 8
a39 1
#	$(LD) $(LDFLAGS_SL) -o $@@ $(OBJS)
d41 2
d44 2
a45 1
pl_handler.o:	pl_handler.c plpgsql.h pl.tab.h
d47 1
a47 1
pl_comp.o:	pl_comp.c plpgsql.h pl.tab.h
d49 2
a50 1
pl_exec.o:	pl_exec.c plpgsql.h pl.tab.h
d52 2
a53 1
pl_funcs.o:	pl_funcs.c plpgsql.h pl.tab.h
d55 5
a59 2
pl_parse.o:	pl_gram.c pl_scan.c plpgsql.h
	$(CC) $(CFLAGS) -c -o $@@ pl_gram.c
d61 5
a65 3
pl_gram.c:	gram.c
	sed -e 's/yy/plpgsql_yy/g' -e 's/YY/PLPGSQL_YY/g' <gram.c >pl_gram.c
	sed -e 's/yy/plpgsql_yy/g' -e 's/YY/PLPGSQL_YY/g' <y.tab.h >pl.tab.h
d67 2
a68 2
pl_scan.c:	scan.c
	sed -e 's/yy/plpgsql_yy/g' -e 's/YY/PLPGSQL_YY/g' <scan.c >pl_scan.c
a69 1
gram.c:		gram.y
d71 2
a72 1
scan.c:		scan.l
d74 2
a75 1
pl.tab.h:	pl_gram.c
@


1.1
log
@Add new Makefile from Jan.
@
text
@d7 1
a7 1
#    $Header: /usr/local/src/pgsql/src/pl/plpgsql/src/RCS/Makefile,v 1.2 1998/08/13 16:53:48 pgsql Exp pgsql $
@
