Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5379b84

Browse files
committed
More cleanups. I can now compile without PORTNAME being defined n
Makefile.global. End result, if all goes well, should allow for much easier porting, since there will no longer be a concept of a "port". Most, if not everything, *should* be determined by configure, or by the compiler itself. Still work to be done though :)
1 parent 30856a3 commit 5379b84

File tree

35 files changed

+383
-322
lines changed

35 files changed

+383
-322
lines changed

src/backend/commands/vacuum.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.54 1997/12/17 04:44:50 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.55 1997/12/19 02:05:33 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -54,7 +54,7 @@
5454
#include <sys/resource.h>
5555
#endif
5656

57-
/* #include <port-protos.h> */
57+
/* #include <port-protos.h> */ /* Why? */
5858

5959
extern int BlowawayRelationBuffers(Relation rdesc, BlockNumber block);
6060

src/backend/main/main.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.10 1997/12/17 04:59:10 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.11 1997/12/19 02:05:42 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -22,7 +22,9 @@
2222
#include "miscadmin.h"
2323
#include "bootstrap/bootstrap.h"/* for BootstrapMain() */
2424
#include "tcop/tcopprot.h" /* for PostgresMain() */
25-
/* #include "port-protos.h" */ /* for init_address_fixup() */
25+
#if defined(NOFIXADE) || defined(NOPRINTADE)
26+
# include "port-protos.h" /* for init_address_fixup() */
27+
#endif
2628

2729
#define NOROOTEXEC "\
2830
\n\"root\" execution of the PostgreSQL backend is not permitted\n\n\

src/backend/optimizer/geqo/Makefile

+6-4
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@
55
#
66
# Copyright (c) 1994, Regents of the University of California
77
#
8-
# $Id: Makefile,v 1.7 1997/04/21 04:26:47 vadim Exp $
8+
# $Id: Makefile,v 1.8 1997/12/19 02:05:51 scrappy Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

1212
SRCDIR = ../../..
1313
include ../../../Makefile.global
1414

15-
INCLUDE_OPT = -I../.. \
16-
-I../../port/$(PORTNAME) \
17-
-I../../../include
15+
INCLUDE_OPT = -I../..
16+
17+
ifdef PORTNAME
18+
INCLUDE_OPT+=-I../../port/$(PORTNAME)
19+
endif
1820

1921
CFLAGS+=$(INCLUDE_OPT)
2022

src/backend/optimizer/path/Makefile

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44
# Makefile for optimizer/path
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/optimizer/path/Makefile,v 1.3 1996/11/09 06:18:10 momjian Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/optimizer/path/Makefile,v 1.4 1997/12/19 02:05:59 scrappy Exp $
88
#
99
#-------------------------------------------------------------------------
1010

1111
SRCDIR = ../../..
1212
include ../../../Makefile.global
1313

14-
INCLUDE_OPT = -I../.. \
15-
-I../../port/$(PORTNAME) \
16-
-I../../../include
14+
INCLUDE_OPT = -I../..
15+
16+
ifdef PORTNAME
17+
INCLUDE_OPT+=-I../../port/$(PORTNAME)
18+
endif
1719

1820
CFLAGS+=$(INCLUDE_OPT)
1921

src/backend/optimizer/plan/Makefile

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44
# Makefile for optimizer/plan
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/optimizer/plan/Makefile,v 1.3 1996/11/09 06:18:17 momjian Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/optimizer/plan/Makefile,v 1.4 1997/12/19 02:06:07 scrappy Exp $
88
#
99
#-------------------------------------------------------------------------
1010

1111
SRCDIR = ../../..
1212
include ../../../Makefile.global
1313

14-
INCLUDE_OPT = -I../.. \
15-
-I../../port/$(PORTNAME) \
16-
-I../../../include
14+
INCLUDE_OPT = -I../..
15+
16+
ifdef PORTNAME
17+
INCLUDE_OPT+=-I../../port/$(PORTNAME)
18+
endif
1719

1820
CFLAGS+=$(INCLUDE_OPT)
1921

src/backend/optimizer/prep/Makefile

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44
# Makefile for optimizer/prep
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/optimizer/prep/Makefile,v 1.4 1997/11/21 18:10:39 momjian Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/optimizer/prep/Makefile,v 1.5 1997/12/19 02:06:10 scrappy Exp $
88
#
99
#-------------------------------------------------------------------------
1010

1111
SRCDIR = ../../..
1212
include ../../../Makefile.global
1313

14-
INCLUDE_OPT = -I../.. \
15-
-I../../port/$(PORTNAME) \
16-
-I../../../include
14+
INCLUDE_OPT = -I../..
15+
16+
ifdef PORTNAME
17+
INCLUDE_OPT+=-I../../port/$(PORTNAME)
18+
endif
1719

