diff --git a/src/Makefile b/src/Makefile index 66ddf2e2bf5a0888604288a509ccf034f4ef3eb3..6d14715688e310c63754e3945ff4c9709e31ba49 100644 --- a/src/Makefile +++ b/src/Makefile @@ -7,15 +7,12 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/Makefile,v 1.10 1996/11/11 13:51:20 bryanh Exp $ -# -# NOTES -# objdir - location of the objects and generated files (eg. obj) +# $Header: /cvsroot/pgsql/src/Makefile,v 1.11 1996/11/13 10:34:58 bryanh Exp $ # #------------------------------------------------------------------------- -MKDIR=./mk --include $(MKDIR)/../Makefile.global +SRCDIR= . +include Makefile.global FIND = find # assuming gnu tar and split here @@ -41,7 +38,7 @@ ifeq ($(USE_TCL), true) $(MAKE) -C libpgtcl $@ endif $(MAKE) -C bin $@ -ifneq ($(wildcard $(MKDIR)/../../doc), ) +ifneq ($(wildcard ../doc), ) $(MAKE) -C ../doc $@ endif @if test $@. = all. -o $@. = .; then \ diff --git a/src/Makefile.global b/src/Makefile.global index b5c091b31cf6cae54ca70e6bc425c23d84558d51..2972c03e5ab63c5436d87cc42a4a6b46789b24b1 100644 --- a/src/Makefile.global +++ b/src/Makefile.global @@ -7,7 +7,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.64 1996/11/13 08:36:31 bryanh Exp $ +# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.65 1996/11/13 10:35:00 bryanh Exp $ # # NOTES # Essentially all Postgres make files include this file and use the @@ -68,14 +68,6 @@ PORTNAME= UNDEFINED # library), set LINUX_ELF to null in Makefile.custom. LINUX_ELF= 1 -# SRCDIR specifies where the source files are. It should be defined before -# we are included, but for transition purposes, we put this default here. -ifdef SRCDIR -MKDIR:= $(SRCDIR)/mk -else -SRCDIR:= $(MKDIR)/.. -endif - LIBPQDIR:= $(SRCDIR)/libpq # For convenience, POSTGRESDIR is where DATADIR, BINDIR, and LIBDIR @@ -83,13 +75,6 @@ LIBPQDIR:= $(SRCDIR)/libpq # changable separately. POSTGRESDIR= /usr/local/pgsql -# POSTGRESLOGIN is the login name of the user who gets special -# privileges within the database. By default it is "postgres", but -# you can change it to any existing login name (such as your own -# login if you are compiling a private version or don't have root -# access). -POSTGRESLOGIN= postgres - # DATADIR specifies where the postmaster expects to find its database. # This may be overridden by command line options or the PGDATA environment # variable. @@ -268,8 +253,6 @@ DASH_N= -n BACKSLASH_C= -objdir= obj - ############################################################################## # # Customization. @@ -277,8 +260,8 @@ objdir= obj # 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 $(MKDIR)/../Makefile.custom), ) -include $(MKDIR)/../Makefile.custom +ifneq ($(wildcard $(SRCDIR/Makefile.custom), ) +include $(SRCDIR)/Makefile.custom endif ############################################################################# @@ -304,10 +287,9 @@ endif # HISTORY: Before October 1996, this file included the following line: # -include $(MKDIR)/port/postgres.mk.$(PORTNAME) # Now, we instead have all the former contents of those .mk files inline -# with ifeq ($(PORTNAME) ...). This makes it a little bit easier to use -# Makefile.global because you don't have to set MKDIR too. It also makes -# it easier to read the make files. Finally, it should help with -# migration to autoconf. - Bryan +# with ifeq ($(PORTNAME) ...). This makes it easier to read the make +# files and to make certain updates. It should also help with the migration +# to autoconf. -Bryan # Since there are no longer separate files for each platform, much of the # commonality among the platforms ought to be factored out of the following. @@ -548,7 +530,7 @@ INSTALL= /usr/ucb/install # everything to compile. :-/ # # The extra -I flag is to scoop up extra BSD-emulating headers. -CFLAGS_BE+= -DSYSV_DIRENT -I$(POSTGRESDIR)/src/backend/port/sparc_solaris +CFLAGS_BE+= -DSYSV_DIRENT -I$(SRCDIR)/backend/port/sparc_solaris LDADD_BE+= -lsocket -lnsl LD_ADD+= $(LDADD_BE) @@ -715,7 +697,7 @@ INSTALL= /home/tools/bin/install # everything to compile. :-/ # # The extra -I flag is to scoop up extra BSD-emulating headers. -CFLAGS_BE+= -DSYSV_DIRENT -I$(POSTGRESDIR)/src/backend/port/svr4 +CFLAGS_BE+= -DSYSV_DIRENT -I$(SRCDIR)/backend/port/svr4 LDADD_BE+= -lsocket -lnsl -lc /usr/ucblib/libucb.a LD_ADD+= $(LDADD_BE) @@ -755,15 +737,6 @@ endif -############################################################################## -# -# Miscellaneous configuration -# - -srcdir= $(SRCDIR) -includedir= $(HEADERDIR) - - # This goes here so that customization in Makefile.custom is effective ############################################################################## # diff --git a/src/bin/Makefile b/src/bin/Makefile index aee2307c5009a0b8fabdd9b3e5ee1326629727fe..17064b6edfac51405caa532c4f96bd218fb279b8 100644 --- a/src/bin/Makefile +++ b/src/bin/Makefile @@ -7,12 +7,12 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/Makefile,v 1.5 1996/11/11 13:39:09 bryanh Exp $ +# $Header: /cvsroot/pgsql/src/bin/Makefile,v 1.6 1996/11/13 10:35:20 bryanh Exp $ # #------------------------------------------------------------------------- SRCDIR=.. -include $(SRCDIR)/Makefile.global +include ../Makefile.global .DEFAULT all: # diff --git a/src/bin/psql/Makefile b/src/bin/psql/Makefile index 3e6ec54697383dbb32140d4e107edb3031847acc..c0a8ff9afc04f0fd5106d770882b1b586eeec8ee 100644 --- a/src/bin/psql/Makefile +++ b/src/bin/psql/Makefile @@ -7,46 +7,45 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.12 1996/11/12 06:11:52 bryanh Exp $ +# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.13 1996/11/13 10:35:26 bryanh Exp $ # #------------------------------------------------------------------------- -SRCDIR = ../.. -LIBPQDIR = $(SRCDIR)/libpq +SRCDIR= ../.. include ../../Makefile.global -INCLUDE_OPT := \ +INCLUDE_OPT:= \ -I$(LIBPQDIR) \ - -I$(SRCDIR)/include + -I../../include -CFLAGS += $(INCLUDE_OPT) +CFLAGS+= $(INCLUDE_OPT) # #USE_READLINE is set in Makefile.global # ifeq ($(USE_READLINE), true) - CFLAGS += $(READLINE_INC) $(HISTORY_INC) + CFLAGS+= $(READLINE_INC) $(HISTORY_INC) LIBCURSES= -lcurses - LD_ADD += $(READLINE_LIB) $(HISTORY_LIB) $(LIBCURSES) + LD_ADD+= $(READLINE_LIB) $(HISTORY_LIB) $(LIBCURSES) ifeq ($(PORTNAME), ultrix4) - LD_ADD += -ltermcap + LD_ADD+= -ltermcap else ifeq ($(PORTNAME), sparc) - LD_ADD += -ltermcap + LD_ADD+= -ltermcap else ifeq ($(PORTNAME), linux) - LD_ADD += -ltermcap + LD_ADD+= -ltermcap else ifeq ($(PORTNAME), next) - LD_ADD += -ltermcap + LD_ADD+= -ltermcap else ifeq ($(PORTNAME), bsdi) - LD_ADD += -ltermcap + LD_ADD+= -ltermcap else ifeq ($(PORTNAME), BSD44_derived) - LD_ADD += -ltermcap + LD_ADD+= -ltermcap endif endif endif @@ -54,7 +53,7 @@ ifeq ($(USE_READLINE), true) endif endif else - CFLAGS += -DNOREADLINE + CFLAGS+= -DNOREADLINE endif OBJS= psql.o stringutils.o diff --git a/src/interfaces/libpgtcl/Makefile b/src/interfaces/libpgtcl/Makefile index e4c0f1586602de5c59b3c0a27e392bbb081e30c8..cc9e554caf3fe56647e5a731f8f8a322f493a894 100644 --- a/src/interfaces/libpgtcl/Makefile +++ b/src/interfaces/libpgtcl/Makefile @@ -7,12 +7,11 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile,v 1.5 1996/11/12 11:42:09 bryanh Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile,v 1.6 1996/11/13 10:35:31 bryanh Exp $ # #------------------------------------------------------------------------- SRCDIR= .. -LIBPQDIR= $(SRCDIR)/libpq include ../Makefile.global INCLUDE_OPT= \ @@ -58,4 +57,4 @@ install-libpgtcl: libpgtcl.a .PHONY: clean clean: - rm -f $(OBJS) \ No newline at end of file + rm -f $(OBJS) diff --git a/src/interfaces/libpq++/Makefile b/src/interfaces/libpq++/Makefile index 3fb1f5d72495fdc7e1003cfec736ea98ca57bef6..0c734256a91948a2fc0a2f72a598b866e749a2ae 100644 --- a/src/interfaces/libpq++/Makefile +++ b/src/interfaces/libpq++/Makefile @@ -7,12 +7,11 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.2 1996/11/12 11:42:24 bryanh Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.3 1996/11/13 10:35:39 bryanh Exp $ # #------------------------------------------------------------------------- SRCDIR= .. -LIBPQDIR= $(SRCDIR)/libpq include ../Makefile.global CXXFLAGS= $(CFLAGS) @@ -63,4 +62,4 @@ doc: clean: rm libpq++.a $(OBJS) - $(MAKE) -C examples clean \ No newline at end of file + $(MAKE) -C examples clean diff --git a/src/interfaces/libpq++/examples/Makefile b/src/interfaces/libpq++/examples/Makefile index e319a065c3b09fe5faf56521f4b03b751060c6ec..1066d402255cf11dd4a4f850002a3c085c6159a4 100644 --- a/src/interfaces/libpq++/examples/Makefile +++ b/src/interfaces/libpq++/examples/Makefile @@ -3,7 +3,6 @@ # SRCDIR= ../.. -LIBPQDIR= $(SRCDIR)/libpq include ../../Makefile.global CXXFLAGS= $(CFLAGS) diff --git a/src/test/bench/Makefile b/src/test/bench/Makefile index 7e6375f2bd72b40026f025d7a9481ed63bd963ef..440cc30748d8da458750b037e6f6c66b13f87196 100644 --- a/src/test/bench/Makefile +++ b/src/test/bench/Makefile @@ -7,12 +7,11 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/test/bench/Attic/Makefile,v 1.2 1996/11/12 11:42:49 bryanh Exp $ +# $Header: /cvsroot/pgsql/src/test/bench/Attic/Makefile,v 1.3 1996/11/13 10:35:59 bryanh Exp $ # #------------------------------------------------------------------------- SRCDIR= ../.. -LIBPQDIR= $(SRCDIR)/libpq include ../../Makefile.global CREATEFILES= create.sql bench.sql diff --git a/src/test/examples/Makefile b/src/test/examples/Makefile index f01885ba030726de7ef2f7f847db347851b126f5..885888a35e26f26481437bf5b6763777bdb84a2d 100644 --- a/src/test/examples/Makefile +++ b/src/test/examples/Makefile @@ -3,7 +3,6 @@ # SRCDIR= ../.. -LIBPQDIR= $(SRCDIR)/libpq include ../../Makefile.global CFLAGS+= -I$(LIBPQDIR) diff --git a/src/test/regress/Makefile b/src/test/regress/Makefile index 6a115abd06038511331949386fd8cb70ae5cd55b..8e602ba0d7a4260d9ffc8638d59b820b1e572798 100644 --- a/src/test/regress/Makefile +++ b/src/test/regress/Makefile @@ -7,12 +7,11 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/test/regress/Makefile,v 1.8 1996/11/12 11:43:05 bryanh Exp $ +# $Header: /cvsroot/pgsql/src/test/regress/Makefile,v 1.9 1996/11/13 10:36:17 bryanh Exp $ # #------------------------------------------------------------------------- SRCDIR= ../.. -LIBPQDIR= $(SRCDIR)/libpq include ../../Makefile.global CFLAGS+= -I$(LIBPQDIR) -I../../include diff --git a/src/tutorial/C-code/Makefile b/src/tutorial/C-code/Makefile index 22ba97158ad52902c8e04ef06e32a252148dbcc5..26fd5c8be4fb663589b676da2036c9dcaf095e98 100644 --- a/src/tutorial/C-code/Makefile +++ b/src/tutorial/C-code/Makefile @@ -1,5 +1,4 @@ SRCDIR= ../.. -LIBPQDIR= $(SRCDIR)/libpq include ../../Makefile.global CFLAGS+= -I../../include -I$(LIBPQDIR) diff --git a/src/tutorial/Makefile b/src/tutorial/Makefile index b0b7861a765b38001e26b05545f648433c6ee755..87b1a319df8d545433efc32eb59cd5fe45279229 100644 --- a/src/tutorial/Makefile +++ b/src/tutorial/Makefile @@ -4,12 +4,11 @@ # Makefile for tutorial # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/tutorial/Makefile,v 1.2 1996/11/12 11:43:20 bryanh Exp $ +# $Header: /cvsroot/pgsql/src/tutorial/Makefile,v 1.3 1996/11/13 10:36:24 bryanh Exp $ # #------------------------------------------------------------------------- SRCDIR= .. -LIBPQDIR= $(SRCDIR)/libpq include ../Makefile.global CFLAGS+= -I$(LIBPQDIR) -I../../include