-# $Header: /cvsroot/pgsql/contrib/Makefile,v 1.26 2001/09/04 19:21:42 tgl Exp $
+# $Header: /cvsroot/pgsql/contrib/Makefile,v 1.27 2001/09/06 10:49:29 petere Exp $
subdir = contrib
top_builddir = ..
intarray \
isbn_issn \
lo \
- mSQL-interface \
- mac \
miscutil \
noupdate \
oid2name \
pg_logger \
pg_resetxlog \
pgbench \
- pgcrypto \
rserv \
rtree_gist \
seg \
string \
tips \
userlock \
- vacuumlo
+ vacuumlo
+
+# Missing:
+# ipc_check \ (does not have a makefile)
+# mSQL-interface \ (requires msql installed)
+# mac \ (does not have a makefile)
+# mysql \ (does not have a makefile)
+# oracle \ (does not have a makefile)
+# pgcrypto \ (non-standard makefile)
+# start-scripts \ (does not have a makefile)
+# tools \ (does not have a makefile)
+# xml \ (non-standard makefile)
ifeq ($(with_java),yes)
WANTED_DIRS += retep
endif
-all install installdirs uninstall clean distclean maintainer-clean:
- for dir in $(WANTED_DIRS); do \
- if [ -f $$dir/Makefile ]; then \
- $(MAKE) -C $$dir $@; \
- fi; \
+all install installdirs uninstall clean distclean maintainer-clean check installcheck:
+ @for dir in $(WANTED_DIRS); do \
+ $(MAKE) -C $$dir $@ || exit; \
done
-#
-# $Header: /cvsroot/pgsql/contrib/array/Attic/Makefile,v 1.15 2001/06/18 21:38:01 momjian Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/array/Attic/Makefile,v 1.16 2001/09/06 10:49:29 petere Exp $
subdir = contrib/array
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-NAME := array_iterator
-SONAME := $(NAME)$(DLSUFFIX)
+MODULES = array_iterator
+DATA_built = array_iterator.sql
+DOCS = README.array_iterator
-override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
-override CFLAGS += $(CFLAGS_SL)
-override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
-
-all: $(SONAME) $(NAME).sql
-
-$(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
-
-installdirs:
- $(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir)/contrib
-
-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
-
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
+# $Header: /cvsroot/pgsql/contrib/btree_gist/Makefile,v 1.3 2001/09/06 10:49:29 petere Exp $
+
subdir = contrib/btree_gist
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-# override libdir to install shlib in contrib not main directory
-libdir := $(libdir)/contrib
-
-# shared library parameters
-NAME= btree_gist
-SO_MAJOR_VERSION= 1
-SO_MINOR_VERSION= 0
-
-override CPPFLAGS += -I$(srcdir)
-
-OBJS= btree_gist.o
-
-all: all-lib $(NAME).sql
-
-# Shared library stuff
-include $(top_srcdir)/src/Makefile.shlib
-
-
-$(NAME).sql: $(NAME).sql.in
- sed -e 's:MODULE_PATHNAME:$(libdir)/$(shlib):g' < $< > $@
-
-.PHONY: submake
-submake:
- $(MAKE) -C $(top_builddir)/src/test/regress pg_regress
-
-# against installed postmaster
-installcheck: submake
- $(top_builddir)/src/test/regress/pg_regress btree_gist
-
-# in-tree test doesn't work yet (no way to install my shared library)
-#check: all submake
-# $(top_builddir)/src/test/regress/pg_regress --temp-install \
-# --top-builddir=$(top_builddir) btree_gist
-check:
- @echo "'make check' is not supported."
- @echo "Do 'make install', then 'make installcheck' instead."
-
-install: all installdirs install-lib
- $(INSTALL_DATA) $(srcdir)/README.$(NAME) $(docdir)/contrib
- $(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir)
-
-uninstall: uninstall-lib
- rm -f $(docdir)/contrib/README.$(NAME) $(datadir)/contrib/$(NAME).sql
-
-clean distclean maintainer-clean: clean-lib
- rm -f *.so y.tab.c y.tab.h $(OBJS) $(NAME).sql
-# things created by various check targets
- rm -rf results tmp_check log
- rm -f regression.diffs regression.out regress.out run_check.out
-ifeq ($(PORTNAME), win)
- rm -f regress.def
-endif
-
-depend dep:
- $(CC) -MM $(CFLAGS) *.c >depend
+MODULES = btree_gist
+DATA_built = btree_gist.sql
+DOCS = README.btree_gist
+REGRESS = btree_gist
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
-#
-# $Header: /cvsroot/pgsql/contrib/chkpass/Makefile,v 1.2 2001/08/23 16:50:33 tgl Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/chkpass/Makefile,v 1.3 2001/09/06 10:49:29 petere Exp $
subdir = contrib/chkpass
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-# override libdir to install shlib in contrib not main directory
-libdir := $(libdir)/contrib
+MODULES = chkpass
+DATA_built = chkpass.sql
+DOCS = README.chkpass
-# shared library parameters
-NAME= chkpass
-SO_MAJOR_VERSION= 1
-SO_MINOR_VERSION= 0
-
-override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
-
-ifdef REFINT_VERBOSE
-override CPPFLAGS+= -DREFINT_VERBOSE
-endif
-
-OBJS= chkpass.o
-
-all: all-lib $(NAME).sql
-
-# Shared library stuff
-include $(top_srcdir)/src/Makefile.shlib
-
-
-$(NAME).sql: $(NAME).sql.in
- sed -e 's:MODULE_PATHNAME:$(libdir)/$(shlib):g' < $< > $@
-
-install: all installdirs install-lib
- $(INSTALL_DATA) $(srcdir)/README.$(NAME) $(docdir)/contrib
- $(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir)
-
-uninstall: uninstall-lib
- rm -f $(docdir)/contrib/README.$(NAME) $(datadir)/contrib/$(NAME).sql
-
-clean distclean maintainer-clean: clean-lib
- rm -f $(OBJS) $(NAME).sql
-
-depend dep:
- $(CC) -MM -MG $(CFLAGS) *.c >depend
-
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
--- /dev/null
+# $Header: /cvsroot/pgsql/contrib/contrib-global.mk,v 1.1 2001/09/06 10:49:29 petere Exp $
+
+# This file contains generic rules to build many kinds of simple
+# contrib modules. You only need to set a few variables and include
+# this file, the rest will be done here.
+#
+# Use the following layout for your Makefile:
+#
+# subdir = contrib/xxx
+# top_builddir = ../..
+# include $(top_builddir)/src/Makefile.global
+#
+# [variable assignments, see below]
+# [custom rules, rarely necessary]
+#
+# include $(top_srcdir)/contrib/contrib-global.mk
+#
+# The following variables can be set:
+#
+# MODULES -- list of shared objects to be build from source file with
+# same stem (do not include suffix in this list)
+# DATA -- random files to install into $PREFIX/share/contrib
+# DATA_built -- random files to install into $PREFIX/share/contrib,
+# which need to be built first
+# DOCS -- random files to install under $PREFIX/doc/contrib
+# SCRIPTS -- script files (not binaries) to install into $PREFIX/bin
+# REGRESS -- list of regression test cases (without suffix)
+#
+# or at most one of these two:
+#
+# PROGRAM -- a binary program to build (list objects files in OBJS)
+# MODULE_big -- a shared object to build (list object files in OBJS)
+#
+# The following can also be set:
+#
+# EXTRA_CLEAN -- extra files to remove in 'make clean'
+# PG_CPPFLAGS -- will be added to CPPFLAGS
+# PG_LIBS -- will be added to PROGRAM link line
+# SHLIB_LINK -- will be added to MODULE_big link line
+#
+# Better look at some of the existing uses for examples...
+
+
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
+
+ifdef MODULES
+override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
+endif
+
+ifdef PG_CPPFLAGS
+override CPPFLAGS := $(PG_CPPFLAGS) $(CPPFLAGS)
+endif
+
+all: $(PROGRAM) $(DATA_built) $(addsuffix $(DLSUFFIX), $(MODULES))
+
+ifdef MODULE_big
+# shared library parameters
+NAME = $(MODULE_big)
+SO_MAJOR_VERSION= 0
+SO_MINOR_VERSION= 0
+rpath =
+
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
+
+include $(top_srcdir)/src/Makefile.shlib
+
+all: all-lib
+endif # MODULE_big
+
+
+install: all installdirs
+ifneq (,$(DATA)$(DATA_built))
+ @for file in $(addprefix $(srcdir)/, $(DATA)) $(DATA_built); do \
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(datadir)/contrib"; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(datadir)/contrib; \
+ done
+endif # DATA
+ifdef MODULES
+ @for file in $(addsuffix $(DLSUFFIX), $(MODULES)); do \
+ echo "$(INSTALL_SHLIB) $$file $(DESTDIR)$(libdir)/contrib"; \
+ $(INSTALL_SHLIB) $$file $(DESTDIR)$(libdir)/contrib; \
+ done
+endif # MODULES
+ifdef DOCS
+ @for file in $(addprefix $(srcdir)/, $(DOCS)); do \
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/contrib"; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/contrib; \
+ done
+endif # DOCS
+ifdef PROGRAM
+ $(INSTALL_PROGRAM) $(PROGRAM)$(X) $(DESTDIR)$(bindir)
+endif # PROGRAM
+ifdef MODULE_big
+ $(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(libdir)/contrib/$(MODULE_big)$(DLSUFFIX)
+endif # MODULE_big
+ifdef SCRIPTS
+ @for file in $(addprefix $(srcdir)/, $(SCRIPTS)); do \
+ echo "$(INSTALL_SCRIPT) $$file $(DESTDIR)$(bindir)"; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(bindir); \
+ done
+endif # SCRIPTS
+
+
+installdirs:
+ifneq (,$(DATA)$(DATA_built))
+ $(mkinstalldirs) $(DESTDIR)$(datadir)/contrib
+endif
+ifneq (,$(MODULES)$(MODULE_big))
+ $(mkinstalldirs) $(DESTDIR)$(libdir)/contrib
+endif
+ifdef DOCS
+ $(mkinstalldirs) $(DESTDIR)$(docdir)/contrib
+endif
+ifneq (,$(PROGRAM)$(SCRIPTS))
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+endif
+
+
+uninstall:
+ifneq (,$(DATA)$(DATA_built))
+ rm -f $(addprefix $(DESTDIR)$(datadir)/contrib/, $(DATA) $(DATA_built))
+endif
+ifdef MODULES
+ rm -f $(addprefix $(DESTDIR)$(libdir)/contrib/, $(addsuffix $(DLSUFFIX), $(MODULES)))
+endif
+ifdef DOCS
+ rm -f $(addprefix $(DESTDIR)$(docdir)/contrib/, $(DOCS))
+endif
+ifdef PROGRAM
+ rm -f $(DESTDIR)$(bindir)/$(PROGRAM)$(X)
+endif
+ifdef MODULE_big
+ rm -f $(DESTDIR)$(libdir)/contrib/$(MODULE_big)$(DLSUFFIX)
+endif
+ifdef SCRIPTS
+ rm -f $(addprefix $(DESTDIR)$(bindir)/, $(SCRIPTS))
+endif
+
+
+clean:
+ifdef MODULES
+ rm -f $(addsuffix $(DLSUFFIX), $(MODULES)) $(addsuffix .o, $(MODULES))
+endif
+ifdef DATA_built
+ rm -f $(DATA_built)
+endif
+ifdef PROGRAM
+ rm -f $(PROGRAM)$(X)
+endif
+ifdef OBJS
+ rm -f $(OBJS)
+endif
+ifdef EXTRA_CLEAN
+ rm -f $(EXTRA_CLEAN)
+endif
+ifdef REGRESS
+# things created by various check targets
+ rm -rf results tmp_check log
+ rm -f regression.diffs regression.out regress.out run_check.out
+ifeq ($(PORTNAME), win)
+ rm -f regress.def
+endif
+endif # REGRESS
+
+ifdef MODULE_big
+clean: clean-lib
+endif
+
+distclean maintainer-clean: clean
+
+
+ifdef REGRESS
+.PHONY: submake
+submake:
+ $(MAKE) -C $(top_builddir)/src/test/regress pg_regress
+
+# against installed postmaster
+installcheck: submake
+ $(top_builddir)/src/test/regress/pg_regress $(REGRESS)
+
+# in-tree test doesn't work yet (no way to install my shared library)
+#check: all submake
+# $(top_builddir)/src/test/regress/pg_regress --temp-install \
+# --top-builddir=$(top_builddir) $(REGRESS)
+check:
+ @echo "'make check' is not supported."
+ @echo "Do 'make install', then 'make installcheck' instead."
+endif # REGRESS
+
+
+# STANDARD RULES
+
+ifneq (,$(MODULES)$(MODULE_big))
+%.sql: %.sql.in
+ sed 's,MODULE_PATHNAME,$(libdir)/contrib/$*,g' $< >$@
+endif
+
+ifdef PROGRAM
+$(PROGRAM): $(OBJS)
+ $(CC) $(CFLAGS) $(OBJS) $(PG_LIBS) $(LDFLAGS) $(LIBS) -o $@
+endif
-#
-# $Header: /cvsroot/pgsql/contrib/cube/Makefile,v 1.4 2001/06/18 21:38:01 momjian Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/cube/Makefile,v 1.5 2001/09/06 10:49:29 petere Exp $
subdir = contrib/cube
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-# override libdir to install shlib in contrib not main directory
-libdir := $(libdir)/contrib
-
-# shared library parameters
-NAME= cube
-SO_MAJOR_VERSION= 1
-SO_MINOR_VERSION= 0
-
-override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
-override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
-
+MODULE_big = cube
OBJS= cube.o cubeparse.o cubescan.o buffer.o
-all: all-lib $(NAME).sql
-
-# Shared library stuff
-include $(top_srcdir)/src/Makefile.shlib
+DATA_built = cube.sql
+DOCS = README.cube
+REGRESS = cube
cubeparse.c cubeparse.h: cubeparse.y
@$(missing) flex $< $@
endif
-$(NAME).sql: $(NAME).sql.in
- sed -e 's:MODULE_PATHNAME:$(libdir)/$(shlib):g' < $< > $@
-
-.PHONY: submake
-submake:
- $(MAKE) -C $(top_builddir)/src/test/regress pg_regress
-
-# against installed postmaster
-installcheck: submake
- $(top_builddir)/src/test/regress/pg_regress cube
-
-# in-tree test doesn't work yet (no way to install my shared library)
-#check: all submake
-# $(top_builddir)/src/test/regress/pg_regress --temp-install \
-# --top-builddir=$(top_builddir) seg
-check:
- @echo "'make check' is not supported."
- @echo "Do 'make install', then 'make installcheck' instead."
+EXTRA_CLEAN = cubeparse.c cubeparse.h cubescan.c y.tab.c y.tab.h
-install: all installdirs install-lib
- $(INSTALL_DATA) $(srcdir)/README.$(NAME) $(docdir)/contrib
- $(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
-installdirs:
- $(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir)
-
-uninstall: uninstall-lib
- rm -f $(docdir)/contrib/README.$(NAME) $(datadir)/contrib/$(NAME).sql
-
-clean distclean maintainer-clean: clean-lib
- rm -f cubeparse.c cubeparse.h cubescan.c
- rm -f y.tab.c y.tab.h $(OBJS) $(NAME).sql
-# things created by various check targets
- rm -rf results tmp_check log
- rm -f regression.diffs regression.out regress.out run_check.out
-ifeq ($(PORTNAME), win)
- rm -f regress.def
-endif
-
-depend dep:
- $(CC) -MM $(CFLAGS) *.c >depend
-
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
-#
-# $Header: /cvsroot/pgsql/contrib/dbase/Attic/Makefile,v 1.1 2001/05/10 14:41:23 momjian Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/dbase/Attic/Makefile,v 1.2 2001/09/06 10:49:29 petere Exp $
subdir = contrib/dbase
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
-
+PROGRAM = dbf2pg
OBJS = dbf.o dbf2pg.o endian.o
+PG_CPPFLAGS = -I$(libpq_srcdir)
+PG_LIBS = $(libpq)
-all: dbf2pg
-
-dbf2pg: $(OBJS) $(libpq_builddir)/libpq.a
- $(CC) $(CFLAGS) $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -liconv -o $@
-
-install: all installdirs
- $(INSTALL_PROGRAM) dbf2pg$(X) $(bindir)
- $(INSTALL_DATA) README.dbf2pg $(docdir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(bindir) $(docdir)/contrib
-
-uninstall:
- rm -f $(bindir)/dbf2pg$(X) $(docdir)/contrib/README.dbf2pg
-
-clean distclean maintainer-clean:
- rm -f dbf2pg$(X) $(OBJS)
-
-depend dep:
- $(CC) -MM -MG $(CFLAGS) *.c > depend
+DOCS = README.dbf2pg
+MAN = dbf2pg.1 # XXX not implemented
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
+# $Header: /cvsroot/pgsql/contrib/dblink/Makefile,v 1.4 2001/09/06 10:49:29 petere Exp $
+
subdir = contrib/dblink
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-include_srcdir = $(top_builddir)/src/include
-
-
-NAME := dblink
-SONAME := $(NAME)$(DLSUFFIX)
-
-override CFLAGS += -I$(srcdir)
-override CFLAGS += -I$(include_srcdir)
-override CFLAGS += -I$(libpq_srcdir)
-override CFLAGS += $(CFLAGS_SL)
-override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
-
-OBJS = $(NAME).o
-
-SHLIB_LINK= $(libpq)
-
-all: $(OBJS) $(SONAME) $(NAME).sql
-
-include $(top_builddir)/src/Makefile.shlib
-
-$(OBJS): $(NAME).c
- $(CC) -o $@ -c $(CFLAGS) $<
-
-$(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
-
-installdirs:
- $(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir)/contrib
-
-uninstall:
- rm -rf $(docdir)/contrib/README.$(NAME) $(datadir)/contrib/$(NAME).sql $(libdir)/contrib/$(SONAME)
-clean distclean maintainer-clean:
- rm -f $(SONAME) *.o *.sql
+MODULE_big = dblink
+PG_CPPFLAGS = -I$(libpq_srcdir)
+OBJS = dblink.o
+SHLIB_LINK = $(libpq)
-depend dep:
- $(CC) -MM -MG $(CFLAGS) *.c > depend
+DATA_built = dblink.sql
+DOCS = README.dblink
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
-#
-# $Header: /cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.10 2001/06/18 21:38:01 momjian Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.11 2001/09/06 10:49:29 petere Exp $
subdir = contrib/earthdistance
top_builddir = ../..
-include ../../src/Makefile.global
+include $(top_builddir)/src/Makefile.global
-NAME := earthdistance
-SONAME := $(NAME)$(DLSUFFIX)
+MODULES = earthdistance
+DATA_built = earthdistance.sql
+DOCS = README.earthdistance
-override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
-override CFLAGS += $(CFLAGS_SL)
-override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
-
-all: $(SONAME) $(NAME).sql
-
-$(NAME).sql: $(NAME).sql.in
- sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(SONAME):g' < $< > $@
-
-install: all installdirs
- $(INSTALL_SHLIB) $(SONAME) $(libdir)/contrib
- $(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
- $(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(libdir)/contrib $(datadir)/contrib $(docdir)/contrib
-
-uninstall:
- rm -f $(libdir)/contrib/$(SONAME) $(datadir)/contrib/$(NAME).sql $(docdir)/contrib/README.$(NAME)
-
-clean distclean maintainer-clean:
- rm -f $(SONAME) $(NAME).sql
-
-depend dep:
- $(CC) -MM -MG $(CFLAGS) *.c > depend
-
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
-#
-# $Header: /cvsroot/pgsql/contrib/findoidjoins/Attic/Makefile,v 1.12 2001/02/20 19:20:27 petere Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/findoidjoins/Attic/Makefile,v 1.13 2001/09/06 10:49:29 petere Exp $
subdir = contrib/findoidjoins
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-libpgeasy_srcdir = $(top_srcdir)/src/interfaces/libpgeasy
-libpgeasy_builddir = $(top_builddir)/src/interfaces/libpgeasy
-
-override CPPFLAGS := -I$(libpgeasy_srcdir) -I$(libpq_srcdir) $(CPPFLAGS)
-
+PROGRAM = findoidjoins
OBJS = findoidjoins.o
-all: findoidjoins
-
-findoidjoins: $(OBJS) $(libpgeasy_builddir)/libpgeasy.a $(libpq_builddir)/libpq.a
- $(CC) $(CFLAGS) $(OBJS) -L$(libpgeasy_builddir) -lpgeasy $(libpq) $(LDFLAGS) $(LIBS) -o $@
-
-install: all installdirs
- $(INSTALL_PROGRAM) findoidjoins$(X) $(bindir)
- $(INSTALL_SCRIPT) make_oidjoins_check $(bindir)
- $(INSTALL_DATA) README.findoidjoins $(docdir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(bindir) $(docdir)/contrib
-
-uninstall:
- rm -f $(bindir)/findoidjoins$(X) $(bindir)/make_oidjoins_check $(docdir)/contrib/README.findoidjoins
+libpgeasy_srcdir = $(top_srcdir)/src/interfaces/libpgeasy
+libpgeasy_builddir = $(top_builddir)/src/interfaces/libpgeasy
-clean distclean maintainer-clean:
- rm -f findoidjoins$(X) $(OBJS)
+PG_CPPFLAGS = -I$(libpgeasy_srcdir) -I$(libpq_srcdir)
+PG_LIBS = -L$(libpgeasy_builddir) -lpgeasy $(libpq)
-depend dep:
- $(CC) -MM -MG $(CFLAGS) *.c > depend
+SCRIPTS = make_oidjoins_check
+DOCS = README.findoidjoins
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
-#
-# $Header: /cvsroot/pgsql/contrib/fulltextindex/Attic/Makefile,v 1.10 2001/06/18 21:38:01 momjian Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/fulltextindex/Attic/Makefile,v 1.11 2001/09/06 10:49:29 petere Exp $
subdir = contrib/fulltextindex
top_builddir = ../..
-include ../../src/Makefile.global
+include $(top_builddir)/src/Makefile.global
-NAME := fti
-SONAME := $(NAME)$(DLSUFFIX)
+MODULES = fti
+DATA_built = fti.sql
+DOCS = README.fti
+SCRIPTS = fti.pl
-override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
-override CFLAGS += $(CFLAGS_SL)
-override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
-
-all: $(SONAME) $(NAME).sql
-
-$(NAME).sql: $(NAME).sql.in
- sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(SONAME):g' < $< > $@
-
-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
-
-installdirs:
- $(mkinstalldirs) $(bindir) $(libdir)/contrib $(datadir)/contrib $(docdir)/contrib
-
-uninstall:
- rm -f $(bindir)/fti.pl $(libdir)/contrib/$(SONAME) \
- $(datadir)/contrib/$(NAME).sql $(docdir)/contrib/README.$(NAME)
-
-clean distclean maintainer-clean:
- rm -f $(SONAME) $(NAME).sql
-
-depend dep:
- $(CC) -MM -MG $(CFLAGS) *.c > depend
-
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
+# $Header: /cvsroot/pgsql/contrib/fuzzystrmatch/Makefile,v 1.2 2001/09/06 10:49:29 petere Exp $
+
subdir = contrib/fuzzystrmatch
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-# override libdir to install shlib in contrib not main directory
-libdir := $(libdir)/contrib
-
-# shared library parameters
-NAME= fuzzystrmatch
-SO_MAJOR_VERSION= 0
-SO_MINOR_VERSION= 1
-
-override CPPFLAGS := -I$(srcdir)/src/include $(CPPFLAGS)
-
-OBJS= fuzzystrmatch.o
-
-all: all-lib $(NAME).sql
-
-# Shared library stuff
-include $(top_srcdir)/src/Makefile.shlib
-
-
-$(NAME).sql: $(NAME).sql.in
- sed -e 's:MODULE_PATHNAME:$(libdir)/$(shlib):g' < $< > $@
-
-install: all installdirs install-lib
-
-installdirs:
- $(mkinstalldirs) $(DESTDIR)$(libdir)
-
-uninstall: uninstall-lib
-
-clean distclean maintainer-clean: clean-lib
- rm -f $(OBJS) $(NAME).sql
-
-depend dep:
- $(CC) -MM $(CFLAGS) *.c >depend
+MODULES = fuzzystrmatch
+DATA_built = fuzzystrmatch.sql
+DOCS = README.fuzzystrmatch README.soundex
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
-# $Header: /cvsroot/pgsql/contrib/intarray/Makefile,v 1.7 2001/06/18 21:38:01 momjian Exp $
+# $Header: /cvsroot/pgsql/contrib/intarray/Makefile,v 1.8 2001/09/06 10:49:29 petere Exp $
subdir = contrib/intarray
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-# override libdir to install shlib in contrib not main directory
-libdir := $(libdir)/contrib
+MODULES = _int
+DATA_built = _int.sql
+DOCS = README.intarray
+REGRESS = _int
-# shared library parameters
-NAME= _int
-SO_MAJOR_VERSION= 1
-SO_MINOR_VERSION= 0
-
-override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
-override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
-
-OBJS= _int.o
-
-all: all-lib $(NAME).sql
-
-# Shared library stuff
-include $(top_srcdir)/src/Makefile.shlib
-
-
-$(NAME).sql: $(NAME).sql.in
- sed 's,MODULE_PATHNAME,$(libdir)/$(shlib),g' $< >$@
-
-.PHONY: submake
-submake:
- $(MAKE) -C $(top_builddir)/src/test/regress pg_regress
-
-installcheck: submake
- $(top_builddir)/src/test/regress/pg_regress _int
-
-check:
- @echo "'$(MAKE) check' is not supported."
- @echo "Do '$(MAKE) install', then '$(MAKE) installcheck' instead."
-
-install: all installdirs install-lib
- $(INSTALL_DATA) $(srcdir)/README.intarray $(docdir)/contrib
- $(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir)
-
-uninstall: uninstall-lib
- rm -f $(docdir)/contrib/README.intarray $(datadir)/contrib/$(NAME).sql
-
-clean distclean maintainer-clean: clean-lib
- rm -f $(OBJS) $(NAME).sql
-# things created by various check targets
- rm -rf results
- rm -f regression.diffs regression.out
+include $(top_srcdir)/contrib/contrib-global.mk
-#
-# $Header: /cvsroot/pgsql/contrib/isbn_issn/Attic/Makefile,v 1.10 2001/06/18 21:38:01 momjian Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/isbn_issn/Attic/Makefile,v 1.11 2001/09/06 10:49:29 petere Exp $
subdir = contrib/isbn_issn
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-NAME := isbn_issn
-SONAME := $(NAME)$(DLSUFFIX)
+MODULES = isbn_issn
+DATA_built = isbn_issn.sql
+DOCS = README.isbn_issn
-override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
-override CFLAGS += $(CFLAGS_SL)
-override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
-
-all: $(SONAME) $(NAME).sql
-
-$(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
-
-installdirs:
- $(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir)/contrib
-
-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
-
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
-#
-# $Header: /cvsroot/pgsql/contrib/lo/Makefile,v 1.10 2001/06/18 21:38:01 momjian Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/lo/Makefile,v 1.11 2001/09/06 10:49:29 petere Exp $
subdir = contrib/lo
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-NAME := lo
-SONAME := $(NAME)$(DLSUFFIX)
+MODULES = lo
+DATA_built = lo.sql
+DATA = lo_drop.sql lo_test.sql
+DOCS = README.lo
-SQLS = $(NAME).sql lo_drop.sql lo_test.sql
-MODS = $(NAME)$(DLSUFFIX)
-
-override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
-override CFLAGS += $(CFLAGS_SL)
-override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
-
-ifdef REFINT_VERBOSE
-override CPPFLAGS+= -DREFINT_VERBOSE
-endif
-
-all: $(SONAME) $(NAME).sql
-
-$(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
-
-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)
-
-clean distclean maintainer-clean:
- rm -f $(SONAME) $(NAME).sql
-
-depend dep:
- $(CC) -MM -MG $(CFLAGS) *.c > depend
-
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
-#
-# $Header: /cvsroot/pgsql/contrib/miscutil/Attic/Makefile,v 1.15 2001/06/18 21:38:01 momjian Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/miscutil/Attic/Makefile,v 1.16 2001/09/06 10:49:29 petere Exp $
subdir = contrib/miscutil
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-NAME := misc_utils
-SONAME := $(NAME)$(DLSUFFIX)
+MODULES = misc_utils
+DATA_built = misc_utils.sql
+DOCS = README.misc_utils
-override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
-override CFLAGS += $(CFLAGS_SL)
-override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
-
-all: $(SONAME) $(NAME).sql
-
-$(NAME).sql: $(NAME).sql.in
- sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(SONAME):g' < $< > $@
-
-install: all installdirs
- $(INSTALL_SHLIB) $(SONAME) $(libdir)/contrib
- $(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
- $(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(libdir)/contrib $(datadir)/contrib $(docdir)/contrib
-
-uninstall:
- rm -f $(libdir)/contrib/$(SONAME) $(datadir)/contrib/$(NAME).sql $(docdir)/contrib/README.$(NAME)
-
-clean distclean maintainer-clean:
- rm -f $(SONAME) $(NAME).sql
-
-depend dep:
- $(CC) -MM -MG $(CFLAGS) *.c > depend
-
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
-#
-# $Header: /cvsroot/pgsql/contrib/noupdate/Attic/Makefile,v 1.8 2001/06/18 21:38:02 momjian Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/noupdate/Attic/Makefile,v 1.9 2001/09/06 10:49:29 petere Exp $
subdir = contrib/noupdate
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-NAME := noup
-SONAME := $(NAME)$(DLSUFFIX)
+MODULES = noup
+DATA_built = noup.sql
+DOCS = README.noup
-override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
-override CFLAGS += $(CFLAGS_SL)
-override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
-
-all: $(SONAME) $(NAME).sql
-
-$(NAME).sql: $(NAME).sql.in
- sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(SONAME):g' < $< > $@
-
-install: all installdirs
- $(INSTALL_SHLIB) $(SONAME) $(libdir)/contrib
- $(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
- $(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(libdir)/contrib $(datadir)/contrib $(docdir)/contrib
-
-uninstall:
- rm -f $(libdir)/contrib/$(SONAME) $(datadir)/contrib/$(NAME).sql $(docdir)/contrib/README.$(NAME)
-
-clean distclean maintainer-clean:
- rm -f $(SONAME) $(NAME).sql
-
-depend dep:
- $(CC) -MM -MG $(CFLAGS) *.c > depend
-
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
-# $Header: /cvsroot/pgsql/contrib/oid2name/Makefile,v 1.3 2001/02/20 19:20:27 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/oid2name/Makefile,v 1.4 2001/09/06 10:49:29 petere Exp $
subdir = contrib/oid2name
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
-
+PROGRAM = oid2name
OBJS = oid2name.o
-all: oid2name
-
-oid2name: $(OBJS) $(libpq_builddir)/libpq.a
- $(CC) $(CFLAGS) $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@ -g
-
-install: all installdirs
- $(INSTALL_PROGRAM) oid2name$(X) $(bindir)
- $(INSTALL_DATA) README.oid2name $(docdir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(bindir) $(docdir)/contrib
-
-uninstall:
- rm -f $(bindir)/oid2name$(X) $(docdir)/contrib/README.oid2name
-
-clean distclean maintainer-clean:
- rm -f oid2name$(X) $(OBJS)
+PG_CPPFLAGS = -I$(libpq_srcdir)
+PG_LIBS = $(libpq)
-depend dep:
- $(CC) -MM -MG $(CFLAGS) *.c > depend
+DOCS = README.oid2name
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
-#
-# $Header: /cvsroot/pgsql/contrib/pg_controldata/Attic/Makefile,v 1.4 2001/04/03 19:06:19 tgl Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/pg_controldata/Attic/Makefile,v 1.5 2001/09/06 10:49:29 petere Exp $
subdir = contrib/pg_controldata
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
+PROGRAM = pg_controldata
OBJS = pg_controldata.o pg_crc.o $(SNPRINTF)
-all: pg_controldata
-
-pg_controldata: $(OBJS)
- $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) -o $@
-
pg_crc.c: $(top_srcdir)/src/backend/utils/hash/pg_crc.c
rm -f $@ && $(LN_S) $< .
snprintf.c: $(top_srcdir)/src/backend/port/snprintf.c
rm -f $@ && $(LN_S) $< .
-install: all installdirs
- $(INSTALL_PROGRAM) pg_controldata$(X) $(bindir)
- $(INSTALL_DATA) README.pg_controldata $(docdir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(bindir) $(docdir)/contrib
-
-uninstall:
- rm -f $(bindir)/pg_controldata$(X) $(docdir)/contrib/README.pg_controldata
-
-clean distclean maintainer-clean:
- rm -f pg_controldata$(X) $(OBJS) pg_crc.c snprintf.c
+EXTRA_CLEAN = pg_crc.c snprintf.c
-depend dep:
- $(CC) -MM -MG $(CFLAGS) *.c > depend
+DOCS = README.pg_controldata
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
* copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001;
* licence: BSD
*
- * $Header: /cvsroot/pgsql/contrib/pg_controldata/Attic/pg_controldata.c,v 1.3 2001/03/22 03:59:09 momjian Exp $
+ * $Header: /cvsroot/pgsql/contrib/pg_controldata/Attic/pg_controldata.c,v 1.4 2001/09/06 10:49:29 petere Exp $
*/
#include "postgres.h"
int
-main()
+main(int argc, char *argv[])
{
ControlFileData ControlFile;
int fd;
char pgctime_str[32];
char ckpttime_str[32];
- DataDir = getenv("PGDATA");
+ if (argc > 1)
+ DataDir = argv[1];
+ else
+ DataDir = getenv("PGDATA");
if (DataDir == NULL)
{
- fprintf(stderr, "PGDATA is not defined\n");
+ fprintf(stderr, "no data directory specified\n");
exit(1);
}
-#
-# $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/Makefile,v 1.10 2001/02/20 19:20:27 petere Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/Makefile,v 1.11 2001/09/06 10:49:30 petere Exp $
subdir = contrib/pg_dumplo
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
-
+PROGRAM = pg_dumplo
OBJS = main.o lo_export.o lo_import.o utils.o
-all: pg_dumplo
-
-pg_dumplo: $(OBJS) $(libpq_builddir)/libpq.a
- $(CC) $(CFLAGS) $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@
-
-install: all installdirs
- $(INSTALL_PROGRAM) pg_dumplo$(X) $(bindir)
- $(INSTALL_DATA) README.pg_dumplo $(docdir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(bindir) $(docdir)/contrib
-
-uninstall:
- rm -f $(bindir)/pg_dumplo$(X) $(docdir)/contrib/README.pg_dumplo
-
-clean distclean maintainer-clean:
- rm -f pg_dumplo$(X) $(OBJS)
+PG_CPPFLAGS = -I$(libpq_srcdir)
+PG_LIBS = $(libpq)
-depend dep:
- $(CC) -MM -MG $(CFLAGS) *.c > depend
+DOCS = README.pg_dumplo
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
-#
-# $Header: /cvsroot/pgsql/contrib/pg_logger/Attic/Makefile,v 1.1 2001/02/11 02:18:27 momjian Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/pg_logger/Attic/Makefile,v 1.2 2001/09/06 10:49:30 petere Exp $
subdir = contrib/pg_logger
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
+PROGRAM = pg_logger
OBJS = pg_logger.o
-all: pg_logger
+DOCS = README.pg_logger
-pg_logger: $(OBJS)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
-
-install: all installdirs
- $(INSTALL_PROGRAM) pg_logger$(X) $(bindir)
- $(INSTALL_DATA) README.pg_logger $(docdir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(bindir) $(docdir)/contrib
-
-uninstall:
- rm -f $(bindir)/pg_logger$(X) $(docdir)/contrib/README.pg_logger
-
-clean distclean maintainer-clean:
- rm -f pg_logger$(X) $(OBJS)
-
-depend dep:
- $(CC) -MM -MG $(CFLAGS) *.c > depend
-
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
-#
-# $Header: /cvsroot/pgsql/contrib/pg_resetxlog/Attic/Makefile,v 1.2 2001/04/03 19:01:57 tgl Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/pg_resetxlog/Attic/Makefile,v 1.3 2001/09/06 10:49:30 petere Exp $
subdir = contrib/pg_resetxlog
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
+PROGRAM = pg_resetxlog
OBJS = pg_resetxlog.o pg_crc.o $(SNPRINTF)
-all: pg_resetxlog
-
-pg_resetxlog: $(OBJS)
- $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) -o $@
-
pg_crc.c: $(top_srcdir)/src/backend/utils/hash/pg_crc.c
rm -f $@ && $(LN_S) $< .
snprintf.c: $(top_srcdir)/src/backend/port/snprintf.c
rm -f $@ && $(LN_S) $< .
-install: all installdirs
- $(INSTALL_PROGRAM) pg_resetxlog$(X) $(bindir)
- $(INSTALL_DATA) README.pg_resetxlog $(docdir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(bindir) $(docdir)/contrib
-
-uninstall:
- rm -f $(bindir)/pg_resetxlog$(X) $(docdir)/contrib/README.pg_resetxlog
-
-clean distclean maintainer-clean:
- rm -f pg_resetxlog$(X) $(OBJS) pg_crc.c snprintf.c
+EXTRA_CLEAN = pg_crc.c snprintf.c
-depend dep:
- $(CC) -MM -MG $(CFLAGS) *.c > depend
+DOCS = README.pg_resetxlog
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
-#
-# $Header: /cvsroot/pgsql/contrib/pgbench/Makefile,v 1.9 2001/02/20 19:20:27 petere Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/pgbench/Makefile,v 1.10 2001/09/06 10:49:30 petere Exp $
subdir = contrib/pgbench
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
-
+PROGRAM = pgbench
OBJS = pgbench.o
-all: pgbench
-
-pgbench: $(OBJS) $(libpq_builddir)/libpq.a
- $(CC) $(CFLAGS) $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@
-
-install: all installdirs
- $(INSTALL_PROGRAM) pgbench$(X) $(bindir)
- $(INSTALL_DATA) README.pgbench $(docdir)/contrib
- $(INSTALL_DATA) README.pgbench_jis $(docdir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(bindir) $(docdir)/contrib
-
-uninstall:
- rm -f $(bindir)/pgbench$(X) $(docdir)/contrib/README.pgbench $(docdir)/contrib/README.pgbench_jis
-
-clean distclean maintainer-clean:
- rm -f pgbench$(X) $(OBJS)
+PG_CPPFLAGS = -I$(libpq_srcdir)
+PG_LIBS = $(libpq)
-depend dep:
- $(CC) -MM -MG $(CFLAGS) *.c > depend
+DOCS = README.pgbench README.pgbench_jis
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
for file in $(TCLS) $(PERLS) $(SCRIPTS); do \
$(INSTALL_SCRIPT) $$file $(DESTDIR)$(bindir) || exit ; \
done
- $(INSTALL_DATA) RServ.pm $(DESTDIR)$(datadir)/contrib
+ $(INSTALL_DATA) $(srcdir)/RServ.pm $(DESTDIR)$(datadir)/contrib
$(INSTALL_SHLIB) $(SONAME) $(DESTDIR)$(libdir)/contrib
- $(INSTALL_DATA) README.$(NAME) $(DESTDIR)$(docdir)/contrib
+ $(INSTALL_DATA) $(srcdir)/README.$(NAME) $(DESTDIR)$(docdir)/contrib
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)/contrib \
-#
-# $Header: /cvsroot/pgsql/contrib/rtree_gist/Attic/Makefile,v 1.2 2001/06/20 00:04:44 momjian Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/rtree_gist/Attic/Makefile,v 1.3 2001/09/06 10:49:30 petere Exp $
subdir = contrib/rtree_gist
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-# override libdir to install shlib in contrib not main directory
-libdir := $(libdir)/contrib
+MODULES = rtree_gist
+DATA_built = rtree_gist.sql
+DOCS = README.rtree_gist
+REGRESS = rtree_gist
-# shared library parameters
-NAME= rtree_gist
-SO_MAJOR_VERSION= 1
-SO_MINOR_VERSION= 0
-
-override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
-override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
-
-OBJS= rtree_gist.o
-
-all: all-lib $(NAME).sql
-
-# Shared library stuff
-include $(top_srcdir)/src/Makefile.shlib
-
-
-$(NAME).sql: $(NAME).sql.in
- sed -e 's:MODULE_PATHNAME:$(libdir)/$(shlib):g' < $< > $@
-
-.PHONY: submake
-submake:
- $(MAKE) -C $(top_builddir)/src/test/regress pg_regress
-
-# against installed postmaster
-installcheck: submake
- $(top_builddir)/src/test/regress/pg_regress rtree_gist
-
-# in-tree test doesn't work yet (no way to install my shared library)
-#check: all submake
-# $(top_builddir)/src/test/regress/pg_regress --temp-install \
-# --top-builddir=$(top_builddir) rtree_gist
-check:
- @echo "'make check' is not supported."
- @echo "Do 'make install', then 'make installcheck' instead."
-
-install: all installdirs install-lib
- $(INSTALL_DATA) $(srcdir)/README.$(NAME) $(docdir)/contrib
- $(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir)
-
-uninstall: uninstall-lib
- rm -f $(docdir)/contrib/README.$(NAME) $(datadir)/contrib/$(NAME).sql
-
-clean distclean maintainer-clean: clean-lib
- rm -f $(OBJS) $(NAME).sql
-# things created by various check targets
- rm -rf results tmp_check log
- rm -f regression.diffs regression.out regress.out run_check.out
-ifeq ($(PORTNAME), win)
- rm -f regress.def
-endif
-
-depend dep:
- $(CC) -MM $(CFLAGS) *.c >depend
-
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
-#
-# $Header: /cvsroot/pgsql/contrib/seg/Makefile,v 1.4 2001/06/18 21:38:02 momjian Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/seg/Makefile,v 1.5 2001/09/06 10:49:30 petere Exp $
subdir = contrib/seg
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-# override libdir to install shlib in contrib not main directory
-libdir := $(libdir)/contrib
-
-# shared library parameters
-NAME= seg
-SO_MAJOR_VERSION= 1
-SO_MINOR_VERSION= 0
-
-override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
-override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
-
-OBJS= seg.o segparse.o segscan.o buffer.o
-
-all: all-lib $(NAME).sql
-
-# Shared library stuff
-include $(top_srcdir)/src/Makefile.shlib
+MODULE_big = seg
+OBJS = seg.o segparse.o segscan.o buffer.o
+DATA_built = seg.sql
+DOCS = README.seg
+REGRESS = seg
segparse.c segparse.h: segparse.y
@$(missing) flex $< $@
endif
-$(NAME).sql: $(NAME).sql.in
- sed -e 's:MODULE_PATHNAME:$(libdir)/$(shlib):g' < $< > $@
-
-.PHONY: submake
-submake:
- $(MAKE) -C $(top_builddir)/src/test/regress pg_regress
-
-# against installed postmaster
-installcheck: submake
- $(top_builddir)/src/test/regress/pg_regress seg
+EXTRA_CLEAN = segparse.c segparse.h segscan.c y.tab.c y.tab.h
-# in-tree test doesn't work yet (no way to install my shared library)
-#check: all submake
-# $(top_builddir)/src/test/regress/pg_regress --temp-install \
-# --top-builddir=$(top_builddir) seg
-check:
- @echo "'make check' is not supported."
- @echo "Do 'make install', then 'make installcheck' instead."
-install: all installdirs install-lib
- $(INSTALL_DATA) $(srcdir)/README.$(NAME) $(docdir)/contrib
- $(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir)
-
-uninstall: uninstall-lib
- rm -f $(docdir)/contrib/README.$(NAME) $(datadir)/contrib/$(NAME).sql
-
-clean distclean maintainer-clean: clean-lib
- rm -f segparse.c segparse.h segscan.c
- rm -f y.tab.c y.tab.h $(OBJS) $(NAME).sql
-# things created by various check targets
- rm -rf results tmp_check log
- rm -f regression.diffs regression.out regress.out run_check.out
-ifeq ($(PORTNAME), win)
- rm -f regress.def
-endif
-
-depend dep:
- $(CC) -MM $(CFLAGS) *.c >depend
-
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
-#
-# $Header: /cvsroot/pgsql/contrib/spi/Makefile,v 1.20 2001/04/04 21:15:56 tgl Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/spi/Makefile,v 1.21 2001/09/06 10:49:30 petere Exp $
subdir = contrib/spi
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-OBJS = autoinc.o insert_username.o moddatetime.o refint.o timetravel.o
-DOCS = README.spi
-SQLS = $(OBJS:.o=.sql)
-EXAMPLES= $(OBJS:.o=.example)
-MODS = $(OBJS:.o=$(DLSUFFIX))
-
-override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
-override CFLAGS += $(CFLAGS_SL)
+MODULES = autoinc insert_username moddatetime refint timetravel
+DATA_built = $(addsuffix .sql, $(MODULES))
+DOCS = README.spi $(addsuffix .example, $(MODULES))
ifdef REFINT_VERBOSE
-override CPPFLAGS+= -DREFINT_VERBOSE
+PG_CPPFLAGS = -DREFINT_VERBOSE
endif
-override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
-
-
-all: $(MODS) $(SQLS)
-
-%.sql: %.sql.in
- sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(@:.sql=$(DLSUFFIX)):g' < $< > $@
-
-install: all installdirs
- for inst_file in $(SQLS); do \
- $(INSTALL_DATA) $$inst_file $(datadir)/contrib || exit; \
- done
- for inst_file in $(MODS); do \
- $(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
-
-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
-
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
- #
-# $Header: /cvsroot/pgsql/contrib/string/Attic/Makefile,v 1.15 2001/06/18 21:38:02 momjian Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/string/Attic/Makefile,v 1.16 2001/09/06 10:49:30 petere Exp $
subdir = contrib/string
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-NAME := string_io
-SONAME := $(NAME)$(DLSUFFIX)
+MODULES = string_io
+DATA_built = string_io.sql
+DOCS = README.string_io
-override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
-override CFLAGS += $(CFLAGS_SL)
-override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
-
-all: $(SONAME) $(NAME).sql
-
-%.sql: %.sql.in
- sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(@:.sql=$(DLSUFFIX)):g' < $< > $@
-
-install: all installdirs
- $(INSTALL_SHLIB) $(SONAME) $(libdir)/contrib
- $(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
- $(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(libdir)/contrib $(datadir)/contrib $(docdir)/contrib
-
-uninstall:
- rm -f $(libdir)/contrib/$(SONAME) $(datadir)/contrib/$(NAME).sql $(docdir)/contrib/README.$(NAME)
-
-clean distclean maintainer-clean:
- rm -f $(SONAME) $(NAME).sql
-
-depend dep:
- $(CC) -MM -MG $(CFLAGS) *.c > depend
-
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
-#
-# $Header: /cvsroot/pgsql/contrib/tips/Attic/Makefile,v 1.4 2000/07/09 13:13:43 petere Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/tips/Attic/Makefile,v 1.5 2001/09/06 10:49:30 petere Exp $
subdir = contrib/tips
top_builddir = ../..
-include ../../src/Makefile.global
+include $(top_builddir)/src/Makefile.global
-all:
+DOCS = README.apachelog
-install: installdirs
- $(INSTALL_DATA) README.apachelog $(docdir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(docdir)/contrib
-
-uninstall:
- rm -f $(docdir)/contrib/README.apachelog
+include $(top_srcdir)/contrib/contrib-global.mk
-#
-# $Header: /cvsroot/pgsql/contrib/userlock/Attic/Makefile,v 1.15 2001/06/18 21:38:02 momjian Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/userlock/Attic/Makefile,v 1.16 2001/09/06 10:49:30 petere Exp $
subdir = contrib/userlock
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-NAME := user_locks
-SONAME := $(NAME)$(DLSUFFIX)
+MODULES = user_locks
+DATA_built = user_locks.sql
+DOCS = README.user_locks
-override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
-override CFLAGS += $(CFLAGS_SL)
-override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
-
-all: $(SONAME) $(NAME).sql
-
-%.sql: %.sql.in
- sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(@:.sql=$(DLSUFFIX)):g' < $< > $@
-
-install: all installdirs
- $(INSTALL_SHLIB) $(SONAME) $(libdir)/contrib
- $(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
- $(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(libdir)/contrib $(datadir)/contrib $(docdir)/contrib
-
-uninstall:
- rm -rf $(libdir)/contrib/$(SONAME) $(datadir)/contrib/$(NAME).sql $(docdir)/contrib/README.$(NAME)
-
-clean distclean maintainer-clean:
- rm -f $(SONAME) $(NAME).sql
-
-depend dep:
- $(CC) -MM -MG $(CFLAGS) *.c > depend
-
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk
-#
-# $Header: /cvsroot/pgsql/contrib/vacuumlo/Makefile,v 1.10 2001/02/20 19:20:28 petere Exp $
-#
+# $Header: /cvsroot/pgsql/contrib/vacuumlo/Makefile,v 1.11 2001/09/06 10:49:30 petere Exp $
subdir = contrib/vacuumlo
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
-
+PROGRAM = vacuumlo
OBJS = vacuumlo.o
-all: vacuumlo
-
-vacuumlo: $(OBJS) $(libpq_builddir)/libpq.a
- $(CC) $(CFLAGS) $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@
-
-install: all installdirs
- $(INSTALL_PROGRAM) vacuumlo$(X) $(bindir)
- $(INSTALL_DATA) README.vacuumlo $(docdir)/contrib
-
-installdirs:
- $(mkinstalldirs) $(bindir) $(docdir)/contrib
-
-uninstall:
- rm -f $(bindir)/vacuumlo$(X) $(docdir)/contrib/README.vacuumlo
-
-clean distclean maintainer-clean:
- rm -f vacuumlo$(X) $(OBJS)
+PG_CPPFLAGS = -I$(libpq_srcdir)
+PG_LIBS = $(libpq)
-depend dep:
- $(CC) -MM -MG $(CFLAGS) *.c > depend
+DOCS = README.vacuumlo
-ifeq (depend,$(wildcard depend))
-include depend
-endif
+include $(top_srcdir)/contrib/contrib-global.mk