Another round of those unportable config/build changes :-/

* Add option to build with OpenSSL out of the box. Fix thusly exposed
  bit rot. Although it compiles now, getting this to do something
  useful is left as an exercise.

* Fix Kerberos options to defer checking for required libraries until
  all the other libraries are checked for.

* Change default odbcinst.ini and krb5.srvtab path to PREFIX/etc.

* Install work around for Autoconf's install-sh relative path anomaly.
  Get rid of old INSTL_*_OPTS variables, now that we don't need them
  anymore.

* Use `gunzip -c' instead of g?zcat. Reportedly broke on AIX.

* Look for only one of readline.h or readline/readline.h, not both.

* Make check for PS_STRINGS cacheable. Don't test for the header files
  separately.

* Disable fcntl(F_SETLK) test on Linux.

* Substitute the standard GCC warnings set into CFLAGS in configure,
  don't add it on in Makefile.global.

* Sweep through contrib tree to teach makefiles standard semantics.

... and in completely unrelated news:

* Make postmaster.opts arbitrary options-aware. I still think we need to
  save the environment as well.
This commit is contained in:
Peter Eisentraut 2000-07-09 13:14:19 +00:00
parent b59c03f842
commit 74618e2b82
37 changed files with 1796 additions and 1975 deletions

2107
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,30 @@
dnl Process this file with autoconf to produce a configure script.
dnl Developers, please strive to achieve this order:
dnl
dnl 0. Initialization and options processing
dnl 1. Programs
dnl 2. Libraries
dnl 3. Header files
dnl 4. Types
dnl 5. Structures
dnl 6. Compiler characteristics
dnl 7. Functions, global variables
dnl 8. System services
dnl
dnl Read the Autoconf manual for details.
AC_INIT(src/backend/access/common/heaptuple.c)
AC_PREFIX_DEFAULT(/usr/local/pgsql)
AC_CONFIG_HEADER(src/include/config.h)
AC_PREREQ(2.13)
AC_CONFIG_AUX_DIR(`pwd`/config)
AC_CONFIG_AUX_DIR(config)
VERSION='7.1devel'
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(PG_VERSION, "$VERSION")
mkinstalldirs="\$(SHELL) \$(top_srcdir)/config/mkinstalldirs"
AC_SUBST(mkinstalldirs)
AC_CANONICAL_HOST
tas_file=dummy.s
@ -400,83 +412,99 @@ fi],
AC_SUBST(with_python)
dnl A note on the Kerberos and OpenSSL options:
dnl
dnl Optionally build with Kerberos 4 support
dnl
AC_MSG_CHECKING(whether to build with Kerberos 4 support)
dnl The user can give an argument to the option in order the specify
dnl the base path of the respective installation (what he specified
dnl perhaps as --prefix). If no argument is given ($withval is "yes")
dnl then we take the path where the package installs by default. This
dnl way the user doesn't have to use redundant --with-includes and
dnl --with-libraries options, but he can still use them if the layout
dnl is non-standard.
#
# Kerberos 4
#
AC_ARG_WITH(krb4, [ --with-krb4[=DIR] use Kerberos 4 [/usr/athena]],
[if test x"$withval" != x"no"; then
# If the user didn't give an argument, we take the Kerberos 4 default
# path /usr/athena. We look into lib/ and include/ for the Kerberos
# libraries and includes. If the user has a more complicated layout
# he can use --with-includes and --with-libraries.
if test x"$withval" = x"yes"; then
krb4dir=/usr/athena
if test x"$withval" != x"yes"; then
krb4_prefix=$withval
else
krb4dir=$withval
krb4_prefix=/usr/athena
fi
with_krb4=yes
AC_MSG_RESULT(yes)
if test -d $krb4dir; then
if test -d "$krb4dir/include"; then
INCLUDES="$INCLUDES -I$krb4dir/include"
else
with_krb4=no
fi],
[with_krb4=no])
AC_SUBST(with_krb4)
if test "$with_krb4" = yes ; then
AC_MSG_RESULT([building with Kerberos 4 support])
AC_DEFINE(KRB4, [], [Define if you are building with Kerberos 4 support.])
if test -d "$krb4_prefix"; then
if test -d "$krb4_prefix/include"; then
INCLUDES="$INCLUDES -I$krb4_prefix/include"
fi
if test -d "$krb4dir/lib"; then
krb_libdir="-L$krb4dir/lib"
if test -d "$krb4_prefix/lib"; then
krb_libdir="-L$krb4_prefix/lib"
LIBS="$krb_libdir $LIBS"
fi
fi
AC_CHECK_LIB(des, main, [], [AC_MSG_ERROR([library \`des' is required for Kerberos 4])])
AC_CHECK_LIB(krb, main, [], [AC_MSG_ERROR([library \`krb' is required for Kerberos 4])])
dnl Test for these libraries is below
KRB_LIBS="$krb_libdir -lkrb -ldes"
AC_DEFINE(KRB4,, [Define if you are building with Kerberos 4 support.])
else
AC_MSG_RESULT(no)
fi],
[AC_MSG_RESULT(no)])
AC_SUBST(with_krb4)
fi
dnl
dnl Optionally build with Kerberos 5 support
dnl
AC_MSG_CHECKING(whether to build with Kerberos 5 support)
#
# Kerberos 5
#
AC_ARG_WITH(krb5, [ --with-krb5[=DIR] use Kerberos 5 [/usr/athena]],
[if test x"$withval" != x"no"; then
if test x"$withval" = x"yes"; then
krb5dir=/usr/athena
if test x"$withval" != x"yes"; then
krb5_prefix=$withval
else
krb5dir=$withval
krb5_prefix=/usr/athena
fi
with_krb5=yes
AC_MSG_RESULT(yes)
if test -d $krb5dir; then
if test -d "$krb5dir/include"; then
INCLUDES="$INCLUDES -I$krb5dir/include"
else
with_krb5=no
fi],
[with_krb5=no])
AC_SUBST(with_krb5)
if test "$with_krb5" = yes ; then
AC_MSG_RESULT([building with Kerberos 5 support])
AC_DEFINE(KRB5,, [Define if you are building with Kerberos 5 support.])
if test -d $krb5_prefix; then
if test -d "$krb5_prefix/include"; then
INCLUDES="$INCLUDES -I$krb5_prefix/include"
fi
if test -d "$krb5dir/lib"; then
krb_libdir="-L$krb5dir/lib"
if test -d "$krb5_prefix/lib"; then
krb_libdir="-L$krb5_prefix/lib"
LIBS="$krb_libdir $LIBS"
fi
fi
AC_CHECK_LIB(com_err, main, [], [AC_MSG_ERROR([library \`com_err' is required for Kerberos 5])])
AC_CHECK_LIB(crypto, main, [], [AC_MSG_ERROR([library \`crypto' is required for Kerberos 5])])
AC_CHECK_LIB(krb5, main, [], [AC_MSG_ERROR([library \`krb5' is required for Kerberos 5])])
dnl Test for these libraries is below
KRB_LIBS="$krb_libdir -lkrb5 -lcrypto -lcom_err"
AC_DEFINE(KRB5,, [Define if you are building with Kerberos 5 support.])
else
AC_MSG_RESULT(no)
fi],
[AC_MSG_RESULT(no)])
AC_SUBST(with_krb5)
fi
# Using both Kerberos 4 and Kerberos 5 at the same time isn't going to work.
if test "$with_krb4" = yes && test "$with_krb5" = yes ; then
AC_MSG_ERROR([Kerberos 4 and Kerberos 5 support cannot be combined])
fi
dnl Necessary for special libpq link
AC_SUBST(KRB_LIBS)
dnl
dnl Kerberos configuration parameters
dnl
#
# Kerberos configuration parameters
#
AC_ARG_WITH(krb-srvnam, [ --with-krb-srvnam=NAME name of the Postgres service principal in Kerberos],
[if test x"$withval" = x"yes"; then
AC_MSG_ERROR([argument required for --with-krb-srvnam])
@ -492,14 +520,53 @@ AC_ARG_WITH(krb-srvtab, [ --with-krb-srvtab=FILE location of Kerberos server's
else
krb_srvtab=$withval
fi],
[if test x"$with_krb5" = x"yes"; then
krb_srvtab="FILE:/usr/local/postgres/krb5.keytab"
[if test "$with_krb5" = yes ; then
krb_srvtab='FILE:${sysconfdir}/krb5.keytab'
elif test "$with_krb4" = yes ; then
krb_srvtab='/etc/srvtab'
else
krb_srvtab="/etc/srvtab"
krb_srvtab=
fi])
AC_DEFINE_UNQUOTED(PG_KRB_SRVTAB, ["$krb_srvtab"], [The location of the Kerberos server's keytab file])
AC_SUBST(krb_srvtab)
#
# OpenSSL
#
AC_ARG_WITH(openssl, [ --with-openssl[=DIR] build with OpenSSL support [/usr/local/ssl]],
[if test x"$withval" != x"no" ; then
if test x"$withval" != x"yes" ; then
openssl_prefix=$withval
else
openssl_prefix=/usr/local/ssl
fi
with_openssl=yes
else
with_openssl=no
fi],
[with_openssl=no])
AC_SUBST(with_openssl)
if test "$with_openssl" = yes ; then
AC_MSG_RESULT([building with OpenSSL support])
AC_DEFINE([USE_SSL], [], [Define to build with (Open)SSL support])
if test -d "${openssl_prefix}/include" ; then
INCLUDES="$INCLUDES -I${openssl_prefix}/include"
fi
if test -d "${openssl_prefix}/lib" ; then
openssl_libdir="${openssl_prefix}/lib"
LIBS="$LIBS -L${openssl_prefix}/lib"
fi
fi
# OpenSSL and Kerberos 5 both have a `crypto' library, so if you want to
# use both of them you'll have to figure it out yourself.
if test "$with_openssl" = yes && test "$with_krb5" = yes ; then
AC_MSG_ERROR([OpenSSL and Kerberos 5 support cannot be combined])
fi
dnl
dnl Optionally enable the building of the ODBC driver
@ -524,14 +591,14 @@ AC_SUBST(enable_odbc)
dnl Allow for overriding the default location of the odbcinst.ini
dnl file which is normally ${datadir} (i.e., ${prefix}/share).
if test x"$enable_odbc" = x"yes" ; then
AC_ARG_WITH(odbcinst, [ --with-odbcinst=DIR default directory for odbcinst.ini [datadir]],
AC_ARG_WITH(odbcinst, [ --with-odbcinst=DIR default directory for odbcinst.ini [sysconfdir]],
[if test x"$with_odbcinst" = x"yes" || test x"$with_odbcinst" = x"no" ; then
AC_MSG_ERROR([You must supply an argument to the --with-odbcinst option.])
fi
odbcinst_ini_dir=$withval],
[odbcinst_ini_dir='${datadir}'])
[odbcinst_ini_dir='${sysconfdir}'])
else
odbcinst_ini_dir='${datadir}'
odbcinst_ini_dir='${sysconfdir}'
fi
AC_SUBST(odbcinst_ini_dir)
@ -628,37 +695,34 @@ fi],
AC_SUBST(with_CXX)
dnl Figure out how to invoke "install" and what install options to use.
# Figure out how to invoke "install" and what install options to use.
AC_PROG_INSTALL
INSTLOPTS="-m 444"
INSTL_EXE_OPTS="-m 555"
INSTL_SCRIPT_OPTS="-m 755"
INSTL_LIB_OPTS="-m 644"
INSTL_SHLIB_OPTS="-m 644"
dnl HPUX wants shared libs to be mode 555.
case "$host_os" in
hpux*)
INSTL_SHLIB_OPTS="-m 555" ;;
# When Autoconf chooses install-sh as install program it tries to generate
# a relative path to it in each makefile where it subsitutes it. This clashes
# with our Makefile.global concept. This workaround helps.
case $INSTALL in
*install-sh*) INSTALL='\${SHELL} \${top_srcdir}/config/install-sh -c';;
esac
AC_SUBST(INSTLOPTS)
AC_SUBST(INSTL_LIB_OPTS)
AC_SUBST(INSTL_SHLIB_OPTS)
AC_SUBST(INSTL_EXE_OPTS)
# Fix Autoconf's brain-dead defaults for script installs.
INSTALL_SCRIPT="\${INSTALL} -m 755"
dnl Fix autoconf's brain-dead defaults for script and shlib installs.
INSTALL_SCRIPT="\${INSTALL} $INSTL_SCRIPT_OPTS"
AC_SUBST(INSTALL_SCRIPT)
# HPUX wants shared libs to be mode 555. Add your platform's special
# needs here if necessary.
case $host_os in
hpux*) INSTL_SHLIB_OPTS="-m 555" ;;
*) INSTL_SHLIB_OPTS="-m 644" ;;
esac
INSTALL_SHLIB="\${INSTALL} $INSTL_SHLIB_OPTS"
AC_SUBST(INSTALL_SHLIB)
mkinstalldirs="\$(SHELL) \$(top_srcdir)/config/mkinstalldirs"
AC_SUBST(mkinstalldirs)
AC_PROG_AWK
AC_PROG_LEX
@ -678,15 +742,12 @@ broken as well.)
fi
AC_PROG_LN_S
AC_PROG_RANLIB
AC_PATH_PROG(find, find)
AC_PATH_PROG(tar, tar)
AC_PATH_PROGS(GZCAT, gzcat zcat, gzcat)
AC_CHECK_PROGS(PERL, perl,)
AC_PROG_YACC
AC_SUBST(YFLAGS)
AC_CHECK_LIB(z, main)
AC_CHECK_LIB(sfio, main)
AC_CHECK_LIB(ncurses, main, [], [AC_CHECK_LIB(curses, main)])
AC_CHECK_LIB(termcap, main)
@ -714,8 +775,29 @@ AC_CHECK_LIB(BSD, main)
AC_CHECK_LIB(gen, main)
AC_CHECK_LIB(PW, main)
AC_SEARCH_LIBS(crypt, crypt)
AC_CHECK_LIB(z, inflate)
if test "$with_krb4" = yes ; then
AC_CHECK_LIB(des, [des_encrypt], [], [AC_MSG_ERROR([library \`des' is required for Kerberos 4])])
AC_CHECK_LIB(krb, [krb_sendauth], [], [AC_MSG_ERROR([library \`krb' is required for Kerberos 4])])
fi
if test "$with_krb5" = yes ; then
AC_CHECK_LIB(com_err, main, [], [AC_MSG_ERROR([library \`com_err' is required for Kerberos 5])])
AC_CHECK_LIB(crypto, main, [], [AC_MSG_ERROR([library \`crypto' is required for Kerberos 5])])
AC_CHECK_LIB(krb5, main, [], [AC_MSG_ERROR([library \`krb5' is required for Kerberos 5])])
fi
if test "$with_openssl" = yes ; then
dnl Order matters!
AC_CHECK_LIB(crypto, [CRYPTO_new_ex_data], [], [AC_MSG_ERROR([library \`ssl' is required for OpenSSL])])
AC_CHECK_LIB(ssl, [SSL_library_init], [], [AC_MSG_ERROR([library \`ssl' is required for OpenSSL])])
fi
dnl
dnl Checks for header files.
dnl
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(arpa/inet.h)
@ -725,24 +807,38 @@ AC_CHECK_HEADERS(endian.h)
AC_CHECK_HEADERS(float.h)
AC_CHECK_HEADERS(fp_class.h)
AC_CHECK_HEADERS(getopt.h)
AC_CHECK_HEADERS(history.h)
AC_CHECK_HEADERS(ieeefp.h)
AC_CHECK_HEADERS(limits.h)
AC_CHECK_HEADERS(netdb.h)
AC_CHECK_HEADERS(netinet/in.h)
AC_CHECK_HEADERS(readline.h)
AC_CHECK_HEADERS(readline/history.h)
AC_CHECK_HEADERS(readline/readline.h)
AC_CHECK_HEADERS([readline/readline.h readline.h], [break])
AC_CHECK_HEADERS([readline/history.h history.h], [break])
AC_CHECK_HEADERS(sys/select.h)
AC_CHECK_HEADERS(termios.h)
AC_CHECK_HEADERS(unistd.h)
AC_CHECK_HEADERS(values.h)
AC_CHECK_HEADERS(sys/exec.h sys/pstat.h machine/vmparam.h)
AC_CHECK_HEADERS(sys/pstat.h)
AC_CHECK_HEADERS(sys/types.h sys/socket.h)
AC_CHECK_HEADERS(sys/param.h pwd.h)
if test "$with_krb4" = yes ; then
AC_CHECK_HEADER(krb.h, [], [AC_MSG_ERROR([header file <krb.h> is required for Kerberos 4])])
fi
if test "$with_krb5" = yes ; then
AC_CHECK_HEADER(krb5.h, [], [AC_MSG_ERROR([header file <krb5.h> is required for Kerberos 5])])
AC_CHECK_HEADER(com_err.h, [], [AC_MSG_ERROR([header file <com_err.h> is required for Kerberos 5])])
fi
if test "$with_openssl" = yes ; then
AC_CHECK_HEADER([openssl/ssl.h], [], [AC_MSG_ERROR([header file <openssl/ssl.h> is required for OpenSSL])])
AC_CHECK_HEADER([openssl/err.h], [], [AC_MSG_ERROR([header file <openssl/err.h> is required for OpenSSL])])
fi
dnl
dnl Checks for typedefs, structures, and compiler characteristics.
dnl
AC_C_CONST
AC_C_INLINE
AC_C_STRINGIZE
@ -762,6 +858,7 @@ PGAC_UNION_SEMUN
AC_MSG_CHECKING(for fcntl(F_SETLK))
if test "$os" != linux ; then
AC_TRY_LINK([#include <stdio.h>
#include <fcntl.h>],
[struct flock lck;
@ -770,6 +867,9 @@ AC_TRY_LINK([#include <stdio.h>
fcntl(0, F_SETLK, &lck);],
[AC_DEFINE(HAVE_FCNTL_SETLK) AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no))
else
AC_MSG_RESULT([broken on Linux])
fi
dnl Checks for library functions.
AC_FUNC_MEMCMP
@ -779,18 +879,18 @@ AC_CHECK_FUNCS(memmove sysconf)
AC_CHECK_FUNCS(sigprocmask waitpid setsid fcvt)
AC_CHECK_FUNCS(setproctitle pstat)
AC_MSG_CHECKING(for PS_STRINGS)
AC_TRY_LINK(
[#ifdef HAVE_MACHINE_VMPARAM_H
# include <machine/vmparam.h>
#endif
#ifdef HAVE_SYS_EXEC_H
# include <sys/exec.h>
#endif],
AC_CACHE_CHECK([for PS_STRINGS], [pgac_cv_var_PS_STRINGS],
[AC_TRY_LINK(
[#include <machine/vmparam.h>
#include <sys/exec.h>
],
[PS_STRINGS->ps_nargvstr = 1;
PS_STRINGS->ps_argvstr = "foo";],
[AC_MSG_RESULT(yes) AC_DEFINE(HAVE_PS_STRINGS)],
AC_MSG_RESULT(no))
[pgac_cv_var_PS_STRINGS=yes],
[pgac_cv_var_PS_STRINGS=no])])
if test "$pgac_cv_var_PS_STRINGS" = yes ; then
AC_DEFINE([HAVE_PS_STRINGS], [], [Define if the PS_STRINGS thing exists.])
fi
AC_CHECK_FUNCS(fpclass fp_class fp_class_d class)
dnl We use our snprintf.c emulation if either snprintf() or vsnprintf()
@ -1193,6 +1293,12 @@ See the file 'config.log' for further diagnostics.])
fi
# Wait with these until we're done so no tests fail because of too
# many warnings.
if test x"$GCC" = x"yes" ; then
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wmissing-declarations"
fi
dnl Finally ready to produce output files ...
AC_OUTPUT(

View File

@ -1,13 +1,12 @@
#
# The PostgreSQL contrib tree Makefile
#
# Portions Copyright (c) 1999-2000, PostgreSQL, Inc
#
# $Header: /cvsroot/pgsql/contrib/Makefile,v 1.5 2000/06/19 13:52:59 momjian Exp $
# $Header: /cvsroot/pgsql/contrib/Makefile,v 1.6 2000/07/09 13:12:57 petere Exp $
#
TOPDIR = ..
include Makefile.global
subdir = contrib
top_builddir = ..
include ../src/Makefile.global
WANTED_DIRS = array \
earthdistance \
@ -25,34 +24,22 @@ WANTED_DIRS = array \
spi \
string \
tips \
tools \
unixdate \
userlock \
vacuumlo
# odbc
all:
all .DEFAULT:
for dir in $(WANTED_DIRS); do \
if [ -e $$dir/Makefile ]; then \
$(MAKE) -C $$dir $@ ; \
fi; \
done
install:
../config/mkinstalldirs $(CONTRIB_BINDIR) $(CONTRIB_MODDIR) $(CONTRIB_DOCDIR) $(CONTRIB_SQLDIR) $(CONTRIB_EXAMPLESDIR)
for dir in $(WANTED_DIRS); do \
if [ -e $$dir/Makefile ]; then \
$(MAKE) -C $$dir $@ ; \
fi; \
done
$(INSTALL) $(INSTL_LIB_OPTS) Contrib.index $(CONTRIB_DOCDIR);
.DEFAULT:
for dir in $(WANTED_DIRS); do \
if [ -e $$dir/Makefile ]; then \
$(MAKE) -C $$dir $@ ; \
fi; \
done
$(INSTALL_DATA) Contrib.index $(docdir)/contrib

View File

@ -1,44 +0,0 @@
#-------------------------------------------------------------------------
#
# Makefile.global
# Build and install PostgreSQL contrib.
#
# Portions Copyright (c) 1999-2000, PostgreSQL, Inc
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/contrib/Attic/Makefile.global,v 1.2 2000/06/19 13:52:59 momjian Exp $
#
#-------------------------------------------------------------------------
SRCDIR = $(TOPDIR)/src
include $(SRCDIR)/Makefile.global
### ---------------------------------------------------------
### DELETE THIS PART if ../src/Makefile.global is standardize
### (has define all next definitions itself)
DOCDIR=$(POSTDOCDIR)
# not $PGDATA, but anything like '/usr/local/pgsql/share'
DATADIR=$(LIBDIR)
### ----------------------------------------------------------
# execute-able
CONTRIB_BINDIR = $(BINDIR)
# *.so
CONTRIB_MODDIR = $(LIBDIR)/modules
# *.doc
CONTRIB_DOCDIR = $(DOCDIR)/contrib
# *.sql
CONTRIB_SQLDIR = $(DATADIR)/sql
# *.examples
CONTRIB_EXAMPLESDIR = $(CONTRIB_DOCDIR)/examples
RM = rm -f
SED = sed

View File

@ -1,54 +1,38 @@
#
# $Header: /cvsroot/pgsql/contrib/array/Attic/Makefile,v 1.11 2000/07/04 16:16:43 momjian Exp $
# $Header: /cvsroot/pgsql/contrib/array/Attic/Makefile,v 1.12 2000/07/09 13:12:59 petere Exp $
#
TOPDIR=../..
subdir = contrib/array
top_builddir = ../..
include ../../src/Makefile.global
include ../Makefile.global
NAME = array_iterator
PROGRAM =
OBJS = $(NAME).o
DOCS = README.$(NAME)
SQLS = $(NAME).sql
BINS =
EXAMPLES=
MODS = $(NAME)$(DLSUFFIX)
NAME := array_iterator
SONAME := $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
OTHER_CLEAN = $(SQLS)
all: $(SONAME) $(NAME).sql
all: $(MODS) $(SQLS)
$(NAME).sql: $(NAME).sql.in
sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(SONAME):g' < $< > $@
%.sql: %.sql.in
$(SED) "s|MODULE_PATHNAME|$(CONTRIB_MODDIR)/$(@:.sql=$(DLSUFFIX))|" < $< > $@
install: all installdirs
$(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
$(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
$(INSTALL_SHLIB) $(SONAME) $(libdir)/contrib
install: install_doc install_sql install_mod
installdirs:
$(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir)/contrib
install_doc:
for inst_file in $(DOCS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
done
install_sql:
for inst_file in $(SQLS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_SQLDIR); \
done
install_mod:
for inst_file in $(MODS); do \
$(INSTALL) $(INSTL_SHLIB_OPTS) $$inst_file $(CONTRIB_MODDIR); \
done
uninstall:
rm -rf $(docdir)/contrib/README.$(NAME) $(datadir)/contrib/$(NAME).sql $(libdir)/contrib/$(SONAME)
clean distclean maintainer-clean:
rm -f $(SONAME) $(NAME).sql
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
clean:
$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
ifeq (depend,$(wildcard depend))
include depend
endif

View File

@ -1,53 +1,38 @@
#
# $Header: /cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.5 2000/07/04 16:16:44 momjian Exp $
# $Header: /cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.6 2000/07/09 13:13:00 petere Exp $
#
TOPDIR=../..
subdir = contrib/earthdistance
top_builddir = ../..
include ../../src/Makefile.global
include ../Makefile.global
NAME = earthdistance
PROGRAM =
OBJS = $(NAME).o
DOCS = README.$(NAME)
SQLS = $(NAME).sql
BINS =
EXAMPLES=
MODS = $(NAME)$(DLSUFFIX)
NAME := earthdistance
SONAME := $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
OTHER_CLEAN = $(SQLS)
all: $(SONAME) $(NAME).sql
all: $(MODS) $(SQLS)
$(NAME).sql: $(NAME).sql.in
sed -e 's:MODULE_PATHNAME:$(datadir)/contrib/$(SONAME):g' < $< > $@
%.sql: %.sql.in
$(SED) "s|MODULE_PATHNAME|$(CONTRIB_MODDIR)/$(@:.sql=$(DLSUFFIX))|" < $< > $@
install: all installdirs
$(INSTALL_SHLIB) $(SONAME) $(libdir)/contrib
$(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
$(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
install: install_doc install_sql install_mod
installdirs:
$(mkinstalldirs) $(libdir)/contrib $(datadir)/contrib $(docdir)/contrib
install_doc:
for inst_file in $(DOCS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
done
uninstall:
rm -f $(libdir)/contrib/$(SONAME) $(datadir)/contrib/$(NAME).sql $(docdir)/contrib/README.$(NAME)
install_sql:
for inst_file in $(SQLS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_SQLDIR); \
done
install_mod:
for inst_file in $(MODS); do \
$(INSTALL) $(INSTL_SHLIB_OPTS) $$inst_file $(CONTRIB_MODDIR); \
done
clean distclean maintainer-clean:
rm -f $(SONAME) $(NAME).sql
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
clean:
$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
ifeq (depend,$(wildcard depend))
include depend
endif

View File

@ -1,50 +1,26 @@
#
# $Header: /cvsroot/pgsql/contrib/findoidjoins/Attic/Makefile,v 1.7 2000/06/19 13:53:22 momjian Exp $
# $Header: /cvsroot/pgsql/contrib/findoidjoins/Attic/Makefile,v 1.8 2000/07/09 13:13:03 petere Exp $
#
TOPDIR=../..
subdir = contrib/findoidjoins
top_builddir = ../..
include ../../src/Makefile.global
include ../Makefile.global
CFLAGS += -I$(LIBPGEASYDIR) -I$(LIBPQDIR)
LIBS += $(LIBPGEASY)
NAME = findoidjoins
all: findoidjoins
PROGRAM = $(NAME)
OBJS = $(NAME).o
DOCS = README.$(NAME)
SQLS =
BINS = $(PROGRAM) make_oidjoins_check
EXAMPLES=
MODS =
install: all installdirs
$(INSTALL_PROGRAM) findoidjoins$(X) $(bindir)
$(INSTALL_SCRIPT) make_oidjoins_check $(bindir)
$(INSTALL_DATA) README.findoidjoins $(docdir)/contrib
CFLAGS += -I$(LIBPGEASYDIR) -I$(LIBPQDIR)
installdirs:
$(mkinstalldirs) $(bindir) $(docdir)/contrib
OTHER_CLEAN =
uninstall:
rm -f $(bindir)/findoidjoins$(X) $(bindir)/make_oidjoins_check $(docdir)/contrib/README.findoidjoins
all: $(PROGRAM)
$(PROGRAM): $(OBJS) $(LIBPGEASYDIR)/libpgeasy.a
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBPGEASY)
install: install_doc nstall_bin
install_doc:
for inst_file in $(DOCS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
done
install_bin:
for inst_file in $(BINS); do \
$(INSTALL) $(INSTL_EXE_OPTS) $$inst_file $(CONTRIB_BINDIR); \
done
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
clean:
$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
ifeq (depend,$(wildcard depend))
include depend
endif
clean distclean maintainer-clean:
rm -f findoidjoins$(X)

View File

@ -1,58 +1,40 @@
#
# $Header: /cvsroot/pgsql/contrib/fulltextindex/Attic/Makefile,v 1.6 2000/07/04 16:16:48 momjian Exp $
# $Header: /cvsroot/pgsql/contrib/fulltextindex/Attic/Makefile,v 1.7 2000/07/09 13:13:07 petere Exp $
#
TOPDIR=../..
subdir = contrib/fulltextindex
top_builddir = ../..
include ../../src/Makefile.global
include ../Makefile.global
NAME = fti
PROGRAM =
OBJS = $(NAME).o
DOCS = README.$(NAME)
SQLS = $(NAME).sql
BINS = fti.pl
EXAMPLES=
MODS = $(NAME)$(DLSUFFIX)
NAME := fti
SONAME := $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
OTHER_CLEAN = $(SQLS)
all: $(SONAME) $(NAME).sql
all: $(MODS) $(SQLS)
$(NAME).sql: $(NAME).sql.in
sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(SONAME):g' < $< > $@
%.sql: %.sql.in
$(SED) "s|MODULE_PATHNAME|$(CONTRIB_MODDIR)/$(@:.sql=$(DLSUFFIX))|" < $< > $@
install: all installdirs
$(INSTALL_SCRIPT) fti.pl $(bindir)
$(INSTALL_SHLIB) $(SONAME) $(libdir)/contrib
$(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
$(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
install: install_doc install_sql install_mod install_bin
installdirs:
$(mkinstalldirs) $(bindir) $(libdir)/contrib $(datadir)/contrib $(docdir)/contrib
install_doc:
for inst_file in $(DOCS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
done
uninstall:
rm -f $(bindir)/fti.pl $(libdir)/contrib/$(SONAME) \
$(datadir)/contrib/$(NAME).sql $(docdir)/contrib/README.$(NAME)
install_sql:
for inst_file in $(SQLS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_SQLDIR); \
done
install_mod:
for inst_file in $(MODS); do \
$(INSTALL) $(INSTL_SHLIB_OPTS) $$inst_file $(CONTRIB_MODDIR); \
done
install_bin:
for inst_file in $(BINS); do \
$(INSTALL) $(INSTL_EXE_OPTS) $$inst_file $(CONTRIB_BINDIR); \
done
clean distclean maintainer-clean:
rm -f $(SONAME) $(NAME).sql
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
clean:
$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
ifeq (depend,$(wildcard depend))
include depend
endif

View File

@ -1,54 +1,38 @@
#
# $Header: /cvsroot/pgsql/contrib/isbn_issn/Attic/Makefile,v 1.6 2000/07/04 16:16:53 momjian Exp $
# $Header: /cvsroot/pgsql/contrib/isbn_issn/Attic/Makefile,v 1.7 2000/07/09 13:13:10 petere Exp $
#
TOPDIR=../..
subdir = contrib/isbn_issn
top_builddir = ../..
include ../../src/Makefile.global
include ../Makefile.global
NAME = isbn_issn
PROGRAM =
OBJS = $(NAME).o
DOCS = README.$(NAME)
SQLS = $(NAME).sql
BINS =
EXAMPLES=
MODS = $(NAME)$(DLSUFFIX)
NAME := isbn_issn
SONAME := $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
OTHER_CLEAN = $(SQLS)
all: $(SONAME) $(NAME).sql
all: $(MODS) $(SQLS)
$(NAME).sql: $(NAME).sql.in
sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(SONAME):g' < $< > $@
install: all installdirs
$(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
$(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
$(INSTALL_SHLIB) $(SONAME) $(libdir)/contrib
%.sql: %.sql.in
$(SED) "s|MODULE_PATHNAME|$(CONTRIB_MODDIR)/$(@:.sql=$(DLSUFFIX))|" < $< > $@
installdirs:
$(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir)/contrib
install: install_doc install_sql install_mod
uninstall:
rm -rf $(docdir)/contrib/README.$(NAME) $(datadir)/contrib/$(NAME).sql $(libdir)/contrib/$(SONAME)
install_doc:
for inst_file in $(DOCS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
done
install_sql:
for inst_file in $(SQLS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_SQLDIR); \
done
install_mod:
for inst_file in $(MODS); do \
$(INSTALL) $(INSTL_SHLIB_OPTS) $$inst_file $(CONTRIB_MODDIR); \
done
clean distclean maintainer-clean:
rm -f $(SONAME) $(NAME).sql
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
clean:
$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
ifeq (depend,$(wildcard depend))
include depend
endif

View File

@ -1,40 +0,0 @@
#
# $Header: /cvsroot/pgsql/contrib/linux/Attic/Makefile,v 1.2 2000/06/19 13:53:41 momjian Exp $
#
TOPDIR=../..
include ../Makefile.global
NAME =
PROGRAM =
OBJS =
DOCS =
SQLS =
BINS =
BINS = postgres.init.csh postgres.init.sh
EXAMPLES=
MODS =
OTHER_CLEAN =
all:
install: install_bin
install_bin:
for inst_file in $(BINS); do \
$(INSTALL) $(INSTL_EXE_OPTS) $$inst_file $(CONTRIB_BINDIR); \
done
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
clean:
$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
ifeq (depend,$(wildcard depend))
include depend
endif

View File

@ -1,19 +1,15 @@
#
# $Header: /cvsroot/pgsql/contrib/lo/Makefile,v 1.6 2000/07/04 16:16:54 momjian Exp $
# $Header: /cvsroot/pgsql/contrib/lo/Makefile,v 1.7 2000/07/09 13:13:14 petere Exp $
#
TOPDIR=../..
subdir = contrib/lo
top_builddir = ../..
include ../../src/Makefile.global
include ../Makefile.global
NAME := lo
SONAME := $(NAME)$(DLSUFFIX)
NAME = lo
PROGRAM =
OBJS = $(NAME).o
DOCS = README.$(NAME)
SQLS = $(NAME).sql lo_drop.sql lo_test.sql
BINS =
EXAMPLES=
MODS = $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
@ -22,39 +18,31 @@ ifdef REFINT_VERBOSE
CFLAGS+= -DREFINT_VERBOSE
endif
OTHER_CLEAN = $(SQLS)
all: $(SONAME) $(NAME).sql
all: $(MODS) $(SQLS)
$(NAME).sql: $(NAME).sql.in
sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(SONAME):g' < $< > $@
install: all installdirs
$(INSTALL_SHLIB) $(SONAME) $(libdir)/contrib
$(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
$(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
$(INSTALL_DATA) lo_drop.sql $(datadir)/contrib
$(INSTALL_DATA) lo_test.sql $(datadir)/contrib
%.sql: %.sql.in
$(SED) "s|MODULE_PATHNAME|$(CONTRIB_MODDIR)/$(@:.sql=$(DLSUFFIX))|" < $< > $@
installdirs:
$(mkinstalldirs) $(libdir)/contrib $(docdir)/contrib $(datadir)/contrib
uninstall:
rm -f $(libdir)/contrib/$(SONAME) $(docdir)/contrib/README.$(NAME) \
$(addprefix $(datadir)/contrib/, $(NAME).sql lo_drop.sql lo_test.sql)
install: install_doc install_sql install_mod
install_doc:
for inst_file in $(DOCS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
done
install_sql:
for inst_file in $(SQLS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_SQLDIR); \
done
install_mod:
for inst_file in $(MODS); do \
$(INSTALL) $(INSTL_SHLIB_OPTS) $$inst_file $(CONTRIB_MODDIR); \
done
clean distclean maintainer-clean:
rm -f $(SONAME) $(NAME).sql
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
clean:
$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
ifeq (depend,$(wildcard depend))
include depend
endif

View File

@ -1,35 +1,30 @@
#
# $Header: /cvsroot/pgsql/contrib/mSQL-interface/Attic/Makefile,v 1.3 2000/06/19 13:53:47 momjian Exp $
# $Header: /cvsroot/pgsql/contrib/mSQL-interface/Attic/Makefile,v 1.4 2000/07/09 13:13:17 petere Exp $
#
TOPDIR=../..
subdir = contrib/mSQL-interface
top_builddir = ../..
include ../../src/Makefile.global
include ../Makefile.global
NAME := mpgsql
SO_MAJOR_VERSION := 0
SO_MINOR_VERSION := 0
OBJS := mpgsql.o
NAME = mpgsql
CFLAGS += -I$(LIBPQDIR)
PROGRAM =
OBJS =
DOCS = README.$(NAME) $(NAME).c
SQLS =
BINS =
EXAMPLES=
MODS =
include $(top_srcdir)/src/Makefile.shlib
OTHER_CLEAN =
all: all-lib
all::
install: all installdirs install-lib
$(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
install: install_doc
installdirs:
$(mkinstalldirs) $(libdir) $(docdir)/contrib
install_doc:
for inst_file in $(DOCS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
done
uninstall: uninstall-lib
rm -f $(docdir)/contrib/README.$(NAME)
clean:
$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
ifeq (depend,$(wildcard depend))
include depend
endif
clean distclean maintainer-clean: clean-lib
rm -f $(OBJS)

View File

@ -1,53 +1,38 @@
#
# $Header: /cvsroot/pgsql/contrib/miscutil/Attic/Makefile,v 1.11 2000/07/04 16:16:59 momjian Exp $
# $Header: /cvsroot/pgsql/contrib/miscutil/Attic/Makefile,v 1.12 2000/07/09 13:13:20 petere Exp $
#
TOPDIR=../..
subdir = contrib/miscutil
top_builddir = ../..
include ../../src/Makefile.global
include ../Makefile.global
NAME = misc_utils
PROGRAM =
OBJS = $(NAME).o
DOCS = README.$(NAME)
SQLS = $(NAME).sql
BINS =
EXAMPLES=
MODS = $(NAME)$(DLSUFFIX)
NAME := misc_utils
SONAME := $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
OTHER_CLEAN = $(SQLS)
all: $(SONAME) $(NAME).sql
all: $(MODS) $(SQLS)
$(NAME).sql: $(NAME).sql.in
sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(SONAME):g' < $< > $@
%.sql: %.sql.in
$(SED) "s|MODULE_PATHNAME|$(CONTRIB_MODDIR)/$(@:.sql=$(DLSUFFIX))|" < $< > $@
install: all installdirs
$(INSTALL_SHLIB) $(SONAME) $(libdir)/contrib
$(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
$(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
install: install_doc install_sql install_mod
installdirs:
$(mkinstalldirs) $(libdir)/contrib $(datadir)/contrib $(docdir)/contrib
install_doc:
for inst_file in $(DOCS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
done
uninstall:
rm -f $(libdir)/contrib/$(SONAME) $(datadir)/contrib/$(NAME).sql $(docdir)/contrib/README.$(NAME)
install_sql:
for inst_file in $(SQLS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_SQLDIR); \
done
install_mod:
for inst_file in $(MODS); do \
$(INSTALL) $(INSTL_SHLIB_OPTS) $$inst_file $(CONTRIB_MODDIR); \
done
clean distclean maintainer-clean:
rm -f $(SONAME) $(NAME).sql
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
clean:
$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
ifeq (depend,$(wildcard depend))
include depend
endif

View File

@ -1,53 +1,38 @@
#
# $Header: /cvsroot/pgsql/contrib/noupdate/Attic/Makefile,v 1.4 2000/07/04 16:17:03 momjian Exp $
# $Header: /cvsroot/pgsql/contrib/noupdate/Attic/Makefile,v 1.5 2000/07/09 13:13:24 petere Exp $
#
TOPDIR=../..
subdir = contrib/noupdate
top_builddir = ../..
include ../../src/Makefile.global
include ../Makefile.global
NAME = noup
PROGRAM =
OBJS = $(NAME).o
DOCS = README.$(NAME)
SQLS = $(NAME).sql
BINS =
EXAMPLES=
MODS = $(NAME)$(DLSUFFIX)
NAME := noup
SONAME := $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
OTHER_CLEAN = $(SQLS)
all: $(SONAME) $(NAME).sql
all: $(MODS) $(SQLS)
$(NAME).sql: $(NAME).sql.in
sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(SONAME):g' < $< > $@
%.sql: %.sql.in
$(SED) "s|MODULE_PATHNAME|$(CONTRIB_MODDIR)/$(@:.sql=$(DLSUFFIX))|" < $< > $@
install: all installdirs
$(INSTALL_SHLIB) $(SONAME) $(libdir)/contrib
$(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
$(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
install: install_doc install_sql install_mod
installdirs:
$(mkinstalldirs) $(libdir)/contrib $(datadir)/contrib $(docdir)/contrib
install_doc:
for inst_file in $(DOCS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
done
uninstall:
rm -f $(libdir)/contrib/$(SONAME) $(datadir)/contrib/$(NAME).sql $(docdir)/contrib/README.$(NAME)
install_sql:
for inst_file in $(SQLS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_SQLDIR); \
done
install_mod:
for inst_file in $(MODS); do \
$(INSTALL) $(INSTL_SHLIB_OPTS) $$inst_file $(CONTRIB_MODDIR); \
done
clean distclean maintainer-clean:
rm -f $(SONAME) $(NAME).sql
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
clean:
$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
ifeq (depend,$(wildcard depend))
include depend
endif

View File

@ -1,50 +1,35 @@
#
# $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/Makefile,v 1.4 2000/06/19 13:54:01 momjian Exp $
# $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/Makefile,v 1.5 2000/07/09 13:13:24 petere Exp $
#
TOPDIR=../..
subdir = contrib/pg_dumplo
top_builddir = ../..
include ../../src/Makefile.global
include ../Makefile.global
NAME = pg_dumplo
PROGRAM = $(NAME)
OBJS = main.o lo_export.o lo_import.o utils.o
DOCS = README.$(NAME)
SQLS =
BINS = $(PROGRAM)
EXAMPLES=
MODS =
CFLAGS += -I$(LIBPQDIR)
OTHER_CLEAN =
all: pg_dumplo
all: $(PROGRAM)
$(PROGRAM): $(OBJS) $(LIBPQDIR)/libpq.a
pg_dumplo: $(OBJS) $(LIBPQDIR)/libpq.a
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBPQ)
install: install_doc install_bin
install: all installdirs
$(INSTALL_PROGRAM) pg_dumplo$(X) $(bindir)
$(INSTALL_DATA) README.pg_dumplo $(docdir)/contrib
install_doc:
for inst_file in $(DOCS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
done
installdirs:
$(mkinstalldirs) $(bindir) $(docdir)/contrib
install_bin:
for inst_file in $(BINS); do \
$(INSTALL) $(INSTL_EXE_OPTS) $$inst_file $(CONTRIB_BINDIR); \
done
uninstall:
rm -f $(bindir)/pg_dumplo$(X) $(docdir)/contrib/README.pg_dumplo
clean distclean maintainer-clean:
rm -f pg_dumplo $(OBJS)
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
clean:
$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
ifeq (depend,$(wildcard depend))
include depend
endif

View File

@ -1,48 +1,26 @@
#
# $Header: /cvsroot/pgsql/contrib/pgbench/Makefile,v 1.4 2000/06/19 13:54:09 momjian Exp $
# $Header: /cvsroot/pgsql/contrib/pgbench/Makefile,v 1.5 2000/07/09 13:13:29 petere Exp $
#
TOPDIR=../..
subdir = contrib/pgbench
top_builddir = ../..
include ../../src/Makefile.global
include ../Makefile.global
CFLAGS += -I$(LIBPQDIR)
LIBS += $(LIBPQ)
NAME = pgbench
all: pgbench
PROGRAM = $(NAME)
OBJS = $(NAME).o
DOCS = README.$(NAME) README.$(NAME)_jis
SQLS =
BINS = $(PROGRAM)
EXAMPLES=
MODS =
install: all installdirs
$(INSTALL_PROGRAM) pgbench$(X) $(bindir)
$(INSTALL_DATA) README.pgbench $(docdir)/contrib
$(INSTALL_DATA) README.pgbench_jis $(docdir)/contrib
CFLAGS += -I$(LIBPQDIR)
installdirs:
$(mkinstalldirs) $(bindir) $(docdir)/contrib
OTHER_CLEAN =
uninstall:
rm -f $(bindir)/pgbench$(X) $(docdir)/contrib/README.pgbench $(docdir)/contrib/README.pgbench_jis
all: $(PROGRAM)
$(PROGRAM): $(OBJS) $(LIBPQDIR)/libpq.a
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBPQ)
install: install_doc install_bin
install_doc:
for inst_file in $(DOCS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
done
install_bin:
for inst_file in $(BINS); do \
$(INSTALL) $(INSTL_EXE_OPTS) $$inst_file $(CONTRIB_BINDIR); \
done
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
clean:
$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
ifeq (depend,$(wildcard depend))
include depend
endif
clean distclean maintainer-clean:
rm -f pgbench$(X)

View File

@ -1,54 +1,38 @@
#
# $Header: /cvsroot/pgsql/contrib/soundex/Attic/Makefile,v 1.6 2000/07/04 16:17:08 momjian Exp $
# $Header: /cvsroot/pgsql/contrib/soundex/Attic/Makefile,v 1.7 2000/07/09 13:13:33 petere Exp $
#
TOPDIR=../..
subdir = contrib/soundex
top_builddir = ../..
include ../../src/Makefile.global
include ../Makefile.global
NAME = soundex
PROGRAM =
OBJS = $(NAME).o
DOCS = README.$(NAME)
SQLS = $(NAME).sql
BINS =
EXAMPLES=
MODS = $(NAME)$(DLSUFFIX)
NAME := soundex
SONAME := $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
OTHER_CLEAN = $(SQLS)
all: $(SONAME) $(NAME).sql
all: $(MODS) $(SQLS)
$(NAME).sql: $(NAME).sql.in
sed -e 's:MODULE_PATHNAME:$(datadir)/contrib/$(SONAME):g' < $< > $@
install: all installdirs
$(INSTALL_SHLIB) $(SONAME) $(libdir)/contrib
$(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
$(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
%.sql: %.sql.in
$(SED) "s|MODULE_PATHNAME|$(CONTRIB_MODDIR)/$(@:.sql=$(DLSUFFIX))|" < $< > $@
installdirs:
$(mkinstalldirs) $(libdir)/contrib $(datadir)/contrib $(docdir)/contrib
install: install_doc install_sql install_mod
uninstall:
rm -f $(libdir)/contrib/$(SONAME) $(datadir)/contrib/$(NAME).sql $(docdir)/contrib/README.$(NAME)
install_doc:
for inst_file in $(DOCS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
done
install_sql:
for inst_file in $(SQLS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_SQLDIR); \
done
install_mod:
for inst_file in $(MODS); do \
$(INSTALL) $(INSTL_SHLIB_OPTS) $$inst_file $(CONTRIB_MODDIR); \
done
clean distclean maintainer-clean:
rm -f $(SONAME) $(NAME).sql
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
clean:
$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
ifeq (depend,$(wildcard depend))
include depend
endif

View File

@ -1,19 +1,15 @@
#
# $Header: /cvsroot/pgsql/contrib/spi/Makefile,v 1.16 2000/07/04 16:17:11 momjian Exp $
# $Header: /cvsroot/pgsql/contrib/spi/Makefile,v 1.17 2000/07/09 13:13:36 petere Exp $
#
TOPDIR=../..
subdir = contrib/spi
top_builddir = ../..
include ../../src/Makefile.global
include ../Makefile.global
NAME =
PROGRAM =
OBJS = autoinc.o insert_username.o moddatetime.o refint.o timetravel.o
DOCS = README.spi
SQLS = $(OBJS:.o=.sql)
BINS =
EXAMPLES= $(OBJS:.o=.example) new_example.example
EXAMPLES= $(OBJS:.o=.example)
MODS = $(OBJS:.o=$(DLSUFFIX))
CFLAGS += -I. $(CFLAGS_SL)
@ -22,43 +18,36 @@ ifdef REFINT_VERBOSE
CFLAGS+= -DREFINT_VERBOSE
endif
OTHER_CLEAN = $(SQLS)
all: $(MODS) $(SQLS)
%.sql: %.sql.in
$(SED) "s|MODULE_PATHNAME|$(CONTRIB_MODDIR)/$(@:.sql=$(DLSUFFIX))|" < $< > $@
sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(@:.sql=$(DLSUFFIX)):g' < $< > $@
install: install_doc install_sql install_mod install_example
install_doc:
for inst_file in $(DOCS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
done
install_sql:
install: all installdirs
for inst_file in $(SQLS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_SQLDIR); \
$(INSTALL_DATA) $$inst_file $(datadir)/contrib || exit; \
done
install_mod:
for inst_file in $(MODS); do \
$(INSTALL) $(INSTL_SHLIB_OPTS) $$inst_file $(CONTRIB_MODDIR); \
$(INSTALL_SHLIB) $$inst_file $(libdir)/contrib || exit; \
done
for inst_file in $(EXAMPLES) README.spi; do \
$(INSTALL_DATA) $$inst_file $(docdir)/contrib/spi || exit; \
done
install_example:
for inst_file in $(EXAMPLES); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_EXAMPLESDIR); \
done
installdirs:
$(mkinstalldirs) $(datadir)/contrib $(libdir)/contrib $(docdir)/contrib/spi
uninstall:
rm -f $(addprefix $(datadir)/contrib/, $(SQLS)) \
$(addprefix $(libdir)/contrib/, $(MODS)) \
$(addprefix $(docdir)/contrib/spi/, $(EXAMPLES) README.spi)
clean distclean maintainer-clean:
rm -f $(MODS) $(SQLS) $(OBJS)
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
clean:
$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
ifeq (depend,$(wildcard depend))
include depend
endif

View File

@ -1,58 +1,38 @@
#
# $Header: /cvsroot/pgsql/contrib/statmath/Attic/Makefile,v 1.1 2000/07/04 14:36:03 wieck Exp $
# $Header: /cvsroot/pgsql/contrib/statmath/Attic/Makefile,v 1.2 2000/07/09 13:13:41 petere Exp $
#
TOPDIR=../..
subdir = contrib/statmath
top_builddir = ../..
include ../../src/Makefile.global
include ../Makefile.global
NAME = statmath
PROGRAM =
OBJS = $(NAME).o
DOCS = README.$(NAME)
SQLS = $(NAME).sql
BINS =
EXAMPLES=
MODS = $(NAME)$(DLSUFFIX)
NAME := statmath
SONAME := $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
OTHER_CLEAN = $(SQLS)
all: $(SONAME) $(NAME).sql
all: $(MODS) $(SQLS)
$(NAME).sql: $(NAME).sql.in
sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(SONAME):g' < $< > $@
%.sql: %.sql.in
$(SED) "s|MODULE_PATHNAME|$(CONTRIB_MODDIR)/$(NAME)$(DLSUFFIX)|" < $< > $@
install: all installdirs
$(INSTALL_SHLIB) $(SONAME) $(libdir)/contrib
$(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
$(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
install: install_doc install_sql install_mod install_bin
installdirs:
$(mkinstalldirs) $(libdir)/contrib $(datadir)/contrib $(docdir)/contrib
install_doc:
for inst_file in $(DOCS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
done
uninstall:
rm -f $(libdir)/contrib/$(SONAME) $(datadir)/contrib/$(NAME).sql $(docdir)/contrib/README.$(NAME)
install_sql:
for inst_file in $(SQLS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_SQLDIR); \
done
install_mod:
for inst_file in $(MODS); do \
$(INSTALL) $(INSTL_SHLIB_OPTS) $$inst_file $(CONTRIB_MODDIR); \
done
install_bin:
for inst_file in $(BINS); do \
$(INSTALL) $(INSTL_EXE_OPTS) $$inst_file $(CONTRIB_BINDIR); \
done
clean:
rm -f $(SONAME) $(NAME).sql
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
clean:
$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
ifeq (depend,$(wildcard depend))
include depend
endif

View File

@ -1,54 +1,38 @@
#
# $Header: /cvsroot/pgsql/contrib/string/Attic/Makefile,v 1.11 2000/07/04 16:17:17 momjian Exp $
# $Header: /cvsroot/pgsql/contrib/string/Attic/Makefile,v 1.12 2000/07/09 13:13:43 petere Exp $
#
TOPDIR=../..
subdir = contrib/string
top_builddir = ../..
include ../../src/Makefile.global
include ../Makefile.global
NAME = string_io
PROGRAM =
OBJS = $(NAME).o
DOCS = README.$(NAME)
SQLS = $(NAME).sql
BINS =
EXAMPLES=
MODS = $(NAME)$(DLSUFFIX)
NAME := string_io
SONAME := $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
OTHER_CLEAN = $(SQLS)
all: $(MODS) $(SQLS)
all: $(SONAME) $(NAME).sql
%.sql: %.sql.in
$(SED) "s|MODULE_PATHNAME|$(CONTRIB_MODDIR)/$(@:.sql=$(DLSUFFIX))|" < $< > $@
sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(@:.sql=$(DLSUFFIX)):g' < $< > $@
install: install_doc install_sql install_mod
install: all installdirs
$(INSTALL_SHLIB) $(SONAME) $(libdir)/contrib
$(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
$(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
install_doc:
for inst_file in $(DOCS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
done
installdirs:
$(mkinstalldirs) $(libdir)/contrib $(datadir)/contrib $(docdir)/contrib
install_sql:
for inst_file in $(SQLS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_SQLDIR); \
done
uninstall:
rm -f $(libdir)/contrib/$(SONAME) $(datadir)/contrib/$(NAME).sql $(docdir)/contrib/README.$(NAME)
install_mod:
for inst_file in $(MODS); do \
$(INSTALL) $(INSTL_SHLIB_OPTS) $$inst_file $(CONTRIB_MODDIR); \
done
clean distclean maintainer-clean:
rm -f $(SONAME) $(NAME).sql
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
clean:
$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
ifeq (depend,$(wildcard depend))
include depend
endif

View File

@ -1,31 +1,18 @@
#
# $Header: /cvsroot/pgsql/contrib/tips/Attic/Makefile,v 1.3 2000/06/19 13:54:31 momjian Exp $
# $Header: /cvsroot/pgsql/contrib/tips/Attic/Makefile,v 1.4 2000/07/09 13:13:43 petere Exp $
#
TOPDIR=../..
subdir = contrib/tips
top_builddir = ../..
include ../../src/Makefile.global
include ../Makefile.global
all:
NAME =
install: installdirs
$(INSTALL_DATA) README.apachelog $(docdir)/contrib
PROGRAM =
OBJS =
DOCS = README.apachelog
SQLS =
BINS =
EXAMPLES=
MODS =
all::
install: install_doc
install_doc:
$(TOPDIR)/config/mkinstalldirs $(CONTRIB_DOCDIR)/tips
for inst_file in $(DOCS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR)/tips; \
done
clean:
$(RM) *~
installdirs:
$(mkinstalldirs) $(docdir)/contrib
uninstall:
rm -f $(docdir)/contrib/README.apachelog

View File

@ -1,21 +0,0 @@
#
# $Header: /cvsroot/pgsql/contrib/tools/Attic/Makefile,v 1.3 2000/06/19 13:54:37 momjian Exp $
#
TOPDIR=../..
include ../Makefile.global
NAME =
PROGRAM =
OBJS =
DOCS =
SQLS =
BINS =
EXAMPLES=
MODS =
clean:
$(RM) *~

View File

@ -1,30 +1,18 @@
#
# $Header: /cvsroot/pgsql/contrib/unixdate/Attic/Makefile,v 1.2 2000/06/19 13:54:38 momjian Exp $
# $Header: /cvsroot/pgsql/contrib/unixdate/Attic/Makefile,v 1.3 2000/07/09 13:13:50 petere Exp $
#
TOPDIR=../..
subdir = contrib/unixdate
top_builddir = ../..
include ../../src/Makefile.global
include ../Makefile.global
all:
NAME = unixdate
install: installdirs
$(INSTALL_DATA) unixdate.sql $(datadir)/contrib
PROGRAM =
OBJS =
DOCS =
SQLS = $(NAME).sql
BINS =
EXAMPLES=
MODS =
all::
install: install_sql
install_sql:
for inst_file in $(SQLS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_SQLDIR); \
done
clean:
$(RM) *~
uninstall:
rm -f $(datadir)/contrib/unixdate.sql
installdirs:
$(mkinstalldirs) $(datadir)/contrib

View File

@ -1,53 +1,38 @@
#
# $Header: /cvsroot/pgsql/contrib/userlock/Attic/Makefile,v 1.11 2000/07/04 16:17:21 momjian Exp $
# $Header: /cvsroot/pgsql/contrib/userlock/Attic/Makefile,v 1.12 2000/07/09 13:13:52 petere Exp $
#
TOPDIR=../..
subdir = contrib/userlock
top_builddir = ../..
include ../../src/Makefile.global
include ../Makefile.global
NAME = user_locks
PROGRAM =
OBJS = $(NAME).o
DOCS = README.$(NAME)
SQLS = $(NAME).sql
BINS =
EXAMPLES=
MODS = $(NAME)$(DLSUFFIX)
NAME := user_locks
SONAME := $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
OTHER_CLEAN = $(SQLS)
all: $(MODS) $(SQLS)
all: $(SONAME) $(NAME).sql
%.sql: %.sql.in
$(SED) "s|MODULE_PATHNAME|$(CONTRIB_MODDIR)/$(@:.sql=$(DLSUFFIX))|" < $< > $@
sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(@:.sql=$(DLSUFFIX)):g' < $< > $@
install: install_doc install_sql install_mod
install: all installdirs
$(INSTALL_SHLIB) $(SONAME) $(libdir)/contrib
$(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
$(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
install_doc:
for inst_file in $(DOCS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
done
installdirs:
$(mkinstalldirs) $(libdir)/contrib $(datadir)/contrib $(docdir)/contrib
install_sql:
for inst_file in $(SQLS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_SQLDIR); \
done
uninstall:
rm -rf $(libdir)/contrib/$(SONAME) $(datadir)/contrib/$(NAME).sql $(docdir)/contrib/README.$(NAME)
install_mod:
for inst_file in $(MODS); do \
$(INSTALL) $(INSTL_SHLIB_OPTS) $$inst_file $(CONTRIB_MODDIR); \
done
clean distclean maintainer-clean:
rm -f $(SONAME) $(NAME).sql
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
clean:
$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
ifeq (depend,$(wildcard depend))
include depend
endif

View File

@ -1,48 +1,32 @@
#
# $Header: /cvsroot/pgsql/contrib/vacuumlo/Makefile,v 1.5 2000/06/19 13:54:50 momjian Exp $
# $Header: /cvsroot/pgsql/contrib/vacuumlo/Makefile,v 1.6 2000/07/09 13:13:55 petere Exp $
#
TOPDIR=../..
subdir = contrib/vacuumlo
top_builddir = ../..
include ../../src/Makefile.global
include ../Makefile.global
CPPFLAGS += -I$(LIBPQDIR)
LIBS += $(LIBPQ)
NAME = vacuumlo
all: vacuumlo
PROGRAM = $(NAME)
OBJS = $(NAME).o
DOCS = README.$(NAME)
SQLS =
BINS = $(PROGRAM)
EXAMPLES=
MODS =
install: all installdirs
$(INSTALL_PROGRAM) vacuumlo$(X) $(bindir)
$(INSTALL_DATA) README.vacuumlo $(docdir)/contrib
CFLAGS += -I$(LIBPQDIR)
installdirs:
$(mkinstalldirs) $(bindir) $(docdir)/contrib
OTHER_CLEAN =
uninstall:
rm -f $(bindir)/vacuumlo$(X) $(docdir)/contrib/README.vacuumlo
all: $(PROGRAM)
$(PROGRAM): $(OBJS) $(LIBPGEASYDIR)/libpgeasy.a
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBPGEASY)
install: install_doc install_bin
install_doc:
for inst_file in $(DOCS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
done
install_bin:
for inst_file in $(BINS); do \
$(INSTALL) $(INSTL_EXE_OPTS) $$inst_file $(CONTRIB_BINDIR); \
done
clean distclean maintainer-clean:
rm -f vacuumlo$(X)
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
clean:
$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
ifeq (depend,$(wildcard depend))
include depend
endif

View File

@ -8,7 +8,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/doc/Makefile,v 1.15 2000/05/17 16:57:40 momjian Exp $
# $Header: /cvsroot/pgsql/doc/Makefile,v 1.16 2000/07/09 13:13:55 petere Exp $
#
#----------------------------------------------------------------------------
@ -16,7 +16,6 @@ PGDOCS= $(POSTGRESDIR)/doc
SRCDIR= ../src
TAR= tar
GZCAT= zcat
# Pick up Makefile.global from the source area
# This is the only resource from the code source area and is optional.
@ -58,7 +57,7 @@ distclean::
man::
-@if test ! -d $(POSTMANDIR) ; then mkdir $(POSTMANDIR) ; fi
$(GZCAT) man.tar.gz | (cd $(POSTMANDIR) ; $(TAR) xf - )
gunzip -c man.tar.gz | (cd $(POSTMANDIR) ; $(TAR) xf - )
#
# Generic production rules
@ -75,5 +74,5 @@ man::
%: %.tar.gz
rm -rf ./$@ $(PGDOCS)/$*
if test ! -d $(PGDOCS)/$* ; then mkdir $(PGDOCS)/$* ; fi
$(GZCAT) $< | (cd $(PGDOCS)/$* ; $(TAR) xf - )
gunzip -c $< | (cd $(PGDOCS)/$* ; $(TAR) xf - )
# touch ./$*

View File

@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.85 2000/07/02 15:20:41 petere Exp $
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.86 2000/07/09 13:13:59 petere Exp $
#
# NOTES
# Essentially all Postgres make files include this file and use the
@ -38,17 +38,23 @@
# PostgreSQL version number
VERSION = @VERSION@
ifndef top_builddir
top_builddir = $(SRCDIR)/..
endif
ifndef SRCDIR
SRCDIR = $(top_builddir)/src
endif
# This should be changed once we have separate build dirs.
top_srcdir = $(top_builddir)
ifeq ($(top_builddir), $(top_srcdir))
srcdir = .
else
srcdir = $(top_srcdir)/$(subdir)
endif
VPATH = $(srcdir)
SRCDIR = $(top_builddir)/src
endif
##############################################################################
#
@ -88,7 +94,9 @@ sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
includedir = @includedir@
mandir = @mandir@
docdir = ${prefix}/doc
odbcinst_ini_dir = @odbcinst_ini_dir@
# old variable names for installation directories
@ -97,8 +105,8 @@ POSTGRESDIR= $(prefix)
BINDIR= $(bindir)
LIBDIR= $(libdir)
TEMPLATEDIR= $(libdir)
POSTMANDIR= $(POSTGRESDIR)/man
POSTDOCDIR= $(POSTGRESDIR)/doc
POSTMANDIR= $(mandir)
POSTDOCDIR= $(docdir)
HEADERDIR= $(includedir)
@ -126,6 +134,8 @@ PYTHON = @PYTHON@
python_extmakefile = @python_extmakefile@
python_moduledir = @python_moduledir@
krb_srvtab = @krb_srvtab@
#
# Please do not edit USE_TCL and USE_TK by hand.
#
@ -156,12 +166,6 @@ INSTALL_SHLIB = @INSTALL_SHLIB@
mkinstalldirs = @mkinstalldirs@
# don't use these any more
INSTLOPTS= @INSTLOPTS@
INSTL_EXE_OPTS= @INSTL_EXE_OPTS@
INSTL_LIB_OPTS= @INSTL_LIB_OPTS@
INSTL_SHLIB_OPTS= @INSTL_SHLIB_OPTS@
RANLIB= @RANLIB@
#-------------------------------------------------------------
@ -184,11 +188,11 @@ LDOUT= -o
DLSUFFIX= @DLSUFFIX@
LN_S= @LN_S@
TAR= @tar@
GZCAT= @GZCAT@
PERL = @PERL@
AWK = @AWK@
CXX=@CXX@
CXXFLAGS=@CXXFLAGS@ @INCLUDES@
GCC = @GCC@
##############################################################################
@ -259,12 +263,6 @@ ifneq ($(CUSTOM_COPT),)
COPT= $(CUSTOM_COPT)
endif
GCC = @GCC@
ifeq ($(GCC), yes)
CFLAGS+= -Wall -Wmissing-prototypes -Wmissing-declarations
endif
ifdef COPT
CFLAGS+= $(COPT)
LDFLAGS+= $(COPT)
@ -284,3 +282,4 @@ SNPRINTF = @SNPRINTF@
STRDUP = @STRDUP@
.PHONY: all install installdirs uninstall dep depend clean distclean maintainer-clean
.SILENT: installdirs

View File

@ -4,11 +4,12 @@
# Makefile for libpq subsystem (backend half of libpq interface)
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/libpq/Makefile,v 1.21 2000/07/08 03:04:39 tgl Exp $
# $Header: /cvsroot/pgsql/src/backend/libpq/Makefile,v 1.22 2000/07/09 13:14:05 petere Exp $
#
#-------------------------------------------------------------------------
SRCDIR = ../..
subdir = src/backend/libpq
top_builddir = ../..
include ../../Makefile.global
# be-fsstubs is here for historical reasons, probably belongs elsewhere
@ -17,6 +18,12 @@ OBJS = be-fsstubs.o \
auth.o crypt.o hba.o password.o \
pqcomm.o pqformat.o pqpacket.o pqsignal.o util.o
# This location might depend on the installation directories. Therefore
# we can't subsitute it into config.h.
ifdef krb_srvtab
CPPFLAGS += -DPG_KRB_SRVTAB='"$(krb_srvtab)"'
endif
all: SUBSYS.o

View File

@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.153 2000/07/08 03:04:13 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.154 2000/07/09 13:14:05 petere Exp $
*
* NOTES
*
@ -86,11 +86,6 @@
#include "utils/exc.h"
#include "utils/guc.h"
/*
* "postmaster.opts" is a file containing options for postmaser.
* pg_ctl will use it to restart postmaster.
*/
#define OPTSFNAME "postmaster.opts"
#if !defined(MAXINT)
#define MAXINT INT_MAX
@ -246,7 +241,7 @@ extern int optind,
/*
* postmaster.c - function prototypes
*/
static void pmdaemonize(char *extraoptions);
static void pmdaemonize(int argc, char *argv[]);
static Port *ConnCreate(int serverFd);
static void ConnFree(Port *port);
static void reset_shared(int port);
@ -267,15 +262,7 @@ static long PostmasterRandom(void);
static void RandomSalt(char *salt);
static void SignalChildren(SIGNAL_ARGS);
static int CountChildren(void);
static int
SetOptsFile(char *progname, int port, char *datadir,
int assert, int nbuf,
int debuglvl, int netserver,
#ifdef USE_SSL
int securenetserver,
#endif
int maxbackends, int reinit,
int silent, int sendstop, char *extraoptions);
static bool CreateOptsFile(int argc, char *argv[]);
extern int BootstrapMain(int argc, char *argv[]);
static pid_t SSDataBase(bool startup);
@ -564,8 +551,8 @@ PostmasterMain(int argc, char *argv[])
#ifdef USE_SSL
if (!NetServer && SecureNetServer)
{
fprintf(stderr, "For SSL, you must enable TCP/IP connections.\n",
argv[0]);
fprintf(stderr, "%s: For SSL, you must enable TCP/IP connections.\n",
progname);
exit(1);
}
InitSSL();
@ -602,7 +589,7 @@ PostmasterMain(int argc, char *argv[])
PortList = DLNewList();
if (silentflag)
pmdaemonize(original_extraoptions);
pmdaemonize(argc, argv);
else
{
@ -612,26 +599,7 @@ PostmasterMain(int argc, char *argv[])
SetPidFname(DataDir);
if (SetPidFile(getpid()) == 0)
{
if (SetOptsFile(
progname, /* postmaster executable file */
PostPortName, /* port number */
DataDir, /* PGDATA */
assert_enabled, /* whether -A is specified
* or not */
NBuffers, /* -B: number of shared buffers */
DebugLvl, /* -d: debug level */
NetServer, /* -i: accept connection from INET */
#ifdef USE_SSL
SecureNetServer, /* -l: use SSL */
#endif
MaxBackends, /* -N: max number of
* backends */
Reinit, /* -n: reinit shared mem after
* failure */
silentflag, /* -S: detach tty */
SendStop, /* -s: send SIGSTOP */
original_extraoptions /* options for backend */
) != 0)
if (!CreateOptsFile(argc, argv))
{
UnlinkPidFile();
ExitPostmaster(1);
@ -678,7 +646,7 @@ PostmasterMain(int argc, char *argv[])
}
static void
pmdaemonize(char *extraoptions)
pmdaemonize(int argc, char *argv[])
{
int i;
pid_t pid;
@ -700,26 +668,7 @@ pmdaemonize(char *extraoptions)
*/
if (SetPidFile(pid) == 0)
{
if (SetOptsFile(
progname, /* postmaster executable file */
PostPortName, /* port number */
DataDir, /* PGDATA */
assert_enabled, /* whether -A is specified
* or not */
NBuffers, /* -B: number of shared buffers */
DebugLvl, /* -d: debug level */
NetServer, /* -i: accept connection from INET */
#ifdef USE_SSL
SecureNetServer, /* -l: use SSL */
#endif
MaxBackends, /* -N: max number of
* backends */
Reinit, /* -n: reinit shared mem after
* failure */
1, /* -S: detach tty */
SendStop, /* -s: send SIGSTOP */
extraoptions /* options for backend */
) != 0)
if (!CreateOptsFile(argc, argv))
{
/*
@ -2202,84 +2151,44 @@ SSDataBase(bool startup)
return (pid);
}
/*
* Create the opts file
*/
static int
SetOptsFile(char *progname, int port, char *datadir,
int assert, int nbuf,
int debuglvl, int netserver,
#ifdef USE_SSL
int securenetserver,
#endif
int maxbackends, int reinit,
int silent, int sendstop, char *extraoptions)
static bool
CreateOptsFile(int argc, char *argv[])
{
int fd;
char optsfile[MAXPGPATH];
char opts[1024];
char buf[1024];
char fullprogname[MAXPGPATH];
char *filename;
FILE *fp;
unsigned i;
/*
* Creating opts file
*/
snprintf(optsfile, sizeof(optsfile), "%s/%s", datadir, OPTSFNAME);
fd = open(optsfile, O_RDWR | O_TRUNC | O_CREAT, 0600);
if (fd < 0)
if (FindExec(fullprogname, argv[0], "postmaster") == -1)
return false;
filename = palloc(strlen(DataDir) + 20);
sprintf(filename, "%s/postmaster.opts", DataDir);
fp = fopen(filename, "w");
if (fp == NULL)
{
fprintf(stderr, "Can't create optsfile:%s", optsfile);
return (-1);
}
snprintf(opts, sizeof(opts), "%s\n-p %d\n-D %s\n", progname, port, datadir);
if (assert)
{
sprintf(buf, "-A %d\n", assert);
strcat(opts, buf);
fprintf(stderr, "%s: cannot create file %s: %s\n", progname,
filename, strerror(errno));
return false;
}
snprintf(buf, sizeof(buf), "-B %d\n", nbuf);
strcat(opts, buf);
fprintf(fp, "%s", fullprogname);
for (i = 1; i < argc; i++)
fprintf(fp, " '%s'", argv[i]);
fputs("\n", fp);
if (debuglvl)
if (ferror(fp))
{
sprintf(buf, "-d %d\n", debuglvl);
strcat(opts, buf);
fprintf(stderr, "%s: writing file %s failed\n", progname, filename);
fclose(fp);
return false;
}
if (netserver)
strcat(opts, "-i\n");
#ifdef USE_SSL
if (securenetserver)
strcat(opts, "-l\n");
#endif
snprintf(buf, sizeof(buf), "-N %d\n", maxbackends);
strcat(opts, buf);
if (!reinit)
strcat(opts, "-n\n");
if (silent)
strcat(opts, "-S\n");
if (sendstop)
strcat(opts, "-s\n");
if (strlen(extraoptions) > 0)
{
strcat(opts, "-o '");
strcat(opts, extraoptions);
strcat(opts, "'");
}
if (write(fd, opts, strlen(opts)) != strlen(opts))
{
perror("Writing to opts file failed");
close(fd);
return (-1);
}
close(fd);
return (0);
fclose(fp);
return true;
}

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.18 2000/06/08 22:37:33 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.19 2000/07/09 13:14:08 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -151,7 +151,7 @@ ValidateBinary(char *path)
* we change directories to the /data directory.
*/
int
FindExec(char *full_path, char *argv0, char *binary_name)
FindExec(char *full_path, const char *argv0, const char *binary_name)
{
char buf[MAXPGPATH + 2];
char *p;

View File

@ -5,7 +5,7 @@
* to contain some useful information. Differs wildly across
* platforms.
*
* $Header: /cvsroot/pgsql/src/backend/utils/misc/ps_status.c,v 1.1 2000/06/04 01:44:34 petere Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/misc/ps_status.c,v 1.2 2000/07/09 13:14:11 petere Exp $
*
* Copyright 2000 by PostgreSQL Global Development Group
* various details abducted from various places
@ -20,11 +20,9 @@
#ifdef HAVE_SYS_PSTAT_H
# include <sys/pstat.h> /* for HP-UX */
#endif
#ifdef HAVE_MACHINE_VMPARAM_H
#ifdef HAVE_PS_STRINGS
# include <machine/vmparam.h> /* for old BSD */
#endif
#ifdef HAVE_SYS_EXEC_H
# include <sys/exec.h> /* for old BSD */
# include <sys/exec.h>
#endif
#include "miscadmin.h"

View File

@ -8,7 +8,7 @@
* or in config.h afterwards. Of course, if you edit config.h, then your
* changes will be overwritten the next time you run configure.
*
* $Id: config.h.in,v 1.123 2000/07/05 17:44:29 scrappy Exp $
* $Id: config.h.in,v 1.124 2000/07/09 13:14:13 petere Exp $
*/
#ifndef CONFIG_H
@ -58,8 +58,8 @@
/* Kerberos name of the Postgres service principal (--with-krb-srvnam=NAME) */
#undef PG_KRB_SRVNAM
/* Location of the Kerberos server's keytab file (--with-krb-srvtab=FILE) */
#undef PG_KRB_SRVTAB
/* Define to build with (Open)SSL support (--with-openssl[=DIR]) */
#undef USE_SSL
/*
* DEF_PGPORT is the TCP port number on which the Postmaster listens and

View File

@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: miscadmin.h,v 1.62 2000/07/02 15:21:18 petere Exp $
* $Id: miscadmin.h,v 1.63 2000/07/09 13:14:13 petere Exp $
*
* NOTES
* some of the information in this file will be moved to
@ -133,7 +133,7 @@ extern char *getpgusername(void);
extern void SetPgUserName(void);
extern int GetUserId(void);
extern void SetUserId(void);
extern int FindExec(char *backend, char *argv0, char *binary_name);
extern int FindExec(char *full_path, const char *argv0, const char *binary_name);
extern int CheckPathAccess(char *path, char *name, int open_mode);
/* lower case version for case-insensitive SQL referenced in pg_proc.h */

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.130 2000/06/14 18:17:58 petere Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.131 2000/07/09 13:14:17 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -795,7 +795,7 @@ connectDBStart(PGconn *conn)
np.protoVersion = htonl(NEGOTIATE_SSL_CODE);
if (pqPacketSend(conn, (char *) &np, sizeof(StartupPacket)) != STATUS_OK)
{
sprintf(conn->errorMessage,
printfPQExpBuffer(&conn->errorMessage,
"connectDB() -- couldn't send SSL negotiation packet: errno=%d\n%s\n",
errno, strerror(errno));
goto connect_errReturn;
@ -803,7 +803,7 @@ connectDBStart(PGconn *conn)
/* Now receive the postmasters response */
if (recv(conn->sock, &SSLok, 1, 0) != 1)
{
sprintf(conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n",
printfPQExpBuffer(&conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n",
errno, strerror(errno));
goto connect_errReturn;
}
@ -816,7 +816,7 @@ connectDBStart(PGconn *conn)
SSL_context = SSL_CTX_new(SSLv23_method());
if (!SSL_context)
{
sprintf(conn->errorMessage,
printfPQExpBuffer(&conn->errorMessage,
"connectDB() -- couldn't create SSL context: %s\n",
ERR_reason_error_string(ERR_get_error()));
goto connect_errReturn;
@ -826,7 +826,7 @@ connectDBStart(PGconn *conn)
!SSL_set_fd(conn->ssl, conn->sock) ||
SSL_connect(conn->ssl) <= 0)
{
sprintf(conn->errorMessage,
printfPQExpBuffer(&conn->errorMessage,
"connectDB() -- couldn't establish SSL connection: %s\n",
ERR_reason_error_string(ERR_get_error()));
goto connect_errReturn;
@ -844,7 +844,7 @@ connectDBStart(PGconn *conn)
}
else if (SSLok != 'N')
{
strcpy(conn->errorMessage,
printfPQExpBuffer(&conn->errorMessage,
"Received invalid negotiation response.\n");
goto connect_errReturn;
}

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $Header: /cvsroot/pgsql/src/test/regress/Attic/run_check.sh,v 1.21 2000/07/06 21:33:45 petere Exp $
# $Header: /cvsroot/pgsql/src/test/regress/Attic/run_check.sh,v 1.22 2000/07/09 13:14:19 petere Exp $
# ----------
# Check call syntax
@ -187,7 +187,7 @@ export PATH
# Run initdb to initialize a database system in ./tmp_check
# ----------
echo "=============== Initializing check database instance ================"
initdb -D $PGDATA --noclean >$LOGDIR/initdb.log 2>&1
initdb -D $PGDATA -L $CHKDIR/share --noclean >$LOGDIR/initdb.log 2>&1
if [ $? -ne 0 ]
then