head	1.29;
access;
symbols
	Version_2_1:1.25
	old_buffer_manager:1.23
	Version_2:1.21;
locks; strict;


1.29
date	92.05.21.19.03.42;	author mer;	state Exp;
branches;
next	1.28;

1.28
date	91.08.18.18.25.22;	author postgres;	state Exp;
branches;
next	1.27;

1.27
date	91.05.14.14.32.04;	author kemnitz;	state Exp;
branches;
next	1.26;

1.26
date	91.05.13.23.14.25;	author kemnitz;	state Exp;
branches;
next	1.25;

1.25
date	91.02.22.09.32.02;	author mer;	state Exp;
branches;
next	1.24;

1.24
date	91.01.18.22.36.23;	author hong;	state Exp;
branches;
next	1.23;

1.23
date	90.10.14.16.07.33;	author kemnitz;	state Exp;
branches;
next	1.22;

1.22
date	90.08.21.12.46.09;	author cimarron;	state Exp;
branches;
next	1.21;

1.21
date	90.07.23.20.29.48;	author kemnitz;	state Version_2;
branches;
next	1.20;

1.20
date	90.07.17.21.42.41;	author mao;	state Exp;
branches;
next	1.19;

1.19
date	90.05.23.13.22.53;	author mao;	state Exp;
branches;
next	1.18;

1.18
date	90.04.19.17.44.27;	author kemnitz;	state Exp;
branches;
next	1.17;

1.17
date	90.03.04.15.52.57;	author mao;	state Exp;
branches;
next	1.16;

1.16
date	90.02.09.00.24.50;	author kemnitz;	state Exp;
branches;
next	1.15;

1.15
date	90.02.08.22.12.48;	author kemnitz;	state Exp;
branches;
next	1.14;

1.14
date	90.02.07.08.48.05;	author ong;	state Exp;
branches;
next	1.13;

1.13
date	90.02.02.17.55.20;	author ong;	state Exp;
branches;
next	1.12;

1.12
date	89.11.06.17.55.02;	author mao;	state Exp;
branches;
next	1.11;

1.11
date	89.10.11.19.07.09;	author mao;	state Exp;
branches;
next	1.10;

1.10
date	89.10.11.15.06.12;	author hong;	state Exp;
branches;
next	1.9;

1.9
date	89.10.11.14.26.23;	author mao;	state Exp;
branches;
next	1.8;

1.8
date	89.10.11.14.10.12;	author mao;	state Exp;
branches;
next	1.7;

1.7
date	89.10.11.14.01.56;	author mao;	state Exp;
branches;
next	1.6;

1.6
date	89.10.11.09.48.36;	author mao;	state Exp;
branches;
next	1.5;

1.5
date	89.10.10.19.17.02;	author mao;	state Exp;
branches;
next	1.4;

1.4
date	89.10.03.15.49.27;	author mao;	state Exp;
branches;
next	1.3;

1.3
date	89.10.02.13.34.58;	author mao;	state Exp;
branches;
next	1.2;

1.2
date	89.09.22.01.06.58;	author goh;	state Exp;
branches;
next	1.1;

1.1
date	89.09.19.17.24.43;	author goh;	state Exp;
branches;
next	;


desc
@@


1.29
log
@add purify targets
@
text
@#include "config.mk"
#include "port.mk"
#include "files.postgres"

.SUFFIXES: .c .o .lex .y

PMSRCS = 	\
	src/support/postmaster.c

PATHPMSRCS = 	\
	$(SD)/support/postmaster.c

PMOBJS=  \
	$(OD)/support/postmaster.o

PMLINKS= $(OD)/LIB.o $(OD)/port/$(PORTNAME)/port.o $(OD)/UTIL.o \
		 $(OD)/STORAGE.o $(OD)/ACCESS.o $(STUBOBJS) $(INH_OBJ)

