src/backend/port/Makefile
src/backend/catalog/genbki.sh
src/backend/utils/Gen_fmgrtab.sh
- src/bin/pg_dump/Makefile
- src/bin/pg_version/Makefile
src/bin/pgtclsh/mkMakefile.tcldefs.sh
src/bin/pgtclsh/mkMakefile.tkdefs.sh
- src/bin/psql/Makefile
src/include/version.h
src/interfaces/Makefile
src/interfaces/libpq/Makefile
src/interfaces/libpgtcl/Makefile
src/interfaces/odbc/GNUmakefile
src/interfaces/python/GNUmakefile
- src/pl/Makefile
- src/pl/plpgsql/Makefile
- src/pl/plpgsql/src/Makefile
src/pl/tcl/mkMakefile.tcldefs.sh
- src/pl/plperl/GNUmakefile
src/test/regress/GNUmakefile
src/include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
src/backend/port/Makefile
src/backend/catalog/genbki.sh
src/backend/utils/Gen_fmgrtab.sh
- src/bin/pg_dump/Makefile
- src/bin/pg_version/Makefile
src/bin/pgtclsh/mkMakefile.tcldefs.sh
src/bin/pgtclsh/mkMakefile.tkdefs.sh
- src/bin/psql/Makefile
src/include/version.h
src/interfaces/Makefile
src/interfaces/libpq/Makefile
src/interfaces/libpgtcl/Makefile
src/interfaces/odbc/GNUmakefile
src/interfaces/python/GNUmakefile
- src/pl/Makefile
- src/pl/plpgsql/Makefile
- src/pl/plpgsql/src/Makefile
src/pl/tcl/mkMakefile.tcldefs.sh
- src/pl/plperl/GNUmakefile
src/test/regress/GNUmakefile
"}
EOF
src/backend/port/Makefile
src/backend/catalog/genbki.sh
src/backend/utils/Gen_fmgrtab.sh
- src/bin/pg_dump/Makefile
- src/bin/pg_version/Makefile
src/bin/pgtclsh/mkMakefile.tcldefs.sh
src/bin/pgtclsh/mkMakefile.tkdefs.sh
- src/bin/psql/Makefile
src/include/version.h
src/interfaces/Makefile
src/interfaces/libpq/Makefile
src/interfaces/libpgtcl/Makefile
src/interfaces/odbc/GNUmakefile
src/interfaces/python/GNUmakefile
- src/pl/Makefile
- src/pl/plpgsql/Makefile
- src/pl/plpgsql/src/Makefile
src/pl/tcl/mkMakefile.tcldefs.sh
- src/pl/plperl/GNUmakefile
src/test/regress/GNUmakefile
)
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.52 2000/06/10 18:01:36 petere Exp $
+# $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.53 2000/06/27 00:30:48 petere Exp $
#
#-------------------------------------------------------------------------
$(MAKE) -C ../contrib/spi clean
# Not all subdirectories have a make distclean target yet
-distclean:
+distclean maintainer-clean:
-$(MAKE) -C utils clean
-$(MAKE) -C backend clean
rm -f backend/port/Makefile backend/catalog/genbki.sh \
backend/utils/Gen_fmgrtab.sh \
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 bin $@
+ -$(MAKE) -C pl $@
-$(MAKE) -C test clean
rm -f test/regress/GNUmakefile
-$(MAKE) -C ../contrib/spi clean
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.80 2000/06/19 16:58:35 petere Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.81 2000/06/27 00:30:48 petere Exp $
#
# NOTES
# Essentially all Postgres make files include this file and use the
#
#-------------------------------------------------------------------------
+ifndef SRCDIR
+# 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
##############################################################################
#
LIBPGTCL= -L$(LIBPGTCLDIR) -lpgtcl
LIBPGEASY= -L$(LIBPGEASYDIR) -lpgeasy
-# For convenience, POSTGRESDIR is where BINDIR, and LIBDIR
-# and other target destinations are rooted. Of course, each of these is
-# changable separately.
-POSTGRESDIR= @prefix@
-
-# Where the postgres executables live (changeable by just putting them
-# somewhere else and putting that directory in your shell PATH)
-BINDIR= $(POSTGRESDIR)/bin
-
-# Where libpq.a gets installed. You must put it where your loader will
-# look for it if you wish to use the -lpq convention. Otherwise you
-# can just put the absolute pathname to the library at the end of your
-# command line.
-LIBDIR= $(POSTGRESDIR)/lib
-
-# Where the database templates are stored
-#
-TEMPLATEDIR= $(POSTGRESDIR)/lib
-
-# Where the man pages (suitable for use with "man") get installed.
+# installation directories
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+includedir = @includedir@
+
+# old variable names for installation directories
+
+POSTGRESDIR= $(prefix)
+BINDIR= $(bindir)
+LIBDIR= $(libdir)
+TEMPLATEDIR= $(libdir)
POSTMANDIR= $(POSTGRESDIR)/man
-
-# Where the formatted documents (e.g., the reference manual) get installed.
POSTDOCDIR= $(POSTGRESDIR)/doc
-
-# Where the header files necessary to build frontend programs get installed.
-HEADERDIR= $(POSTGRESDIR)/include
+HEADERDIR= $(includedir)
##############################################################################
#PROFILE= -p -non_shared
+with_perl = @with_perl@
+
#
# Please do not edit USE_TCL and USE_TK by hand.
#
#
# For many ports, INSTALL is overridden below.
INSTALL= @INSTALL@
-RANLIB= @RANLIB@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_DATA = @INSTALL_DATA@
+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@
#-------------------------------------------------------------
# See the subdirectory template for default settings for these
LN_S= @LN_S@
TAR= @tar@
GZCAT= @GZCAT@
+PERL = @PERL@
+
##############################################################################
#
CFLAGS+= $(PROFILE)
LDFLAGS+= $(PROFILE)
endif
+
+
+# substitute implementations of the C library
+STRERROR = @STRERROR@
+STRERROR2 = @STRERROR2@
+SNPRINTF = @SNPRINTF@
+STRDUP = @STRDUP@
+
+.DEFAULT: all
+.PHONY: all install installdirs uninstall dep depend clean distclean maintainer-clean
#-------------------------------------------------------------------------
#
-# Makefile
-# Makefile for src/bin (client programs)
+# Makefile for src/bin (client programs)
#
# Copyright (c) 1994, Regents of the University of California
#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/Makefile,v 1.25 2000/01/20 21:51:02 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/Makefile,v 1.26 2000/06/27 00:30:49 petere Exp $
#
#-------------------------------------------------------------------------
-SRCDIR= ..
+subdir = src/bin
+top_builddir = ../..
include ../Makefile.global
-DIRS = pg_id pg_version psql pg_dump pg_passwd \
- scripts initdb initlocation ipcclean \
- pg_ctl
+DIRS := initdb initlocation ipcclean pg_ctl pg_dump pg_id \
+ pg_passwd pg_version psql scripts
+
+ALLDIRS := $(DIRS) pg_encoding pgaccess pgtclsh
ifdef MULTIBYTE
DIRS += pg_encoding
endif
-#
# TCL/TK programs
-#
ifeq ($(USE_TCL), true)
ifeq ($(USE_TK), true)
DIRS += pgaccess
DIRS += pgtclsh
endif
-.DEFAULT all:
- for i in $(DIRS); do $(MAKE) -C $$i $@; done
+all install installdirs uninstall depend:
+ @for dir in $(DIRS); do $(MAKE) -C $$dir $@ || exit 1; done
+
+clean:
+ @for dir in $(DIRS); do $(MAKE) -C $$dir $@; done
+
+distclean maintainer-clean:
+ @for dir in $(ALLDIRS); do $(MAKE) -C $$dir $@; done
#-------------------------------------------------------------------------
#
-# Makefile.inc--
-# Makefile for bin/initdb
+# Makefile for src/bin/initdb
#
# Copyright (c) 1994, Regents of the University of California
#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/initdb/Makefile,v 1.17 2000/02/16 21:25:59 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/initdb/Makefile,v 1.18 2000/06/27 00:30:53 petere Exp $
#
#-------------------------------------------------------------------------
-SRCDIR= ../..
+subdir = src/bin/initdb
+top_builddir = ../../..
include ../../Makefile.global
all: initdb
initdb: initdb.sh
- sed -e 's/__MULTIBYTE__/$(MULTIBYTE)/g' < initdb.sh > initdb
+ sed -e 's/__MULTIBYTE__/$(MULTIBYTE)/g' < $< > $@
-install: initdb
- $(INSTALL) $(INSTL_EXE_OPTS) $+ $(BINDIR)/$+
+install: all installdirs
+ $(INSTALL_SCRIPT) initdb $(bindir)/initdb
-clean:
- rm -f initdb
+installdirs:
+ $(mkinstalldirs) $(bindir)
-dep depend:
+uninstall:
+ rm -f $(bindir)/initdb
+
+clean distclean maintainer-clean:
+ rm -f initdb
#-------------------------------------------------------------------------
#
-# Makefile.inc--
-# Makefile for bin/initlocation
+# Makefile for src/bin/initlocation
#
# Copyright (c) 1994, Regents of the University of California
#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/initlocation/Attic/Makefile,v 1.8 1999/12/08 10:29:43 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/initlocation/Attic/Makefile,v 1.9 2000/06/27 00:31:00 petere Exp $
#
#-------------------------------------------------------------------------
-SRCDIR= ../..
+subdir = src/bin/initlocation
+top_builddir = ../../..
include ../../Makefile.global
all: initlocation
initlocation: initlocation.sh
- cp -p initlocation.sh initlocation
+ cp $< $@
-install: initlocation
- $(INSTALL) $(INSTL_EXE_OPTS) $+ $(BINDIR)
+install: all installdirs
+ $(INSTALL_SCRIPT) initlocation $(bindir)/initlocation
-clean:
- rm -f initlocation
+installdirs:
+ $(mkinstalldirs) $(bindir)
-dep depend:
+uninstall:
+ rm -f $(bindir)/initlocation
+
+clean distclean maintainer-clean:
+ rm -f initlocation
#-------------------------------------------------------------------------
#
-# Makefile for bin/ipcclean
+# Makefile for src/bin/ipcclean
#
# Copyright (c) 1994, Regents of the University of California
#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/ipcclean/Attic/Makefile,v 1.10 2000/04/14 23:43:43 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/ipcclean/Attic/Makefile,v 1.11 2000/06/27 00:31:05 petere Exp $
#
#-------------------------------------------------------------------------
-SRCDIR= ../..
+subdir = src/bin/ipcclean
+top_builddir = ../../..
include ../../Makefile.global
all: ipcclean
ipcclean: ipcclean.sh
cp $< $@
-install: ipcclean
- $(INSTALL) $(INSTL_EXE_OPTS) $^ $(BINDIR)
+install: all installdirs
+ $(INSTALL_SCRIPT) ipcclean $(bindir)/ipcclean
-clean:
- rm -f ipcclean
+installdirs:
+ $(mkinstalldirs) $(bindir)
-dep depend:
+uninstall:
+ rm -f $(bindir)/ipcclean
+
+clean distclean maintainer-clean:
+ rm -f ipcclean
#-------------------------------------------------------------------------
#
-# Makefile.inc--
-# Makefile for bin/pg_ctl
+# Makefile for src/bin/pg_ctl
#
# Copyright (c) 1999, PostgreSQL Global Development Group
#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Makefile,v 1.5 2000/06/04 01:44:36 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Makefile,v 1.6 2000/06/27 00:31:08 petere Exp $
#
#-------------------------------------------------------------------------
-SRCDIR= ../..
+subdir = src/bin/pg_ctl
+top_builddir = ../../..
include ../../Makefile.global
all: pg_ctl
pg_ctl: pg_ctl.sh
- cat pg_ctl.sh > pg_ctl
+ cp $< $@
-install: pg_ctl
- $(INSTALL) $(INSTL_EXE_OPTS) $+ $(BINDIR)
+install: all installdirs
+ $(INSTALL_SCRIPT) pg_ctl $(bindir)/pg_ctl
-clean:
- rm -f pg_ctl
+installdirs:
+ $(mkinstalldirs) $(bindir)
-dep depend:
+uninstall:
+ rm -f $(bindir)/pg_ctl
+
+clean distclean maintainer-clean:
+ rm -f pg_ctl
--- /dev/null
+#-------------------------------------------------------------------------
+#
+# Makefile for src/bin/pg_dump
+#
+# Copyright (c) 1994, Regents of the University of California
+#
+# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.15 2000/06/27 00:31:12 petere Exp $
+#
+#-------------------------------------------------------------------------
+
+subdir = src/bin/pg_dump
+top_builddir = ../../..
+include ../../Makefile.global
+
+OBJS= pg_dump.o common.o $(STRDUP)
+
+CFLAGS+= -I$(LIBPQDIR)
+
+
+all: submake pg_dump$(X)
+
+pg_dump$(X): $(OBJS) $(LIBPQDIR)/libpq.a
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBPQ) $(LDFLAGS)
+
+../../utils/strdup.o:
+ $(MAKE) -C ../../utils strdup.o
+
+.PHONY: submake
+submake:
+ $(MAKE) -C $(LIBPQDIR) libpq.a
+
+install: all installdirs
+ $(INSTALL_PROGRAM) pg_dump$(X) $(bindir)/pg_dump$(X)
+ $(INSTALL_SCRIPT) pg_dumpall $(bindir)/pg_dumpall
+ $(INSTALL_SCRIPT) pg_upgrade $(bindir)/pg_upgrade
+
+installdirs:
+ $(mkinstalldirs) $(bindir)
+
+uninstall:
+ rm -f $(addprefix $(bindir)/, pg_dump$(X) pg_dumpall pg_upgrade)
+
+depend dep:
+ $(CC) -MM $(CFLAGS) *.c >depend
+
+clean distclean maintainer-clean:
+ rm -f pg_dump$(X) $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+++ /dev/null
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for bin/pg_dump
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/Makefile.in,v 1.14 2000/06/17 00:09:44 petere Exp $
-#
-#-------------------------------------------------------------------------
-
-SRCDIR= ../..
-include ../../Makefile.global
-
-OBJS= pg_dump.o common.o @STRDUP@
-
-CFLAGS+= -I$(LIBPQDIR)
-
-
-all: submake pg_dump
-
-pg_dump: $(OBJS) $(LIBPQDIR)/libpq.a
- $(CC) $(CFLAGS) -o pg_dump $(OBJS) $(LIBPQ) $(LDFLAGS)
-
-../../utils/strdup.o:
- $(MAKE) -C ../../utils strdup.o
-
-.PHONY: submake
-submake:
- $(MAKE) -C $(LIBPQDIR) libpq.a
-
-install: pg_dump
- $(INSTALL) $(INSTL_EXE_OPTS) pg_dump$(X) $(BINDIR)/pg_dump$(X)
- $(INSTALL) $(INSTL_EXE_OPTS) pg_dumpall $(BINDIR)/pg_dumpall
- $(INSTALL) $(INSTL_EXE_OPTS) pg_upgrade $(BINDIR)/pg_upgrade
-
-depend dep:
- $(CC) -MM $(CFLAGS) *.c >depend
-
-clean:
- rm -f pg_dump$(X) $(OBJS)
-
-ifeq (depend,$(wildcard depend))
-include depend
-endif
#-------------------------------------------------------------------------
#
-# Makefile for bin/pg_encoding
+# Makefile for src/bin/pg_encoding
#
-# Copyright (c) 1998, PostgreSQL development group
+# Copyright (c) 1998, PostgreSQL Global Development Group
#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/Makefile,v 1.7 2000/05/29 05:45:44 tgl Exp $
+# $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/Makefile,v 1.8 2000/06/27 00:31:17 petere Exp $
#
#-------------------------------------------------------------------------
-SRCDIR= ../..
-include $(SRCDIR)/Makefile.global
+subdir = src/bin/pg_encoding
+top_builddir = ../../..
+include ../../Makefile.global
OBJS= pg_encoding.o
-all: submake pg_encoding
+all: submake pg_encoding$(X)
-pg_encoding: $(OBJS)
- $(CC) -o pg_encoding $(OBJS) $(LIBPQ) $(LDFLAGS) $(CFLAGS)
+pg_encoding$(X): $(OBJS)
+ $(CC) -o $@ $(OBJS) $(LIBPQ) $(LDFLAGS) $(CFLAGS)
.PHONY: submake
submake:
$(MAKE) -C $(LIBPQDIR) libpq.a
-install: pg_encoding
- $(INSTALL) $(INSTL_EXE_OPTS) pg_encoding$(X) $(BINDIR)/pg_encoding$(X)
+install: all installdirs
+ $(INSTALL_PROGRAM) pg_encoding$(X) $(bindir)/pg_encoding$(X)
+
+installdirs:
+ $(mkinstalldirs) $(bindir)
+
+uninstall:
+ rm -f $(bindir)/pg_encoding$(X)
depend dep:
$(CC) -MM $(CFLAGS) *.c >depend
-clean:
+clean distclean maintainer-clean:
rm -f pg_encoding$(X) pg_encoding.o
ifeq (depend,$(wildcard depend))
#-------------------------------------------------------------------------
#
-# Makefile
-# Makefile for bin/pg_id
+# Makefile for src/bin/pg_id
#
# Copyright (C) 2000 by PostgreSQL Global Development Team
#
-# $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/Makefile,v 1.16 2000/03/31 14:14:32 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/Makefile,v 1.17 2000/06/27 00:31:20 petere Exp $
#
#-------------------------------------------------------------------------
-SRCDIR= ../..
+subdir = src/bin/pg_id
+top_builddir = ../../..
include ../../Makefile.global
-OBJS= pg_id.o
+all: pg_id$(X)
-all: pg_id
+pg_id$(X): pg_id.o
+ $(CC) -o $@ $^ $(LDFLAGS)
-pg_id: $(OBJS)
- $(CC) -o pg_id $(OBJS) $(LDFLAGS)
+install: all installdirs
+ $(INSTALL_PROGRAM) pg_id$(X) $(bindir)/pg_id$(X)
-install: pg_id
- $(INSTALL) $(INSTL_EXE_OPTS) pg_id$(X) $(BINDIR)/pg_id$(X)
+installdirs:
+ $(mkinstalldirs) $(bindir)
+
+uninstall:
+ rm -f $(bindir)/pg_id$(X)
depend dep:
$(CC) -MM $(CFLAGS) *.c >depend
-clean:
- rm -f pg_id$(X) $(OBJS)
+clean distclean maintainer-clean:
+ rm -f pg_id$(X) pg_id.o
ifeq (depend,$(wildcard depend))
include depend
-#-------------------------------------------------------------------------
#
-# Makefile
-# Makefile for bin/pg_passwd
-#-------------------------------------------------------------------------
+# Makefile for src/bin/pg_passwd
+#
-SRCDIR= ../..
+subdir = src/bin/pg_passwd
+top_builddir = ../../..
include ../../Makefile.global
-OBJS= pg_passwd.o
+all: pg_passwd$(X)
-all: pg_passwd
+pg_passwd$(X): pg_passwd.o
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
-pg_passwd: $(OBJS)
- $(CC) $(CFLAGS) -o pg_passwd $(OBJS) $(LDFLAGS)
+install: all installdirs
+ $(INSTALL_PROGRAM) pg_passwd$(X) $(bindir)/pg_passwd$(X)
-install: pg_passwd
- $(INSTALL) $(INSTL_EXE_OPTS) pg_passwd$(X) $(BINDIR)/pg_passwd$(X)
+installdirs:
+ $(mkinstalldirs) $(bindir)
-.PHONY: submake
-submake:
- $(MAKE) -C $(LIBPQDIR) libpq.a
+uninstall:
+ rm -f $(bindir)/pg_passwd$(X)
depend dep:
$(CC) -MM $(CFLAGS) *.c >depend
-clean:
- rm -f pg_passwd$(X) $(OBJS)
+clean distclean maintainer-clean:
+ rm -f pg_passwd$(X) pg_passwd.o
ifeq (depend,$(wildcard depend))
include depend
--- /dev/null
+#-------------------------------------------------------------------------
+#
+# Makefile for src/bin/pg_version
+#
+# Portions Copyright (c) 1996-2000, PostgreSQL, Inc
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# $Header: /cvsroot/pgsql/src/bin/pg_version/Attic/Makefile,v 1.7 2000/06/27 00:31:29 petere Exp $
+#
+#-------------------------------------------------------------------------
+
+subdir = src/bin/pg_version
+top_builddir = ../../..
+include ../../Makefile.global
+
+OBJS= pg_version.o $(top_builddir)/src/utils/version.o $(STRERROR2)
+
+all: pg_version$(X)
+
+pg_version$(X): $(OBJS)
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+$(top_builddir)/src/utils/version.o: $(top_srcdir)/src/utils/version.c $(top_builddir)/src/include/version.h
+ $(MAKE) -C $(top_builddir)/src/utils version.o
+
+install: all installdirs
+ $(INSTALL_PROGRAM) pg_version$(X) $(bindir)/pg_version$(X)
+
+installdirs:
+ $(mkinstalldirs) $(bindir)
+
+uninstall:
+ rm -f $(bindir)/pg_version$(X)
+
+depend dep:
+ $(CC) -MM $(CFLAGS) *.c >depend
+
+clean distclean maintainer-clean:
+ rm -f pg_version$(X) pg_version.o
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+++ /dev/null
-#-------------------------------------------------------------------------
-#
-# Makefile.in--
-# Makefile for bin/pg_version
-#
-# Portions Copyright (c) 1996-2000, PostgreSQL, Inc
-# Portions Copyright (c) 1994, Regents of the University of California
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/pg_version/Attic/Makefile.in,v 1.9 2000/05/29 05:45:46 tgl Exp $
-#
-#-------------------------------------------------------------------------
-
-SRCDIR= ../..
-include $(SRCDIR)/Makefile.global
-
-OBJS= pg_version.o $(SRCDIR)/utils/version.o @STRERROR2@
-
-all: pg_version
-
-pg_version: $(OBJS)
- $(CC) $(CFLAGS) -o pg_version $(OBJS) $(LDFLAGS)
-
-$(SRCDIR)/utils/version.o: $(SRCDIR)/utils/version.c $(SRCDIR)/include/version.h
- $(MAKE) -C $(SRCDIR)/utils version.o
-
-install: pg_version
- $(INSTALL) $(INSTL_EXE_OPTS) pg_version$(X) $(BINDIR)/pg_version$(X)
-
-depend dep:
- $(CC) -MM $(CFLAGS) *.c >depend
-
-clean:
- rm -f pg_version$(X) pg_version.o
-
-ifeq (depend,$(wildcard depend))
-include depend
-endif
#-------------------------------------------------------------------------
#
-# Makefile
-# Makefile for pgaccess
+# Makefile for src/bin/pgaccess
#
# Copyright (c) 1994, Regents of the University of California
#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/pgaccess/Attic/Makefile,v 1.8 1999/12/16 01:25:10 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/pgaccess/Attic/Makefile,v 1.9 2000/06/27 00:31:34 petere Exp $
#
#-------------------------------------------------------------------------
-SRCDIR= ../..
-include $(SRCDIR)/Makefile.global
+subdir = src/bin/pgaccess
+top_builddir = ../../..
+include ../../Makefile.global
+
+pgaccessdir = $(datadir)/pgaccess
all: pgaccess
pgaccess: pgaccess.sh
- sed -e 's;__wish__;$(WISH);' pgaccess.sh | \
- sed -e 's;__POSTGRESDIR__;$(POSTGRESDIR);' \
- > pgaccess
-
-install:
- $(INSTALL) $(INSTL_EXE_OPTS) pgaccess $(BINDIR)/pgaccess
- -@if [ ! -d $(POSTGRESDIR)/pgaccess ]; then mkdir $(POSTGRESDIR)/pgaccess; fi
- $(INSTALL) $(INSTL_EXE_OPTS) main.tcl $(POSTGRESDIR)/pgaccess
- -@if [ ! -d $(POSTGRESDIR)/pgaccess/lib ]; then mkdir $(POSTGRESDIR)/pgaccess/lib; fi
- $(INSTALL) $(INSTLOPTS) lib/*.tcl $(POSTGRESDIR)/pgaccess/lib
- -@if [ ! -d $(POSTGRESDIR)/pgaccess/lib/help ]; then mkdir $(POSTGRESDIR)/pgaccess/lib/help; fi
- $(INSTALL) $(INSTLOPTS) lib/help/*.hlp $(POSTGRESDIR)/pgaccess/lib/help
- -@if [ ! -d $(POSTGRESDIR)/pgaccess/lib/languages ]; then mkdir $(POSTGRESDIR)/pgaccess/lib/languages; fi
- $(INSTALL) $(INSTLOPTS) lib/languages/[a-z]* $(POSTGRESDIR)/pgaccess/lib/languages
- -@if [ ! -d $(POSTGRESDIR)/pgaccess/images ]; then mkdir $(POSTGRESDIR)/pgaccess/images; fi
- $(INSTALL) $(INSTLOPTS) images/*.gif $(POSTGRESDIR)/pgaccess/images
-
-clean:
+ sed -e 's,__wish__,$(WISH),' -e 's,__PGACCESSHOME__,$(pgaccessdir),' < $< > $@
+
+install: all installdirs
+ $(INSTALL_SCRIPT) pgaccess $(bindir)/pgaccess
+ $(INSTALL_SCRIPT) main.tcl $(pgaccessdir)
+ $(INSTALL_DATA) lib/*.tcl $(pgaccessdir)/lib
+ $(INSTALL_DATA) lib/help/*.hlp $(pgaccessdir)/lib/help
+ $(INSTALL_DATA) lib/languages/[a-z]* $(pgaccessdir)/lib/languages
+ $(INSTALL_DATA) images/*.gif $(pgaccessdir)/images
+
+installdirs:
+ $(mkinstalldirs) $(bindir) $(pgaccessdir)/lib/help $(pgaccessdir)/lib/languages $(pgaccessdir)/images
+
+uninstall:
+ rm -f $(bindir)/pgaccess
+ rm -rf $(pgaccessdir)
+
+clean distclean maintainer-clean:
rm -f pgaccess
-#!/bin/sh
+#! /bin/sh
PATH_TO_WISH=__wish__
-PGACCESS_HOME=__POSTGRESDIR__/pgaccess
+PGACCESS_HOME=__PGACCESSHOME__
export PATH_TO_WISH
export PGACCESS_HOME
exec ${PATH_TO_WISH} ${PGACCESS_HOME}/main.tcl "$@"
-
#-------------------------------------------------------------------------
#
-# Makefile
-# Makefile for a tclsh workalike with pgtcl commands installed
+# Makefile for src/bin/pgtclsh
+# (a tclsh workalike with pgtcl commands installed)
#
# Copyright (c) 1994, Regents of the University of California
#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.27 2000/06/17 00:09:47 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.28 2000/06/27 00:31:40 petere Exp $
#
#-------------------------------------------------------------------------
-SRCDIR= ../..
+subdir = src/bin/pgtclsh
+top_builddir = ../../..
include ../../Makefile.global
#
# If we are here then TCL is available
-PGMS = pgtclsh
-INSTPGMS = install_tcl
+PROGRAMS = pgtclsh
# Add TK targets if TK is available
ifeq ($(USE_TK), true)
-PGMS += pgtksh
-INSTPGMS += install_tk
+PROGRAMS += pgtksh
endif
-all: $(PGMS)
+all: submake $(PROGRAMS)
pgtclsh: pgtclAppInit.o
- $(CC) $(CFLAGS) $(TCL_DEFS) -o $@ pgtclAppInit.o \
+ $(CC) $(CFLAGS) $(TCL_DEFS) -o $@ $< \
$(LIBPGTCL) $(LIBPQ) $(TCL_LIB_SPEC) $(TCL_LIBS) $(LDFLAGS)
pgtksh: pgtkAppInit.o
- $(CC) $(CFLAGS) $(TK_DEFS) -o $@ pgtkAppInit.o \
+ $(CC) $(CFLAGS) $(TK_DEFS) -o $@ $< \
$(LIBPGTCL) $(LIBPQ) $(X_LIBS) $(TK_LIB_SPEC) $(TK_LIBS) \
$(TCL_LIB_SPEC) $(X11_LIBS) $(LDFLAGS)
-install: $(INSTPGMS)
+.PHONY: submake
+submake:
+ $(MAKE) -C $(LIBPGTCLDIR) all
+
+install: all installdirs
+ $(INSTALL_PROGRAM) pgtclsh $(bindir)/pgtclsh
+ifeq ($(USE_TK), true)
+ $(INSTALL_PROGRAM) pgtksh $(bindir)/pgtksh
+endif
-install_tcl: pgtclsh
- $(INSTALL) $(INSTL_EXE_OPTS) pgtclsh $(BINDIR)/pgtclsh
+installdirs:
+ $(mkinstalldirs) $(bindir)
-install_tk: pgtksh
- $(INSTALL) $(INSTL_EXE_OPTS) pgtksh $(BINDIR)/pgtksh
+uninstall:
+ rm -f $(bindir)/pgtclsh $(bindir)/pgtksh
Makefile.tcldefs: mkMakefile.tcldefs.sh
- /bin/sh ./mkMakefile.tcldefs.sh
+ $(SHELL) $<
Makefile.tkdefs: mkMakefile.tkdefs.sh
- /bin/sh ./mkMakefile.tkdefs.sh
+ $(SHELL) $<
+
+mkMakefile.tcldefs.sh mkMakefile.tkdefs.sh: $(top_builddir)/config.status
+mkMakefile.tcldefs.sh mkMakefile.tkdefs.sh: % : %.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
clean:
- rm -f *.o Makefile.t*defs pgtclsh pgtksh
+ rm -f *.o Makefile.tcldefs Makefile.tkdefs pgtclsh pgtksh
+
+distclean maintainer-clean: clean
+ rm -f mkMakefile.tcldefs.sh mkMakefile.tkdefs.sh
dep depend:
$(CC) -MM $(CFLAGS) *.c > depend
--- /dev/null
+#-------------------------------------------------------------------------
+#
+# Makefile for src/bin/psql
+#
+# Copyright (c) 1994, Regents of the University of California
+#
+# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.21 2000/06/27 00:31:41 petere Exp $
+#
+#-------------------------------------------------------------------------
+
+subdir = src/bin/psql
+top_builddir = ../../..
+include ../../Makefile.global
+
+REFDOCDIR= $(top_srcdir)/doc/src/sgml/ref
+
+CFLAGS+= -I$(LIBPQDIR)
+
+OBJS=command.o common.o help.o input.o stringutils.o mainloop.o \
+ copy.o startup.o prompt.o variables.o large_obj.o print.o describe.o \
+ tab-complete.o
+
+all: submake psql$(X)
+
+ifdef STRDUP
+OBJS+=$(top_builddir)/src/utils/strdup.o
+
+$(top_builddir)/src/utils/strdup.o:
+ $(MAKE) -C $(top_builddir)/src/utils strdup.o
+endif
+
+# Move these to the utils directory?
+
+ifdef STRERROR
+OBJS+=$(top_builddir)/src/backend/port/strerror.o
+
+$(top_builddir)/src/backend/port/strerror.o:
+ $(MAKE) -C $(top_builddir)/src/backend/port strerror.o
+endif
+
+ifdef SNPRINTF
+OBJS+=$(top_builddir)/src/backend/port/snprintf.o
+
+$(top_builddir)/src/backend/port/snprintf.o:
+ $(MAKE) -C $(top_builddir)/src/backend/port snprintf.o
+endif
+
+# End of hacks for picking up backend 'port' modules
+
+psql$(X): $(OBJS) $(LIBPQDIR)/libpq.a
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBPQ) $(LDFLAGS)
+
+help.o: $(srcdir)/sql_help.h
+
+ifdef PERL
+$(srcdir)/sql_help.h: create_help.pl $(wildcard $(REFDOCDIR)/*.sgml)
+ $(PERL) $< $(REFDOCDIR) $@
+else
+$(srcdir)/sql_help.h:
+ @echo "*** Perl is needed to build psql help."
+endif
+
+.PHONY: submake
+
+submake:
+ $(MAKE) -C $(LIBPQDIR) libpq.a
+
+install: all installdirs
+ $(INSTALL_PROGRAM) psql$(X) $(bindir)/psql$(X)
+
+installdirs:
+ $(mkinstalldirs) $(bindir)
+
+uninstall:
+ rm -f $(bindir)/psql$(X)
+
+depend dep:
+ $(CC) -MM -MG $(CFLAGS) *.c >depend
+
+clean distclean:
+ rm -f psql$(X) $(OBJS)
+
+maintainer-clean: distclean
+ rm -f sql_help.h
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+++ /dev/null
-#-------------------------------------------------------------------------
-#
-# Makefile.in--
-# Makefile for bin/psql
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/psql/Attic/Makefile.in,v 1.26 2000/06/17 00:09:51 petere Exp $
-#
-#-------------------------------------------------------------------------
-
-SRCDIR= ../..
-include $(SRCDIR)/Makefile.global
-
-DOCDIR= $(SRCDIR)/../doc/src/sgml/ref
-PERL = @PERL@
-
-CFLAGS+= -I$(LIBPQDIR)
-
-OBJS=command.o common.o help.o input.o stringutils.o mainloop.o \
- copy.o startup.o prompt.o variables.o large_obj.o print.o describe.o \
- tab-complete.o
-
-all: submake psql
-
-ifneq (@STRDUP@,)
-OBJS+=$(SRCDIR)/utils/strdup.o
-
-$(SRCDIR)/utils/strdup.o:
- $(MAKE) -C $(SRCDIR)/utils strdup.o
-endif
-
-# Move these to the utils directory?
-
-ifneq (@STRERROR@,)
-OBJS+=$(SRCDIR)/backend/port/strerror.o
-
-$(SRCDIR)/backend/port/strerror.o:
- $(MAKE) -C $(SRCDIR)/backend/port strerror.o
-endif
-
-ifneq (@SNPRINTF@,)
-OBJS+=$(SRCDIR)/backend/port/snprintf.o
-
-$(SRCDIR)/backend/port/snprintf.o:
- $(MAKE) -C $(SRCDIR)/backend/port snprintf.o
-endif
-
-# End of hacks for picking up backend 'port' modules
-
-psql: $(OBJS) $(LIBPQDIR)/libpq.a
- $(CC) $(CFLAGS) -o psql $(OBJS) $(LIBPQ) $(LDFLAGS)
-
-help.o: sql_help.h
-
-ifneq ($(strip $(PERL)),)
-sql_help.h: $(wildcard $(DOCDIR)/*.sgml) create_help.pl
- $(PERL) create_help.pl $(DOCDIR) sql_help.h
-else
-sql_help.h:
- @echo "*** Perl is needed to build psql help."
-endif
-
-.PHONY: submake
-
-submake:
- $(MAKE) -C $(LIBPQDIR) libpq.a
-
-install: psql
- $(INSTALL) $(INSTL_EXE_OPTS) psql$(X) $(BINDIR)/psql$(X)
-
-depend dep:
- $(CC) -MM -MG $(CFLAGS) *.c >depend
-
-clean:
- rm -f psql$(X) $(OBJS)
-
-# Some people might get in trouble if they do a make clean and the
-# sql_help.h is gone, for it needs the docs in the right place to be
-# regenerated. -- (pe)
-
-maintainer-clean: clean
- rm -f sql_help.h
-
-ifeq (depend,$(wildcard depend))
-include depend
-endif
#
# Copyright 2000 by PostgreSQL Global Development Group
#
-# $Header: /cvsroot/pgsql/src/bin/psql/create_help.pl,v 1.6 2000/04/16 18:07:22 tgl Exp $
+# $Header: /cvsroot/pgsql/src/bin/psql/create_help.pl,v 1.7 2000/06/27 00:31:41 petere Exp $
#################################################################
#
$docdir = $ARGV[0] || die "$0: missing required argument: docdir\n";
$outputfile = $ARGV[1] || die "$0: missing required argument: output file\n";
-$define = $outputfile;
+if ($outputfile =~ m!.*/([^/]+)$!) {
+ $outputfilebasename = $1;
+}
+else {
+ $outputfilebasename = $outputfile;
+}
+
+$define = $outputfilebasename;
$define =~ tr/a-z/A-Z/;
$define =~ s/\W/_/g;
print OUT
"/*
- * *** Do not change this file. It is machine-generated. ***
+ * *** Do not change this file by hand. It is automatically
+ * *** generated from the DocBook documentation.
*
- * This file was generated by
- * $^X $0 $outputfile
- * from the DocBook documentation in
- * $docdir
+ * generated by
+ * $^X $0 @ARGV
*
*/
$count++;
}
else {
- print STDERR "$0: parsing file '$file' failed at or near line $. (N='$cmdname' D='$cmddesc')\n";
+ print STDERR "$0: parsing file '$file' failed (N='$cmdname' D='$cmddesc')\n";
}
}
#-------------------------------------------------------------------------
#
-# Makefile.inc--
-# Makefile for bin/scripts
+# Makefile for src/bin/scripts
#
# Copyright (c) 1994, Regents of the University of California
#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/scripts/Makefile,v 1.4 1999/12/16 01:25:11 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/scripts/Makefile,v 1.5 2000/06/27 00:31:44 petere Exp $
#
#-------------------------------------------------------------------------
-.SUFFIXES:
-
-SRCDIR=../..
+subdir = src/bin/scripts
+top_builddir = ../../..
include ../../Makefile.global
-SCRIPTS=createdb dropdb createuser dropuser createlang droplang vacuumdb
+SCRIPTS := createdb dropdb createuser dropuser createlang droplang vacuumdb
all: $(SCRIPTS)
-createdb:
-dropdb:
-createuser:
-dropuser:
-
createlang: createlang.sh
- sed -e 's/__DLSUFFIX__/$(DLSUFFIX)/' createlang.sh > createlang
-droplang:
+ sed -e 's/__DLSUFFIX__/$(DLSUFFIX)/' $< > $@
-vacuumdb:
+install: all installdirs
+ $(INSTALL_SCRIPT) $(SCRIPTS) $(bindir)
-install: $(SCRIPTS)
- for i in $+; do $(INSTALL) $(INSTL_EXE_OPTS) $$i $(BINDIR); done
+installdirs:
+ $(mkinstalldirs) $(bindir)
-clean:
- rm -f createlang
+uninstall:
+ rm -f $(addprefix $(bindir)/, $(SCRIPTS))
-dep depend:
+clean distclean maintainer-clean:
+ rm -f createlang
--- /dev/null
+#-------------------------------------------------------------------------
+#
+# Makefile for src/pl (procedural languages)
+#
+# Copyright (c) 1994, Regents of the University of California
+#
+# $Header: /cvsroot/pgsql/src/pl/Makefile,v 1.9 2000/06/27 00:31:48 petere Exp $
+#
+#-------------------------------------------------------------------------
+
+subdir = src/pl
+top_builddir = ../..
+include ../Makefile.global
+
+DIRS := plpgsql
+
+ifeq ($(USE_TCL), true)
+DIRS += tcl
+endif
+
+# Disabled because it doesn't work
+#ifeq ($(with_perl), yes)
+# $(MAKE) -C plperl $@
+#endif
+
+ALLDIRS := plpgsql tcl plperl
+
+
+all install installdirs uninstall depend:
+ @for dir in $(DIRS); do $(MAKE) -C $$dir $@ || exit 1; done
+
+clean:
+ @for dir in $(DIRS); do $(MAKE) -C $$dir $@; done
+
+distclean maintainer-clean:
+ @for dir in $(ALLDIRS); do $(MAKE) -C $$dir $@; done
+++ /dev/null
-#-------------------------------------------------------------------------
-#
-# 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.2 2000/06/20 16:40:04 petere Exp $
-#
-#-------------------------------------------------------------------------
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-top_srcdir = @top_srcdir@
-top_builddir = ../..
-subdir = src/pl
-
-
-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 $@
-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
-
-
-Makefile: Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
-
-$(top_builddir)/config.status: $(top_srcdir)/configure
- cd $(top_builddir) && ./config.status --recheck
--- /dev/null
+# $Header: /cvsroot/pgsql/src/pl/plperl/GNUmakefile,v 1.1 2000/06/27 00:31:49 petere Exp $
+
+subdir = src/pl/plperl
+top_builddir = ../../..
+include ../../Makefile.global
+
+plperl_installdir = $(libdir)
+
+
+all: Makefile
+ $(MAKE) -f $< all
+
+Makefile: Makefile.PL
+ @plperl_installdir='$(plperl_installdir)' \
+ EXTRA_INCLUDES='-I$(top_srcdir)/src/include $(INCLUDES)' \
+ $(PERL) $< POLLUTE=1
+
+install: all installdirs
+ $(MAKE) -f $< install
+
+installdirs:
+ $(mkinstalldirs) $(plperl_installdir)
+
+uninstall:
+ rm -f $(libdir)/plperl$(DLSUFFIX)
+
+clean distclean maintainer-clean:
+ -[ -f Makefile ] && $(MAKE) -f Makefile realclean
+++ /dev/null
-# $Header: /cvsroot/pgsql/src/pl/plperl/Attic/GNUmakefile.in,v 1.2 2000/06/17 00:10:21 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@
-INCLUDES = @INCLUDES@
-
-all: Makefile
- $(MAKE) -f $< all
-
-Makefile: Makefile.PL
- @plperl_installdir='$(plperl_installdir)' \
- EXTRA_INCLUDES='-I$(top_srcdir)/src/include $(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
--- /dev/null
+#-------------------------------------------------------------------------
+#
+# Makefile for src/pl/plpgsql (PostgreSQL's SQL procedural language)
+#
+# Copyright (c) 1994, Regents of the University of California
+#
+# $Header: /cvsroot/pgsql/src/pl/plpgsql/Makefile,v 1.3 2000/06/27 00:31:56 petere Exp $
+#
+#-------------------------------------------------------------------------
+
+subdir = src/pl/plpgsql
+top_builddir = ../../..
+include ../../Makefile.global
+
+all install installdirs uninstall:
+ $(MAKE) -C src $@
+
+clean distclean maintainer-clean:
+ -$(MAKE) -C src $@
+++ /dev/null
-#-------------------------------------------------------------------------
-#
-# Makefile for src/pl/plpgsql (PostgreSQL's SQL procedural language)
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-# $Header: /cvsroot/pgsql/src/pl/plpgsql/Attic/Makefile.in,v 1.1 2000/06/20 16:40:07 petere Exp $
-#
-#-------------------------------------------------------------------------
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-top_srcdir = @top_srcdir@
-top_builddir = ../../..
-subdir = src/pl/plpgsql
-
-
-.DEFAULT all install clean:
- $(MAKE) -C src $@
-
-distclean maintainer-clean:
- -$(MAKE) -C src $@
- rm -f Makefile
-
-
-.PHONY: all install clean distclean maintainer-clean
-
-
-Makefile: Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
-
-$(top_builddir)/config.status: $(top_srcdir)/configure
- cd $(top_builddir) && ./config.status --recheck
#
# Makefile for the plpgsql shared object
#
-# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/Makefile.in,v 1.26 2000/06/20 16:40:10 petere Exp $
+# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.3 2000/06/27 00:32:01 petere Exp $
#
#-------------------------------------------------------------------------
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-top_srcdir = @top_srcdir@
-top_builddir = ../../../..
subdir = src/pl/plpgsql/src
-
-
-INSTALL = @INSTALL@
-INSTALL_SHLIB = @INSTALL_SHLIB@
-mkinstalldirs = @mkinstalldirs@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-libdir = @libdir@
-
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
# Shared library parameters
NAME= plpgsql
SO_MAJOR_VERSION= 1
SO_MINOR_VERSION= 0
-DLSUFFIX = @DLSUFFIX@
-
-SRCDIR = $(top_srcdir)/src
-include $(SRCDIR)/Makefile.global
-
CPPFLAGS += -I$(srcdir)
-OBJS= pl_parse.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o
+OBJS = pl_parse.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o
-# Shared library stuff, also default 'all' target
-include $(SRCDIR)/Makefile.shlib
+# Shared library stuff, also default `all' target
+include $(top_srcdir)/src/Makefile.shlib
# In order to use Makefile.shlib, we allow it to build a static
# call it that when installed, however, so we ignore the install-shlib
# rule and do this instead:
-install: installdirs $(shlib)
-ifneq ($(shlib),)
+install: installdirs all
+ifdef shlib
$(INSTALL_SHLIB) $(shlib) $(libdir)/plpgsql$(DLSUFFIX)
else
@echo "*****"; \
installdirs:
$(mkinstalldirs) $(libdir)
-pl_handler.o pl_comp.o pl_exec.o pl_funcs.o: plpgsql.h pl.tab.h
+uninstall:
+ rm -f $(libdir)/plpgsql$(DLSUFFIX)
-pl_parse.o: pl_gram.c pl_scan.c plpgsql.h
+pl_handler.o pl_comp.o pl_exec.o pl_funcs.o: plpgsql.h $(srcdir)/pl.tab.h
+
+pl_parse.o: $(srcdir)/pl_gram.c $(srcdir)/pl_scan.c plpgsql.h
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
# Note: Since the yacc and lex files are shipped in the distribution,
sed -e 's%__libdir__%$(libdir)%g' -e 's%__DLSUFFIX__%$(DLSUFFIX)%g' < $< > $@
-clean: clean-shlib
+clean distclean: clean-shlib
rm -f lib$(NAME).a *.o y.tab.c y.tab.h lex.yy.c mklang.sql
-distclean: clean
- rm -f Makefile
-
maintainer-clean: clean
rm -f $(srcdir)/pl_gram.c $(srcdir)/pl.tab.h $(srcdir)/pl_scan.c
- rm -f Makefile
-
-
-.PHONY: all install installdirs clean distclean maintainer-clean
-
-
-Makefile: Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
-
-$(top_builddir)/src/Makefile.global: $(top_srcdir)/src/Makefile.global.in $(top_builddir)/config.status
- cd $(top_builddir) && CONFIG_FILES=src/Makefile.global CONFIG_HEADERS= ./config.status
-
-$(top_builddir)/config.status: $(top_srcdir)/configure
- cd $(top_builddir) && ./config.status --recheck
#-------------------------------------------------------------------------
#
-# Makefile
-# Makefile for the pltcl shared object
+# Makefile for the pltcl shared object
#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.17 2000/06/17 00:10:25 petere Exp $
+# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.18 2000/06/27 00:32:06 petere Exp $
#
#-------------------------------------------------------------------------
-#
-# Tell make where the postgresql sources live
-#
-SRCDIR= ../../../src
-include $(SRCDIR)/Makefile.global
+subdir = src/pl/tcl
+top_builddir = ../../..
+include ../../Makefile.global
-#
-# Include definitions from the tclConfig.sh file
-# NOTE: GNU make will make this file automatically if it doesn't exist,
-# using the make rule that appears below. Cute, eh?
-#
include Makefile.tcldefs
-#
-# Find out whether Tcl was built as a shared library --- if not,
-# we can't link a shared library that depends on it, and have to
-# forget about building pltcl.
-# In Tcl 8, tclConfig.sh sets TCL_SHARED_BUILD for us, but in
-# older Tcl releases it doesn't. In that case we guess based on
-# the name of the Tcl library.
-#
+# Find out whether Tcl was built as a shared library --- if not, we
+# can't link a shared library that depends on it, and have to forget
+# about building pltcl. In Tcl 8, tclConfig.sh sets TCL_SHARED_BUILD
+# for us, but in older Tcl releases it doesn't. In that case we guess
+# based on the name of the Tcl library.
+
ifndef TCL_SHARED_BUILD
ifneq (,$(findstring $(DLSUFFIX),$(TCL_LIB_FILE)))
TCL_SHARED_BUILD=1
endif
-# Change following to how shared library that contains
-# references to libtcl must get built on your system.
-# Since these definitions come from the tclConfig.sh script,
-# they should work if the shared build of tcl was successful
-# on this system. However, tclConfig.sh lies to us a little bit
-# (at least in versions 7.6 through 8.0.4) --- it doesn't mention -lc
-# in TCL_LIBS, but you still need it on systems that want to hear about
-# dependent libraries...
+# Change following to how shared library that contains references to
+# libtcl must get built on your system. Since these definitions come
+# from the tclConfig.sh script, they should work if the shared build
+# of tcl was successful on this system. However, tclConfig.sh lies to
+# us a little bit (at least in versions 7.6 through 8.0.4) --- it
+# doesn't mention -lc in TCL_LIBS, but you still need it on systems
+# that want to hear about dependent libraries...
ifneq ($(TCL_SHLIB_LD_LIBS),)
# link command for a shared lib must mention shared libs it uses
SHLIB_EXTRA_LIBS=
endif
-%$(TCL_SHLIB_SUFFIX): %.o
+%$(TCL_SHLIB_SUFFIX): %.o
$(TCL_SHLIB_LD) -o $@ $< $(TCL_LIB_SPEC) $(SHLIB_EXTRA_LIBS)
CC = $(TCL_CC)
-# Since we are using Tcl's choice of C compiler, which might not be the
-# same one selected for Postgres, do NOT use CFLAGS from Makefile.global.
-# Instead use TCL's CFLAGS plus necessary -I directives.
+# Since we are using Tcl's choice of C compiler, which might not be
+# the same one selected for Postgres, do NOT use CFLAGS from
+# Makefile.global. Instead use TCL's CFLAGS plus necessary -I
+# directives.
-# Can choose either TCL_CFLAGS_OPTIMIZE or TCL_CFLAGS_DEBUG here, as needed
+# Can choose either TCL_CFLAGS_OPTIMIZE or TCL_CFLAGS_DEBUG here, as
+# needed
CFLAGS= $(TCL_CFLAGS_OPTIMIZE)
CFLAGS+= $(TCL_SHLIB_CFLAGS) $(TCL_DEFS)
-CFLAGS+= -I$(SRCDIR)/include $(INCLUDES)
-
-#
-# Uncomment the following to enable the unknown command lookup
-# on the first of all calls to the call handler. See the doc
-# in the modules directory about details.
-#
+CFLAGS+= -I$(top_srcdir)/src/include $(INCLUDES)
+
+
+# Uncomment the following to enable the unknown command lookup on the
+# first of all calls to the call handler. See the doc in the modules
+# directory about details.
+
#CFLAGS+= -DPLTCL_UNKNOWN_SUPPORT
endif
-ifeq ($(TCL_SHARED_BUILD),1)
+# Provide dummy targets for the case where we can't build the shared library.
+
+ifeq ($(TCL_SHARED_BUILD), 1)
-#
-# Build the shared lib
-#
all: $(INFILES)
-install: all
- $(INSTALL) $(INSTL_SHLIB_OPTS) $(DLOBJS) $(LIBDIR)/$(DLOBJS)
+install: all installdirs
+ $(INSTALL_SHLIB) $(DLOBJS) $(libdir)/$(DLOBJS)
-else
+installdirs:
+ $(mkinstalldirs) $(libdir)
-#
-# Oops, can't build it
-#
-all:
- @echo "Cannot build pltcl because Tcl is not a shared library; skipping it."
+uninstall:
+ rm -f $(libdir)/$(DLOBJS)
-install:
- @echo "Cannot build pltcl because Tcl is not a shared library; skipping it."
+else
+all install:
+ @echo "*****"; \
+ echo "* Cannot build pltcl because Tcl is not a shared library; skipping it."; \
+ echo "*****"
endif
-#
-# Make targets that are still valid when we can't build pltcl
-# should be below here.
-#
Makefile.tcldefs: mkMakefile.tcldefs.sh
- /bin/sh ./mkMakefile.tcldefs.sh
+ $(SHELL) $<
+
+mkMakefile.tcldefs.sh: mkMakefile.tcldefs.sh.in $(top_builddir)/config.status
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+
-#
-# Clean
-#
clean:
- rm -f $(INFILES) *.o
- rm -f Makefile.tcldefs
+ rm -f $(INFILES) *.o Makefile.tcldefs
-dep depend:
+distclean maintainer-clean: clean
+ rm -f mkMakefile.tcldefs.sh