diff --git a/contrib/array/Makefile b/contrib/array/Makefile
index 14e748506c2154dbeb151d98a27558ce624fdfd4..260b56e60fda9874a7445b252c86ce9294450444 100644
--- a/contrib/array/Makefile
+++ b/contrib/array/Makefile
@@ -1,5 +1,5 @@
 #
-# $Header: /cvsroot/pgsql/contrib/array/Attic/Makefile,v 1.13 2000/10/20 21:03:03 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/array/Attic/Makefile,v 1.14 2001/02/20 19:20:26 petere Exp $
 #
 
 subdir = contrib/array
@@ -9,7 +9,7 @@ include $(top_builddir)/src/Makefile.global
 NAME	:= array_iterator
 SONAME	:= $(NAME)$(DLSUFFIX)
 
-override CPPFLAGS += -I$(srcdir)
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
 override CFLAGS += $(CFLAGS_SL)
 
 all: $(SONAME) $(NAME).sql
diff --git a/contrib/cube/Makefile b/contrib/cube/Makefile
index 7ac1d008c6256d55ec0f69be58101fde49522891..014fafa1fe2cb81798c74b503ff105c052206c51 100644
--- a/contrib/cube/Makefile
+++ b/contrib/cube/Makefile
@@ -1,5 +1,5 @@
 #
-# $Header: /cvsroot/pgsql/contrib/cube/Makefile,v 1.2 2001/02/10 22:31:42 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/cube/Makefile,v 1.3 2001/02/20 19:20:27 petere Exp $
 #
 
 subdir = contrib/cube
@@ -14,7 +14,7 @@ NAME= cube
 SO_MAJOR_VERSION= 1
 SO_MINOR_VERSION= 0
 
-override CPPFLAGS += -I$(srcdir)
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
 
 OBJS= cube.o cubeparse.o cubescan.o buffer.o
 
diff --git a/contrib/earthdistance/Makefile b/contrib/earthdistance/Makefile
index 47e1cf96e204ccbeaf2d2dbfaf03a61f3915b605..7c754befe714292998af13d7e8078000f83e9bbc 100644
--- a/contrib/earthdistance/Makefile
+++ b/contrib/earthdistance/Makefile
@@ -1,5 +1,5 @@
 #
-# $Header: /cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.7 2000/10/20 21:03:03 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.8 2001/02/20 19:20:27 petere Exp $
 #
 
 subdir = contrib/earthdistance
@@ -9,7 +9,7 @@ include ../../src/Makefile.global
 NAME	:= earthdistance
 SONAME	:= $(NAME)$(DLSUFFIX)
 
-override CPPFLAGS += -I$(srcdir)
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
 override CFLAGS += $(CFLAGS_SL)
 
 all: $(SONAME) $(NAME).sql
diff --git a/contrib/findoidjoins/Makefile b/contrib/findoidjoins/Makefile
index ab1750e71bfae4c7774946df5f573f9b1716c847..34cea18ca9551337d8ae2142b686be1ea11ae11d 100644
--- a/contrib/findoidjoins/Makefile
+++ b/contrib/findoidjoins/Makefile
@@ -1,19 +1,22 @@
 #
-# $Header: /cvsroot/pgsql/contrib/findoidjoins/Attic/Makefile,v 1.11 2000/12/04 01:32:18 tgl Exp $
+# $Header: /cvsroot/pgsql/contrib/findoidjoins/Attic/Makefile,v 1.12 2001/02/20 19:20:27 petere Exp $
 #
 
 subdir = contrib/findoidjoins
 top_builddir = ../..
 include $(top_builddir)/src/Makefile.global
 
-override CPPFLAGS += -I$(libpgeasy_srcdir) -I$(libpq_srcdir)
+libpgeasy_srcdir = $(top_srcdir)/src/interfaces/libpgeasy
+libpgeasy_builddir = $(top_builddir)/src/interfaces/libpgeasy
+
+override CPPFLAGS := -I$(libpgeasy_srcdir) -I$(libpq_srcdir) $(CPPFLAGS)
 
 OBJS	= findoidjoins.o
 
 all: findoidjoins
 
 findoidjoins: $(OBJS) $(libpgeasy_builddir)/libpgeasy.a $(libpq_builddir)/libpq.a
-	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(libpgeasy) $(libpq) $(LIBS) -o $@
+	$(CC) $(CFLAGS) $(OBJS) -L$(libpgeasy_builddir) -lpgeasy $(libpq) $(LDFLAGS) $(LIBS) -o $@
 
 install: all installdirs
 	$(INSTALL_PROGRAM) findoidjoins$(X)	$(bindir)
diff --git a/contrib/fulltextindex/Makefile b/contrib/fulltextindex/Makefile
index 15b95138cc49f1d3b402f28f717a45658636f3dc..3a60a6cf0959aa2a63968a1dc53b787367da97c7 100644
--- a/contrib/fulltextindex/Makefile
+++ b/contrib/fulltextindex/Makefile
@@ -1,5 +1,5 @@
 #
-# $Header: /cvsroot/pgsql/contrib/fulltextindex/Attic/Makefile,v 1.8 2000/10/20 21:03:10 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/fulltextindex/Attic/Makefile,v 1.9 2001/02/20 19:20:27 petere Exp $
 #
 
 subdir = contrib/fulltextindex
@@ -9,7 +9,7 @@ include ../../src/Makefile.global
 NAME	:= fti
 SONAME	:= $(NAME)$(DLSUFFIX)
 