$(OD)/support/postmaster: $(OD)/support/postmasterlinks $(PMLINKS) $(PMOBJS)
	@@ echo "linking postmaster"
	@@ $(CC) $(LDFLAGS) -o $(OD)/support/postmaster \
		$(PMOBJS) $(PMLINKS) $(OD)/libpq.a $(LIBS)
	@@ sh -c 'if (test $$STRIPOBJS = "t" ) then \
		    strip $(OD)/support/postmaster ; \
		 else true ; fi'

missing: $(PMOBJS)
	@@ echo "nm'ing postmaster .o's " ; \
	cd $(OD); \
	rm -f ../newconf/pm.nm ; \
	nm -o $(PMOBJS) $(OTHOBJS)  \
	 > ../newconf/pm.nm

postmasterlinks: $(OD)/support/postmasterlinks

postmaster: $(OD)/support/postmaster

puremaster:
	@@ echo "linking a pure postmaster"
	@@ purify $(CC) $(LDFLAGS) -o $(OD)/support/postmaster \
		$(PMOBJS) $(PMLINKS) $(OD)/libpq.a $(LIBS)


$(OD)/support/postmasterlinks: 
	@@- echo "checking symbolic links ...." ; \
	cd $(OD)/support ; \
	for x in $(PMSRCS) ;do \
	    p=`echo $$x | sed -e 's:[^/]*/::g' ` ; \
	    if  [ -f $$p ] ; then \
		echo > /dev/null ; \
	    else \
		echo linking $$p ; \
		ln -s $(TREE)/$$x ; \
	    fi ; \
	done ; \
	touch postmasterlinks

.y.o:
	@@ echo yaccing $(<F) ; \
	cd $(@@D) ; yacc -d $(<F)
	-@@ cd $(@@D) ; \
	if [ -f yacc.sed ] ; then \
		echo "sed'ing y.tab.c" ; \
		sed -f yacc.sed < y.tab.c > $*.c ; \
		rm -f y.tab.c ; \
	else \
	 	mv y.tab.c $*.c ; \
	fi
	-@@ cd $(@@D) ; \
	echo "   ... compiling $*.c" ; \
	$(CC) $(CFLAGS) -c $*.c 

.c.o:
	@@ echo compiling $(<F)
	@@ cd $(@@D) ; $(CC) $(CFLAGS) -DPOSTMASTER \
	-DPOSTMASTERLOG -DPG_STANDALONE -DVACUUMDLOG -c $(<F) 

.lex.o:
	@@ echo lexing $(<F) ; \
	cd $(@@D) ; lex $(<F)
	-@@ cd $(@@D) ; \
	if [ -f lex.sed ] ; then \
		echo "sed'ing lex.yy.c" ; \
		sed -f lex.sed < lex.yy.c > $*.c; \
	else \
		mv lex.yy.c $*.c ; \
	fi
	@@ cd $(@@D) ; \
	echo "   ... compiling $*.c" ; \
	$(CC) $(CFLAGS) -c $*.c
@


1.28
log
@fixed problem with "Cannot load Shell" on
Sun 3.
@
text
@d38 6
@


1.27
log
@changed cc to $(CC)
@
text
@d16 2
a17 2
PMLINKS= $(LIBOBJS) $(OD)/port/$(PORTNAME)/port.o $(UTILOBJS) $(STORAGEOBJS) \
		 $(AMOBJS) $(STUBOBJS) $(INH_OBJ)
@


1.26
log
@no more cinterface.a

@
text
@d21 1
a21 1
	@@ cc $(LDFLAGS) -o $(OD)/support/postmaster \
d65 1
a65 1
	cc $(CFLAGS) -c $*.c 
d69 1
a69 1
	@@ cd $(@@D) ; cc $(CFLAGS) -DPOSTMASTER \
d84 1
a84 1
	cc $(CFLAGS) -c $*.c
@


1.25
log
@now depends on libpq
@
text
@d8 1
a8 4
	src/support/postmaster.c	\
	src/support/daemon.c		\
	src/support/suputils.c		\
	src/utils/error/elog.c
d11 1
a11 4
	$(SD)/support/postmaster.c	\
	$(SD)/support/daemon.c		\
	$(SD)/support/suputils.c	\
	$(SD)/utils/error/elog.c
d14 1
a14 4
	$(OD)/support/postmaster.o	\
	$(OD)/support/daemon.o		\
	$(OD)/support/suputils.o	\
	$(OD)/support/elog.o
d16 4
a19 1
$(OD)/support/postmaster: $(OD)/support/postmasterlinks cinterface $(PMOBJS)
d21 2
a22 2
	cc $(LDFLAGS) -o $(OD)/support/postmaster \
		$(PMOBJS) $(OD)/cinterface.a $(OD)/libpq.a $(LIBS)
d35 2
@


1.24
log
@change for the new buffer manager
@
text
@d28 1
a28 1
		$(PMOBJS) $(OD)/cinterface.a $(LIBS)
@


1.23
log
@Modified postmasterlinks symlink creation so Sun make is happy.
@
text
@a10 2
	src/storage/buffer/buf_sync.c	\
	src/storage/buffer/internal.h	\
a16 2
	$(SD)/storage/buffer/buf_sync.c	\
	$(SD)/storage/buffer/internal.h	\
a22 1
	$(OD)/support/buf_sync.o	\
@


1.22
log
@added -strip flag to Make which sets STRIPOBJS environment variable
which causes the final targets to be stripped after compilation.
@
text
@d45 2
@


1.21
log
@Moved cinterface.a stuff out of this file,
@
text
@d31 1
a31 1
	@@ echo "linking postmaster" ; \
d34 3
@


1.20
log
@build cinterface.a in pieces -- file list is too big for make on suns
@
text
@a6 25
# OTHOBJS= \
	$(OD)/storage/ipc/ipc.o		\
	$(OD)/storage/ipc/ipci.o	\
	$(OD)/storage/ipc/sinval.o	\
	$(OD)/storage/ipc/sinvaladt.o	\
	$(OD)/utils/error/dlog.o	\
	$(OD)/utils/error/excid.o	\
	$(OD)/utils/error/format.o	\
	$(OD)/utils/error/assert.o	\
	$(OD)/utils/error/excabort.o	\
	$(OD)/utils/error/exc.o		\
	$(OD)/storage/file/fd.o		\
	$(OD)/storage/page/pos.o	\
	$(OD)/storage/page/block.o	\
	$(OD)/lib/catalog/catname.o	\
	$(OD)/storage/lmgr/plsync.o	\
	$(OD)/storage/lmgr/plm.o	\
	$(OD)/storage/lmgr/pladt.o	\
	$(OD)/storage/lmgr/pladtdeb.o	\
	$(OD)/storage/lmgr/pldebug.o

#	$(OD)/storage/lmgr/lmgr.o	
#	$(OD)/storage/lmgr/plsync.o	
#	$(OD)/storage/lmgr/plm.o	

d30 1
a30 56
STUBOBJS= \
	$(OD)/support/stubs.o

STAT=	LIB.stat PORT.stat UTIL.stat STORAGE.stat AM.stat STUB.stat INH.stat

# ALLOBJS= $(LIBOBJS) \
# 	 $(PORTOBJS) \
# 	 $(UTILOBJS) \
# 	 $(STORAGEOBJS) \
# 	 $(AMOBJS) \
# 	 $(STUBOBJS) \
# 	 $(INH_OBJ)

postmaster: $(OD)/cinterface.a $(OD)/support/postmaster

cinterface: $(OD)/cinterface.a

$(OD)/cinterface.a: $(STAT)
	ranlib $(OD)/cinterface.a

LIB.stat: $(LIBOBJS)
	@@ echo adding library objects to cinterface...
	@@ ar ru $(OD)/cinterface.a $(LIBOBJS)
	touch LIB.stat

PORT.stat: $(PORTOBJS)
	@@ echo adding port objects to cinterface...
	@@ ar ru $(OD)/cinterface.a $(PORTOBJS)
	touch PORT.stat

UTIL.stat: $(UTILOBJS)
	@@ echo adding utility objects to cinterface...
	@@ ar ru $(OD)/cinterface.a $(UTILOBJS)
	touch UTIL.stat

STORAGE.stat: $(STORAGEOBJS)
	@@ echo adding storage objects to cinterface...
	@@ ar ru $(OD)/cinterface.a $(STORAGEOBJS)
	touch STORAGE.stat

AM.stat: $(AMOBJS)
	@@ echo adding access method objects to cinterface...
	@@ ar ru $(OD)/cinterface.a $(AMOBJS)
	touch AM.stat

STUB.stat: $(STUBOBJS)
	@@ echo adding stub objects to cinterface...
	@@ ar ru $(OD)/cinterface.a $(STUBOBJS)
	touch STUB.stat

INH.stat: $(INH_OBJ)
	@@ echo adding inheritance objects to cinterface...
	@@ ar ru $(OD)/cinterface.a $(INH_OBJ)
	touch INH.stat

$(OD)/support/postmaster: $(OD)/support/postmasterlinks $(OD)/cinterface.a $(PMOBJS)
@


1.19
log
@hack to stub out some routines referenced in cinterface that should only
be called from inside postgres.  added support/stubs.o to the library;
this file contains stubs for such routines.
@
text
@d43 1
a43 1
	$(SD)/support/suputils.c		\
d58 1
a58 7
ALLOBJS= $(LIBOBJS) \
	 $(PORTOBJS) \
	 $(UTILOBJS) \
	 $(STORAGEOBJS) \
	 $(AMOBJS) \
	 $(STUBOBJS) \
	 $(INH_OBJ)
d60 8
d72 1
a72 3
$(OD)/cinterface.a: $(ALLOBJS)
	@@ echo ar ru $(OD)/cinterface.a ...
	@@ ar ru $(OD)/cinterface.a $(ALLOBJS)
d74 35
@


1.18
log
@Added $(LIBS) to linking step.
@
text
@d55 3
d63 1
@


1.17
log
@due to changes in newtree/newport scheme, Make stopped working; get it
going again.
@
text
@d74 1
a74 1
		$(PMOBJS) $(OD)/cinterface.a -lm -lc 
@


1.16
log
@Fixed postmasterlinks problem.
@
text
@d95 1
a95 1
	touch $(OD)/support/postmasterlinks
@


1.15
log
@Changed so that it will not re-link every time a
'Make postmaster' is ran.
@
text
@d83 1
a83 1
$(OD)/support/postmasterlinks: $(PMOBJS)
@


1.14
log
@removed executor from cinterface
@
text
@d40 8
d62 1
a62 1
postmaster: $(OD)/cinterface.a $(OD)/postmaster
d71 1
a71 1
$(OD)/postmaster: postmasterlinks $(OD)/cinterface.a $(PMOBJS)
d83 1
a83 1
postmasterlinks: $(PMSRCS)
d94 2
a95 1
	done
@


1.13
log
@added executor to cinterface
@
text
@a50 1
	 $(EXECOBJS) \
@


1.12
log
@don't use syscache.o

@
text
@d51 1
@


1.11
log
@add PORTOBJS to list of files in cinterface.a
@
text
@d38 1
a38 2
	src/utils/error/elog.c		\
	src/utils/cache/syscache.c	
d45 1
a45 2
	$(OD)/support/elog.o		\
	$(OD)/support/syscache.o	
@


1.10
log
@port_taslock is in library
@
text
@d50 1
@


1.9
log
@works
@
text
@a32 1
	src/$(PORTDIR)/port_taslock.c	\
a41 1
	$(OD)/$(PORTDIR)/port_taslock.o	\
@


1.8
log
@missing port files for postmaster
@
text
@d33 1
a38 1
	src/storage/page/itemptr.c	\
a44 1
	$(OD)/support/postmaster.o	\
a47 1
	$(OD)/support/itemptr.o		\
@


1.7
log
@don't ar cinterface.a when making postmaster
@
text
@d43 1
d45 1
d70 2
a71 2
	cd $(OD); \
	cc $(LDFLAGS) -o $(OD)/postmaster $(PMOBJS) $(OD)/cinterface.a -lm -lc 
@


1.6
log
@get vacuumd, cinterface right.
@
text
@a67 1
	ar ts $(OD)/cinterface.a  ; \
@


1.5
log
@working on sun version
@
text
@a51 1
	 $(PORTOBJS) \
d63 1
a63 1
	@@ ar ru $(OD)/cinterface.a $? 
d65 1
a65 1
		
@


1.4
log
@fix .l, .y rules so that they terminate correctly if lex, yacc, or cc
die, but not if *.sed doesn't exist.
@
text
@@


1.3
log
@this version was (erroneously) checked in as support.mk.  i am moving it
back to postmaster, so that support can be used for real support programs.
@
text
@a41 2


d51 6
d58 1
d60 1
a61 4
ALLOBJS= $(LIBOBJS) $(PORTOBJS) $(UTILOBJS) $(STORAGEOBJS) $(AMOBJS) $(INH_OBJ)

postmaster: $(OD)/cinterface.a $(OD)/postmaster

d63 1
d65 1
d94 14
a107 3
	@@ echo yaccing $(<F)
	cd $(@@D) ; yacc -dv $(<F) ; mv y.tab.c $*.c ; cc $(CFLAGS) -c $*.c
	
d112 1
a112 1
	
d114 3
a116 2
	@@ echo lexing $(<F)
	cd $(@@D) ; lex $(<F) ; \
d118 1
a118 1
		echo "sedding lex.yy.c" ; \
d122 3
a124 1
	fi ; \
@


1.2
log
@*** empty log message ***
@
text
@d7 26
a32 1
PMSRCS =	\
d37 1
d40 1
a40 2
	src/utils/cache/syscache.c	\
	src/utils/fmgr/fmgr.c
d42 3
a44 1
PMOBJS= \
d51 1
a51 2
	$(OD)/support/syscache.o	\
	$(OD)/support/fmgr.o
a52 1
ALLOBJS= $(LIBOBJS) $(PORTOBJS) $(STORAGEOBJS) $(UTILOBJS) 
a53 4
postmaster: postmasterlinks $(ALLOBJS) $(PMOBJS)
	@@ echo "linking postmaster"
	@@ cd $(OD); \
	cc $(LDFLAGS) -o postgres $(ALLOBS) $(LIBS)
d55 23
a77 2
postmasterlinks: 
	@@ echo "making symbolic links ...."
d80 5
d86 1
d95 2
a96 1
	@@ cd $(@@D) ; cc $(CFLAGS) -DPOSTMASTER -c $(<F) 
a107 1
	
@


1.1
log
@Initial revision
@
text
@d7 9
a15 1
ALLOBJS= $(LIBOBJS) $(PORTOBJS) $(STORAGEOBJS) $(UTILOBJS) 
d17 9
a25 2
$(TARGET): $(ALLOBJS)
	@@ echo Module $(TARGET) done
d27 1
a27 3
# library: $(CLIBOBJS)
#	@@ echo making library
#	@@ cd $(OD) ; ar ru cinterface.a $(LIBMODULES)
d29 2
a30 2
postgres: $(ALLOBJS)
	@@ echo "linking postgres"
d32 1
a32 1
	cc $(LDFLAGS) -o postgres $(ALLMODS) $(LIBS)
d34 7
d47 12
a58 1
	@@ cd $(@@D) ; cc $(CFLAGS) -c $(<F)
@