1820
CFLAGS+=$(INCLUDE_OPT)
1921

src/backend/optimizer/util/Makefile

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44
# Makefile for optimizer/util
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/optimizer/util/Makefile,v 1.3 1996/11/06 09:29:18 scrappy Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/optimizer/util/Makefile,v 1.4 1997/12/19 02:06:17 scrappy Exp $
88
#
99
#-------------------------------------------------------------------------
1010

1111
SRCDIR = ../../..
1212
include ../../../Makefile.global
1313

14-
INCLUDE_OPT = -I../.. \
15-
-I../../port/$(PORTNAME) \
16-
-I../../../include
14+
INCLUDE_OPT = -I../..
15+
16+
ifdef PORTNAME
17+
INCLUDE_OPT+=-I../../port/$(PORTNAME)
18+
endif
1719

1820
CFLAGS+=$(INCLUDE_OPT)
1921

src/backend/port/Makefile.in

+5-14
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,14 @@
1919
# be converted to Method 2.
2020
#
2121
# IDENTIFICATION
22-
# $Header: /cvsroot/pgsql/src/backend/port/Attic/Makefile.in,v 1.4 1997/04/15 17:39:23 scrappy Exp $
22+
# $Header: /cvsroot/pgsql/src/backend/port/Attic/Makefile.in,v 1.5 1997/12/19 02:06:24 scrappy Exp $
2323
#
2424
#-------------------------------------------------------------------------
2525

2626
SRCDIR=../..
2727
include ../../Makefile.global
2828

29-
ifndef PORTNAME
30-
.DEFAULT all:
31-
@echo "Error: Must invoke make with PORTNAME= argument."
32-
@false
33-
else
34-
35-
OBJS = $(PORTNAME)/SUBSYS.o @INET_ATON@ @STRERROR@
29+
OBJS = @PORTNAME@/SUBSYS.o @INET_ATON@ @STRERROR@
3630

3731
all: submake SUBSYS.o
3832

@@ -42,19 +36,16 @@ SUBSYS.o: $(OBJS)
4236
.PHONY: submake clean dep
4337

4438
submake:
45-
$(MAKE) -C $(PORTNAME) SUBSYS.o
39+
$(MAKE) -C @PORTNAME@ SUBSYS.o
4640

4741
clean:
4842
rm -f SUBSYS.o $(OBJS)
49-
$(MAKE) -C $(PORTNAME) clean
43+
$(MAKE) -C @PORTNAME@ clean
5044

5145
depend dep:
5246
$(CC) -MM $(INCLUDE_OPT) *.c >depend
53-
$(MAKE) -C $(PORTNAME) $@
47+
$(MAKE) -C @PORTNAME@ $@
5448

5549
ifeq (depend,$(wildcard depend))
5650
include depend
5751
endif
58-
59-
endif
60-

src/backend/postmaster/Makefile

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44
# Makefile for postmaster
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/postmaster/Makefile,v 1.5 1997/04/02 18:12:39 scrappy Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/postmaster/Makefile,v 1.6 1997/12/19 02:06:34 scrappy Exp $
88
#
99
#-------------------------------------------------------------------------
1010

1111
SRCDIR = ../..
1212
include ../../Makefile.global
1313

14-
INCLUDE_OPT = -I.. \
15-
-I../port/$(PORTNAME) \
16-
-I../../include
14+
INCLUDE_OPT = -I..
15+
16+
ifdef PORTNAME
17+
INCLUDE_OPT+=-I../port/$(PORTNAME)
18+
endif
1719

1820
CFLAGS+=$(INCLUDE_OPT)
1921

src/backend/postmaster/postmaster.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.67 1997/12/15 22:03:59 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.68 1997/12/19 02:06:37 scrappy Exp $
1414
*
1515
* NOTES
1616
*
@@ -87,7 +87,9 @@
8787
#include "utils/mcxt.h"
8888
#include "storage/proc.h"
8989
#include "utils/elog.h"
90-
#include "port-protos.h" /* For gethostname() */
90+
#ifndef HAVE_GETHOSTNAME
91+
# include "port-protos.h" /* For gethostname() */
92+
#endif
9193
#include "storage/fd.h"
9294

9395
#if defined(DBX_VERSION)

src/backend/regex/Makefile

+6-5
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,22 @@
44
# Makefile for regex
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/regex/Makefile,v 1.2 1996/11/09 06:20:58 momjian Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/regex/Makefile,v 1.3 1997/12/19 02:06:41 scrappy Exp $
88
#
99
#-------------------------------------------------------------------------
1010

1111
SRCDIR = ../..
1212
include ../../Makefile.global
1313

14-
INCLUDE_OPT = -I.. \
15-
-I../port/$(PORTNAME) \
16-
-I../../include
14+
INCLUDE_OPT = -I..
15+
16+
ifdef PORTNAME
17+
INCLUDE_OPT+=-I../port/$(PORTNAME)
18+
endif
1719

1820
CFLAGS+=$(INCLUDE_OPT)
1921
CFLAGS+=-DPOSIX_MISTAKE
2022

21-
2223
OBJS = regcomp.o regerror.o regexec.o regfree.o
2324

2425
all: SUBSYS.o

src/backend/rewrite/Makefile

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44
# Makefile for rewrite
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/rewrite/Makefile,v 1.3 1996/11/09 06:21:12 momjian Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/rewrite/Makefile,v 1.4 1997/12/19 02:06:48 scrappy Exp $
88
#
99
#-------------------------------------------------------------------------
1010

1111
SRCDIR = ../..
1212
include ../../Makefile.global
1313

14-
INCLUDE_OPT = -I.. \
15-
-I../port/$(PORTNAME) \
16-
-I../../include
14+
INCLUDE_OPT = -I..
15+
16+
ifdef PORTNAME
17+
INCLUDE_OPT+=-I../port/$(PORTNAME)
18+
endif
1719

1820
CFLAGS+=$(INCLUDE_OPT)
1921

src/backend/storage/buffer/Makefile

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44
# Makefile for storage/buffer
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/storage/buffer/Makefile,v 1.3 1996/11/09 06:21:30 momjian Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/storage/buffer/Makefile,v 1.4 1997/12/19 02:06:56 scrappy Exp $
88
#
99
#-------------------------------------------------------------------------
1010

1111
SRCDIR = ../../..
1212
include ../../../Makefile.global
1313

14-
INCLUDE_OPT = -I../.. \
15-
-I../../port/$(PORTNAME) \
16-
-I../../../include
14+
INCLUDE_OPT = -I../..
15+
16+
ifdef PORTNAME
17+
INCLUDE+=-I../../port/$(PORTNAME)
18+
endif
1719

1820
CFLAGS+=$(INCLUDE_OPT)
1921

src/backend/storage/file/Makefile

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44
# Makefile for storage/file
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/storage/file/Makefile,v 1.2 1996/11/09 06:21:38 momjian Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/storage/file/Makefile,v 1.3 1997/12/19 02:07:04 scrappy Exp $
88
#
99
#-------------------------------------------------------------------------
1010

1111
SRCDIR = ../../..
1212
include ../../../Makefile.global
1313

14-
INCLUDE_OPT = -I../.. \
15-
-I../../port/$(PORTNAME) \
16-
-I../../../include
14+
INCLUDE_OPT = -I../..
15+
16+
ifdef PORTNAME
17+
INCLUDE+=-I../../port/$(PORTNAME)
18+
endif
1719

1820
CFLAGS+=$(INCLUDE_OPT)
1921

src/backend/storage/ipc/Makefile

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44
# Makefile for storage/ipc
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/storage/ipc/Makefile,v 1.4 1997/09/18 14:20:08 momjian Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/storage/ipc/Makefile,v 1.5 1997/12/19 02:07:13 scrappy Exp $
88
#
99
#-------------------------------------------------------------------------
1010

1111
SRCDIR = ../../..
1212
include ../../../Makefile.global
1313

14-
INCLUDE_OPT = -I../.. \
15-
-I../../port/$(PORTNAME) \
16-
-I../../../include
14+
INCLUDE_OPT = -I../..
15+
16+
ifdef PORTNAME
17+
INCLUDE+=-I../../port/$(PORTNAME)
18+
endif
1719

1820
CFLAGS+=$(INCLUDE_OPT)
1921

src/backend/storage/large_object/Makefile

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44
# Makefile for storage/large_object
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/storage/large_object/Makefile,v 1.3 1996/11/09 06:21:59 momjian Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/storage/large_object/Makefile,v 1.4 1997/12/19 02:07:20 scrappy Exp $
88
#
99
#-------------------------------------------------------------------------
1010

1111
SRCDIR = ../../..
1212
include ../../../Makefile.global
1313

14-
INCLUDE_OPT = -I../.. \
15-
-I../../port/$(PORTNAME) \
16-
-I../../../include
14+
INCLUDE_OPT = -I../..
15+
16+
ifdef PORTNAME
17+
INCLUDE+=-I../../port/$(PORTNAME)
18+
endif
1719

1820
CFLAGS+=$(INCLUDE_OPT)
1921

0 commit comments

Comments
 (0)