-override CPPFLAGS += -I$(srcdir)
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
 override CFLAGS += $(CFLAGS_SL)
 
 all: $(SONAME) $(NAME).sql
diff --git a/contrib/intarray/Makefile b/contrib/intarray/Makefile
index 151817f7e1079d79a48f7677ca679459683c2ef3..b4d125b0f9827c535f51cdabfece2f793ea86fd0 100644
--- a/contrib/intarray/Makefile
+++ b/contrib/intarray/Makefile
@@ -1,4 +1,4 @@
-# $Header: /cvsroot/pgsql/contrib/intarray/Makefile,v 1.2 2001/01/13 02:18:31 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/intarray/Makefile,v 1.3 2001/02/20 19:20:27 petere Exp $
 
 subdir = contrib/intarray
 top_builddir = ../..
@@ -12,7 +12,7 @@ NAME= _int
 SO_MAJOR_VERSION= 1
 SO_MINOR_VERSION= 0
 
-override CPPFLAGS += -I$(srcdir) -DPGSQL71
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) -DPGSQL71
 
 OBJS= _int.o
 
diff --git a/contrib/isbn_issn/Makefile b/contrib/isbn_issn/Makefile
index dd91574ebdd8346cafd0c61b869dbfbf6aaf4d76..9f73cc0085e5a8af01641b1ceb7a2bd10b9e8087 100644
--- a/contrib/isbn_issn/Makefile
+++ b/contrib/isbn_issn/Makefile
@@ -1,5 +1,5 @@
 #
-# $Header: /cvsroot/pgsql/contrib/isbn_issn/Attic/Makefile,v 1.8 2000/10/20 21:03:13 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/isbn_issn/Attic/Makefile,v 1.9 2001/02/20 19:20:27 petere Exp $
 #
 
 subdir = contrib/isbn_issn
@@ -9,7 +9,7 @@ include $(top_builddir)/src/Makefile.global
 NAME	:= isbn_issn
 SONAME	:= $(NAME)$(DLSUFFIX)
 
-override CPPFLAGS += -I$(srcdir)
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
 override CFLAGS += $(CFLAGS_SL)
 
 all: $(SONAME) $(NAME).sql
diff --git a/contrib/lo/Makefile b/contrib/lo/Makefile
index bfa1f7561aa0b4a367e3cc0bcfe01a138305f128..913ad507ff4d48daef2afc157c7f2fe9f21184b2 100644
--- a/contrib/lo/Makefile
+++ b/contrib/lo/Makefile
@@ -1,5 +1,5 @@
 #
-# $Header: /cvsroot/pgsql/contrib/lo/Makefile,v 1.8 2000/10/20 21:03:16 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/lo/Makefile,v 1.9 2001/02/20 19:20:27 petere Exp $
 #
 
 subdir = contrib/lo
@@ -12,7 +12,7 @@ SONAME	:= $(NAME)$(DLSUFFIX)
 SQLS	= $(NAME).sql lo_drop.sql lo_test.sql
 MODS	= $(NAME)$(DLSUFFIX)
 
-override CPPFLAGS += -I$(srcdir)
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
 override CFLAGS += $(CFLAGS_SL)
 
 ifdef REFINT_VERBOSE
diff --git a/contrib/mSQL-interface/Makefile b/contrib/mSQL-interface/Makefile
index 179dbe864e8c4d3de83d089e9130aa1442056274..063569d9c7a829fa256a635a4019911d26b1ca8b 100644
--- a/contrib/mSQL-interface/Makefile
+++ b/contrib/mSQL-interface/Makefile
@@ -1,5 +1,5 @@
 #
-# $Header: /cvsroot/pgsql/contrib/mSQL-interface/Attic/Makefile,v 1.6 2000/10/20 21:03:18 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/mSQL-interface/Attic/Makefile,v 1.7 2001/02/20 19:20:27 petere Exp $
 #
 
 subdir = contrib/mSQL-interface
@@ -11,7 +11,7 @@ SO_MAJOR_VERSION := 0
 SO_MINOR_VERSION := 0
 OBJS	:= mpgsql.o
 
-override CPPFLAGS += -I$(libpq_srcdir)
+override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
 
 include $(top_srcdir)/src/Makefile.shlib
 
diff --git a/contrib/miscutil/Makefile b/contrib/miscutil/Makefile
index e57f8e7826cd36320dd72979ddc6da4669ef3643..a745d7f610dc3640bfc46bf5eea152b45a250c5b 100644
--- a/contrib/miscutil/Makefile
+++ b/contrib/miscutil/Makefile
@@ -1,5 +1,5 @@
 #
-# $Header: /cvsroot/pgsql/contrib/miscutil/Attic/Makefile,v 1.13 2000/10/20 21:03:21 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/miscutil/Attic/Makefile,v 1.14 2001/02/20 19:20:27 petere Exp $
 #
 
 subdir = contrib/miscutil
@@ -9,7 +9,7 @@ include $(top_builddir)/src/Makefile.global
 NAME	:= misc_utils
 SONAME	:= $(NAME)$(DLSUFFIX)
 
-override CPPFLAGS += -I$(srcdir)
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
 override CFLAGS += $(CFLAGS_SL)
 
 all: $(SONAME) $(NAME).sql
diff --git a/contrib/noupdate/Makefile b/contrib/noupdate/Makefile
index f165dad275a9583444fb40f437f28aadd41791b9..fbfe66fde33f810ba0800323dad474581132100d 100644
--- a/contrib/noupdate/Makefile
+++ b/contrib/noupdate/Makefile
@@ -1,5 +1,5 @@
 #
