1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Add support for VPATH builds, that is, building somewhere else than in the

source directory.  This involves mostly makefiles using $(srcdir) when they
might have used ".".  (Regression tests don't work with this, yet.)

Sort out usage of CPPFLAGS, CFLAGS (and CXXFLAGS).  Add "override" keyword
in most places, to preserve necessary flags even when the user overrode the
flags.
This commit is contained in:
Peter Eisentraut
2000-10-20 21:04:27 +00:00
parent 039f3f1b05
commit 805e431a38
57 changed files with 664 additions and 608 deletions

View File

@ -1,15 +1,16 @@
#
# $Header: /cvsroot/pgsql/contrib/array/Attic/Makefile,v 1.12 2000/07/09 13:12:59 petere Exp $
# $Header: /cvsroot/pgsql/contrib/array/Attic/Makefile,v 1.13 2000/10/20 21:03:03 petere Exp $
#
subdir = contrib/array
top_builddir = ../..
include ../../src/Makefile.global
include $(top_builddir)/src/Makefile.global
NAME := array_iterator
SONAME := $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
override CPPFLAGS += -I$(srcdir)
override CFLAGS += $(CFLAGS_SL)
all: $(SONAME) $(NAME).sql

View File

@ -1,5 +1,5 @@
#
# $Header: /cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.6 2000/07/09 13:13:00 petere Exp $
# $Header: /cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.7 2000/10/20 21:03:03 petere Exp $
#
subdir = contrib/earthdistance
@ -9,7 +9,8 @@ include ../../src/Makefile.global
NAME := earthdistance
SONAME := $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
override CPPFLAGS += -I$(srcdir)
override CFLAGS += $(CFLAGS_SL)
all: $(SONAME) $(NAME).sql

View File

@ -1,13 +1,13 @@
#
# $Header: /cvsroot/pgsql/contrib/findoidjoins/Attic/Makefile,v 1.9 2000/08/31 16:08:59 petere Exp $
# $Header: /cvsroot/pgsql/contrib/findoidjoins/Attic/Makefile,v 1.10 2000/10/20 21:03:06 petere Exp $
#
subdir = contrib/findoidjoins
top_builddir = ../..
include ../../src/Makefile.global
include $(top_builddir)/src/Makefile.global
CFLAGS += -I$(libpgeasy_srcdir) -I$(libpq_srcdir)
LIBS += $(libpgeasy)
override CPPFLAGS += -I$(libpgeasy_srcdir) -I$(libpq_srcdir)
override LIBS += $(libpgeasy)
all: findoidjoins

View File

@ -1,5 +1,5 @@
#
# $Header: /cvsroot/pgsql/contrib/fulltextindex/Attic/Makefile,v 1.7 2000/07/09 13:13:07 petere Exp $
# $Header: /cvsroot/pgsql/contrib/fulltextindex/Attic/Makefile,v 1.8 2000/10/20 21:03:10 petere Exp $
#
subdir = contrib/fulltextindex
@ -9,7 +9,8 @@ include ../../src/Makefile.global
NAME := fti
SONAME := $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
override CPPFLAGS += -I$(srcdir)
override CFLAGS += $(CFLAGS_SL)
all: $(SONAME) $(NAME).sql

View File

@ -1,15 +1,16 @@
#
# $Header: /cvsroot/pgsql/contrib/isbn_issn/Attic/Makefile,v 1.7 2000/07/09 13:13:10 petere Exp $
# $Header: /cvsroot/pgsql/contrib/isbn_issn/Attic/Makefile,v 1.8 2000/10/20 21:03:13 petere Exp $
#
subdir = contrib/isbn_issn
top_builddir = ../..
include ../../src/Makefile.global
include $(top_builddir)/src/Makefile.global
NAME := isbn_issn
SONAME := $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
override CPPFLAGS += -I$(srcdir)
override CFLAGS += $(CFLAGS_SL)
all: $(SONAME) $(NAME).sql

View File

@ -1,10 +1,10 @@
#
# $Header: /cvsroot/pgsql/contrib/lo/Makefile,v 1.7 2000/07/09 13:13:14 petere Exp $
# $Header: /cvsroot/pgsql/contrib/lo/Makefile,v 1.8 2000/10/20 21:03:16 petere Exp $
#
subdir = contrib/lo
top_builddir = ../..
include ../../src/Makefile.global
include $(top_builddir)/src/Makefile.global
NAME := lo
SONAME := $(NAME)$(DLSUFFIX)
@ -12,10 +12,11 @@ SONAME := $(NAME)$(DLSUFFIX)
SQLS = $(NAME).sql lo_drop.sql lo_test.sql
MODS = $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
override CPPFLAGS += -I$(srcdir)
override CFLAGS += $(CFLAGS_SL)
ifdef REFINT_VERBOSE
CFLAGS+= -DREFINT_VERBOSE
override CPPFLAGS+= -DREFINT_VERBOSE
endif
all: $(SONAME) $(NAME).sql

View File

@ -1,5 +1,5 @@
#
# $Header: /cvsroot/pgsql/contrib/mSQL-interface/Attic/Makefile,v 1.5 2000/08/31 16:09:00 petere Exp $
# $Header: /cvsroot/pgsql/contrib/mSQL-interface/Attic/Makefile,v 1.6 2000/10/20 21:03:18 petere Exp $
#
subdir = contrib/mSQL-interface
@ -11,7 +11,7 @@ SO_MAJOR_VERSION := 0
SO_MINOR_VERSION := 0
OBJS := mpgsql.o
CFLAGS += -I$(libpq_srcdir)
override CPPFLAGS += -I$(libpq_srcdir)
include $(top_srcdir)/src/Makefile.shlib

View File

@ -1,15 +1,16 @@
#
# $Header: /cvsroot/pgsql/contrib/miscutil/Attic/Makefile,v 1.12 2000/07/09 13:13:20 petere Exp $
# $Header: /cvsroot/pgsql/contrib/miscutil/Attic/Makefile,v 1.13 2000/10/20 21:03:21 petere Exp $
#
subdir = contrib/miscutil
top_builddir = ../..
include ../../src/Makefile.global
include $(top_builddir)/src/Makefile.global
NAME := misc_utils
SONAME := $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
override CPPFLAGS += -I$(srcdir)
override CFLAGS += $(CFLAGS_SL)
all: $(SONAME) $(NAME).sql

View File

@ -1,15 +1,16 @@
#
# $Header: /cvsroot/pgsql/contrib/noupdate/Attic/Makefile,v 1.5 2000/07/09 13:13:24 petere Exp $
# $Header: /cvsroot/pgsql/contrib/noupdate/Attic/Makefile,v 1.6 2000/10/20 21:03:24 petere Exp $
#
subdir = contrib/noupdate
top_builddir = ../..
include ../../src/Makefile.global
include $(top_builddir)/src/Makefile.global
NAME := noup
SONAME := $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
override CPPFLAGS += -I$(srcdir)
override CFLAGS += $(CFLAGS_SL)
all: $(SONAME) $(NAME).sql

View File

@ -1,18 +1,18 @@
#
# $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/Makefile,v 1.6 2000/08/31 16:09:05 petere Exp $
# $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/Makefile,v 1.7 2000/10/20 21:03:25 petere Exp $
#
subdir = contrib/pg_dumplo
top_builddir = ../..
include ../../src/Makefile.global
include $(top_builddir)/src/Makefile.global
OBJS = main.o lo_export.o lo_import.o utils.o
CFLAGS += -I$(libpq_srcdir)
override CPPFLAGS += -I$(libpq_srcdir)
all: pg_dumplo
pg_dumplo: $(OBJS) $(libpq_builddir)/libpq.a
$(CC) $(CFLAGS) -o $@ $(OBJS) $(libpq)
$(CC) -o $@ $(OBJS) $(libpq) $(CFLAGS) $(LDFLAGS)
install: all installdirs
$(INSTALL_PROGRAM) pg_dumplo$(X) $(bindir)

View File

@ -1,13 +1,13 @@
#
# $Header: /cvsroot/pgsql/contrib/pgbench/Makefile,v 1.6 2000/08/31 16:09:09 petere Exp $
# $Header: /cvsroot/pgsql/contrib/pgbench/Makefile,v 1.7 2000/10/20 21:03:26 petere Exp $
#
subdir = contrib/pgbench
top_builddir = ../..
include ../../src/Makefile.global
include $(top_builddir)/src/Makefile.global
CFLAGS += -I$(libpq_srcdir)
LIBS += $(libpq)
override CPPFLAGS += -I$(libpq_srcdir)
override LIBS += $(libpq)
all: pgbench

View File

@ -1,5 +1,5 @@
#
# $Header: /cvsroot/pgsql/contrib/soundex/Attic/Makefile,v 1.8 2000/10/04 19:25:34 petere Exp $
# $Header: /cvsroot/pgsql/contrib/soundex/Attic/Makefile,v 1.9 2000/10/20 21:03:28 petere Exp $
#
subdir = contrib/soundex
@ -9,7 +9,8 @@ include $(top_builddir)/src/Makefile.global
NAME := soundex
SONAME := $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
override CPPFLAGS += -I$(srcdir)
override CFLAGS += $(CFLAGS_SL)
all: $(SONAME) $(NAME).sql

View File

@ -1,10 +1,10 @@
#
# $Header: /cvsroot/pgsql/contrib/spi/Makefile,v 1.17 2000/07/09 13:13:36 petere Exp $
# $Header: /cvsroot/pgsql/contrib/spi/Makefile,v 1.18 2000/10/20 21:03:31 petere Exp $
#
subdir = contrib/spi
top_builddir = ../..
include ../../src/Makefile.global
include $(top_builddir)/src/Makefile.global
OBJS = autoinc.o insert_username.o moddatetime.o refint.o timetravel.o
DOCS = README.spi
@ -12,10 +12,11 @@ SQLS = $(OBJS:.o=.sql)
EXAMPLES= $(OBJS:.o=.example)
MODS = $(OBJS:.o=$(DLSUFFIX))
CFLAGS += -I. $(CFLAGS_SL)
override CPPFLAGS += -I$(srcdir)
override CFLAGS += $(CFLAGS_SL)
ifdef REFINT_VERBOSE
CFLAGS+= -DREFINT_VERBOSE
override CPPFLAGS+= -DREFINT_VERBOSE
endif
all: $(MODS) $(SQLS)

View File

@ -1,15 +1,16 @@
#
# $Header: /cvsroot/pgsql/contrib/string/Attic/Makefile,v 1.12 2000/07/09 13:13:43 petere Exp $
# $Header: /cvsroot/pgsql/contrib/string/Attic/Makefile,v 1.13 2000/10/20 21:03:32 petere Exp $
#
subdir = contrib/string
top_builddir = ../..
include ../../src/Makefile.global
include $(top_builddir)/src/Makefile.global
NAME := string_io
SONAME := $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
override CPPFLAGS += -I$(srcdir)
override CFLAGS += $(CFLAGS_SL)
all: $(SONAME) $(NAME).sql

View File

@ -1,15 +1,16 @@
#
# $Header: /cvsroot/pgsql/contrib/userlock/Attic/Makefile,v 1.12 2000/07/09 13:13:52 petere Exp $
# $Header: /cvsroot/pgsql/contrib/userlock/Attic/Makefile,v 1.13 2000/10/20 21:03:34 petere Exp $
#
subdir = contrib/userlock
top_builddir = ../..
include ../../src/Makefile.global
include $(top_builddir)/src/Makefile.global
NAME := user_locks
SONAME := $(NAME)$(DLSUFFIX)
CFLAGS += -I. $(CFLAGS_SL)
override CPPFLAGS += -I$(srcdir)
override CFLAGS += $(CFLAGS_SL)
all: $(SONAME) $(NAME).sql

View File

@ -1,13 +1,13 @@
#
# $Header: /cvsroot/pgsql/contrib/vacuumlo/Makefile,v 1.7 2000/08/31 16:09:12 petere Exp $
# $Header: /cvsroot/pgsql/contrib/vacuumlo/Makefile,v 1.8 2000/10/20 21:03:36 petere Exp $
#
subdir = contrib/vacuumlo
top_builddir = ../..
include ../../src/Makefile.global
include $(top_builddir)/src/Makefile.global
CPPFLAGS += -I$(libpq_srcdir)
LIBS += $(libpq)
override CPPFLAGS += -I$(libpq_srcdir)
override LIBS += $(libpq)
all: vacuumlo