First pass through, of many to come, towards making the whole source

tree "non-PORTNAME" dependent.  Technically, anything that is PORTNAME
dependent should be able to be derived at compile time, through configure
or through gcc
This commit is contained in:
Marc G. Fournier 1997-12-17 04:59:16 +00:00
parent 9ef6b32c47
commit 542d4e528d
9 changed files with 57 additions and 31 deletions

View File

@ -34,7 +34,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.27 1997/11/13 03:22:10 momjian Exp $ # $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.28 1997/12/17 04:58:19 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -60,7 +60,11 @@ postgres: $(OBJS) ../utils/version.o
$(OBJS): $(DIRS:%=%.dir) $(OBJS): $(DIRS:%=%.dir)
$(DIRS:%=%.dir): $(DIRS:%=%.dir):
ifdef PORTNAME
$(MAKE) -C $(subst .dir,,$@) all PORTNAME=$(PORTNAME) $(MAKE) -C $(subst .dir,,$@) all PORTNAME=$(PORTNAME)
else
$(MAKE) -C $(subst .dir,,$@) all
endif
../utils/version.o: ../utils/version.o:
$(MAKE) -C ../utils version.o $(MAKE) -C ../utils version.o
@ -96,10 +100,18 @@ clean:
rm -f postgres $(POSTGRES_IMP) fmgr.h parse.h \ rm -f postgres $(POSTGRES_IMP) fmgr.h parse.h \
global1.bki.source local1_template1.bki.source \ global1.bki.source local1_template1.bki.source \
global1.description local1_template1.description global1.description local1_template1.description
ifdef PORTNAME
for i in $(DIRS); do $(MAKE) -C $$i clean PORTNAME=$(PORTNAME); done for i in $(DIRS); do $(MAKE) -C $$i clean PORTNAME=$(PORTNAME); done
else
for i in $(DIRS); do $(MAKE) -C $$i clean; done
endif
.DEFAULT: .DEFAULT:
ifdef PORTNAME
for i in $(DIRS); do $(MAKE) -C $$i $@ PORTNAME=$(PORTNAME); done for i in $(DIRS); do $(MAKE) -C $$i $@ PORTNAME=$(PORTNAME); done
else
for i in $(DIRS); do $(MAKE) -C $$i $@; done
endif
############################################################################# #############################################################################
# #

View File

@ -4,7 +4,7 @@
# Makefile for the bootstrap module # Makefile for the bootstrap module
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.10 1997/06/11 01:11:55 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.11 1997/12/17 04:58:21 scrappy Exp $
# #
# #
# We must build bootparse.c and bootscanner.c with yacc and lex and sed, # We must build bootparse.c and bootscanner.c with yacc and lex and sed,
@ -21,9 +21,11 @@
SRCDIR= ../.. SRCDIR= ../..
include ../../Makefile.global include ../../Makefile.global
INCLUDE_OPT= -I.. \ INCLUDE_OPT= -I..
-I../port/$(PORTNAME) \
-I../../include ifdef PORTNAME
INCLUDE_OPT+=-I../port/$(PORTNAME)
endif
CFLAGS+= $(INCLUDE_OPT) CFLAGS+= $(INCLUDE_OPT)

View File

@ -4,16 +4,18 @@
# Makefile for catalog # Makefile for catalog
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.5 1997/11/15 20:57:02 momjian Exp $ # $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.6 1997/12/17 04:58:25 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
SRCDIR = ../.. SRCDIR = ../..
include ../../Makefile.global include ../../Makefile.global
INCLUDE_OPT = -I.. \ INCLUDE_OPT = -I..
-I../port/$(PORTNAME) \
-I../../include ifdef PORTNAME
INCLUDE_OPT+=-I../port/$(PORTNAME)
endif
CFLAGS+=$(INCLUDE_OPT) CFLAGS+=$(INCLUDE_OPT)

View File

@ -4,16 +4,18 @@
# Makefile for executor # Makefile for executor
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/executor/Makefile,v 1.3 1997/08/30 10:28:47 vadim Exp $ # $Header: /cvsroot/pgsql/src/backend/executor/Makefile,v 1.4 1997/12/17 04:58:33 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
SRCDIR = ../.. SRCDIR = ../..
include ../../Makefile.global include ../../Makefile.global
INCLUDE_OPT = -I.. \ INCLUDE_OPT = -I..
-I../port/$(PORTNAME) \
-I../../include ifdef PORTNAME
INCLUDE_OPT+=-I../port/$(PORTNAME)
endif
CFLAGS+=$(INCLUDE_OPT) CFLAGS+=$(INCLUDE_OPT)

