Moved the intricacies of the perl interface build into its own makefile

that now functions as a wrapper around the MakeMaker stuff. It might
even behave sensically when we have separate build dirs. Same for plperl,
which of course still doesn't work very well. Made sure that plperl
respects the choice of --libdir.

Added --with-python to automatically build and install the Python interface.
Works similarly to the Perl5 stuff.

Moved the burden of the distclean targets lower down into the source tree.
Eventually, each make file should have its own.

Added automatic remaking of makefiles and configure. Currently only for the
top-level because of a bug(?) in Autoconf. Use GNU `missing' to work around
missing autoconf and aclocal. Start factoring out macros into their own
config/*.m4 files to increase readability and organization.
This commit is contained in:
Peter Eisentraut 2000-06-10 18:02:12 +00:00
parent 2ae20ef98a
commit 6de89c9ab7
22 changed files with 1409 additions and 715 deletions

View File

@ -1,7 +1,7 @@
#
# PostgreSQL top level makefile
#
# $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.2 2000/06/07 23:09:18 petere Exp $
# $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.3 2000/06/10 18:01:34 petere Exp $
#
srcdir = @srcdir@
@ -23,8 +23,24 @@ clean:
$(MAKE) -C src clean
distclean:
$(MAKE) -C src distclean
-$(MAKE) -C src distclean
-rm -f config.cache config.log config.status GNUmakefile
.PHONY: all install clean distclean
AUTOCONF = @AUTOCONF@
ACLOCAL = @ACLOCAL@
GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
$(top_builddir)/config.status: $(top_srcdir)/configure
cd $(top_builddir) && ./config.status --recheck
$(top_srcdir)/configure: $(top_srcdir)/configure.in $(top_srcdir)/aclocal.m4
cd $(top_srcdir) && $(AUTOCONF)
$(top_srcdir)/aclocal.m4: $(wildcard $(top_srcdir)/config/*.m4)
cd $(top_srcdir) && $(ACLOCAL) -I config

View File

@ -1,16 +1,36 @@
# The Postgres make files exploit features of GNU make that other makes
# do not have. Because it is a common mistake for users to try to build
# Postgres with a different make, we have this make file that does nothing
# but tell the user to use GNU make.
# The PostgreSQL make files exploit features of GNU make that other
# makes do not have. Because it is a common mistake for users to try
# to build Postgres with a different make, we have this make file
# that, as a service, will look for a GNU make and invoke it, or show
# an error message if none could be found.
# If the user were using GNU make now, this file would not get used because
# GNU make uses a make file named "GNUmakefile" in preference to "Makefile"
# if it exists. Postgres is shipped with a "GNUmakefile".
# If the user were using GNU make now, this file would not get used
# because GNU make uses a make file named "GNUmakefile" in preference
# to "Makefile" if it exists. PostgreSQL is shipped with a
# "GNUmakefile". If the user hasn't run the configure script yet, the
# GNUmakefile won't exist yet, so we catch that case as well.
all install clean dep depend distclean:
@echo "You must use GNU make to use Postgres. It may be installed"
@echo "on your system with the name 'gmake'."
@echo
@echo "NOTE: If you are sure that you are using GNU make and you are"
@echo " still getting this message, you may simply need to run"
@echo " the configure program."
all install clean dep depend distclean maintainer-clean:
@if ! [ -f GNUmakefile ] ; then \
echo "You need to run the \`configure' program fist. See the file"; \
echo "\`INSTALL' for installation instructions." ; \
false ; \
fi
@IFS=':' ; \
for dir in $$PATH; do \
for prog in gmake gnumake make; do \
if [ -f $$dir/$$prog ] && ( $$dir/$$prog --version | grep GNU >/dev/null 2>&1 ) ; then \
GMAKE=$$dir/$$prog; \
break 2; \
fi; \
done; \
done; \
\
if [ x"$${GMAKE+set}" = xset ]; then \
echo "Using GNU make found at $${GMAKE}"; \
$${GMAKE} ; \
else \
echo "You must use GNU make to build PostgreSQL." ; \
false; \
fi

79
aclocal.m4 vendored Normal file
View File

@ -0,0 +1,79 @@
dnl aclocal.m4 generated automatically by aclocal 1.4
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
#
# Autoconf macros for configuring the build of Python extension modules
#
# $Header: /cvsroot/pgsql/aclocal.m4,v 1.1 2000/06/10 18:01:34 petere Exp $
#
# PGAC_PROG_PYTHON
# ----------------
# Look for Python and set the output variable `PYTHON'
# to `python' if found, empty otherwise.
AC_DEFUN([PGAC_PROG_PYTHON],
[AC_CHECK_PROG(PYTHON, python, python)])
# PGAC_PATH_PYTHONDIR
# -------------------
# Finds the names of various install dirs and helper files
# necessary to build a Python extension module.
#
# It would be nice if we could check whether the current setup allows
# the build of the shared module. Future project.
AC_DEFUN([PGAC_PATH_PYTHONDIR],
[AC_REQUIRE([PGAC_PROG_PYTHON])
[if test "${PYTHON+set}" = set ; then
python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
python_configdir="${python_execprefix}/lib/python${python_version}/config"
python_moduledir="${python_prefix}/lib/python${python_version}"
python_extmakefile="${python_configdir}/Makefile.pre.in"]
AC_MSG_CHECKING(for Python extension makefile)
if test -f "${python_extmakefile}" ; then
AC_MSG_RESULT(found)
else
AC_MSG_RESULT(no)
AC_MSG_ERROR(
[The Python extension makefile was expected at \`${python_extmakefile}\'
but does not exist. This means the Python module cannot be built automatically.])
fi
AC_SUBST(python_version)
AC_SUBST(python_prefix)
AC_SUBST(python_execprefix)
AC_SUBST(python_configdir)
AC_SUBST(python_moduledir)
AC_SUBST(python_extmakefile)
else
AC_MSG_ERROR([Python not found])
fi])# PGAC_PATH_PYTHONDIR
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
dnl The program must properly implement --version.
AC_DEFUN(AM_MISSING_PROG,
[AC_MSG_CHECKING(for working $2)
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
if ($2 --version) < /dev/null > /dev/null 2>&1; then
$1=$2
AC_MSG_RESULT(found)
else
$1="$3/missing $2"
AC_MSG_RESULT(missing)
fi
AC_SUBST($1)])

265
config/missing Executable file
View File

@ -0,0 +1,265 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing 0.3 - GNU automake"
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
aclocal)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`configure.in'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`configure.in'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`configure.in'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a dependancy of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
tar)
shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar ${1+"$@"} && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar ${1+"$@"} && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" ${1+"$@"} && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" ${1+"$@"} && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequirements for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0

50
config/python.m4 Normal file
View File

@ -0,0 +1,50 @@
#
# Autoconf macros for configuring the build of Python extension modules
#
# $Header: /cvsroot/pgsql/config/python.m4,v 1.1 2000/06/10 18:01:35 petere Exp $
#
# PGAC_PROG_PYTHON
# ----------------
# Look for Python and set the output variable `PYTHON'
# to `python' if found, empty otherwise.
AC_DEFUN([PGAC_PROG_PYTHON],
[AC_CHECK_PROG(PYTHON, python, python)])
# PGAC_PATH_PYTHONDIR
# -------------------
# Finds the names of various install dirs and helper files
# necessary to build a Python extension module.
#
# It would be nice if we could check whether the current setup allows
# the build of the shared module. Future project.
AC_DEFUN([PGAC_PATH_PYTHONDIR],
[AC_REQUIRE([PGAC_PROG_PYTHON])
[if test "${PYTHON+set}" = set ; then
python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
python_configdir="${python_execprefix}/lib/python${python_version}/config"
python_moduledir="${python_prefix}/lib/python${python_version}"
python_extmakefile="${python_configdir}/Makefile.pre.in"]
AC_MSG_CHECKING(for Python extension makefile)
if test -f "${python_extmakefile}" ; then
AC_MSG_RESULT(found)
else
AC_MSG_RESULT(no)
AC_MSG_ERROR(
[The Python extension makefile was expected at \`${python_extmakefile}\'
but does not exist. This means the Python module cannot be built automatically.])
fi
AC_SUBST(python_version)
AC_SUBST(python_prefix)
AC_SUBST(python_execprefix)
AC_SUBST(python_configdir)
AC_SUBST(python_moduledir)
AC_SUBST(python_extmakefile)
else
AC_MSG_ERROR([Python not found])
fi])# PGAC_PATH_PYTHONDIR

1079
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,10 @@ AC_PREFIX_DEFAULT(/usr/local/pgsql)
AC_CONFIG_HEADER(src/include/config.h)
AC_PREREQ(2.13)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_AUX_DIR(`pwd`/config)
mkinstalldirs="\$(SHELL) \$(top_srcdir)/config/mkinstalldirs"
AC_SUBST(mkinstalldirs)
AC_CANONICAL_HOST
@ -370,19 +373,35 @@ AC_ARG_WITH(tkconfig,
]
)
dnl We exclude perl support unless we override it with --with-perl
AC_MSG_CHECKING(setting USE_PERL)
AC_ARG_WITH(
perl,
[ --with-perl build Perl interface and plperl ],
[
case "$withval" in
y | ye | yes) USE_PERL=true; AC_MSG_RESULT(enabled) ;;
*) USE_PERL=false; AC_MSG_RESULT(disabled) ;;
esac
],
[ USE_PERL=false; AC_MSG_RESULT(disabled) ]
)
dnl
dnl Optionally build Perl modules (Pg.pm and PL/Perl)
dnl
AC_MSG_CHECKING(whether to build Perl modules)
AC_ARG_WITH(perl, [ --with-perl build Perl interface and plperl],
[if test x"${withval}" = x"yes" ; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi],
[AC_MSG_RESULT(no)])
AC_SUBST(with_perl)
dnl
dnl Optionally build Python interface module
dnl
AC_MSG_CHECKING(whether to build Python modules)
AC_ARG_WITH(python, [ --with-python build Python interface module],
[if test x"${withval}" = x"yes" ; then
AC_MSG_RESULT(yes)
PGAC_PROG_PYTHON
PGAC_PATH_PYTHONDIR
else
AC_MSG_RESULT(no)
fi],
[AC_MSG_RESULT(no)])
AC_SUBST(with_python)
dnl We include odbc support unless we disable it with --with-odbc=false
AC_MSG_CHECKING(setting USE_ODBC)
@ -543,7 +562,6 @@ AC_SUBST(DL_LIB)
AC_SUBST(USE_TCL)
AC_SUBST(USE_TK)
AC_SUBST(WISH)
AC_SUBST(USE_PERL)
AC_SUBST(USE_ODBC)
AC_SUBST(MULTIBYTE)
@ -646,6 +664,8 @@ AC_SUBST(INSTL_SHLIB_OPTS)
AC_SUBST(INSTL_EXE_OPTS)
AC_PROG_AWK
AM_MISSING_PROG(AUTOCONF, autoconf, [\${SHELL} \${top_srcdir}/config])
AM_MISSING_PROG(ACLOCAL, aclocal, [\${SHELL} \${top_srcdir}/config])
dnl Check the option to echo to inhibit newlines.
ECHO_N_OUT=`echo -n "" | wc -c`
@ -680,7 +700,6 @@ broken as well.)
fi
fi
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PATH_PROG(find, find)
AC_PATH_PROG(tar, tar)
@ -690,7 +709,6 @@ AC_PATH_PROG(xargs, xargs)
AC_PATH_PROGS(GZCAT, gzcat zcat, gzcat)
AC_CHECK_PROGS(PERL, perl,)
AC_PROG_YACC
AC_SUBST(YFLAGS)
AC_CHECK_LIB(sfio, main)
@ -1403,16 +1421,21 @@ AC_OUTPUT(
src/bin/pgtclsh/mkMakefile.tkdefs.sh
src/bin/psql/Makefile
src/include/version.h
src/interfaces/Makefile
src/interfaces/libpq/Makefile
src/interfaces/ecpg/lib/Makefile
src/interfaces/ecpg/preproc/Makefile
src/interfaces/perl5/GNUmakefile
src/interfaces/libpq++/Makefile
src/interfaces/libpgeasy/Makefile
src/interfaces/libpgtcl/Makefile
src/interfaces/odbc/GNUmakefile
src/interfaces/odbc/Makefile.global
src/interfaces/python/GNUmakefile
src/pl/Makefile
src/pl/plpgsql/src/Makefile
src/pl/plpgsql/src/mklang.sql
src/pl/tcl/mkMakefile.tcldefs.sh
src/pl/plperl/GNUmakefile
src/test/regress/GNUmakefile
)

View File

@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.51 2000/06/06 22:00:47 petere Exp $
# $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.52 2000/06/10 18:01:36 petere Exp $
#
#-------------------------------------------------------------------------
@ -49,46 +49,27 @@ clean:
$(MAKE) -C test clean
$(MAKE) -C ../contrib/spi clean
# Remove files and symlinks created by configure script
distclean: clean
rm -f \
Makefile.port \
include/config.h \
include/dynloader.h \
include/os.h \
backend/port/tas.s \
backend/port/dynloader.c \
# Not all subdirectories have a make distclean target yet
distclean:
-$(MAKE) -C utils clean
-$(MAKE) -C backend clean
rm -f backend/port/Makefile backend/catalog/genbki.sh \
backend/utils/Gen_fmgrtab.sh \
interfaces/odbc/port \
interfaces/odbc/makefiles \
interfaces/odbc/template \
interfaces/odbc/config.h \
\
\
\
GNUmakefile \
backend/port/tas.s backend/port/dynloader.c
-$(MAKE) -C interfaces distclean
-$(MAKE) -C bin clean
rm -f bin/pg_dump/Makefile bin/pg_version/Makefile \
bin/psql/Makefile bin/pgtclsh/mkMakefile.tcldefs.sh \
bin/pgtclsh/mkMakefile.tkdefs.sh
-$(MAKE) -C pl distclean
-$(MAKE) -C test clean
rm -f test/regress/GNUmakefile
-$(MAKE) -C ../contrib/spi clean
rm -f Makefile.port \
include/config.h include/dynloader.h \
include/os.h include/version.h \
Makefile.global \
backend/port/Makefile \
backend/catalog/genbki.sh \
backend/utils/Gen_fmgrtab.sh \
bin/pg_dump/Makefile \
bin/pg_version/Makefile \
bin/psql/Makefile \
bin/pgtclsh/mkMakefile.tcldefs.sh \
bin/pgtclsh/mkMakefile.tkdefs.sh \
include/version.h \
interfaces/libpq/Makefile \
interfaces/ecpg/lib/Makefile \
interfaces/ecpg/preproc/Makefile \
interfaces/libpq++/Makefile \
interfaces/libpgeasy/Makefile \
interfaces/libpgtcl/Makefile \
interfaces/odbc/GNUmakefile \
interfaces/odbc/Makefile.global \
pl/plpgsql/src/Makefile \
pl/plpgsql/src/mklang.sql \
pl/tcl/mkMakefile.tcldefs.sh \
test/regress/GNUmakefile
GNUmakefile
.DEFAULT:
$(MAKE) -C utils $@
@ -113,4 +94,3 @@ BACKUP:
.PHONY: TAGS
.PHONY: BACKUP

View File

@ -1,16 +0,0 @@
# The Postgres make files exploit features of GNU make that other makes
# do not have. Because it is a common mistake for users to try to build
# Postgres with a different make, we have this make file that does nothing
# but tell the user to use GNU make.
# If the user were using GNU make now, this file would not get used because
# GNU make uses a make file named "GNUmakefile" in preference to "Makefile"
# if it exists. Postgres is shipped with a "GNUmakefile".
all install clean dep depend distclean:
@echo "You must use GNU make to use Postgres. It may be installed"
@echo "on your system with the name 'gmake'."
@echo
@echo "NOTE: If you are sure that you are using GNU make and you are"
@echo " still getting this message, you may simply need to run"
@echo " the configure program."

View File

@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.75 2000/05/29 05:44:32 tgl Exp $
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.76 2000/06/10 18:01:36 petere Exp $
#
# NOTES
# Essentially all Postgres make files include this file and use the
@ -78,11 +78,6 @@ LIBDIR= $(POSTGRESDIR)/lib
#
TEMPLATEDIR= $(POSTGRESDIR)/lib
# This is the directory where IPC utilities ipcs and ipcrm are located
#
IPCS=@ipcs@
IPCRM=@ipcrm@
# Where the man pages (suitable for use with "man") get installed.
POSTMANDIR= $(POSTGRESDIR)/man
@ -155,13 +150,6 @@ USE_TCL= @USE_TCL@
USE_TK= @USE_TK@
WISH= @WISH@
USE_PERL= @USE_PERL@
PERL= @PERL@
#
# enable native odbc driver support
USE_ODBC= @USE_ODBC@
X_CFLAGS= @X_CFLAGS@
X_LIBS= @X_LIBS@
X11_LIBS= -lX11 @X_EXTRA_LIBS@
@ -204,7 +192,6 @@ BACKSLASH_C= @BACKSLASH_C@
#-------------------------------------------------------------
CC= @CC@
CPP= @CPP@
YFLAGS= @YFLAGS@
YACC= @YACC@
LEX= @LEX@
AROPT= @AROPT@

View File

@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/psql/Attic/Makefile.in,v 1.24 2000/05/11 17:46:35 momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/psql/Attic/Makefile.in,v 1.25 2000/06/10 18:01:45 petere Exp $
#
#-------------------------------------------------------------------------
@ -15,6 +15,7 @@ SRCDIR= ../..
include $(SRCDIR)/Makefile.global
DOCDIR= $(SRCDIR)/../doc/src/sgml/ref
PERL = @PERL@
CFLAGS+= -I$(LIBPQDIR)

View File

@ -1,65 +0,0 @@
#-------------------------------------------------------------------------
#
# Makefile.inc--
# Makefile for src/bin (utility programs)
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.38 2000/04/26 09:03:10 wieck Exp $
#
#-------------------------------------------------------------------------
SRCDIR= ..
include $(SRCDIR)/Makefile.global
# Note: the klugery for perl5 is to ensure that the perl5 shared lib
# gets built with the correct path to the installed location of libpq
# during "make install", but is built against the local tree during
# ordinary building and testing. During install, we must also guard
# against the likelihood that we don't have permissions to install into
# the Perl module library.
.DEFAULT all install clean dep depend distclean:
$(MAKE) -C libpq $@
$(MAKE) -C ecpg $@
ifeq ($(HAVE_Cplusplus), true)
$(MAKE) -C libpq++ $@
else
echo $(HAVE_Cplusplus): No C++
endif
$(MAKE) -C libpgeasy $@
ifeq ($(USE_TCL), true)
$(MAKE) -C libpgtcl $@
endif
ifeq ($(USE_PERL), true)
if [ "$@" = "install" ]; then \
$(MAKE) $(MFLAGS) install-perl5; \
else \
$(MAKE) $(MFLAGS) perl5/Makefile; \
$(MAKE) $(MFLAGS) -C perl5 $@; \
fi
endif
ifeq ($(USE_ODBC), true)
$(MAKE) -C odbc $@
endif
perl5/Makefile: perl5/Makefile.PL
cd perl5 && $(PERL) Makefile.PL POLLUTE=1
install-perl5: perl5/Makefile
$(MAKE) -C perl5 clean
cd perl5 && POSTGRES_HOME="$(POSTGRESDIR)" $(PERL) Makefile.PL POLLUTE=1
$(MAKE) -C perl5 all
-@if [ -w `$(MAKE) --quiet -C perl5 echo-installdir` ]; then \
$(MAKE) $(MFLAGS) -C perl5 install; \
rm -f perl5/Makefile; \
else \
echo "Skipping install of Perl module for lack of permissions."; \
echo "To install it, cd into interfaces/perl5, su to become the"; \
echo "appropriate user, and do '$(MAKE) install'."; \
fi
.PHONY: install-perl5

View File

@ -0,0 +1,65 @@
#-------------------------------------------------------------------------
#
# Makefile for src/interfaces
#
# Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/interfaces/Attic/Makefile.in,v 1.1 2000/06/10 18:01:48 petere Exp $
#
#-------------------------------------------------------------------------
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ../..
USE_TCL = @USE_TCL@
USE_ODBC = @USE_ODBC@
WITH_CXX = @HAVECXX@
with_perl = @with_perl@
with_python = @with_python@
all install clean dep depend:
$(MAKE) -C libpq $@
$(MAKE) -C ecpg $@
ifeq ($(WITH_CXX), true)
$(MAKE) -C libpq++ $@
endif
$(MAKE) -C libpgeasy $@
ifeq ($(USE_TCL), true)
$(MAKE) -C libpgtcl $@
endif
ifeq ($(with_perl), yes)
$(MAKE) -C perl5 $@
endif
ifeq ($(with_python), yes)
$(MAKE) -C python $@
endif
ifeq ($(USE_ODBC), true)
$(MAKE) -C odbc $@
endif
distclean maintainer-clean: clean
ifeq ($(with_perl), yes)
-$(MAKE) -C perl5 $@
endif
ifeq ($(with_python), yes)
-$(MAKE) -C python $@
endif
rm -f Makefile \
libpq/Makefile \
ecpg/lib/Makefile \
ecpg/preproc/Makefile \
libpq++/Makefile \
libpgeasy/Makefile \
libpgtcl/Makefile \
odbc/GNUmakefile \
odbc/Makefile.global \
odbc/port \
odbc/makefiles \
odbc/template \
odbc/config.h
.PHONY: all install dep depend clean distclean maintainer-clean

View File

@ -0,0 +1,71 @@
# This file is an interface from the Autoconf world to Perl's
# MakeMaker world, so that the latter behaves (kind of) like the
# former would prefer. Internally, we call Perl to create another
# Makefile according to it's own ideas and then invoke the rules from
# that file.
#
# $Header: /cvsroot/pgsql/src/interfaces/perl5/Attic/GNUmakefile.in,v 1.1 2000/06/10 18:01:56 petere Exp $
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ../../..
PERL = @PERL@
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
includedir = @includedir@
all: Makefile libpq-all
$(MAKE) -f $< all
Makefile: Makefile.PL
$(PERL) $< POLLUTE=1
libpq-all:
$(MAKE) -C $(top_builddir)/src/interfaces/libpq all
# The klugery here is to ensure that the perl5 shared library gets
# built with the correct path to the installed location of libpq
# during `make install', but is built against the local tree during
# ordinary building and testing.
#
# During install, we must also guard against the likelihood that we
# don't have permissions to install into the Perl module library. The
# purer alternative would naturally be the ability to select the
# installation directory somewhere.
install: Makefile libpq-install
$(MAKE) -f Makefile clean
POSTGRES_LIB="$(libdir)" \
POSTGRES_INCLUDE="$(includedir)" \
$(PERL) $(srcdir)/Makefile.PL POLLUTE=1
$(MAKE) -f Makefile all
-@if [ -w "`$(MAKE) --quiet -f Makefile echo-installdir`" ]; then \
$(MAKE) -f Makefile install; \
rm -f Makefile; \
else \
echo "*****" ;\
echo "* Skipping the installation of the Perl module for lack of permissions."; \
echo "* To install it, change to the directory "`pwd`","; \
echo "* become the appropriate user, and do \`$(MAKE) install'."; \
echo "*****"; \
fi
libpq-install:
$(MAKE) -C $(top_builddir)/src/interfaces/libpq install
# Note: Perl's idea of "clean" is a little different, so we use "realclean"
clean:
-[ -f Makefile ] && $(MAKE) -f Makefile realclean
distclean maintainer-clean: clean
rm -f GNUmakefile
.PHONY: all install clean distclean maintainer-clean libpq-all libpq-install

View File

@ -1,6 +1,6 @@
#-------------------------------------------------------
#
# $Id: Makefile.PL,v 1.15 2000/04/23 04:26:32 tgl Exp $
# $Id: Makefile.PL,v 1.16 2000/06/10 18:01:56 petere Exp $
#
# Copyright (c) 1997, 1998 Edmund Mergl
#
@ -12,14 +12,14 @@ use strict;
my %opts;
if (! $ENV{POSTGRES_HOME}) {
if (! $ENV{POSTGRES_LIB} || ! $ENV{POSTGRES_INCLUDE}) {
# Check that we actually are inside the Postgres source tree
if (! -d "../libpq") {
die
"To install Pg separately from the Postgres distribution,
you must set environment variable POSTGRES_HOME to point to
where Postgres is installed (often /usr/local/pgsql).\n";
"To install Pg separately from the Postgres distribution, you must
set environment variables POSTGRES_LIB and POSTGRES_INCLUDE to point
to where Postgres is installed (often /usr/local/pgsql/{lib,include}).\n";
}
# Setup for build/test inside a Postgres source tree
@ -44,9 +44,9 @@ where Postgres is installed (often /usr/local/pgsql).\n";
%opts = (
NAME => 'Pg',
VERSION_FROM => 'Pg.pm',
INC => "-I$ENV{POSTGRES_HOME}/include",
INC => "-I$ENV{POSTGRES_INCLUDE}",
OBJECT => "Pg\$(OBJ_EXT)",
LIBS => ["-L$ENV{POSTGRES_HOME}/lib -lpq"],
LIBS => ["-L$ENV{POSTGRES_LIB} -lpq"],
);
}
@ -57,7 +57,7 @@ WriteMakefile(%opts);
sub MY::installbin {
q[
# Create a target that interfaces/Makefile can use to
# Create a target that can be used to
# determine the Perl install directory.
echo-installdir:
@echo $(INSTALLSITELIB)

View File

@ -0,0 +1,74 @@
#-------------------------------------------------------------------
#
# Makefile for src/interfaces/python, a.k.a. "PyGreSQL"
#
# Written by Peter Eisentraut <peter_e@gmx.net>
#
# $Header: /cvsroot/pgsql/src/interfaces/python/Attic/GNUmakefile.in,v 1.1 2000/06/10 18:02:00 petere Exp $
#
#-------------------------------------------------------------------
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ../../..
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
includedir = @includedir@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
LIBS = @LIBS@
PYTHON = @PYTHON@
python_extmakefile = @python_extmakefile@
python_moduledir = @python_moduledir@
all: Makefile pgmodule.c libpq-all
$(MAKE) -f Makefile
libpq-all:
$(MAKE) -C $(top_builddir)/src/interfaces/libpq all
Makefile: Setup.in Makefile.pre.in
$(MAKE) -f Makefile.pre.in boot srcdir=$(srcdir) VPATH=$(srcdir)
Makefile.pre.in: $(python_extmakefile)
cp $< $@
Setup.in: Setup.in.raw
sed -e "s%__LIBPQ__%${top_srcdir}/src/interfaces/libpq%g" \
-e "s%__EXTRA_LIBS__%${LIBS}%g" \
-e "s%__INCLUDES__%${top_srcdir}/src/include%g" \
< $< > $@
install: all
@echo "Installing Python module"
@if ! ( $(INSTALL_DATA) pg.py $(python_moduledir) && \
$(MAKE) -f Makefile install ); then \
echo "*****" ;\
echo "* Skipping the installation of the Python interface module for lack"; \
echo "* of permissions. To install it, change to the directory"; \
echo "* "`pwd`", become the appropriate"; \
echo "* user, and do \`$(MAKE) install'."; \
echo "*****"; \
fi
# Python sometimes has a different idea what exactly "clean" is.
clean:
-[ -f Makefile ] && $(MAKE) -f Makefile clobber
rm -f Makefile.pre.in Makefile Setup Setup.in
distclean maintainer-clean: clean
rm -f GNUmakefile
.PHONY: all libpq-all install clean distclean maintainer-clean

View File

@ -0,0 +1,3 @@
*shared*
_pg pgmodule.c -I__LIBPQ__ -I__INCLUDES__ -L__LIBPQ__ -lpq __EXTRA_LIBS__

View File

@ -680,7 +680,7 @@ static char connect__doc__[] =
static PyObject *
pgconnect(pgobject * self, PyObject * args, PyObject * dict)
{
static const char *kwlist[] = {"dbname", "host", "port", "opt",
static char *kwlist[] = {"dbname", "host", "port", "opt",
"tty", "user", "passwd", NULL};
char *pghost,
*pgopt,

View File

@ -1,30 +0,0 @@
#-------------------------------------------------------------------------
#
# Makefile
# Makefile for src/pl (procedural languages)
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/pl/Makefile,v 1.7 2000/04/11 17:42:28 momjian Exp $
#
#-------------------------------------------------------------------------
SRCDIR= ..
include $(SRCDIR)/Makefile.global
.DEFAULT all install clean dep depend distclean:
$(MAKE) -C plpgsql $@
ifeq ($(USE_TCL), true)
$(MAKE) -C tcl $@
endif
# does't work bjm 2000-04-11
#ifeq ($(USE_PERL), true)
# -$(MAKE) $(MFLAGS) plperl/Makefile
# -$(MAKE) $(MFLAGS) -C plperl $@
#endif
plperl/Makefile: plperl/Makefile.PL
cd plperl && $(PERL) Makefile.PL POLLUTE=1

42
src/pl/Makefile.in Normal file
View File

@ -0,0 +1,42 @@
#-------------------------------------------------------------------------
#
# Makefile for src/pl (procedural languages)
#
# Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/pl/Attic/Makefile.in,v 1.1 2000/06/10 18:02:09 petere Exp $
#
#-------------------------------------------------------------------------
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ../..
with_perl = @with_perl@
USE_TCL = @USE_TCL@
all install clean:
$(MAKE) -C plpgsql $@
ifeq ($(USE_TCL), true)
$(MAKE) -C tcl $@
endif
# Disabled because it doesn't work
#ifeq ($(with_perl), yes)
# $(MAKE) -C plperl $@
#endif
distclean maintainer-clean:
-$(MAKE) -C plpgsql clean
rm -f plpgsql/src/Makefile plpgsql/src/mklang.sql
ifeq ($(USE_TCL), true)
$(MAKE) -C tcl clean
endif
rm -f tcl/mkMakefile.tcldefs.sh
-$(MAKE) -C plperl $@
rm -f Makefile
.PHONY: all install clean distclean maintainer-clean

View File

@ -0,0 +1,40 @@
# $Header: /cvsroot/pgsql/src/pl/plperl/Attic/GNUmakefile.in,v 1.1 2000/06/10 18:02:11 petere Exp $
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ../../..
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
plperl_installdir = $(libdir)
mkinstalldirs = @mkinstalldirs@
PERL = @PERL@
PGSQL_INCLUDES = @PGSQL_INCLUDES@
all: Makefile
$(MAKE) -f $< all
Makefile: Makefile.PL
@plperl_installdir='$(plperl_installdir)' \
EXTRA_INCLUDES='-I$(top_srcdir)/src/include $(PGSQL_INCLUDES)' \
$(PERL) $< POLLUTE=1
install: Makefile installdirs
$(MAKE) -f $< install
installdirs:
$(mkinstalldirs) $(plperl_installdir)
clean:
-[ -f Makefile ] && $(MAKE) -f Makefile realclean
distclean maintainer-clean: clean
rm -f GNUmakefile
.PHONY: all install installdirs clean distclean maintainer-clean

View File

@ -15,13 +15,15 @@ if ($Config{'useshrplib'} ne 'true') {
# Dummy Makefile for use when we can't build plperl
all install:
@echo "Cannot build plperl because libperl is not a shared library; skipping it."
@echo "*****"; \
echo "* Cannot build PL/Perl because libperl is not a shared library." ; \
echo "* Skipped."; \
echo "*****"
clean distclean:
clean realclean:
rm -f Makefile
.DEFAULT dep depend:
EndOfMakefile
close(OUT);
exit(0);
@ -54,19 +56,11 @@ my $perllib = "-L$Config{archlibexp}/CORE -lperl";
WriteMakefile( 'NAME' => 'plperl',
dynamic_lib => { 'OTHERLDFLAGS' => "$opcode $perllib" } ,
INC => '-I$(SRCDIR)/include $(PGSQL_INCLUDES)',
INC => "$ENV{EXTRA_INCLUDES}",
XS => { 'SPI.xs' => 'SPI.c' },
OBJECT => 'plperl.o eloglvl.o SPI.o',
);
sub MY::post_initialize {
q[
SRCDIR=../../../src
include $(SRCDIR)/Makefile.global
];
}
sub MY::cflags {
package MY; # so that "SUPER" works right
@ -88,9 +82,9 @@ sub MY::cflags {
sub MY::install {
q[
qq[
install :: all
cp $(INST_DYNAMIC) $(LIBDIR)
cp \$(INST_DYNAMIC) $ENV{plperl_installdir}
];
}