-# $Header: /cvsroot/pgsql/contrib/noupdate/Attic/Makefile,v 1.6 2000/10/20 21:03:24 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/noupdate/Attic/Makefile,v 1.7 2001/02/20 19:20:27 petere Exp $
 #
 
 subdir = contrib/noupdate
@@ -9,7 +9,7 @@ include $(top_builddir)/src/Makefile.global
 NAME	:= noup
 SONAME	:= $(NAME)$(DLSUFFIX)
 
-override CPPFLAGS += -I$(srcdir)
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
 override CFLAGS += $(CFLAGS_SL)
 
 all: $(SONAME) $(NAME).sql
diff --git a/contrib/oid2name/Makefile b/contrib/oid2name/Makefile
index 4303164d6a43febaa2242867be321c9dacea911d..370cd7de12df1894f1b4ce64ed9b64ba85f51921 100644
--- a/contrib/oid2name/Makefile
+++ b/contrib/oid2name/Makefile
@@ -1,18 +1,17 @@
-#
-#
+# $Header: /cvsroot/pgsql/contrib/oid2name/Makefile,v 1.3 2001/02/20 19:20:27 petere Exp $
 
 subdir = contrib/oid2name
 top_builddir = ../..
 include $(top_builddir)/src/Makefile.global
 
-override CPPFLAGS += -I$(libpq_srcdir)
+override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
 
 OBJS	= oid2name.o
 
 all: oid2name
 
 oid2name: $(OBJS) $(libpq_builddir)/libpq.a
-	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(libpq) $(LIBS) -o $@ -g
+	$(CC) $(CFLAGS) $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@ -g
 
 install: all installdirs
 	$(INSTALL_PROGRAM) oid2name$(X) $(bindir)
diff --git a/contrib/pg_dumplo/Makefile b/contrib/pg_dumplo/Makefile
index a3156945c3b308cd5a7ca692f183a2a0c0f7b4d7..9a21898f797898fa47a941306918262b77a76f3c 100644
--- a/contrib/pg_dumplo/Makefile
+++ b/contrib/pg_dumplo/Makefile
@@ -1,19 +1,19 @@
 #
-# $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/Makefile,v 1.9 2000/12/04 01:32:18 tgl Exp $
+# $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/Makefile,v 1.10 2001/02/20 19:20:27 petere Exp $
 #
 
 subdir = contrib/pg_dumplo
 top_builddir = ../..
 include $(top_builddir)/src/Makefile.global
 
-override CPPFLAGS += -I$(libpq_srcdir)
+override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
 
 OBJS	= main.o lo_export.o lo_import.o utils.o
 
 all: pg_dumplo
 
 pg_dumplo: $(OBJS) $(libpq_builddir)/libpq.a
-	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(libpq) $(LIBS) -o $@
+	$(CC) $(CFLAGS) $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@
 
 install: all installdirs
 	$(INSTALL_PROGRAM) pg_dumplo$(X)	$(bindir)
diff --git a/contrib/pgbench/Makefile b/contrib/pgbench/Makefile
index 61f71e58f179364b4ca5109e7668ebca119df29f..157e9c168ca170361d5842e52ca1b9651c3e74c3 100644
--- a/contrib/pgbench/Makefile
+++ b/contrib/pgbench/Makefile
@@ -1,19 +1,19 @@
 #
-# $Header: /cvsroot/pgsql/contrib/pgbench/Makefile,v 1.8 2000/12/04 01:32:19 tgl Exp $
+# $Header: /cvsroot/pgsql/contrib/pgbench/Makefile,v 1.9 2001/02/20 19:20:27 petere Exp $
 #
 
 subdir = contrib/pgbench
 top_builddir = ../..
 include $(top_builddir)/src/Makefile.global
 
-override CPPFLAGS += -I$(libpq_srcdir)
+override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
 
 OBJS	= pgbench.o
 
 all: pgbench
 
 pgbench: $(OBJS) $(libpq_builddir)/libpq.a
-	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(libpq) $(LIBS) -o $@
+	$(CC) $(CFLAGS) $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@
 
 install: all installdirs
 	$(INSTALL_PROGRAM) pgbench$(X)	$(bindir)
diff --git a/contrib/rserv/Makefile b/contrib/rserv/Makefile
index c721420bde9318ccf5c250a64ff21a1e350b3952..bd2b4f15571a132af71d4b241b6e4aa3d337dd65 100644
--- a/contrib/rserv/Makefile
+++ b/contrib/rserv/Makefile
@@ -14,7 +14,7 @@ PERLS	+= SlaveInit SlaveAddTable GetSyncID
 PERLS	+= PrepareSnapshot ApplySnapshot
 SCRIPTS	= InitRservTest
 
-override CPPFLAGS += -I$(srcdir)
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
 override CFLAGS += $(CFLAGS_SL)
 
 
diff --git a/contrib/seg/Makefile b/contrib/seg/Makefile
index 1efc1c3198c50ca31818e20f82b42d9c13353a05..0df4644cf5a164b7600f319fd8363fb76682c7df 100644
--- a/contrib/seg/Makefile
+++ b/contrib/seg/Makefile
@@ -1,5 +1,5 @@
 #
-# $Header: /cvsroot/pgsql/contrib/seg/Makefile,v 1.2 2001/02/10 22:31:42 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/seg/Makefile,v 1.3 2001/02/20 19:20:28 petere Exp $
 #
 
 subdir = contrib/seg
@@ -14,7 +14,7 @@ NAME= seg
 SO_MAJOR_VERSION= 1
 SO_MINOR_VERSION= 0
 
-override CPPFLAGS += -I$(srcdir)
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
 
 OBJS= seg.o segparse.o segscan.o buffer.o
 
diff --git a/contrib/spi/Makefile b/contrib/spi/Makefile
index bdce795f9505e9c4d799a0dec90d27efbc357b95..6a44b355de2e03dff4391131481668d583068108 100644
--- a/contrib/spi/Makefile
+++ b/contrib/spi/Makefile
@@ -1,5 +1,5 @@
 #
-# $Header: /cvsroot/pgsql/contrib/spi/Makefile,v 1.18 2000/10/20 21:03:31 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/spi/Makefile,v 1.19 2001/02/20 19:20:28 petere Exp $
 #
 
 subdir = contrib/spi
@@ -12,7 +12,7 @@ SQLS	= $(OBJS:.o=.sql)
 EXAMPLES= $(OBJS:.o=.example)
 MODS	= $(OBJS:.o=$(DLSUFFIX))
 
-override CPPFLAGS += -I$(srcdir)
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
 override CFLAGS += $(CFLAGS_SL)
 
 ifdef REFINT_VERBOSE
diff --git a/contrib/string/Makefile b/contrib/string/Makefile
index 05b6fafb7fdb05594ecbc4f04bee98d0e5631a92..086b03a6a03a5e6f61693eb5a0310d085bbc471b 100644
--- a/contrib/string/Makefile
+++ b/contrib/string/Makefile
@@ -1,5 +1,5 @@
  #
-# $Header: /cvsroot/pgsql/contrib/string/Attic/Makefile,v 1.13 2000/10/20 21:03:32 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/string/Attic/Makefile,v 1.14 2001/02/20 19:20:28 petere Exp $
 #
 
 subdir = contrib/string
@@ -9,7 +9,7 @@ include $(top_builddir)/src/Makefile.global
 NAME	:= string_io
 SONAME	:= $(NAME)$(DLSUFFIX)
 
-override CPPFLAGS += -I$(srcdir)
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
 override CFLAGS += $(CFLAGS_SL)
 
 all: $(SONAME) $(NAME).sql
diff --git a/contrib/userlock/Makefile b/contrib/userlock/Makefile
index e33d6d9e24b70fe0d4c47a0c8cbd9680be83cfc8..ca13469bd6a2585079cf775e98631195eabc63ad 100644
--- a/contrib/userlock/Makefile
+++ b/contrib/userlock/Makefile
@@ -1,5 +1,5 @@
 #
-# $Header: /cvsroot/pgsql/contrib/userlock/Attic/Makefile,v 1.13 2000/10/20 21:03:34 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/userlock/Attic/Makefile,v 1.14 2001/02/20 19:20:28 petere Exp $
 #
 
 subdir = contrib/userlock
@@ -9,7 +9,7 @@ include $(top_builddir)/src/Makefile.global
 NAME	:= user_locks
 SONAME	:= $(NAME)$(DLSUFFIX)
 
-override CPPFLAGS += -I$(srcdir)
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
 override CFLAGS += $(CFLAGS_SL)
 
 all: $(SONAME) $(NAME).sql
diff --git a/contrib/vacuumlo/Makefile b/contrib/vacuumlo/Makefile
index a61733ee586d07ec8ccb9128e2a78255d9865808..8e57a148f8cf83480d7f65e7ebf0c9e9cfa5f9a1 100644
--- a/contrib/vacuumlo/Makefile
+++ b/contrib/vacuumlo/Makefile
@@ -1,19 +1,19 @@
 #
-# $Header: /cvsroot/pgsql/contrib/vacuumlo/Makefile,v 1.9 2000/12/04 01:32:19 tgl Exp $
+# $Header: /cvsroot/pgsql/contrib/vacuumlo/Makefile,v 1.10 2001/02/20 19:20:28 petere Exp $
 #
 
 subdir = contrib/vacuumlo
 top_builddir = ../..
 include $(top_builddir)/src/Makefile.global
 
-override CPPFLAGS += -I$(libpq_srcdir)
+override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
 
 OBJS	= vacuumlo.o
 
 all: vacuumlo
 
 vacuumlo: $(OBJS) $(libpq_builddir)/libpq.a
-	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(libpq) $(LIBS) -o $@
+	$(CC) $(CFLAGS) $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@
 
 install: all installdirs
 	$(INSTALL_PROGRAM) vacuumlo$(X) $(bindir)
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index f158b7a311ec51f8b740a2db49042cc65658d71e..67800397a43ba2edcaa4f96925bbdf87a5dc2c40 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -1,5 +1,5 @@
 # -*-makefile-*-
-# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.118 2001/02/07 20:13:27 tgl Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.119 2001/02/20 19:20:28 petere Exp $
 
 #------------------------------------------------------------------------------
 # All PostgreSQL makefiles include this file and use the variables it sets,
@@ -137,7 +137,7 @@ DOCBOOKSTYLE	= @DOCBOOKSTYLE@
 
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-override CPPFLAGS += $(sort -I$(top_srcdir)/src/include -I$(top_builddir)/src/include)
+override CPPFLAGS := $(sort -I$(top_srcdir)/src/include -I$(top_builddir)/src/include) $(CPPFLAGS)
 
 CC = @CC@
 GCC = @GCC@
@@ -240,10 +240,6 @@ libpq_srcdir = $(top_srcdir)/src/interfaces/libpq
 libpq_builddir = $(top_builddir)/src/interfaces/libpq
 libpq = -L$(libpq_builddir) -lpq
 
-libpgeasy_srcdir = $(top_srcdir)/src/interfaces/libpgeasy
-libpgeasy_builddir = $(top_builddir)/src/interfaces/libpgeasy
-libpgeasy = -L$(libpgeasy_builddir) -lpgeasy
-
 
 ##########################################################################
 #
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index b61910894f3fa7081cbb23a9e4c80d6f0f44ff22..461eb8d697c90fc1537ace5bbea03287c31d3a7a 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -6,7 +6,7 @@
 # Copyright (c) 1998, Regents of the University of California
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.44 2001/02/10 18:46:34 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.45 2001/02/20 19:20:28 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -230,9 +230,6 @@ ifeq ($(PORTNAME), beos)
   SHLIB_LINK		+= -ltermcap -lstdc++.r4 -lbind -lsocket -L/boot/develop/lib/x86
 endif
 
-# Pull in any extra -L options that the user might have specified.
-SHLIB_LINK := $(filter -L%, $(LDFLAGS)) $(SHLIB_LINK)
-
 ifeq ($(enable_rpath), yes)
 SHLIB_LINK += $(rpath)
 endif
@@ -298,7 +295,7 @@ else # PORTNAME == win
 # WIN case
 $(shlib) lib$(NAME).a: $(OBJS) $(top_builddir)/src/utils/dllinit.o
 	$(DLLTOOL) --export-all --output-def $(NAME).def $(OBJS)
-	$(DLLWRAP) -o $(shlib) --dllname $(shlib) --def $(NAME).def $(OBJS) $(top_builddir)/src/utils/dllinit.o $(DLLINIT) $(SHLIB_LINK)
+	$(DLLWRAP) -o $(shlib) --dllname $(shlib) --def $(NAME).def $(OBJS) $(top_builddir)/src/utils/dllinit.o $(DLLINIT) $(DLLLIBS) $(SHLIB_LINK)
 	$(DLLTOOL) --dllname $(shlib) --def $(NAME).def --output-lib lib$(NAME).a
 
 $(top_builddir)/src/utils/dllinit.o: $(top_srcdir)/src/utils/dllinit.c
diff --git a/src/backend/tioga/Makefile b/src/backend/tioga/Makefile
index c4460896f768b21205696988643e6331bfb05ce1..cc8d20a7b373884c9d0097ad5052f4a8ceff81e7 100644
--- a/src/backend/tioga/Makefile
+++ b/src/backend/tioga/Makefile
@@ -4,7 +4,7 @@
 #    Makefile for tioga
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/backend/tioga/Attic/Makefile,v 1.9 2000/10/20 21:03:50 petere Exp $
+#    $Header: /cvsroot/pgsql/src/backend/tioga/Attic/Makefile,v 1.10 2001/02/20 19:20:28 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -13,7 +13,7 @@ top_builddir = ../../..
 include $(top_builddir)/src/Makefile.global
 
 OBJS = tgRecipe.o Varray.o
-override CPPFLAGS += -I$(srcdir)
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
 
 all: SUBSYS.o
 
diff --git a/src/bin/pg_dump/Makefile b/src/bin/pg_dump/Makefile
index 950617308748489961d4d5b242bde7d3f2b21834..406816a1346d4af8c6e7ab4087696ec2d3374f9f 100644
--- a/src/bin/pg_dump/Makefile
+++ b/src/bin/pg_dump/Makefile
@@ -5,7 +5,7 @@
 # Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
 # Portions Copyright (c) 1994, Regents of the University of California
 #
-# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.28 2001/02/18 18:33:59 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.29 2001/02/20 19:20:28 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -16,15 +16,15 @@ include $(top_builddir)/src/Makefile.global
 OBJS= pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o pg_backup_files.o \
        pg_backup_null.o pg_backup_tar.o $(STRDUP)
 
-override CPPFLAGS+= -I$(libpq_srcdir)
+override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
 
 all: submake pg_dump pg_restore pg_dumpall
 
 pg_dump: pg_dump.o common.o $(OBJS) $(libpq_builddir)/libpq.a 
-	$(CC) $(CFLAGS) $(LDFLAGS) pg_dump.o common.o $(OBJS) $(libpq) $(LIBS) -o $@
+	$(CC) $(CFLAGS) pg_dump.o common.o $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@
 
 pg_restore: pg_restore.o $(OBJS) $(libpq_builddir)/libpq.a
-	$(CC) $(CFLAGS) $(LDFLAGS) pg_restore.o $(OBJS) $(libpq) $(LIBS) -o $@
+	$(CC) $(CFLAGS) pg_restore.o $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@
 
 ../../utils/strdup.o:
 	$(MAKE) -C ../../utils strdup.o
diff --git a/src/bin/pg_encoding/Makefile b/src/bin/pg_encoding/Makefile
index 784d78d4bc8b8421375d0bc6e3f3ff9cd55c64f3..63a065c3fedaac2992747038c412c808bd68634e 100644
--- a/src/bin/pg_encoding/Makefile
+++ b/src/bin/pg_encoding/Makefile
@@ -4,7 +4,7 @@
 #
 # Copyright (c) 1998, PostgreSQL Global Development Group
 #
-# $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/Makefile,v 1.12 2000/11/30 20:36:11 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/Makefile,v 1.13 2001/02/20 19:20:28 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -17,7 +17,7 @@ OBJS= pg_encoding.o
 all: submake pg_encoding
 
 pg_encoding: $(OBJS)
-	$(CC) $(CFLAGS) $(LDFLAGS) $^ $(libpq) $(LIBS) -o $@
+	$(CC) $(CFLAGS) $^ $(libpq) $(LDFLAGS) $(LIBS) -o $@
 
 .PHONY: submake
 
diff --git a/src/bin/pgtclsh/Makefile b/src/bin/pgtclsh/Makefile
index 6ac3ebefffcd8bd24365643db7477e9255288528..ea6dfb1ae2e9609fd116939829a74285e053fad8 100644
--- a/src/bin/pgtclsh/Makefile
+++ b/src/bin/pgtclsh/Makefile
@@ -6,7 +6,7 @@
 # Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
 # Portions Copyright (c) 1994, Regents of the University of California
 #
-# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.36 2001/02/18 18:34:01 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.37 2001/02/20 19:20:29 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -26,7 +26,7 @@ libpgtcl_srcdir = $(top_srcdir)/src/interfaces/libpgtcl
 libpgtcl_builddir = $(top_builddir)/src/interfaces/libpgtcl
 libpgtcl = -L$(libpgtcl_builddir) -lpgtcl
 
-override CPPFLAGS += -I$(libpgtcl_srcdir) $(TK_XINCLUDES)
+override CPPFLAGS := -I$(libpgtcl_srcdir) $(CPPFLAGS) $(TK_XINCLUDES)
 
 
 # If we are here then Tcl is available
@@ -40,10 +40,10 @@ endif
 all: submake $(PROGRAMS)
 
 pgtclsh: pgtclAppInit.o
-	$(CC) $(CFLAGS) $(LDFLAGS) $^ $(libpgtcl) $(libpq) $(TCL_LIB_SPEC) $(TCL_LIBS) $(LIBS) -o $@
+	$(CC) $(CFLAGS) $^ $(libpgtcl) $(libpq) $(TCL_LIB_SPEC) $(TCL_LIBS) $(LDFLAGS) $(LIBS) -o $@
 
 pgtksh: pgtkAppInit.o
-	$(CC) $(CFLAGS) $(LDFLAGS) $^ $(libpgtcl) $(libpq) $(TK_LIB_SPEC) $(TK_LIBS) $(TCL_LIB_SPEC) $(LIBS) -o $@
+	$(CC) $(CFLAGS) $^ $(libpgtcl) $(libpq) $(TK_LIB_SPEC) $(TK_LIBS) $(TCL_LIB_SPEC) $(LDFLAGS) $(LIBS) -o $@
 
 .PHONY: submake
 submake:
diff --git a/src/bin/psql/Makefile b/src/bin/psql/Makefile
index 82333e5001adc89ccd1661d17114bb4c22ff3acd..0d0d0ec9e9aaa431360065833f45dd8c0398f482 100644
--- a/src/bin/psql/Makefile
+++ b/src/bin/psql/Makefile
@@ -5,7 +5,7 @@
 # Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
 # Portions Copyright (c) 1994, Regents of the University of California
 #
-# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.28 2001/02/18 18:34:01 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.29 2001/02/20 19:20:29 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -15,7 +15,7 @@ include $(top_builddir)/src/Makefile.global
 
 REFDOCDIR= $(top_srcdir)/doc/src/sgml/ref
 
-override CPPFLAGS+= -I$(libpq_srcdir)
+override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
 
 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 \
@@ -49,7 +49,7 @@ endif
 # End of hacks for picking up backend 'port' modules
 
 psql: $(OBJS) $(libpq_builddir)/libpq.a
-	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(libpq) $(LIBS) -o $@
+	$(CC) $(CFLAGS) $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@
 
 help.o: $(srcdir)/sql_help.h
 
diff --git a/src/interfaces/ecpg/lib/Makefile b/src/interfaces/ecpg/lib/Makefile
index 9d150abb4e86c003d538e0e38fe8a65bd1d3f598..3e7411df59dc48577af6e8f8f67077ba39efe7d3 100644
--- a/src/interfaces/ecpg/lib/Makefile
+++ b/src/interfaces/ecpg/lib/Makefile
@@ -4,7 +4,7 @@
 #
 # Copyright (c) 1994, Regents of the University of California
 #
-# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile,v 1.10 2000/10/20 21:04:05 petere Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile,v 1.11 2001/02/20 19:20:29 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -16,7 +16,7 @@ NAME= ecpg
 SO_MAJOR_VERSION= 3
 SO_MINOR_VERSION= 2.0
 
-override CPPFLAGS += -I$(top_srcdir)/src/interfaces/ecpg/include -I$(libpq_srcdir)
+override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include -I$(libpq_srcdir) $(CPPFLAGS)
 
 
 OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \
diff --git a/src/interfaces/ecpg/preproc/Makefile b/src/interfaces/ecpg/preproc/Makefile
index 187f523e84d9e02a2f764dc7d29b37e333c339b7..907b60777213821ee0c72248e9a2272819340e64 100644
--- a/src/interfaces/ecpg/preproc/Makefile
+++ b/src/interfaces/ecpg/preproc/Makefile
@@ -1,4 +1,4 @@
-# $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.73 2001/02/10 22:31:42 petere Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.74 2001/02/20 19:20:29 petere Exp $
 
 subdir = src/interfaces/ecpg/preproc
 top_builddir = ../../../..
@@ -8,7 +8,8 @@ MAJOR_VERSION=2
 MINOR_VERSION=8
 PATCHLEVEL=0
 
-override CPPFLAGS+=-I$(srcdir)/../include -DMAJOR_VERSION=$(MAJOR_VERSION) \
+override CPPFLAGS := -I$(srcdir)/../include $(CPPFLAGS) \
+	-DMAJOR_VERSION=$(MAJOR_VERSION) \
 	-DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \
 	-DINCLUDE_PATH=\"$(includedir)\" 
 
diff --git a/src/interfaces/libpgeasy/Makefile b/src/interfaces/libpgeasy/Makefile
index e8e107eb168c5969696b5c59fb8f9daf2082ff6d..a5501657018116944f6dab58d436c6f52ec18d82 100644
--- a/src/interfaces/libpgeasy/Makefile
+++ b/src/interfaces/libpgeasy/Makefile
@@ -2,7 +2,7 @@
 #
 # Makefile for src/interfaces/libpgeasy
 #
-# $Header: /cvsroot/pgsql/src/interfaces/libpgeasy/Attic/Makefile,v 1.5 2000/10/31 14:37:25 petere Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/libpgeasy/Attic/Makefile,v 1.6 2001/02/20 19:20:29 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -16,16 +16,16 @@ NAME= pgeasy
 SO_MAJOR_VERSION= 2
 SO_MINOR_VERSION= 1
 
-override CPPFLAGS += -I$(libpq_srcdir)
+override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
 
 OBJS= libpgeasy.o halt.o
 
-SHLIB_LINK+= $(libpq)
+SHLIB_LINK = $(libpq)
 
 # If crypt is a separate library, rather than part of libc, it may need
 # to be referenced separately to keep (broken) linkers happy.  (This is
 # braindead; users of libpq should not need to know what it depends on.)
-SHLIB_LINK+= $(filter -lcrypt, $(LIBS))
+SHLIB_LINK+= $(filter -L%, $(LDFLAGS)) $(filter -lcrypt, $(LIBS))
 
 all: all-lib
 
diff --git a/src/interfaces/libpgtcl/Makefile b/src/interfaces/libpgtcl/Makefile
index eebff49b72875c017b985bc18cd8df26666e434a..fdc6d83f5c4d3dd746c8904d6d57a89ee1c1f2a2 100644
--- a/src/interfaces/libpgtcl/Makefile
+++ b/src/interfaces/libpgtcl/Makefile
@@ -4,7 +4,7 @@
 #
 # Copyright (c) 1994, Regents of the University of California
 #
-# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile,v 1.24 2000/10/31 14:37:25 petere Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile,v 1.25 2001/02/20 19:20:29 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -16,16 +16,16 @@ NAME= pgtcl
 SO_MAJOR_VERSION= 2
 SO_MINOR_VERSION= 1
 
-override CPPFLAGS += -I$(libpq_srcdir)
+override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
 
 OBJS= pgtcl.o pgtclCmds.o pgtclId.o
 
-SHLIB_LINK+= $(libpq)
+SHLIB_LINK = $(libpq)
 
 # If crypt is a separate library, rather than part of libc, it may need
 # to be referenced separately to keep (broken) linkers happy.  (This is
 # braindead; users of libpq should not need to know what it depends on.)
-SHLIB_LINK+= $(filter -lcrypt, $(LIBS))
+SHLIB_LINK+= $(filter -L%, $(LDFLAGS)) $(filter -lcrypt, $(LIBS))
 
 all: submake all-lib
 
diff --git a/src/interfaces/libpq++/Makefile b/src/interfaces/libpq++/Makefile
index 0cff48776092cffa052004df0eeea684a9da52d3..48a9cff86ffdccd9b0aa85c20ae68163c54743aa 100644
--- a/src/interfaces/libpq++/Makefile
+++ b/src/interfaces/libpq++/Makefile
@@ -4,7 +4,7 @@
 #
 # Copyright (c) 1994, Regents of the University of California
 #
-# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.27 2000/10/23 21:43:57 petere Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.28 2001/02/20 19:20:29 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -16,7 +16,7 @@ NAME= pq++
 SO_MAJOR_VERSION= 3
 SO_MINOR_VERSION= 1
 
-override CPPFLAGS += -I$(libpq_srcdir)
+override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
 
 OBJS = pgconnection.o pgdatabase.o pgtransdb.o pgcursordb.o pglobject.o 
 
diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile
index efe5a4b52f48891612ba52e7168b14a24f045ad4..ec920e58cde313a9557d9eec7dfc5b010c061ec7 100644
--- a/src/interfaces/libpq/Makefile
+++ b/src/interfaces/libpq/Makefile
@@ -4,7 +4,7 @@
 #
 # Copyright (c) 1994, Regents of the University of California
 #
-# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.50 2001/02/11 01:52:11 ishii Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.51 2001/02/20 19:20:29 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -17,7 +17,7 @@ NAME= pq
 SO_MAJOR_VERSION= 2
 SO_MINOR_VERSION= 1
 
-override CPPFLAGS += -DFRONTEND -I$(srcdir) -DSYSCONFDIR='"$(sysconfdir)"'
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) -DFRONTEND -DSYSCONFDIR='"$(sysconfdir)"'
 
 OBJS= fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o \
       pqexpbuffer.o dllist.o pqsignal.o \
@@ -30,7 +30,7 @@ endif
 # Add libraries that libpq depends (or might depend) on into the
 # shared library link.  (The order in which you list them here doesn't
 # matter.)
-SHLIB_LINK += $(filter -lcrypt -ldes -lkrb -lcom_err -lcrypto -lk5crypto -lkrb5 -lssl -lsocket -lnsl -lresolv, $(LIBS))
+SHLIB_LINK += $(filter -L%, $(LDFLAGS)) $(filter -lcrypt -ldes -lkrb -lcom_err -lcrypto -lk5crypto -lkrb5 -lssl -lsocket -lnsl -lresolv, $(LIBS))
 
 
 all: all-lib
diff --git a/src/interfaces/odbc/GNUmakefile b/src/interfaces/odbc/GNUmakefile
index c2c1936fa5260db7c3442d839a6b0826d6187343..2fd66c93e781f177e1ee443de9b53afe1d6300c4 100644
--- a/src/interfaces/odbc/GNUmakefile
+++ b/src/interfaces/odbc/GNUmakefile
@@ -2,7 +2,7 @@
 #
 # GNUMakefile for psqlodbc (Postgres ODBC driver)
 #
-# $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile,v 1.13 2001/02/14 05:45:38 momjian Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile,v 1.14 2001/02/20 19:20:29 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -15,7 +15,7 @@ NAME = psqlodbc
 SO_MAJOR_VERSION = 0
 SO_MINOR_VERSION = 26
 
-override CPPFLAGS += -I$(srcdir) -DHAVE_CONFIG_H -DODBCINSTDIR='"$(odbcinst_ini_dir)"'
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) -DHAVE_CONFIG_H -DODBCINSTDIR='"$(odbcinst_ini_dir)"'
 
 
 OBJS = info.o bind.o columninfo.o connection.o convert.o drvconn.o \
diff --git a/src/makefiles/Makefile.win b/src/makefiles/Makefile.win
index 3f2c0f6e77293a58e6c53fc790d6f06b6ed1f419..5dac251872a8c0333521837aff882819ae445d1d 100644
--- a/src/makefiles/Makefile.win
+++ b/src/makefiles/Makefile.win
@@ -1,12 +1,11 @@
-# $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.8 2001/01/09 18:45:41 petere Exp $
+# $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.9 2001/02/20 19:20:29 petere Exp $
 LDFLAGS+= -g
 DLLTOOL= dlltool
 DLLWRAP= dllwrap
-DLLLIBS=-L/usr/local/lib -L$(top_builddir)/src/backend -lpostgres -lcygipc -lcygwin -lcrypt -lkernel32
+DLLLIBS=-L$(top_builddir)/src/backend -lpostgres -lcygipc -lcygwin -lcrypt -lkernel32
 MK_NO_LORDER=true
 MAKE_DLL=true
 #MAKE_DLL=false
-SHLIB_LINK=$(DLLLIBS)
 # linking with -lm or -lc causes program to crash
 # (see http://sources.redhat.com/cygwin/faq/faq.html#SEC110)
 LIBS:=$(filter-out -lm -lc, $(LIBS))
diff --git a/src/pl/plpgsql/src/Makefile b/src/pl/plpgsql/src/Makefile
index f024367491d600fa3c333dbbf82c8f40127fe70b..d04988cc2ad83226803810e9a7e8c191cd54c4f6 100644
--- a/src/pl/plpgsql/src/Makefile
+++ b/src/pl/plpgsql/src/Makefile
@@ -2,7 +2,7 @@
 #
 # Makefile for the plpgsql shared object
 #
-# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.11 2001/02/10 22:31:42 petere Exp $
+# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.12 2001/02/20 19:20:29 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -15,7 +15,7 @@ NAME= plpgsql
 SO_MAJOR_VERSION= 1
 SO_MINOR_VERSION= 0
 
-override CPPFLAGS += -I$(srcdir)
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
 
 OBJS = pl_parse.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o
 
diff --git a/src/test/bench/Makefile b/src/test/bench/Makefile
index 97ab82470929089010fb7bad463e6cdfe1d22b89..4f8e8b2e09209945d3fec8f0420a761db0203e10 100644
--- a/src/test/bench/Makefile
+++ b/src/test/bench/Makefile
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/test/bench/Attic/Makefile,v 1.8 2000/10/20 21:04:19 petere Exp $
+#    $Header: /cvsroot/pgsql/src/test/bench/Attic/Makefile,v 1.9 2001/02/20 19:20:29 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -18,7 +18,7 @@ include $(top_builddir)/src/Makefile.global
 CREATEFILES= create.sql bench.sql
 OUTFILES= bench.out bench.out.perquery
 
-override CPPFLAGS += -I$(libpq_srcdir)
+override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
 override CFLAGS += $(CFLAGS_SL)
 
 
diff --git a/src/test/examples/Makefile b/src/test/examples/Makefile
index d811a7030cb0acab5ccaaa06bc4e8da1d1cfa26f..c5ee425f3b5a9ab255782499883fe3ec36d39299 100644
--- a/src/test/examples/Makefile
+++ b/src/test/examples/Makefile
@@ -6,7 +6,7 @@ subdir = src/test/examples
 top_builddir = ../../..
 include $(top_builddir)/src/Makefile.global
 
-override CPPFLAGS+= -I$(libpq_srcdir)
+override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
 LIBS += $(libpq)
 
 
diff --git a/src/test/regress/GNUmakefile b/src/test/regress/GNUmakefile
index dc737b0f90038757d5dd7d504b319ec9deb335b5..71bca8705809c49de0270437f80c6fd7f214d3e9 100644
--- a/src/test/regress/GNUmakefile
+++ b/src/test/regress/GNUmakefile
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.32 2000/11/22 13:16:24 petere Exp $
+#    $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.33 2001/02/20 19:20:30 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -17,7 +17,7 @@ include $(top_builddir)/src/Makefile.global
 
 contribdir := $(top_builddir)/contrib
 
-override CPPFLAGS += -I$(libpq_srcdir)
+override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
 override CFLAGS += $(CFLAGS_SL)