View File

@ -4,16 +4,18 @@
# Makefile for lib (miscellaneous stuff) # Makefile for lib (miscellaneous stuff)
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/lib/Makefile,v 1.7 1997/01/14 02:35:34 momjian Exp $ # $Header: /cvsroot/pgsql/src/backend/lib/Makefile,v 1.8 1997/12/17 04:58:40 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
SRCDIR = ../.. SRCDIR = ../..
include ../../Makefile.global include ../../Makefile.global
INCLUDE_OPT = -I.. \ INCLUDE_OPT = -I..
-I../port/$(PORTNAME) \
-I../../include ifdef PORTNAME
INCLUDE_OPT+=-I../port/$(PORTNAME)
endif
CFLAGS+=$(INCLUDE_OPT) CFLAGS+=$(INCLUDE_OPT)

View File

@ -4,16 +4,18 @@
# Makefile for libpq subsystem (backend half of libpq interface) # Makefile for libpq subsystem (backend half of libpq interface)
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/libpq/Makefile,v 1.8 1997/12/04 00:26:47 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/libpq/Makefile,v 1.9 1997/12/17 04:58:58 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
SRCDIR = ../.. SRCDIR = ../..
include ../../Makefile.global include ../../Makefile.global
INCLUDE_OPT = -I.. \ INCLUDE_OPT = -I..
-I../port/$(PORTNAME) \
-I../../include ifdef PORTNAME
INCLUDE_OPT+=-I../port/$(PORTNAME)
endif
CFLAGS+=$(INCLUDE_OPT) CFLAGS+=$(INCLUDE_OPT)

View File

@ -4,16 +4,18 @@
# Makefile for main # Makefile for main
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/main/Makefile,v 1.2 1996/11/09 06:18:04 momjian Exp $ # $Header: /cvsroot/pgsql/src/backend/main/Makefile,v 1.3 1997/12/17 04:59:05 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
SRCDIR = ../.. SRCDIR = ../..
include ../../Makefile.global include ../../Makefile.global
INCLUDE_OPT = -I.. \ INCLUDE_OPT = -I..
-I../port/$(PORTNAME) \
-I../../include ifdef PORTNAME
INCLUDE_OPT+=-I../port/$(PORTNAME)
endif
CFLAGS+=$(INCLUDE_OPT) CFLAGS+=$(INCLUDE_OPT)

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.9 1997/09/08 02:23:24 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.10 1997/12/17 04:59:10 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -22,7 +22,7 @@
#include "miscadmin.h" #include "miscadmin.h"
#include "bootstrap/bootstrap.h"/* for BootstrapMain() */ #include "bootstrap/bootstrap.h"/* for BootstrapMain() */
#include "tcop/tcopprot.h" /* for PostgresMain() */ #include "tcop/tcopprot.h" /* for PostgresMain() */
#include "port-protos.h" /* for init_address_fixup() */ /* #include "port-protos.h" */ /* for init_address_fixup() */
#define NOROOTEXEC "\ #define NOROOTEXEC "\
\n\"root\" execution of the PostgreSQL backend is not permitted\n\n\ \n\"root\" execution of the PostgreSQL backend is not permitted\n\n\

View File

@ -4,16 +4,18 @@
# Makefile for nodes # Makefile for nodes
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/nodes/Makefile,v 1.3 1996/11/06 08:54:16 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/nodes/Makefile,v 1.4 1997/12/17 04:59:16 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
SRCDIR = ../.. SRCDIR = ../..
include ../../Makefile.global include ../../Makefile.global
INCLUDE_OPT = -I.. \ INCLUDE_OPT = -I..
-I../port/$(PORTNAME) \
-I../../include ifdef PORTNAME
INCLUDE_OPT+=-I../port/$(PORTNAME)
endif
CFLAGS+=$(INCLUDE_OPT) CFLAGS+=$(INCLUDE_OPT)