Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbfdb695

Browse files
committed
Cleaned up PL/pgSQL build. Fixed a couple of copyandpaste'os in the
interfaces and interfaces/odbc make files. Adjusted regression testdriver to start building and installing in the top level directory.
1 parent9f1a223 commitbfdb695

File tree

11 files changed

+130
-104
lines changed

11 files changed

+130
-104
lines changed

‎configure

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8768,14 +8768,6 @@ fi
87688768

87698769

87708770

8771-
test"x$prefix" = xNONE&& prefix=$ac_default_prefix
8772-
test"x$exec_prefix" = xNONE&& exec_prefix='${prefix}'
8773-
8774-
eval expanded_libdir="$libdir"
8775-
eval expanded_libdir="$expanded_libdir"
8776-
8777-
8778-
87798771
trap'' 1 2 15
87808772
cat> confcache<<\EOF
87818773
# This file is a shell script that caches the results of configure
@@ -8900,8 +8892,8 @@ trap 'rm -fr `echo "GNUmakefile
89008892
src/interfaces/odbc/GNUmakefile
89018893
src/interfaces/python/GNUmakefile
89028894
src/pl/Makefile
8895+
src/pl/plpgsql/Makefile
89038896
src/pl/plpgsql/src/Makefile
8904-
src/pl/plpgsql/src/mklang.sql
89058897
src/pl/tcl/mkMakefile.tcldefs.sh
89068898
src/pl/plperl/GNUmakefile
89078899
src/test/regress/GNUmakefile
@@ -9027,7 +9019,6 @@ s%@X_PRE_LIBS@%$X_PRE_LIBS%g
90279019
s%@X_LIBS@%$X_LIBS%g
90289020
s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
90299021
s%@X11_LIBS@%$X11_LIBS%g
9030-
s%@expanded_libdir@%$expanded_libdir%g
90319022
90329023
CEOF
90339024
EOF
@@ -9092,8 +9083,8 @@ CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile
90929083
src/interfaces/odbc/GNUmakefile
90939084
src/interfaces/python/GNUmakefile
90949085
src/pl/Makefile
9086+
src/pl/plpgsql/Makefile
90959087
src/pl/plpgsql/src/Makefile
9096-
src/pl/plpgsql/src/mklang.sql
90979088
src/pl/tcl/mkMakefile.tcldefs.sh
90989089
src/pl/plperl/GNUmakefile
90999090
src/test/regress/GNUmakefile

‎configure.in

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,24 +1184,6 @@ See the file 'config.log' for further diagnostics.])
11841184
fi
11851185

11861186

1187-
dnl Output files that are neither makefiles nor shell scripts probably
1188-
dnl need fully-expanded substitutions, rather than partial expansions
1189-
dnl that include references to other variables. Currently the only
1190-
dnl such item that's needed is an expanded version of libdir, but
1191-
dnl others may be needed someday. NOTE: 'eval' technique only copes
1192-
dnl with one level of indirect reference per expansion; two levels is
1193-
dnl currently enough for libdir, but it's ugly...
1194-
1195-
dnl First we have to force 'NONE' prefix to be expanded itself.
1196-
dnl For some reason, autoconf 2.13 doesn't do this until AC_OUTPUT,
1197-
dnl which is too late...
1198-
test "x$prefix" = xNONE && prefix=$ac_default_prefix
1199-
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1200-
1201-
eval expanded_libdir="$libdir"
1202-
eval expanded_libdir="$expanded_libdir"
1203-
AC_SUBST(expanded_libdir)
1204-
12051187
dnl Finally ready to produce output files ...
12061188

12071189
AC_OUTPUT(
@@ -1228,8 +1210,8 @@ AC_OUTPUT(
12281210
src/interfaces/odbc/GNUmakefile
12291211
src/interfaces/python/GNUmakefile
12301212
src/pl/Makefile
1213+
src/pl/plpgsql/Makefile
12311214
src/pl/plpgsql/src/Makefile
1232-
src/pl/plpgsql/src/mklang.sql
12331215
src/pl/tcl/mkMakefile.tcldefs.sh
12341216
src/pl/plperl/GNUmakefile
12351217
src/test/regress/GNUmakefile

‎src/interfaces/Makefile.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $Header: /cvsroot/pgsql/src/interfaces/Attic/Makefile.in,v 1.3 2000/06/19 16:58:43 petere Exp $
7+
# $Header: /cvsroot/pgsql/src/interfaces/Attic/Makefile.in,v 1.4 2000/06/20 16:39:54 petere Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -57,8 +57,8 @@ distclean maintainer-clean: clean
5757
.PHONY: all install dep depend clean distclean maintainer-clean
5858

5959

60-
GNUmakefile: GNUmakefile.in$(top_builddir)/config.status
61-
CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
60+
Makefile: Makefile.in$(top_builddir)/config.status
61+
cd$(top_builddir)&&CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
6262

6363
$(top_builddir)/config.status:$(top_srcdir)/configure
6464
cd$(top_builddir)&& ./config.status --recheck

‎src/interfaces/odbc/GNUmakefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# GNUMakefile.in for psqlodbc (Postgres ODBC driver).
44
#
5-
# $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile.in,v 1.16 2000/06/19 16:58:44 petere Exp $
5+
# $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile.in,v 1.17 2000/06/20 16:39:57 petere Exp $
66
#
77
#-------------------------------------------------------------------------
88

@@ -71,7 +71,7 @@ endif
7171

7272

7373
GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
74-
CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
74+
cd $(top_builddir) &&CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
7575

7676
$(top_builddir)/config.status: $(top_srcdir)/configure
7777
cd $(top_builddir) && ./config.status --recheck

‎src/pl/Makefile.in

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $Header: /cvsroot/pgsql/src/pl/Attic/Makefile.in,v 1.1 2000/06/10 18:02:09 petere Exp $
7+
# $Header: /cvsroot/pgsql/src/pl/Attic/Makefile.in,v 1.2 2000/06/20 16:40:04 petere Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -13,10 +13,13 @@ VPATH = @srcdir@
1313

1414
top_srcdir = @top_srcdir@
1515
top_builddir = ../..
16+
subdir = src/pl
17+
1618

1719
with_perl = @with_perl@
1820
USE_TCL = @USE_TCL@
1921

22+
2023
allinstallclean:
2124
$(MAKE) -C plpgsql$@
2225
ifeq ($(USE_TCL), true)
@@ -29,8 +32,7 @@ endif
2932

3033

3134
distcleanmaintainer-clean:
32-
-$(MAKE) -C plpgsql clean
33-
rm -f plpgsql/src/Makefile plpgsql/src/mklang.sql
35+
-$(MAKE) -C plpgsql$@
3436
ifeq ($(USE_TCL), true)
3537
$(MAKE) -C tcl clean
3638
endif
@@ -40,3 +42,10 @@ endif
4042

4143

4244
.PHONY: all install clean distclean maintainer-clean
45+
46+
47+
Makefile: Makefile.in$(top_builddir)/config.status
48+
cd$(top_builddir)&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
49+
50+
$(top_builddir)/config.status:$(top_srcdir)/configure
51+
cd$(top_builddir)&& ./config.status --recheck

‎src/pl/plpgsql/Makefile

Lines changed: 0 additions & 20 deletions
This file was deleted.

‎src/pl/plpgsql/Makefile.in

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#-------------------------------------------------------------------------
2+
#
3+
# Makefile for src/pl/plpgsql (PostgreSQL's SQL procedural language)
4+
#
5+
# Copyright (c) 1994, Regents of the University of California
6+
#
7+
# $Header: /cvsroot/pgsql/src/pl/plpgsql/Attic/Makefile.in,v 1.1 2000/06/20 16:40:07 petere Exp $
8+
#
9+
#-------------------------------------------------------------------------
10+
11+
srcdir = @srcdir@
12+
VPATH = @srcdir@
13+
14+
top_srcdir = @top_srcdir@
15+
top_builddir = ../../..
16+
subdir = src/pl/plpgsql
17+
18+
19+
.DEFAULTallinstallclean:
20+
$(MAKE) -C src$@
21+
22+
distcleanmaintainer-clean:
23+
-$(MAKE) -C src$@
24+
rm -f Makefile
25+
26+
27+
.PHONY: all install clean distclean maintainer-clean
28+
29+
30+
Makefile: Makefile.in$(top_builddir)/config.status
31+
cd$(top_builddir)&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
32+
33+
$(top_builddir)/config.status:$(top_srcdir)/configure
34+
cd$(top_builddir)&& ./config.status --recheck

‎src/pl/plpgsql/src/Makefile.in

Lines changed: 70 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,106 @@
11
#-------------------------------------------------------------------------
22
#
3-
# Makefile
4-
# Makefile for the plpgsql shared object
3+
# Makefile for the plpgsql shared object
54
#
6-
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/Makefile.in,v 1.25 2000/06/07 16:26:54 petere Exp $
5+
# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/Makefile.in,v 1.26 2000/06/20 16:40:10 petere Exp $
86
#
97
#-------------------------------------------------------------------------
108

9+
srcdir = @srcdir@
10+
VPATH = @srcdir@
11+
12+
top_srcdir = @top_srcdir@
13+
top_builddir = ../../../..
14+
subdir = src/pl/plpgsql/src
15+
16+
17+
INSTALL = @INSTALL@
18+
INSTALL_SHLIB = @INSTALL_SHLIB@
19+
mkinstalldirs = @mkinstalldirs@
20+
prefix = @prefix@
21+
exec_prefix = @exec_prefix@
22+
libdir = @libdir@
23+
24+
25+
# Shared library parameters
1126
NAME= plpgsql
1227
SO_MAJOR_VERSION= 1
1328
SO_MINOR_VERSION= 0
29+
DLSUFFIX = @DLSUFFIX@
1430

15-
SRCDIR= ../../..
31+
SRCDIR =$(top_srcdir)/src
1632
include$(SRCDIR)/Makefile.global
1733

18-
# If using flex, ask for a case-insensitive, lex-compatible lexer.
19-
ifneq (,$(findstring flex,$(LEX)))
20-
LFLAGS+= -i -l
21-
endif
22-
# bsdi calls flex lex
23-
ifeq ($(PORTNAME), bsdi)
24-
LFLAGS+= -i -l
25-
endif
34+
35+
CPPFLAGS += -I$(srcdir)
2636

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

2939
# Shared library stuff, also default 'all' target
3040
include$(SRCDIR)/Makefile.shlib
3141

3242

33-
# In order to use Makefile.shlib, we allow it to build a static library
34-
# libplpgsql.a, which we just ignore, as well as a shared library that
35-
# it will insist on naming $(shlib).We don't want to call it that when
36-
# installed, however, so we ignore the install-shlib rule and do this
37-
# instead:
43+
# In order to use Makefile.shlib, we allow it to build a static
44+
#librarylibplpgsql.a, which we just ignore, as well as a shared
45+
#library thatit will insist on naming $(shlib). We don't want to
46+
#call it that wheninstalled, however, so we ignore the install-shlib
47+
#rule and do thisinstead:
3848

39-
install:$(shlib)
49+
install:installdirs$(shlib)
4050
ifneq ($(shlib),)
41-
$(INSTALL) $(INSTL_SHLIB_OPTS) $(shlib) $(LIBDIR)/plpgsql$(DLSUFFIX)
51+
$(INSTALL_SHLIB) $(shlib) $(libdir)/plpgsql$(DLSUFFIX)
4252
else
43-
@echo "plpgsql not installed due to lack of shared library support."
53+
@echo "*****"; \
54+
echo "* PL/pgSQL was not installed due to lack of shared library support."; \
55+
echo "*****"
4456
endif
4557

58+
installdirs:
59+
$(mkinstalldirs)$(libdir)
4660

47-
pl_handler.o:pl_handler.c plpgsql.h pl.tab.h
48-
49-
pl_comp.o:pl_comp.c plpgsql.h pl.tab.h
61+
pl_handler.opl_comp.opl_exec.opl_funcs.o: plpgsql.h pl.tab.h
5062

51-
pl_exec.o:pl_exec.c plpgsql.h pl.tab.h
63+
pl_parse.o: pl_gram.c pl_scan.c plpgsql.h
64+
$(CC) -c$(CPPFLAGS)$(CFLAGS) -o$@$<
5265

53-
pl_funcs.o:pl_funcs.c plpgsql.h pl.tab.h
66+
# Note: Since the yacc and lex files are shipped in the distribution,
67+
# they must be generated in the srcdir (as opposed to builddir).
5468

55-
pl_parse.o:pl_gram.c pl_scan.c plpgsql.h
56-
$(CC)$(CFLAGS) -c -o$@ pl_gram.c
57-
58-
pl_gram.cpl.tab.h:gram.y
69+
$(srcdir)/pl_gram.c$(srcdir)/pl.tab.h: gram.y
5970
$(YACC) -d$(YFLAGS)$<
60-
sed -e's/yy/plpgsql_yy/g' -e's/YY/PLPGSQL_YY/g'<y.tab.c>pl_gram.c
61-
sed -e's/yy/plpgsql_yy/g' -e's/YY/PLPGSQL_YY/g'<y.tab.h>pl.tab.h
71+
sed -e's/yy/plpgsql_yy/g' -e's/YY/PLPGSQL_YY/g'<y.tab.c>$(srcdir)/pl_gram.c
72+
sed -e's/yy/plpgsql_yy/g' -e's/YY/PLPGSQL_YY/g'<y.tab.h>$(srcdir)/pl.tab.h
6273
rm -f y.tab.c y.tab.h
6374

64-
pl_scan.c:scan.l
65-
$(LEX)$(LFLAGS)$<
66-
sed -e's/yy/plpgsql_yy/g' -e's/YY/PLPGSQL_YY/g'<lex.yy.c>pl_scan.c
75+
# Assuming flex here for -i and -l options, since scan.l requires flex anyway.
76+
$(srcdir)/pl_scan.c: scan.l
77+
$(LEX)$(LFLAGS) -i -l$<
78+
sed -e's/yy/plpgsql_yy/g' -e's/YY/PLPGSQL_YY/g'< lex.yy.c>$@
6779
rm -f lex.yy.c
6880

81+
mklang.sql: mklang.sql.in
82+
sed -e's%__libdir__%$(libdir)%g' -e's%__DLSUFFIX__%$(DLSUFFIX)%g'<$<>$@
6983

70-
.PHONY: install clean
7184

7285
clean: clean-shlib
73-
rm -f lib$(NAME).a
74-
rm -f*.o
75-
# And the garbage that might have been left behind by partial build:
76-
rm -f y.tab.c y.tab.h lex.yy.c
86+
rm -f lib$(NAME).a*.o y.tab.c y.tab.h lex.yy.c mklang.sql
87+
88+
distclean: clean
89+
rm -f Makefile
90+
91+
maintainer-clean: clean
92+
rm -f$(srcdir)/pl_gram.c$(srcdir)/pl.tab.h$(srcdir)/pl_scan.c
93+
rm -f Makefile
94+
95+
96+
.PHONY: all install installdirs clean distclean maintainer-clean
97+
98+
99+
Makefile: Makefile.in$(top_builddir)/config.status
100+
cd$(top_builddir)&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
101+
102+
$(top_builddir)/src/Makefile.global:$(top_srcdir)/src/Makefile.global.in$(top_builddir)/config.status
103+
cd$(top_builddir)&& CONFIG_FILES=src/Makefile.global CONFIG_HEADERS= ./config.status
104+
105+
$(top_builddir)/config.status:$(top_srcdir)/configure
106+
cd$(top_builddir)&& ./config.status --recheck

‎src/pl/plpgsql/src/mklang.sql.in

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
--
22
-- PL/pgSQL language declaration
33
--
4-
-- $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/mklang.sql.in,v 1.4 1999/05/11 22:57:50 tgl Exp $
4+
-- $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/mklang.sql.in,v 1.5 2000/06/20 16:40:10 petere Exp $
55
--
66

77
create function plpgsql_call_handler() returns opaque
8-
as '@expanded_libdir@/plpgsql@DLSUFFIX@'
8+
as '__libdir__/plpgsql__DLSUFFIX__'
99
language 'C';
1010

1111
create trusted procedural language 'plpgsql'
1212
handler plpgsql_call_handler
1313
lancompiler 'PL/pgSQL';
14-

‎src/pl/plpgsql/src/scan.l

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* procedural language
55
*
66
* IDENTIFICATION
7-
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/scan.l,v 1.3 1999/05/26 20:55:06 momjian Exp $
7+
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/scan.l,v 1.4 2000/06/20 16:40:10 petere Exp $
88
*
99
* This software is copyrighted by Jan Wieck - Hamburg.
1010
*
@@ -46,6 +46,7 @@ extern int yylineno;
4646

4747
staticvoidplpgsql_input(char *buf,int *result,int max);
4848
#defineYY_INPUT(buf,res,max)plpgsql_input(buf, &res, max)
49+
#defineYY_NO_UNPUT
4950
%}
5051

5152
WS[[:alpha:]_"]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp