Fix relative path references so that make knowns which dependencies refer
authorPeter Eisentraut <peter_e@gmx.net>
Thu, 31 Aug 2000 16:12:35 +0000 (16:12 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Thu, 31 Aug 2000 16:12:35 +0000 (16:12 +0000)
to one another. Sort out builddir vs srcdir variable namings. Remove some
now obsoleted make variables.

102 files changed:
GNUmakefile.in
contrib/findoidjoins/Makefile
contrib/mSQL-interface/Makefile
contrib/odbc/Makefile
contrib/pg_dumplo/Makefile
contrib/pgbench/Makefile
contrib/vacuumlo/Makefile
doc/src/Makefile
doc/src/sgml/Makefile
src/Makefile.global.in
src/backend/Makefile
src/backend/access/Makefile
src/backend/access/common/Makefile
src/backend/access/gist/Makefile
src/backend/access/hash/Makefile
src/backend/access/heap/Makefile
src/backend/access/index/Makefile
src/backend/access/nbtree/Makefile
src/backend/access/rtree/Makefile
src/backend/access/transam/Makefile
src/backend/catalog/Makefile
src/backend/commands/Makefile
src/backend/executor/Makefile
src/backend/lib/Makefile
src/backend/main/Makefile
src/backend/nodes/Makefile
src/backend/optimizer/Makefile
src/backend/optimizer/geqo/Makefile
src/backend/optimizer/path/Makefile
src/backend/optimizer/plan/Makefile
src/backend/optimizer/prep/Makefile
src/backend/optimizer/util/Makefile
src/backend/port/Makefile.in
src/backend/port/nextstep/Makefile
src/backend/port/qnx4/Makefile
src/backend/port/sunos4/Makefile
src/backend/postmaster/Makefile
src/backend/regex/Makefile
src/backend/rewrite/Makefile
src/backend/storage/Makefile
src/backend/storage/buffer/Makefile
src/backend/storage/file/Makefile
src/backend/storage/ipc/Makefile
src/backend/storage/large_object/Makefile
src/backend/storage/lmgr/Makefile
src/backend/storage/page/Makefile
src/backend/storage/smgr/Makefile
src/backend/tcop/Makefile
src/backend/tioga/Makefile
src/backend/utils/Makefile
src/backend/utils/adt/Makefile
src/backend/utils/cache/Makefile
src/backend/utils/error/Makefile
src/backend/utils/fmgr/Makefile
src/backend/utils/hash/Makefile
src/backend/utils/init/Makefile
src/backend/utils/mb/Makefile
src/backend/utils/mmgr/Makefile
src/backend/utils/sort/Makefile
src/backend/utils/time/Makefile
src/bin/Makefile
src/bin/initdb/Makefile
src/bin/initlocation/Makefile
src/bin/ipcclean/Makefile
src/bin/pg_ctl/Makefile
src/bin/pg_dump/Makefile
src/bin/pg_encoding/Makefile
src/bin/pg_id/Makefile
src/bin/pg_passwd/Makefile
src/bin/pgaccess/Makefile
src/bin/pgtclsh/Makefile
src/bin/psql/Makefile
src/bin/scripts/Makefile
src/include/Makefile
src/interfaces/Makefile
src/interfaces/ecpg/Makefile
src/interfaces/ecpg/include/Makefile
src/interfaces/ecpg/lib/Makefile
src/interfaces/ecpg/preproc/Makefile
src/interfaces/libpgeasy/Makefile
src/interfaces/libpgtcl/Makefile
src/interfaces/libpq++/Makefile
src/interfaces/libpq/Makefile
src/interfaces/odbc/GNUmakefile
src/interfaces/perl5/GNUmakefile
src/interfaces/python/GNUmakefile
src/interfaces/python/Setup.in.raw
src/makefiles/Makefile.aix
src/makefiles/Makefile.hpux
src/makefiles/Makefile.win
src/pl/Makefile
src/pl/plperl/GNUmakefile
src/pl/plpgsql/Makefile
src/pl/tcl/Makefile
src/test/bench/Makefile
src/test/examples/Makefile
src/test/locale/Makefile
src/test/regress/GNUmakefile
src/test/regress/input/Makefile
src/test/regress/output/Makefile
src/tutorial/Makefile
src/utils/Makefile

index cffcb1bff53c7d7d0aa89174e03ca9b61559d063..77aa70b2c06e86f3734d73615a4c27d84b6c0b8c 100644 (file)
@@ -6,7 +6,7 @@
 
 subdir =
 top_builddir = .
-include src/Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 all:
        $(MAKE) -C doc all
index 9e7d42b1774d49b0100dff569b36adb35cd66d15..3b40c83eb8b3f332c8f95c340ee00c39efa96af4 100644 (file)
@@ -6,8 +6,8 @@ subdir = contrib/findoidjoins
 top_builddir = ../..
 include ../../src/Makefile.global
 
-CFLAGS += -I$(LIBPGEASYDIR) -I$(LIBPQDIR)
-LIBS   += $(LIBPGEASY)
+CFLAGS += -I$(libpgeasy_srcdir) -I$(libpq_srcdir)
+LIBS   += $(libpgeasy)
 
 all: findoidjoins
 
index 4dfbd294002d6cd6eff62443024762e169ba15e4..358d293b98213f3f7773061a16d9440e97706eb8 100644 (file)
@@ -4,14 +4,14 @@
 
 subdir = contrib/mSQL-interface
 top_builddir = ../..
-include ../../src/Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 NAME   := mpgsql
 SO_MAJOR_VERSION := 0
 SO_MINOR_VERSION := 0
 OBJS   := mpgsql.o
 
-CFLAGS += -I$(LIBPQDIR)
+CFLAGS += -I$(libpq_srcdir)
 
 include $(top_srcdir)/src/Makefile.shlib
 
index b9922c486a96d93d786973cf811b30cb7ea089d7..e81f51f215b0aab557d5a99b594b606623f1be31 100644 (file)
@@ -1,9 +1,9 @@
 # ODBC extensions
 # Thomas Lockhart 2000-04-03
 
-SRCDIR= ../../src
-
-include $(SRCDIR)/Makefile.global
+subdir = contrib/odbc
+top_builddir = ../..
+include $(top_builddir)/src/Makefile.global
 
 ifndef PGLIB
   PGLIB= .
index a44424ddc87a958e629733f3e400ae3dcbe2b608..fa7a4559ae0f5b39abcdb3c2ee2a750f6ee55685 100644 (file)
@@ -7,12 +7,12 @@ top_builddir = ../..
 include ../../src/Makefile.global
 
 OBJS   = main.o lo_export.o lo_import.o utils.o
-CFLAGS += -I$(LIBPQDIR)
+CFLAGS += -I$(libpq_srcdir)
 
 all: pg_dumplo
 
-pg_dumplo: $(OBJS) $(LIBPQDIR)/libpq.a
-       $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBPQ) 
+pg_dumplo: $(OBJS) $(libpq_builddir)/libpq.a
+       $(CC) $(CFLAGS) -o $@ $(OBJS) $(libpq)
 
 install: all installdirs
        $(INSTALL_PROGRAM) pg_dumplo$(X)        $(bindir)
index f2660734c16413491e8b5d9a6495b0cd39bdd11a..d7a7259a0c4b871c41b8ae04278d51b190c2e57b 100644 (file)
@@ -6,8 +6,8 @@ subdir = contrib/pgbench
 top_builddir = ../..
 include ../../src/Makefile.global
 
-CFLAGS += -I$(LIBPQDIR)
-LIBS   += $(LIBPQ)
+CFLAGS += -I$(libpq_srcdir)
+LIBS   += $(libpq)
 
 all: pgbench
 
index 1c7c2d41dc106a601b4b9ab48a9543fa4902b341..137bd36614fd3b95c5241039153f0353c7e0022a 100644 (file)
@@ -6,8 +6,8 @@ subdir = contrib/vacuumlo
 top_builddir = ../..
 include ../../src/Makefile.global
 
-CPPFLAGS += -I$(LIBPQDIR)
-LIBS += $(LIBPQ)
+CPPFLAGS += -I$(libpq_srcdir)
+LIBS += $(libpq)
 
 all: vacuumlo
 
index 38471a1193dad8b1e1dafc86ecab49a97da05aeb..00d3569512bdce66716cd4b4f5a51f7da2efae1d 100644 (file)
@@ -1,21 +1,14 @@
 # Postgres documentation makefile
-# Thomas Lockhart
+# $Header$
 
-# Not yet generated from configure, so use relative path names for now...
-PGDOCS= ..
-SRCDIR= ../../src
+subdir = doc/src
+top_builddir = ../..
+-include $(top_builddir)/src/Makefile.global
 
 TAR= tar
 ZIP= gzip
 TAREXCLUDE= --exclude=Makefile --exclude='*.sgml' --exclude=ref
 
-# Pick up Makefile.global from the source area
-# This is the only resource from the code source area and is optional
-
-ifneq ($(wildcard $(SRCDIR)/Makefile.global), )
-include $(SRCDIR)/Makefile.global
-endif
-
 SRC= admin postgres programmer tutorial user
 
 TARGETS= $(SRC:%=%.tar.gz)
@@ -80,5 +73,4 @@ man.tar:
 # Compressed file
 
 %.gz:  %
-       ($(ZIP) -f $<)
-
+       $(GZIP) -f $<
index 1b929e77f8895f50fdf7da8180466b141607801c..45b18d783411479ce99ef45d0e1ebed81988a4d3 100644 (file)
 #
 #----------------------------------------------------------------------------
 
-PGDOCS= ../..
-SRCDIR= ../../../src
+# Pick up Makefile.global from the source area
+# This is the only resource from the code source area and is optional.
+# Actually, we want this to get Makefile.custom - thomas 1998-03-01
+subdir = doc/src/sgml
+top_builddir = ../../..
+-include $(top_builddir)/src/Makefile.global
+
 
 # This is where the default stylesheets appear on my linux system.
 # Probably no need to change this; rather, put definitions
@@ -46,14 +51,6 @@ D2MSCRIPT= $(D2MDIR)/docbook2man-spec.pl
 
 TAR= tar
 
-# Pick up Makefile.global from the source area
-# This is the only resource from the code source area and is optional.
-# Actually, we want this to get Makefile.custom - thomas 1998-03-01
-
-ifneq ($(wildcard $(SRCDIR)/Makefile.global),)
-  include $(SRCDIR)/Makefile.global
-endif
-
 # Hmm, made this optional but jade _really_ doesn't like them missing
 # - thomas 1998-03-01
 ifneq ($(HDSL), )
index f6cfe82ef67378756efe87202a4e62aa56305677..2ef171ff532e5a4905a2deb37aa55f17342d7c6b 100644 (file)
@@ -1,51 +1,20 @@
-#----------------------------------------------------------------------------
-#
-# Makefile.global--
-#    global configuration for the Makefiles
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-#    $Header$
-#
-# NOTES
-#    Essentially all Postgres make files include this file and use the
-#    variables it sets.
-#
-#    To override the default setting, create a Makefile.custom in this
-#    directory and put your defines there. (Makefile.custom is included
-#    near the end of this file).  Sometimes, a variable gets set in
-#    Makefile.global after Makefile.custom has been included, so you can't
-#    simply set that variable in Makefile.custom.  In those cases, there is
-#    often another variable (like CUSTOM_COPT) that you can set in
-#    Makefile.custom that influences the later setting of the true variable
-#    of interest (like CFLAGS) by Makefile.global.
-#
-#
-#    If you change any of these defines you probably have to
-#       make clean; make
-#    since no dependencies are created for these. (of course you can
-#    be crafty and check what files really depend on them and just remake
-#    those).
-#
-#    Before including this file, you must set the SRCDIR variable to the
-#    path of the top of the Postgres source tree (the directory that
-#    contains this file).
+# $Header$
+
+#------------------------------------------------------------------------------
+# All PostgreSQL makefiles include this file and use the variables it sets,
+# which in turn are put here by the configure script. There is no need for
+# users to edit this file -- if it turns out to be necessary then that's a
+# bug.
 #
-#-------------------------------------------------------------------------
+# A makefile that includes this file needs to set the variable `subdir' to
+# the relative path from the top to itself and `top_builddir' to the relative
+# path from itself to the top before including this file. (The "top" is the
+# parent directory of the directory this file is in.)
+#------------------------------------------------------------------------------
 
 # PostgreSQL version number
 VERSION = @VERSION@
 
-ifndef top_builddir
-top_builddir = $(SRCDIR)/..
-endif
-
-ifndef SRCDIR
-SRCDIR = $(top_builddir)/src
-endif
-
 # This should be changed once we have separate build dirs.
 top_srcdir = $(top_builddir)
 
@@ -73,13 +42,14 @@ BSD_SHLIB= true
 # systems now.  May be applicable to other systems to?
 ELF_SYSTEM= @ELF_SYS@
 
-LIBPQDIR= $(SRCDIR)/interfaces/libpq
-LIBPGEASYDIR= $(SRCDIR)/interfaces/libpgeasy
-LIBPGTCLDIR= $(SRCDIR)/interfaces/libpgtcl
+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
 
-LIBPQ= -L$(LIBPQDIR) -lpq
-LIBPGTCL= -L$(LIBPGTCLDIR) -lpgtcl
-LIBPGEASY= -L$(LIBPGEASYDIR) -lpgeasy
 
 # installation directories
 
@@ -99,16 +69,6 @@ docdir = @docdir@
 
 odbcinst_ini_dir = @odbcinst_ini_dir@
 
-# old variable names for installation directories
-
-POSTGRESDIR= $(prefix)
-BINDIR= $(bindir)
-LIBDIR= $(libdir)
-TEMPLATEDIR= $(libdir)
-POSTMANDIR= $(mandir)
-POSTDOCDIR= $(docdir)
-HEADERDIR= $(includedir)
-
 
 ##############################################################################
 #
@@ -117,10 +77,6 @@ HEADERDIR= $(includedir)
 # To disable a feature, comment out the entire definition
 # (that is, prepend '#', don't set it to "0" or "no").
 
-# Comment out ENFORCE_ALIGNMENT if you do NOT want unaligned access to
-# multi-byte types to generate a bus error.
-ENFORCE_ALIGNMENT= true
-
 # Comment out PROFILE to generate a profile version of the binaries
 #PROFILE= -p -non_shared
 
@@ -156,7 +112,6 @@ MULTIBYTE=@MULTIBYTE@
 #
 # Installation.
 #
-# For many ports, INSTALL is overridden below.
 INSTALL= @INSTALL@
 
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -180,7 +135,7 @@ FLEX = @FLEX@
 FLEXFLAGS = @FLEXFLAGS@ $(LFLAGS)
 AROPT= @AROPT@
 CPPFLAGS = @CPPFLAGS@
-CFLAGS = -I$(SRCDIR)/include $(CPPFLAGS) @CFLAGS@
+CFLAGS = -I$(top_srcdir)/src/include $(CPPFLAGS) @CFLAGS@
 CFLAGS_SL= @SHARED_LIB@
 LIBS= @LIBS@
 LDFLAGS= @LDFLAGS@ $(LIBS)
@@ -210,7 +165,7 @@ CPU= @CPU@
 HAVE_POSIX_SIGNALS= @HAVE_POSIX_SIGNALS@
 HPUXMATHLIB= @HPUXMATHLIB@
 
-include $(SRCDIR)/Makefile.port
+include $(top_builddir)/src/Makefile.port
 
 ##############################################################################
 #
@@ -219,9 +174,7 @@ include $(SRCDIR)/Makefile.port
 # This includes your local customizations if Makefile.custom exists
 # in the source directory.  This file doesn't exist in the original
 # distribution so that it doesn't get overwritten when you upgrade.
-ifneq ($(wildcard $(SRCDIR)/Makefile.custom), )
-include $(SRCDIR)/Makefile.custom
-endif
+-include $(top_srcdir)/src/Makefile.custom
 
 # This goes here so that customization in Makefile.custom is effective
 ##############################################################################
index a44d3ad385d7dfa519e33856c091deebd42defaa..9021d8447606965fca354a02dab729eff1046899 100644 (file)
@@ -10,7 +10,7 @@
 
 subdir = src/backend
 top_builddir = ../..
-include ../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 DIRS := access bootstrap catalog parser commands executor lib libpq \
        main nodes optimizer port postmaster regex rewrite \
index a339f811396ebb305009fd59a5cd7dc8af1985a7..2a2fd522119f3a8ea416c0f0e4465d467007bb8f 100644 (file)
@@ -6,7 +6,7 @@
 
 subdir = src/backend/access
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 SUBDIRS            := common gist hash heap index nbtree rtree transam
 SUBDIROBJS  := $(SUBDIRS:%=%/SUBSYS.o)
index bdebf29dc520cddbca4582eac8bcefdb36be95a4..5f02a346288e140964713dd813c9bc1857f74ddf 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/access/common
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = heaptuple.o indextuple.o indexvalid.o printtup.o \
        scankey.o tupdesc.o  
index 16cc0a80e101528ea6eced85ab29f9d3c05b3f54..bee0c00daf652c73dbec37a7e94a9a0f09898f42 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/access/gist
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = gist.o gistget.o gistscan.o giststrat.o
 
@@ -27,4 +28,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 07e5777133b9dc9d3d01e7bd847e8afdf386c2c7..de68d15c0ff228b922ad6195e6ac7962be2b32d3 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/access/hash
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = hash.o hashfunc.o hashinsert.o hashovfl.o hashpage.o hashscan.o \
        hashsearch.o hashstrat.o hashutil.o
index 2824d22b0fbf622291509ae6e3a3978c7d1d8fb1..7cf4f058c6d459915f5064a40da1c615f4f9176e 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/access/heap
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = heapam.o hio.o stats.o tuptoaster.o
 
index 625de982bb5391ed9499019fd6a85d57ce8d2703..6bf3ecb788ccb99956306d4f22e7e72c1e5e63d5 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/access/index
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = genam.o indexam.o istrat.o
 
@@ -27,4 +28,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index ce4fc2b402e161c05b01f7b938ec91eb7445459f..4440ff0c21a62db812e1cc123bde5e5da6f65915 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/access/nbtree
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = nbtcompare.o nbtinsert.o nbtpage.o nbtree.o nbtscan.o nbtsearch.o \
        nbtstrat.o nbtutils.o nbtsort.o
index d40c682fc92a2c02ad7c6df88c7f476cc4860664..5dd31afe6fd06bcb2bb7417665e6399857df8687 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/access/rtree
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = rtget.o rtproc.o rtree.o rtscan.o rtstrat.o
 
index 59b23ab64843c84dabdfa360328904f3ee938948..4ac5fbc677a510fc74af94222ad644973dfc438a 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/access/transam
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = transam.o transsup.o varsup.o xact.o xid.o xlog.o rmgr.o
 
@@ -26,7 +27,7 @@ clean:
 
 # ensure that version checks in xlog.c get recompiled when config.h or
 # catversion.h changes, even if "make depend" hasn't been done.
-xlog.o: xlog.c $(SRCDIR)/include/config.h $(SRCDIR)/include/catalog/catversion.h
+xlog.o: xlog.c $(top_builddir)/src/include/config.h $(top_srcdir)/src/include/catalog/catversion.h
 
 ifeq (depend,$(wildcard depend))
 include depend
index 9cf326b69bed3a3a7cb2efecf988828051e8b86d..553f87a37c41db26cc1ad4ef0e0e9cffe8afc732 100644 (file)
@@ -8,7 +8,7 @@
 
 subdir = src/backend/catalog
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 OBJS = catalog.o heap.o index.o indexing.o aclchk.o \
        pg_aggregate.o pg_operator.o pg_proc.o pg_type.o
index ccba4f3fc0a4cf0293ad9128ced8e0fae3a3887d..20b5e7d64d64be2f2b0bc2b4af00397cf3ecc528 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../..
-include $(SRCDIR)/Makefile.global
+subdir = src/backend/commands
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = async.o creatinh.o command.o comment.o copy.o indexcmds.o define.o \
        remove.o rename.o vacuum.o analyze.o view.o cluster.o \
@@ -30,4 +31,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 06b2190ca6ecfa927cf2d83f77db5aeac07a0585..e82c27c889e7bb26edea9aecdc9eb0b18334f7fd 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../..
-include ../../Makefile.global
+subdir = src/backend/executor
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = execAmi.o execFlatten.o execJunk.o execMain.o \
        execProcnode.o execQual.o execScan.o execTuples.o \
@@ -33,4 +34,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 711df2f773ee42218f52e828c7b3a5f510d74b53..4988a5f93908b2c7f8852316aba3f7c0ebd1ec28 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../..
-include ../../Makefile.global
+subdir = src/backend/lib
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = bit.o hasht.o lispsort.o stringinfo.o dllist.o
 
@@ -27,4 +28,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index f2fe752437753f7af93ea4a2c42ef1199925f73e..03015394e28b91642add946a9a0161e6c743cffa 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../..
-include ../../Makefile.global
+subdir = src/backend/main
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = main.o
 
@@ -27,4 +28,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 4f4c34e53d0f7c7f54306b6e7c7770854623bb9a..b5c4697c8d2984727fdb9897ebae48db4f43bb25 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../..
-include $(SRCDIR)/Makefile.global
+subdir = src/backend/nodes
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = nodeFuncs.o nodes.o list.o \
        copyfuncs.o equalfuncs.o makefuncs.o \
index 6a7f2515d362cb45675ece713162c94ecec07528..a9fa22684937237277f2f2a7aaa27208cc8784a6 100644 (file)
@@ -6,7 +6,7 @@
 
 subdir = src/backend/optimizer
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 SUBDIRS     := geqo path plan prep util
 SUBDIROBJS  := $(SUBDIRS:%=%/SUBSYS.o)
index d63556026d909703cbf773b609796f2d4d110d5c..f017bbb843ff22cdeef1b0b363339bfc20ae2a96 100644 (file)
@@ -5,24 +5,19 @@
 #
 # Copyright (c) 1994, Regents of the University of California
 #
-# $Id$
+# $Header$
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
-
-ifeq ($(CC), gcc)
-CFLAGS+= -Wno-error
-endif
+subdir = src/backend/optimizer/geqo
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = geqo_copy.o geqo_eval.o geqo_main.o geqo_misc.o \
        geqo_pool.o geqo_recombination.o \
        geqo_selection.o \
        geqo_erx.o geqo_pmx.o geqo_cx.o geqo_px.o geqo_ox1.o geqo_ox2.o
 
-# deprecated: minspantree.o
-
 all: SUBSYS.o
 
 SUBSYS.o: $(OBJS)
@@ -37,4 +32,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 0a87671c1c6d79fa63568caad2280fa1cc66ee6f..ea3da28fec52809cde7849ca740d25cfa7bd6dde 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/optimizer/path
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = allpaths.o clausesel.o costsize.o indxpath.o \
        joinpath.o joinrels.o orindxpath.o pathkeys.o tidpath.o
@@ -28,4 +29,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index b03d83afdd54929d711476ca366cd90167ffad0d..99cec8aecd01c4bcad6c8602732d20f05d236b25 100644 (file)
@@ -8,13 +8,12 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/optimizer/plan
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = createplan.o initsplan.o planmain.o planner.o setrefs.o subselect.o
 
-# not ready yet: predmig.o xfunc.o
-
 all: SUBSYS.o
 
 SUBSYS.o: $(OBJS)
@@ -29,4 +28,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 312f9d2124f26f005165fd3f2edd302ac0305177..993053bff45c53032f8b8549f52e12724843353d 100644 (file)
@@ -8,13 +8,12 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/optimizer/prep
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = prepqual.o preptlist.o prepunion.o prepkeyset.o
 
-# not ready yet: predmig.o xfunc.o
-
 all: SUBSYS.o
 
 SUBSYS.o: $(OBJS)
index bf5d9e884cc693fee2e2d597989a1a537b5e2787..7cbe5c01968e9a6e698c13522d05cc17e1eb2e43 100644 (file)
@@ -8,14 +8,13 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/optimizer/util
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = restrictinfo.o clauses.o indexnode.o plancat.o \
        joininfo.o pathnode.o relnode.o tlist.o var.o
 
-# not ready yet: predmig.o xfunc.o
-
 all: SUBSYS.o
 
 SUBSYS.o: $(OBJS)
@@ -30,4 +29,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 8e2dfe3c19a9967b1e08767292d3c57cf7d97c0b..027b70a9873fb43319df5e4af65bfffe1d1440f7 100644 (file)
@@ -17,8 +17,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR=../..
-include ../../Makefile.global
+subdir = src/backend/port
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = dynloader.o @INET_ATON@ @STRERROR@ @MISSING_RANDOM@ @SRANDOM@
 OBJS+= @GETHOSTNAME@ @GETRUSAGE@ @STRCASECMP@ @STRDUP@ @TAS@ @ISINF@
@@ -39,8 +40,6 @@ qnx4.dir:
 tas.o: tas.s
        $(CC) $(CFLAGS) -c tas.s
 
-.PHONY: clean dep
-
 distclean clean:
        rm -f SUBSYS.o $(OBJS)
 
index 1399014dde82212a6379efdbf6cff043421f5a24..4f2e9a92ea5e2dfa1bb81631f9aae767c15877e4 100644 (file)
@@ -1,12 +1,14 @@
 #-------------------------------------------------------------------------
 #
-# Makefile--
-#    Makefile for port/next (NeXTStep 3.3 specific stuff)
+# Makefile for NeXTStep 3.3 specific stuff
+#
+# $Header$
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/port/nextstep
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = dynloader.o port.o
 
index 096f8d7ab737198696426533b64c39b15f247f1a..b826046dd1e68d626b1cecfcc6a4267bb80e834b 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/port/qnx4
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = isnan.o rint.o sem.o shm.o
 
@@ -36,4 +37,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 6477bc43dcd06c0dd8535f956c7a1ea1706f6a6e..3759e1f3b94c2699af39d9b0c396083c997468cf 100644 (file)
@@ -1,15 +1,8 @@
-#-------------------------------------------------------------------------
-#
-# Makefile--
-#    Makefile for port/sparc
-#
-# IDENTIFICATION
-#    $Header$
-#
-#-------------------------------------------------------------------------
+# $Header$
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/port/sunos4
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = strtol.o
 
@@ -27,4 +20,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index b1a11571f0cc4e6123f9e7dd3670ff4e089ae660..bc9c512b10192e77c6f23bbd8be2f6dc42569118 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../..
-include ../../Makefile.global
+subdir = src/backend/postmaster
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = postmaster.o
 
@@ -27,4 +28,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 2c60ad8a9191f46b24de2ccd839e222f87035ba9..b550eba6dd50cf9d599c6f6ae2b4ad44b39b6451 100644 (file)
@@ -8,10 +8,11 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../..
-include ../../Makefile.global
+subdir = src/backend/regex
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
 
-CFLAGS += -DPOSIX_MISTAKE 
+CPPFLAGS += -DPOSIX_MISTAKE 
 
 DEBUGOBJ =
 
@@ -27,7 +28,7 @@ SUBSYS.o: $(OBJS)
        $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
 
 retest: retest.o SUBSYS.o $(DEBUGOBJ)
-       $(CC) -o retest retest.o SUBSYS.o $(DEBUGOBJ)
+       $(CC) $(CFLAGS) -o retest retest.o SUBSYS.o $(DEBUGOBJ)
 
 depend dep:
        $(CC) -MM $(CFLAGS) *.c >depend
@@ -38,4 +39,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 7f0c7501f3a0c5bfe6392a8522e511e885f9d8e5..168d2233c0dcb6cb6c576c7d61a14c398399a141 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../..
-include ../../Makefile.global
+subdir = src/backend/rewrite
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = rewriteRemove.o rewriteDefine.o \
        rewriteHandler.o rewriteManip.o rewriteSupport.o locks.o
@@ -28,4 +29,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index ebf02fb48698e25c602c536a364167d58c4237af..7c2a86fbb70bc75d5021bfc6f31d41721fb69f3b 100644 (file)
@@ -6,7 +6,7 @@
 
 subdir = src/backend/storage
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 SUBDIRS     := buffer file ipc large_object lmgr page smgr
 SUBDIROBJS  := $(SUBDIRS:%=%/SUBSYS.o)
index 3eb30a2369e7cc8969eba556beec4ea241852c0c..719ba86c3c770ab18b94d325846ad2de94b1957b 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/storage/buffer
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = buf_table.o buf_init.o bufmgr.o freelist.o localbuf.o s_lock.o
 
index efb627aba774201d0be1f249a8ae479ca82394fa..c6c0cb14761aa7af79068191d4fe82fc250f6e50 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/storage/file
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = fd.o buffile.o
 
@@ -27,4 +28,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 1ea9e9241569294a821721dfb8b48726c3ba979c..45d030dc3918805df85310bf668a5451461f3013 100644 (file)
@@ -6,7 +6,7 @@
 
 subdir = src/backend/storage/ipc
 top_builddir = ../../../..
-include ../../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 # seems to be required 1999/07/22 bjm
 ifeq ($(CPU), alpha)
index 086cccc88a676ad4a611f418927cdd649244b33d..73cfd346bfe9941a0b5f99fb2cc516e7f42959b5 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/storage/large_object
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = inv_api.o
 
@@ -27,4 +28,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 34d689316114ba493b933d9fadc5551e08bfda70..a00868b1a164a186ec374f19a2de505a5a0a4bd2 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/storage/lmgr
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = lmgr.o lock.o proc.o
 
@@ -27,4 +28,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 025a411fc3c402564dd5b351587dc7e71dcbebf7..1c9ae32dc1e80f2ed5704b04e3afe0e286b9c5fc 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/storage/page
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS =  bufpage.o itemptr.o
 
@@ -27,4 +28,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 5654c5855885dbfedd284a8f490793f39bd50768..9e873f5c5ba08aa228b612f5cdbbbe8a98203925 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/storage/smgr
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = md.o mm.o smgr.o smgrtype.o
 
@@ -27,4 +28,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 0a85c246226add2ed5ac1b2b1b3544f75d5dd7c4..79e9829b574b7bebd46a6026140fbcaa38aae5f7 100644 (file)
@@ -8,12 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR= ../..
-include $(SRCDIR)/Makefile.global
-
-ifeq ($(CC), gcc)
-CFLAGS+= -Wno-error
-endif
+subdir = src/backend/tcop
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS= dest.o fastpath.o postgres.o pquery.o utility.o
 
@@ -31,4 +28,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 460b75871ce110651cfacb7f14004ca36b8b1f7b..846fb1a545200c94ecf5e3b682bc90997a0eaeb1 100644 (file)
@@ -8,10 +8,12 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../..
-include ../../Makefile.global
+subdir = src/backend/tioga
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = tgRecipe.o Varray.o
+CPPFLAGS += -I$(srcdir)
 
 all: SUBSYS.o
 
@@ -27,4 +29,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index f6a13e80708a571d9e7be2d36d3fc073f9b91349..9cc63bd3c04d5236629ac8f871af90a2e03ddebc 100644 (file)
@@ -6,7 +6,7 @@
 
 subdir = src/backend/utils/
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 SUBDIRS     := adt cache error fmgr hash init misc mmgr sort time
 ifdef MULTIBYTE
index 7a74aa3ec9118c4f9196c426538e8582263e5993..ea099ff04860b3bce311c6bdd11835e9dcd8aa1b 100644 (file)
@@ -6,7 +6,7 @@
 
 subdir = src/backend/utils/adt
 top_builddir = ../../../..
-include ../../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 # seems to be required for some date/time stuff 1999/07/22 bjm
 ifeq ($(CPU),alpha)
@@ -40,6 +40,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
-
-
index 7c1a1408ab2306f60288e6b35a27d35f45234527..9ebe9424d5026d9a86fb73224d950d23b37faa19 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/utils/cache
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = catcache.o inval.o rel.o relcache.o syscache.o lsyscache.o \
        fcache.o temprel.o
@@ -28,4 +29,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index b1771f90339ad54cc193b5d327fb50770d365464..eb7099bedf0220599f76803bb10df93e84bf92fe 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/utils/error
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = assert.o elog.o exc.o excabort.o excid.o format.o
 
@@ -27,4 +28,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index d27f9edabafb25fe9f10badfd0c36587d820df1a..9d1eb81d542c7451f7b6a26add24963ff4de38ed 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/utils/fmgr
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = dfmgr.o fmgr.o
 
@@ -27,4 +28,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index ae3c1fa7496d43410bd421894ca963644cafb422..80fbf050dfcbd8bf63d8d70c698b5fdf2654a913 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/utils/hash
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = dynahash.o hashfn.o
 
@@ -27,4 +28,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 904e04aad9351827393e4ca9bd98ee31b0e0d2b1..4e0628c301a05609d86dc132c9448764ffd414ed 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/utils/init
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = findbe.o globals.o miscinit.o postinit.o
 
index a73b0b2be277d8c4729e864c12aae14fbbeafdcf..d15604640fefe47715f22c491a49dc907ed5d38c 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/utils/mb
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = common.o conv.o mbutils.o wchar.o wstrcmp.o wstrncmp.o variable.o \
        big5.o
@@ -47,4 +48,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 1b36aa336663c5cc0aa105fd5c6fa1932016eb1a..67624b2c8d400e2574abf80589e637c71ce11835 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/utils/mmgr
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = aset.o mcxt.o portalmem.o
 
@@ -27,4 +28,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index a7ae9610c30de7852a2444b6aeb00928d568d575..6cac6fc3c48b7504f2445b52990e8ceda9044c10 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/utils/sort
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = logtape.o tuplesort.o tuplestore.o
 
@@ -27,4 +28,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 2119f4601b8954a8e388ea9c4ae9e7b6e2766213..9b39fdf3550a4907eedbb63bad5722d5f18fdea0 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/utils/time
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 OBJS = tqual.o
 
@@ -27,4 +28,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index 63fab62831dd2bffbc67a0fe33d0087d5519a6f1..28eddbee56054536855a4e853ee85e537a529b94 100644 (file)
@@ -10,7 +10,7 @@
 
 subdir = src/bin
 top_builddir = ../..
-include ../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 DIRS := initdb initlocation ipcclean pg_ctl pg_dump pg_id \
        pg_passwd psql scripts pg-config
index 5df9b74d91717ed5366d62a9ad3e081ee17ffe08..459c5d4bf6efcee24dc8629d2eaf022151c20b19 100644 (file)
 
 subdir = src/bin/initdb
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 all: initdb
 
-initdb: initdb.sh ../../Makefile.global
+initdb: initdb.sh $(top_builddir)/src/Makefile.global
        sed -e 's/__MULTIBYTE__/$(MULTIBYTE)/g' \
            -e 's/__VERSION__/$(VERSION)/g' \
            -e 's:__bindir__:$(bindir):g' \
index 43c1d4f9bbc8da685764ae0801beef33dede0894..25c6ea45530ad080732014aca64c2d0cbd8ba15a 100644 (file)
@@ -10,7 +10,7 @@
 
 subdir = src/bin/initlocation
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 all: initlocation
 
index 5095badf21c1ba6a7e120d51bb1751ba2ef06635..046aa2aaecca2c5116351c836afe7d22f9eb1b51 100644 (file)
@@ -10,7 +10,7 @@
 
 subdir = src/bin/ipcclean
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 all: ipcclean
 
index d74a98b988306fc33a665e6f2a784c27e096e4be..dd7878bbb7b0f739982b25be1e77fbf0e12481a8 100644 (file)
@@ -10,7 +10,7 @@
 
 subdir = src/bin/pg_ctl
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 all: pg_ctl
 
index 36683a0cc0ff68228aba9df7e51499c42fbbc205..8e2d61d3577adfbc9ea11994bb624b5be3d2bef7 100644 (file)
 
 subdir = src/bin/pg_dump
 top_builddir = ../../..
-include ../../Makefile.global
+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)
 
-CFLAGS+= -I$(LIBPQDIR)
+CPPFLAGS+= -I$(libpq_srcdir)
 LIBS+= -lz
 
 all: submake pg_dump pg_restore pg_dumpall
 
-pg_dump: pg_dump.o common.o $(OBJS) $(LIBPQDIR)/libpq.a 
-       $(CC) $(CFLAGS) -o $@ pg_dump.o common.o $(OBJS) $(LIBPQ) $(LDFLAGS)
+pg_dump: pg_dump.o common.o $(OBJS) $(libpq_builddir)/libpq.a 
+       $(CC) $(CFLAGS) -o $@ pg_dump.o common.o $(OBJS) $(libpq) $(LDFLAGS)
 
-pg_restore: pg_restore.o $(OBJS) $(LIBPQDIR)/libpq.a
-       $(CC) $(CFLAGS) -o $@ pg_restore.o $(OBJS) $(LIBPQ) $(LDFLAGS)
+pg_restore: pg_restore.o $(OBJS) $(libpq_builddir)/libpq.a
+       $(CC) $(CFLAGS) -o $@ pg_restore.o $(OBJS) $(libpq) $(LDFLAGS)
 
 ../../utils/strdup.o:
        $(MAKE) -C ../../utils strdup.o
@@ -37,7 +37,7 @@ pg_dumpall: pg_dumpall.sh
 
 .PHONY: submake
 submake:
-       $(MAKE) -C $(LIBPQDIR) all
+       $(MAKE) -C $(libpq_builddir) all
 
 install: all installdirs
        $(INSTALL_PROGRAM) pg_dump$(X) $(bindir)/pg_dump$(X)
index 3fc6951de77361a03f180e23bcef1ff126d06fc2..83376a3e938a893c2663f6f78f494791fcc59585 100644 (file)
 
 subdir = src/bin/pg_encoding
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 OBJS= pg_encoding.o
 
 all: submake pg_encoding$(X)
 
 pg_encoding$(X): $(OBJS)
-       $(CC) -o $@ $(OBJS) $(LIBPQ) $(LDFLAGS) $(CFLAGS)
+       $(CC) -o $@ $(OBJS) $(libpq) $(LDFLAGS) $(CFLAGS)
 
 .PHONY: submake
 
 submake:
-       $(MAKE) -C $(LIBPQDIR) all
+       $(MAKE) -C $(libpq_builddir) all
 
 install: all installdirs
        $(INSTALL_PROGRAM) pg_encoding$(X) $(bindir)/pg_encoding$(X)
index da044ea37bca1159721cecdc0c48254600f2d55f..be5e1d678d30844c5d7c8c250fa66d50c7333a28 100644 (file)
@@ -10,7 +10,7 @@
 
 subdir = src/bin/pg_id
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 all: pg_id$(X)
 
index aef4f1a56a4c43b6039f71251b7a217a2c195a49..6009e1a0b8e5dd6b2d3af9916ed1b1e3d5700a04 100644 (file)
@@ -1,10 +1,8 @@
-#
-# Makefile for src/bin/pg_passwd
-#
+# $Header$
 
 subdir = src/bin/pg_passwd
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 all: pg_passwd$(X)
 
index 94418dc153fb308bb01e71a02b2a702fa8b31c35..b3e5d1c176c5997ae3c6a3b4ba623bab11bebe7d 100644 (file)
@@ -10,7 +10,7 @@
 
 subdir = src/bin/pgaccess
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 pgaccessdir = $(datadir)/pgaccess
 
index 2b61ec16a0c591cd0ed8baad8896781823f85b37..bd3055f64e5fa84487ba19b32491562a740f69d4 100644 (file)
@@ -11,7 +11,7 @@
 
 subdir = src/bin/pgtclsh
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 #
 # Include definitions from the tclConfig.sh file
@@ -21,7 +21,11 @@ ifeq ($(USE_TK), true)
 -include Makefile.tkdefs
 endif
 
-CFLAGS+= $(X_CFLAGS) -I$(LIBPGTCLDIR)
+libpgtcl_srcdir = $(top_srcdir)/src/interfaces/libpgtcl
+libpgtcl_builddir = $(top_builddir)/src/interfaces/libpgtcl
+libpgtcl = -L$(libpgtcl_builddir) -lpgtcl
+
+CFLAGS+= $(X_CFLAGS) -I$(libpgtcl_srcdir)
 
 
 # If we are here then TCL is available
@@ -36,16 +40,16 @@ all: submake $(PROGRAMS)
 
 pgtclsh: pgtclAppInit.o
        $(CC) $(CFLAGS) $(TCL_DEFS) -o $@ $< \
-         $(LIBPGTCL) $(LIBPQ) $(TCL_LIB_SPEC) $(TCL_LIBS) $(LDFLAGS)
+         $(libpgtcl) $(libpq) $(TCL_LIB_SPEC) $(TCL_LIBS) $(LDFLAGS)
 
 pgtksh: pgtkAppInit.o
        $(CC) $(CFLAGS) $(TK_DEFS) -o $@ $< \
-         $(LIBPGTCL) $(LIBPQ) $(X_LIBS) $(TK_LIB_SPEC) $(TK_LIBS) \
+         $(libpgtcl) $(libpq) $(X_LIBS) $(TK_LIB_SPEC) $(TK_LIBS) \
          $(TCL_LIB_SPEC) $(X11_LIBS) $(LDFLAGS)
 
 .PHONY: submake
 submake:
-       $(MAKE) -C $(LIBPGTCLDIR) all
+       $(MAKE) -C $(libpgtcl_builddir) all
 
 install: all installdirs
        $(INSTALL_PROGRAM) pgtclsh $(bindir)/pgtclsh
index fb5b65e36f310a173f3ace8dae14cead154001cc..a12efee3ca935fcb91bd78335af2d248b77fe381 100644 (file)
 
 subdir = src/bin/psql
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 REFDOCDIR= $(top_srcdir)/doc/src/sgml/ref
 
-CFLAGS+= -I$(LIBPQDIR)
+CPPFLAGS+= -I$(libpq_srcdir)
 
 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 \
@@ -47,8 +47,8 @@ endif
 
 # End of hacks for picking up backend 'port' modules
 
-psql$(X): $(OBJS) $(LIBPQDIR)/libpq.a
-       $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBPQ) $(LDFLAGS)
+psql$(X): $(OBJS) $(libpq_builddir)/libpq.a
+       $(CC) $(CFLAGS) -o $@ $(OBJS) $(libpq) $(LDFLAGS)
 
 help.o: $(srcdir)/sql_help.h
 
@@ -63,7 +63,7 @@ endif
 .PHONY: submake
 
 submake:
-       $(MAKE) -C $(LIBPQDIR) all
+       $(MAKE) -C $(libpq_builddir) all
 
 distprep: $(srcdir)/sql_help.h
 
index d07dd5218529e0843fac08126abe8dd16ddcfccd..cf5f2ce5f1022f10f3ecbd30d574a308ca618ea8 100644 (file)
@@ -10,7 +10,7 @@
 
 subdir = src/bin/scripts
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 SCRIPTS := createdb dropdb createuser dropuser createlang droplang vacuumdb
 
index 15454a4991cce9fedce587be3a395bc4f7f1a328..344d82b71799f12a57f7b00b230b9616a309c64b 100644 (file)
@@ -11,7 +11,7 @@
 
 subdir = src/include
 top_builddir = ../..
-include ../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 
 HEADERS := os.h config.h c.h postgres.h postgres_ext.h fmgr.h \
index 439d5744021bae2c880ffce9e1f5c46e1ca8a9d0..19bda8f83838bffc8519732146a1e7088e5097b7 100644 (file)
@@ -10,7 +10,7 @@
 
 subdir = src/interfaces
 top_builddir = ../..
-include ../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 DIRS := libpq ecpg libpgeasy
 
index d3f9df7c9a4d608d35720463df0f0681f081e962..2637a2ed015c7b4be8debf53490665897b194d9d 100644 (file)
@@ -1,6 +1,6 @@
 subdir = src/interfaces/ecpg
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 all install installdirs uninstall dep depend distprep:
        $(MAKE) -C include $@
index 3d36e878eb237eaf13c2a6d7530ef1f40f6b9d34..9255fe78b5c117bb5d7ed991c0816dce43aaa520 100644 (file)
@@ -1,6 +1,6 @@
 subdir = src/interfaces/ecpg/include
 top_builddir = ../../../..
-include ../../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 install: all installdirs install-headers
 
index 3aa6046e6e382de181d2f93777f92cd3e3c3bcd8..9ffe7287d82ab60a29bc26844a881b0a478550ca 100644 (file)
 
 subdir = src/interfaces/ecpg/lib
 top_builddir = ../../../..
-include ../../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 NAME= ecpg
 SO_MAJOR_VERSION= 3
 SO_MINOR_VERSION= 1.1
 
-CFLAGS+= -I$(top_srcdir)/src/interfaces/ecpg/include -I$(LIBPQDIR)
+CPPFLAGS += -I$(top_srcdir)/src/interfaces/ecpg/include -I$(libpq_srcdir)
 
 
 OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \
        connect.o misc.o
 
-SHLIB_LINK= $(LIBPQ)
+SHLIB_LINK= $(libpq)
 
 all: all-lib
 
index bba2ecdeb7e140edc1fd88a60560c57362533abb..aeb0a0fc0759c72a83e2d3fd59c3883a7b441e59 100644 (file)
@@ -1,12 +1,12 @@
 subdir = src/interfaces/ecpg/preproc
 top_builddir = ../../../..
-include ../../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 MAJOR_VERSION=2
 MINOR_VERSION=7
 PATCHLEVEL=1
 
-CFLAGS+=-I../include -DMAJOR_VERSION=$(MAJOR_VERSION) \
+CPPFLAGS+=-I../include -DMAJOR_VERSION=$(MAJOR_VERSION) \
        -DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \
        -DINCLUDE_PATH=\"$(includedir)\" 
 
index 0c531f645ca82404f48d6e141ea315914a10544e..4153a3c62ffc9db02ac202a86c27d6fb098cfdf8 100644 (file)
@@ -8,7 +8,7 @@
 
 subdir = src/interfaces/libpgeasy
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 
 # shared library parameters
@@ -16,11 +16,11 @@ NAME= pgeasy
 SO_MAJOR_VERSION= 2
 SO_MINOR_VERSION= 1
 
-CFLAGS+= -I$(LIBPQDIR)
+CPPFLAGS += -I$(libpq_srcdir)
 
 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
index bf8bb6b819e829463ecdaacbadb4ae1a6bb05831..21f52f5eed4342c52ccd660c0998c2e91dc43a4a 100644 (file)
@@ -16,11 +16,11 @@ NAME= pgtcl
 SO_MAJOR_VERSION= 2
 SO_MINOR_VERSION= 1
 
-CFLAGS+= -I$(LIBPQDIR)
+CPPFLAGS += -I$(libpq_srcdir)
 
 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
index 5376b8c35b463890cd7ee73bd371c4ee14b6e378..c45e0c8fa0163823afaea1ca4c4a828c083da947 100644 (file)
 
 subdir = src/interfaces/libpq++
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 NAME= pq++
 SO_MAJOR_VERSION= 3
 SO_MINOR_VERSION= 1
 
 SRCHEADERDIR = $(top_srcdir)/src/include
-CXXFLAGS+= -I$(SRCHEADERDIR) -I$(LIBPQDIR)
+CXXFLAGS+= -I$(SRCHEADERDIR) -I$(libpq_srcdir)
 
 OBJS = pgconnection.o pgdatabase.o pgtransdb.o pgcursordb.o pglobject.o 
 
 ifeq ($(PORTNAME), win)
-SHLIB_LINK+= --driver-name g++ $(LIBPQ)
+SHLIB_LINK+= --driver-name g++ $(libpq)
 else
-SHLIB_LINK= $(LIBPQ)
+SHLIB_LINK= $(libpq)
 endif
 
 # For CC on IRIX, must use CC as linker/archiver of C++ libraries
index 7402d79c739202b524505b8bdd5070a2fe91988b..eb55327ad6507a8cec43538be6685e3bc2afd7d3 100644 (file)
@@ -10,7 +10,7 @@
 
 subdir = src/interfaces/libpq
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 # shared library parameters
 NAME= pq
index 165f121d316bbb4e5ac753ac5b8d1f592108ff3f..68aa155b9b9447c127a3bcc8f399fac582acec03 100644 (file)
@@ -8,14 +8,14 @@
 
 subdir = src/interfaces/odbc
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 # Shared library parameters
 NAME = psqlodbc
 SO_MAJOR_VERSION = 0
 SO_MINOR_VERSION = 26
 
-CFLAGS += -I$(srcdir) -DHAVE_CONFIG_H -DODBCINSTDIR='"$(odbcinst_ini_dir)"'
+CPPFLAGS += -I$(srcdir) -DHAVE_CONFIG_H -DODBCINSTDIR='"$(odbcinst_ini_dir)"'
 
 
 OBJS = info.o bind.o columninfo.o connection.o convert.o drvconn.o \
index 210da52660add2047dd332d0674c84aa75320847..53cf86c8e309c78d596c279bdc4515ae5e7e10c3 100644 (file)
@@ -8,7 +8,7 @@
 
 subdir = src/interfaces/perl5
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 
 all: Makefile libpq-all
@@ -19,7 +19,7 @@ Makefile: Makefile.PL
 
 .PHONY: libpq-all
 libpq-all:
-       $(MAKE) -C $(top_builddir)/src/interfaces/libpq all
+       $(MAKE) -C $(libpq_builddir) all
 
 # The klugery here is to ensure that the perl5 shared library gets
 # built with the correct path to the installed location of libpq
index 111b0800fa2ffa6d53b7c5b775f8c8893e64de7d..5be583a35ab1973c773495480f1871542acb2301 100644 (file)
 
 subdir = src/interfaces/python
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 all: Makefile pgmodule.c libpq-all
        $(MAKE) -f Makefile
 
 .PHONY: libpq-all
 libpq-all:
-       $(MAKE) -C $(top_builddir)/src/interfaces/libpq all
+       $(MAKE) -C $(libpq_builddir) all
 
 Makefile: Setup.in Makefile.pre.in
        $(MAKE) -f Makefile.pre.in boot srcdir=$(srcdir) VPATH=$(srcdir)
@@ -26,10 +26,11 @@ Makefile.pre.in: $(python_extmakefile)
        cp $< $@
 
 Setup.in: Setup.in.raw
-       sed -e "s%__LIBPQ__%${top_srcdir}/src/interfaces/libpq%g" \
-           -e "s%__EXTRA_LIBS__%${LIBS}%g" \
-           -e "s%__INCLUDES__%${top_srcdir}/src/include%g" \
-           < $< > $@
+       sed -e 's,@libpq_srcdir@,$(libpq_srcdir),g' \
+           -e 's,@libpq_builddir@,$(libpq_builddir),g' \
+           -e 's,@EXTRA_LIBS@,$(LIBS),g' \
+           -e 's,@pg_includedir@,$(top_srcdir)/src/include,g' \
+           $< > $@
 
 install: all
        @echo "Installing Python module"
index dddb55881028707a5a1cd0efae1d1bda9878ab5c..9c26d73968c985f97d7e8ed1a92a2400f8ef031c 100644 (file)
@@ -1,3 +1,3 @@
 *shared*
 
-_pg  pgmodule.c -I__LIBPQ__ -I__INCLUDES__ -L__LIBPQ__ -lpq __EXTRA_LIBS__
+_pg  pgmodule.c -I@libpq_srcdir@ -I@pg_includedir@ -L@libpq_builddir@ -lpq @EXTRA_LIBS@
index ba6d0540d393571daf947f350f2391497907b5b9..0066135179e8c34aeebccc05f7fe0a96edc14bd7 100644 (file)
@@ -10,16 +10,16 @@ IMPSUFF= .imp
 
 POSTGRES_IMP= postgres$(IMPSUFF)
 
-MKLDEXPORT=$(SRCDIR)/backend/port/aix/mkldexport.sh
+MKLDEXPORT=$(top_srcdir)/src/backend/port/aix/mkldexport.sh
 
 $(POSTGRES_IMP):
        @echo Making $@
-       $(MKLDEXPORT) postgres $(BINDIR) > $@
-       $(CC) -Wl,-bE:$(SRCDIR)/backend/$@ -o postgres $(OBJS) $(LDFLAGS)
+       $(MKLDEXPORT) postgres $(bindir) > $@
+       $(CC) -Wl,-bE:$(top_builddir)/src/backend/$@ -o postgres $(OBJS) $(LDFLAGS)
 
 %$(EXPSUFF):
        $(MKLDEXPORT) $*.o `pwd` > $*$(EXPSUFF)
 
 %$(DLSUFFIX): %.o %$(EXPSUFF)
        @echo Making share library $@ from $*.o, $*$(EXPSUFF), and installed postgres.imp
-       $(LD) -H512 -bM:SRE -bI:$(LIBDIR)/$(POSTGRES_IMP) -bE:$*$(EXPSUFF) -o $@ $*.o $(LDFLAGS) $(CFLAGS_SL)
+       $(LD) -H512 -bM:SRE -bI:$(libdir)/$(POSTGRES_IMP) -bE:$*$(EXPSUFF) -o $@ $*.o $(LDFLAGS) $(CFLAGS_SL)
index ad2b932d64f4b154ba507e740c593b2239d76159..de2b87d6138fb92c7f4ba0cd57d0d111ec1c510f 100644 (file)
@@ -19,11 +19,11 @@ ifneq ($(HPUXMATHLIB),)
    LDFLAGS:= -L /lib/pa1.1 $(LDFLAGS)
 endif
 
-# On all HPUX versions, embed LIBDIR as the shared library search path
+# On all HPUX versions, embed `libdir' as the shared library search path
 # so that the executables don't need SHLIB_PATH to be set, specify -z
 # to catch null pointer dereferences, and specify -E to make all symbols
 # visible to dynamically linked shared libraries.
-LDFLAGS+= -Wl,+b -Wl,$(LIBDIR) -Wl,-z -Wl,-E
+LDFLAGS+= -Wl,+b -Wl,$(libdir) -Wl,-z -Wl,-E
 
 # Rule for building shared libs (currently used only for regression test
 # shlib ... should go away, since this is not really enough knowledge)
index b73f1f2d090c298a2911b9554c68709a0e7bbea0..45fab0e6e21d346a89211f1e9828b5283df69b71 100644 (file)
@@ -2,7 +2,7 @@ CFLAGS+= -I/usr/local/include
 LDFLAGS+= -g
 DLLTOOL= dlltool
 DLLWRAP= dllwrap
-DLLLIBS=-L/usr/local/lib -L$(LIBDIR) -L$(SRCDIR)/backend -lpostgres -lcygipc -lcygwin -lcrypt -lkernel32
+DLLLIBS=-L/usr/local/lib -L$(libdir) -L$(top_builddir)/src/backend -lpostgres -lcygipc -lcygwin -lcrypt -lkernel32
 X=.exe
 MK_NO_LORDER=true
 MAKE_DLL=true
@@ -11,7 +11,7 @@ SHLIB_LINK=$(DLLLIBS)
 
 %.dll: %.o
        $(DLLTOOL) --export-all --output-def $*.def $<
-       $(DLLWRAP) -o $@ --def $*.def $< $(SRCDIR)/utils/dllinit.o $(DLLLIBS)
+       $(DLLWRAP) -o $@ --def $*.def $< $(top_builddir)/src/utils/dllinit.o $(DLLLIBS)
        rm -f $*.def
 
 curdir:=$(shell pwd)
index 1a000b49c836354e6f3161b1ebb2dde43d70783c..978c6a663dec0ce781e4d4cb3cdec0c5e1994137 100644 (file)
@@ -10,7 +10,7 @@
 
 subdir = src/pl
 top_builddir = ../..
-include ../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 DIRS := plpgsql
 
index ecefef0884367938d1c80fc47b0daa636c38916c..d9531a3d87e97f48dd880931c17c1bbd68270833 100644 (file)
@@ -2,7 +2,7 @@
 
 subdir = src/pl/plperl
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 plperl_installdir = $(libdir)
 
index d9daa5445c90f801dabd5fa925aaccd33733fc95..e1a56d87338a7ce08e07d63fa19d7ed9f29300a6 100644 (file)
@@ -10,7 +10,7 @@
 
 subdir = src/pl/plpgsql
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 all install installdirs uninstall distprep:
        $(MAKE) -C src $@
index 19d0f580fd147be088e814be64104cbdf2dcd746..3ce1b01aedf6d21cac5835c55a8719811225a019 100644 (file)
@@ -8,7 +8,7 @@
 
 subdir = src/pl/tcl
 top_builddir = ../../..
-include ../../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 -include Makefile.tcldefs
 
index 0eebe3865ea7d49c81f99c25843f1db4a69187b1..58b7df2ad839e5329d59a66e8b797bb0e5087cf3 100644 (file)
 #
 #-------------------------------------------------------------------------
 
-SRCDIR= ../..
-include ../../Makefile.global
+subdir = src/test/bench
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
 
 CREATEFILES= create.sql bench.sql
 OUTFILES= bench.out bench.out.perquery
 
-CFLAGS+= -I$(LIBPQDIR) $(CFLAGS_SL)
+CFLAGS+= -I$(libpq_srcdir) $(CFLAGS_SL)
 
 
 all: $(CREATEFILES)
index 8368e4078e8a3fdf9d5fdc64c9b7db6d11c97747..9dd159e2f2e4c9a32f702b0b3df50d7dd71ab770 100644 (file)
@@ -2,12 +2,13 @@
 # Makefile for example programs
 #
 
-SRCDIR= ../..
-include ../../Makefile.global
+subdir = src/test/examples
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
 
-CFLAGS+= -I$(LIBPQDIR)
+CPPFLAGS+= -I$(libpq_srcdir)
 
-LDFLAGS+= -L$(LIBPQDIR) -lpq 
+LDFLAGS+= $(libpq)
 
 
 # PROGS= testlibpq0 testlibpq1 testlibpq2 testlibpq3 testlibpq4 testlo
index cd37c920577698c7531526caa3da13d1f1b59452..eed94c6bc789d39979c305db1997e3cebe8f7eee 100644 (file)
@@ -1,9 +1,8 @@
-#
-# Makefile for example programs
-#
+# $Header$
 
-SRCDIR= ../..
-include ../../Makefile.global
+subdir = src/test/locale
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
 
 
 PROGS = test-pgsql-locale test-ctype
@@ -17,9 +16,7 @@ $(PROGS): % : %.c
 clean: 
        rm -f $(PROGS) *.out
        for d in $(DIRS); do \
-               cd $$d; \
-               $(MAKE) clean; \
-               cd ..; \
+               $(MAKE) -C $$d clean
        done
 
 test-%: all
index fb995c2d20e8bb5ea5371cabcf4446b248a4e2d5..c8ebf004011ed3de25a3e6f1d6d3cf6a2105e387 100644 (file)
@@ -19,9 +19,9 @@ CONTRIB= $(top_builddir)/contrib
 
 HOST := $(shell $(top_srcdir)/config/config.guess)
 
-CFLAGS+= -I$(LIBPQDIR) $(CFLAGS_SL)
+CFLAGS+= -I$(libpq_srcdir) $(CFLAGS_SL)
 
-LDADD+= -L$(LIBPQDIR) -lpq
+LDADD+= $(libpq)
         
 #
 # DLOBJS is the dynamically-loaded object file.  The regression test uses 
index 233adcad1c16e3692da87794b992de4fba0c82c3..3e63bc424da36128227b2f8e148afbbe4ce6ad99 100644 (file)
@@ -11,8 +11,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR= ../../..
-include ../../../Makefile.global
+subdir = src/test/regress/input
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 #
 # ... plus test query inputs
@@ -34,5 +35,5 @@ all: $(INFILES)
        OBJ=`pwd`; \
        sed -e "s:_OBJWD_:$$OBJ/\.\.:g" \
            -e "s:_DLSUFFIX_:$(DLSUFFIX):g" \
-           -e "s:_LIBDIR_:$(LIBDIR):g" \
+           -e "s:_LIBDIR_:$(libdir):g" \
            -e "s/_USER_/$$USER/g" < $< > ../sql/$@
index 79a230131a0600510b872a25fdef6714c496d8ae..80ce17cac5d092f6fc3361f68ad864c5d06533fa 100644 (file)
@@ -11,8 +11,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR= ../../..
-include ../../../Makefile.global
+subdir = src/test/regress/output
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
 
 #
 # ... plus test query inputs
@@ -34,7 +35,6 @@ all: $(INFILES)
        OBJ=`pwd`; \
        sed -e "s:_OBJWD_:$$OBJ/\.\.:g" \
            -e "s:_DLSUFFIX_:$(DLSUFFIX):g" \
-           -e "s:_LIBDIR_:$(LIBDIR):g" \
+           -e "s:_LIBDIR_:$(libdir):g" \
            -e "s/_USER_/$$USER/g" < $< | \
        sed -e "s:output/\.\.:input/\.\.:g" > ../expected/$@
-
index 15372e81581bf04e273fa916e93f5eb8a6e16210..500d4e7523db58f8a1c522a899854e8d938a2efe 100644 (file)
@@ -8,8 +8,9 @@
 #
 #-------------------------------------------------------------------------
 
-SRCDIR= ..
-include $(SRCDIR)/Makefile.global
+subdir = src/tutorial
+top_builddir = ../..
+include $(top_builddir)/src/Makefile.global
 
 CFLAGS+= $(CFLAGS_SL)
 
index f6967bdcb4b2a1015b18469c4aaa9c3e167cba2a..bd9e041117f3f6eae96d0893bbbbf42812c626a1 100644 (file)
@@ -19,7 +19,7 @@
 
 subdir = src/utils
 top_builddir = ../..
-include ../Makefile.global
+include $(top_builddir)/src/Makefile.global
 
 all: