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

Commit 1e801a8

Browse files
committed
Hi,
Attached you'll find a (big) patch that fixes make dep and make depend in all Makefiles where I found it to be appropriate. It also removes the dependency in Makefile.global for NAMEDATALEN and OIDNAMELEN by making backend/catalog/genbki.sh and bin/initdb/initdb.sh a little smarter. This no longer requires initdb.sh that is turned into initdb with a sed script when installing Postgres, hence initdb.sh should be renamed to initdb (after the patch has been applied :-) ) This patch is against the 6.3 sources, as it took a while to complete. Please review and apply, Cheers, Jeroen van Vianen
1 parent 2dfee93 commit 1e801a8

File tree

81 files changed

+250
-430
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+250
-430
lines changed

src/Makefile.global.in

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.37 1998/03/23 06:01:47 momjian Exp $
10+
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.38 1998/04/06 00:20:33 momjian Exp $
1111
#
1212
# NOTES
1313
# Essentially all Postgres make files include this file and use the
@@ -44,11 +44,6 @@
4444
# installation.
4545
# of the port.
4646
#
47-
# Ignore LINUX_ELF if you're not using Linux. But if you are, and you're
48-
# compiling to a.out (which means you're using the dld dynamic loading
49-
# library), set LINUX_ELF to null in Makefile.custom.
50-
LINUX_ELF= true
51-
#
5247
# Ignore BSD_SHLIB if you're not using one of the BSD ports. But if you
5348
# are, and it's one that doesn't have shared libraries (NetBSD/vax is an
5449
# example of this), set BSD_SHLIB to null in Makefile.custom.
@@ -85,23 +80,6 @@ POSTDOCDIR= $(POSTGRESDIR)/doc
8580
# Where the header files necessary to build frontend programs get installed.
8681
HEADERDIR= $(POSTGRESDIR)/include
8782

88-
# NAMEDATALEN is the max length for system identifiers (e.g. table names,
89-
# attribute names, function names, etc.)
90-
#
91-
# These MUST be set here. DO NOT COMMENT THESE OUT
92-
# Setting these too high will result in excess space usage for system catalogs
93-
# Setting them too low will make the system unusable.
94-
# values between 16 and 64 that are multiples of four are recommended.
95-
#
96-
# NOTE also that databases with different NAMEDATALEN's cannot interoperate!
97-
#
98-
# THERE ARE REDUNDANT DEFINITIONS OF THESE VALUES IN config.h.
99-
# Don't change anything here without changing it there too.
100-
101-
NAMEDATALEN= 32
102-
# OIDNAMELEN should be set to NAMEDATALEN + sizeof(Oid)
103-
OIDNAMELEN= 36
104-
10583
##############################################################################
10684
#
10785
# FEATURES

src/backend/access/common/Makefile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44
# Makefile for access/common
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/access/common/Makefile,v 1.9 1998/01/15 19:41:42 pgsql Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/access/common/Makefile,v 1.10 1998/04/06 00:20:44 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

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

14-
INCLUDE_OPT = -I../..
15-
16-
CFLAGS+=$(INCLUDE_OPT)
14+
CFLAGS+=-I../..
1715

1816
OBJS = heaptuple.o heapvalid.o indextuple.o indexvalid.o printtup.o \
1917
scankey.o tupdesc.o
@@ -28,13 +26,12 @@ heaptuple.o heapvalid.o tupdesc.o: ../../fmgr.h
2826
../../fmgr.h:
2927
$(MAKE) -C ../.. fmgr.h
3028

31-
dep: ../../fmgr.h
32-
$(CC) -MM $(INCLUDE_OPT) *.c >depend
29+
dep depend: ../../fmgr.h
30+
$(CC) -MM $(CFLAGS) *.c >depend
3331

3432
clean:
3533
rm -f SUBSYS.o $(OBJS)
3634

3735
ifeq (depend,$(wildcard depend))
3836
include depend
3937
endif
40-

src/backend/access/gist/Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44
# Makefile for access/gist
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/access/gist/Makefile,v 1.5 1997/12/20 00:22:16 scrappy Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/access/gist/Makefile,v 1.6 1998/04/06 00:20:49 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

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

14-
INCLUDE_OPT = -I../..
15-
16-
CFLAGS += $(INCLUDE_OPT)
14+
CFLAGS += -I../..
1715

1816
OBJS = gist.o gistget.o gistscan.o giststrat.o
1917

@@ -23,7 +21,7 @@ SUBSYS.o: $(OBJS)
2321
$(LD) -r -o SUBSYS.o $(OBJS)
2422

2523
depend dep:
26-
$(CC) -MM $(INCLUDE_OPT) *.c >depend
24+
$(CC) -MM $(CFLAGS) *.c >depend
2725

2826
clean:
2927
rm -f SUBSYS.o $(OBJS)

src/backend/access/hash/Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44
# Makefile for access/hash
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/access/hash/Makefile,v 1.5 1997/12/20 00:22:31 scrappy Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/access/hash/Makefile,v 1.6 1998/04/06 00:20:58 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

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

14-
INCLUDE_OPT = -I../..
15-
16-
CFLAGS += $(INCLUDE_OPT)
14+
CFLAGS += -I../..
1715

1816
OBJS = hash.o hashfunc.o hashinsert.o hashovfl.o hashpage.o hashscan.o \
1917
hashsearch.o hashstrat.o hashutil.o
@@ -24,7 +22,7 @@ SUBSYS.o: $(OBJS)
2422
$(LD) -r -o SUBSYS.o $(OBJS)
2523

2624
depend dep:
27-
$(CC) -MM $(INCLUDE_OPT) *.c >depend
25+
$(CC) -MM $(CFLAGS) *.c >depend
2826

2927
clean:
3028
rm -f SUBSYS.o $(OBJS)

src/backend/access/heap/Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44
# Makefile for access/heap
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/access/heap/Makefile,v 1.5 1997/12/20 00:22:39 scrappy Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/access/heap/Makefile,v 1.6 1998/04/06 00:21:09 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

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

14-
INCLUDE_OPT = -I../..
15-
16-
CFLAGS += $(INCLUDE_OPT)
14+
CFLAGS += -I../..
1715

1816
OBJS = heapam.o hio.o stats.o
1917

@@ -23,7 +21,7 @@ SUBSYS.o: $(OBJS)
2321
$(LD) -r -o SUBSYS.o $(OBJS)
2422

2523
depend dep:
26-
$(CC) -MM $(INCLUDE_OPT) *.c >depend
24+
$(CC) -MM $(CFLAGS) *.c >depend
2725

2826
clean:
2927
rm -f SUBSYS.o $(OBJS)

src/backend/access/index/Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44
# Makefile for access/index
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/access/index/Makefile,v 1.5 1997/12/20 00:22:47 scrappy Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/access/index/Makefile,v 1.6 1998/04/06 00:21:24 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

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

14-
INCLUDE_OPT = -I../..
15-
16-
CFLAGS += $(INCLUDE_OPT)
14+
CFLAGS += -I../..
1715

1816
OBJS = genam.o indexam.o istrat.o
1917

@@ -23,7 +21,7 @@ SUBSYS.o: $(OBJS)
2321
$(LD) -r -o SUBSYS.o $(OBJS)
2422

2523
depend dep:
26-
$(CC) -MM $(INCLUDE_OPT) *.c >depend
24+
$(CC) -MM $(CFLAGS) *.c >depend
2725

2826
clean:
2927
rm -f SUBSYS.o $(OBJS)

src/backend/access/nbtree/Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44
# Makefile for access/nbtree
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/access/nbtree/Makefile,v 1.5 1997/12/20 00:22:54 scrappy Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/access/nbtree/Makefile,v 1.6 1998/04/06 00:21:34 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

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

14-
INCLUDE_OPT = -I../..
15-
16-
CFLAGS += $(INCLUDE_OPT)
14+
CFLAGS += -I../..
1715

1816
OBJS = nbtcompare.o nbtinsert.o nbtpage.o nbtree.o nbtscan.o nbtsearch.o \
1917
nbtstrat.o nbtutils.o nbtsort.o
@@ -24,7 +22,7 @@ SUBSYS.o: $(OBJS)
2422
$(LD) -r -o SUBSYS.o $(OBJS)
2523

2624
depend dep:
27-
$(CC) -MM $(INCLUDE_OPT) *.c >depend
25+
$(CC) -MM $(CFLAGS) *.c >depend
2826

2927
clean:
3028
rm -f SUBSYS.o $(OBJS)

src/backend/access/rtree/Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44
# Makefile for access/rtree
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/Makefile,v 1.5 1997/12/20 00:23:00 scrappy Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/Makefile,v 1.6 1998/04/06 00:21:41 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

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

14-
INCLUDE_OPT = -I../..
15-
16-
CFLAGS += $(INCLUDE_OPT)
14+
CFLAGS += -I../..
1715

1816
OBJS = rtget.o rtproc.o rtree.o rtscan.o rtstrat.o
1917

@@ -23,7 +21,7 @@ SUBSYS.o: $(OBJS)
2321
$(LD) -r -o SUBSYS.o $(OBJS)
2422

2523
depend dep:
26-
$(CC) -MM $(INCLUDE_OPT) *.c >depend
24+
$(CC) -MM $(CFLAGS) *.c >depend
2725

2826
clean:
2927
rm -f SUBSYS.o $(OBJS)

src/backend/access/transam/Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44
# Makefile for access/transam
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/access/transam/Makefile,v 1.5 1997/12/20 00:23:09 scrappy Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/access/transam/Makefile,v 1.6 1998/04/06 00:21:52 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

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

14-
INCLUDE_OPT = -I../..
15-
16-
CFLAGS += $(INCLUDE_OPT)
14+
CFLAGS += -I../..
1715

1816
OBJS = transam.o transsup.o varsup.o xact.o xid.o
1917

@@ -23,7 +21,7 @@ SUBSYS.o: $(OBJS)
2321
$(LD) -r -o SUBSYS.o $(OBJS)
2422

2523
depend dep:
26-
$(CC) -MM $(INCLUDE_OPT) *.c >depend
24+
$(CC) -MM $(CFLAGS) *.c >depend
2725

2826
clean:
2927
rm -f SUBSYS.o $(OBJS)

src/backend/bootstrap/Makefile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Makefile for the bootstrap module
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.12 1997/12/20 00:23:19 scrappy Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.13 1998/04/06 00:22:02 momjian Exp $
88
#
99
#
1010
# We must build bootparse.c and bootscanner.c with yacc and lex and sed,
@@ -21,9 +21,7 @@
2121
SRCDIR= ../..
2222
include ../../Makefile.global
2323

24-
INCLUDE_OPT= -I..
25-
26-
CFLAGS+= $(INCLUDE_OPT)
24+
CFLAGS += -I..
2725

2826
ifeq ($(CC), gcc)
2927
CFLAGS+= -Wno-error
@@ -65,8 +63,8 @@ clean:
6563

6664
# This is unusual: We actually have to build some of the parts before
6765
# we know what the header file dependencies are.
68-
dep: bootparse.c bootscanner.c bootstrap_tokens.h
69-
$(CC) -MM $(INCLUDE_OPT) *.c >depend
66+
dep depend: bootparse.c bootscanner.c bootstrap_tokens.h
67+
$(CC) -MM $(CFLAGS) *.c >depend
7068

7169
ifeq (depend,$(wildcard depend))
7270
include depend

src/backend/catalog/Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44
# Makefile for catalog
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.9 1998/02/25 13:05:55 scrappy Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.10 1998/04/06 00:22:13 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

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

14-
INCLUDE_OPT = -I..
15-
16-
CFLAGS+=$(INCLUDE_OPT)
14+
CFLAGS += -I..
1715

1816
OBJS = catalog.o heap.o index.o indexing.o aclchk.o \
1917
pg_aggregate.o pg_operator.o pg_proc.o pg_type.o
@@ -47,7 +45,7 @@ local1_template1.bki.source: $(GENBKI) $(LOCALBKI_SRCS)
4745
sh $(SHOPTS) $(GENBKI) $(BKIOPTS) $(LOCALBKI_SRCS) > $@ 2>local1_template1.description
4846

4947
depend dep:
50-
$(CC) -MM $(INCLUDE_OPT) *.c >depend
48+
$(CC) -MM $(CFLAGS) *.c >depend
5149

5250
clean:
5351
rm -f SUBSYS.o $(OBJS) global1.bki.source local1_template1.bki.source \

src/backend/catalog/genbki.sh

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
#
1212
# IDENTIFICATION
13-
# $Header: /cvsroot/pgsql/src/backend/catalog/Attic/genbki.sh,v 1.9 1997/11/13 03:22:20 momjian Exp $
13+
# $Header: /cvsroot/pgsql/src/backend/catalog/Attic/genbki.sh,v 1.10 1998/04/06 00:22:16 momjian Exp $
1414
#
1515
# NOTES
1616
# non-essential whitespace is removed from the generated file.
@@ -52,6 +52,10 @@ while test $x -le $numargs ; do
5252
shift
5353
done
5454

55+
# Get NAMEDATALEN and OIDNAMELEN from postgres_ext.h
56+
NAMEDATALEN=`grep '#define.*NAMEDATALEN' ../../include/postgres_ext.h | awk '{ print $3 }'`
57+
OIDNAMELEN=`grep '#define.*OIDNAMELEN' ../../include/postgres_ext.h | awk '{ print $3 }'`
58+
5559
# ----------------
5660
# strip comments and trash from .h before we generate
5761
# the .bki file...
@@ -68,14 +72,16 @@ sed -e 's;/\*.*\*/;;g' \
6872
-e 's;\*/;\
6973
*/\
7074
;g' | # we must run a new sed here to see the newlines we added
71-
sed -e 's/;[ ]*$//g' \
72-
-e 's/^[ ]*//' \
73-
-e 's/[ ]Oid/\ oid/g' \
74-
-e 's/[ ]NameData/\ name/g' \
75-
-e 's/^Oid/oid/g' \
76-
-e 's/^NameData/\name/g' \
77-
-e 's/(NameData/(name/g' \
78-
-e 's/(Oid/(oid/g' | \
75+
sed -e "s/;[ ]*$//g" \
76+
-e "s/^[ ]*//" \
77+
-e "s/[ ]Oid/\ oid/g" \
78+
-e "s/[ ]NameData/\ name/g" \
79+
-e "s/^Oid/oid/g" \
80+
-e "s/^NameData/\name/g" \
81+
-e "s/(NameData/(name/g" \
82+
-e "s/(Oid/(oid/g" \
83+
-e "s/NAMEDATALEN/$NAMEDATALEN/g" \
84+
-e "s/OIDNAMELEN/$OIDNAMELEN/g" | \
7985
awk '
8086
# ----------------
8187
# now use awk to process remaining .h file..

0 commit comments

Comments
 (0)