1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-16 15:02:33 +03:00

Refactor backend makefiles to remove lots of duplicate code

This commit is contained in:
Peter Eisentraut
2008-02-19 10:30:09 +00:00
parent a74e0414a2
commit 0474dcb608
53 changed files with 137 additions and 443 deletions

View File

@@ -1,7 +1,7 @@
#
# Makefile for the storage manager subsystem
#
# $PostgreSQL: pgsql/src/backend/storage/Makefile,v 1.13 2007/02/09 15:55:58 petere Exp $
# $PostgreSQL: pgsql/src/backend/storage/Makefile,v 1.14 2008/02/19 10:30:08 petere Exp $
#
subdir = src/backend/storage
@@ -9,19 +9,5 @@ top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
SUBDIRS = buffer file freespace ipc large_object lmgr page smgr
SUBDIROBJS = $(SUBDIRS:%=%/SUBSYS.o)
all: SUBSYS.o
SUBSYS.o: $(SUBDIROBJS)
$(LD) $(LDREL) $(LDOUT) $@ $^
$(SUBDIROBJS): $(SUBDIRS:%=%-recursive) ;
.PHONY: $(SUBDIRS:%=%-recursive)
$(SUBDIRS:%=%-recursive):
$(MAKE) -C $(subst -recursive,,$@) SUBSYS.o
clean:
for dir in $(SUBDIRS); do $(MAKE) -C $$dir $@ || exit; done
rm -f SUBSYS.o
include $(top_srcdir)/src/backend/common.mk

View File

@@ -4,7 +4,7 @@
# Makefile for storage/buffer
#
# IDENTIFICATION
# $PostgreSQL: pgsql/src/backend/storage/buffer/Makefile,v 1.18 2007/01/20 17:16:12 petere Exp $
# $PostgreSQL: pgsql/src/backend/storage/buffer/Makefile,v 1.19 2008/02/19 10:30:08 petere Exp $
#
#-------------------------------------------------------------------------
@@ -14,10 +14,4 @@ include $(top_builddir)/src/Makefile.global
OBJS = buf_table.o buf_init.o bufmgr.o freelist.o localbuf.o
all: SUBSYS.o
SUBSYS.o: $(OBJS)
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
clean:
rm -f SUBSYS.o $(OBJS)
include $(top_srcdir)/src/backend/common.mk

View File

@@ -4,7 +4,7 @@
# Makefile for storage/file
#
# IDENTIFICATION
# $PostgreSQL: pgsql/src/backend/storage/file/Makefile,v 1.12 2007/01/20 17:16:12 petere Exp $
# $PostgreSQL: pgsql/src/backend/storage/file/Makefile,v 1.13 2008/02/19 10:30:08 petere Exp $
#
#-------------------------------------------------------------------------
@@ -14,10 +14,4 @@ include $(top_builddir)/src/Makefile.global
OBJS = fd.o buffile.o
all: SUBSYS.o
SUBSYS.o: $(OBJS)
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
clean:
rm -f SUBSYS.o $(OBJS)
include $(top_srcdir)/src/backend/common.mk

View File

@@ -4,7 +4,7 @@
# Makefile for storage/freespace
#
# IDENTIFICATION
# $PostgreSQL: pgsql/src/backend/storage/freespace/Makefile,v 1.3 2007/01/20 17:16:12 petere Exp $
# $PostgreSQL: pgsql/src/backend/storage/freespace/Makefile,v 1.4 2008/02/19 10:30:08 petere Exp $
#
#-------------------------------------------------------------------------
@@ -14,10 +14,4 @@ include $(top_builddir)/src/Makefile.global
OBJS = freespace.o
all: SUBSYS.o
SUBSYS.o: $(OBJS)
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
clean:
rm -f SUBSYS.o $(OBJS)
include $(top_srcdir)/src/backend/common.mk

View File

@@ -1,7 +1,7 @@
#
# Makefile for storage/ipc
#
# $PostgreSQL: pgsql/src/backend/storage/ipc/Makefile,v 1.20 2007/01/20 17:16:12 petere Exp $
# $PostgreSQL: pgsql/src/backend/storage/ipc/Makefile,v 1.21 2008/02/19 10:30:08 petere Exp $
#
subdir = src/backend/storage/ipc
@@ -18,10 +18,4 @@ endif
OBJS = ipc.o ipci.o pmsignal.o procarray.o shmem.o shmqueue.o \
sinval.o sinvaladt.o
all: SUBSYS.o
SUBSYS.o: $(OBJS)
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
clean:
rm -f SUBSYS.o $(OBJS)
include $(top_srcdir)/src/backend/common.mk

View File

@@ -4,7 +4,7 @@
# Makefile for storage/large_object
#
# IDENTIFICATION
# $PostgreSQL: pgsql/src/backend/storage/large_object/Makefile,v 1.12 2007/01/20 17:16:13 petere Exp $
# $PostgreSQL: pgsql/src/backend/storage/large_object/Makefile,v 1.13 2008/02/19 10:30:08 petere Exp $
#
#-------------------------------------------------------------------------
@@ -14,10 +14,4 @@ include $(top_builddir)/src/Makefile.global
OBJS = inv_api.o
all: SUBSYS.o
SUBSYS.o: $(OBJS)
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
clean:
rm -f SUBSYS.o $(OBJS)
include $(top_srcdir)/src/backend/common.mk

View File

@@ -4,7 +4,7 @@
# Makefile for storage/lmgr
#
# IDENTIFICATION
# $PostgreSQL: pgsql/src/backend/storage/lmgr/Makefile,v 1.22 2007/01/20 17:16:13 petere Exp $
# $PostgreSQL: pgsql/src/backend/storage/lmgr/Makefile,v 1.23 2008/02/19 10:30:08 petere Exp $
#
#-------------------------------------------------------------------------
@@ -14,10 +14,7 @@ include $(top_builddir)/src/Makefile.global
OBJS = lmgr.o lock.o proc.o deadlock.o lwlock.o spin.o s_lock.o
all: SUBSYS.o
SUBSYS.o: $(OBJS)
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
include $(top_srcdir)/src/backend/common.mk
ifdef TAS
TASPATH = $(top_builddir)/src/backend/port/tas.o
@@ -31,4 +28,4 @@ check: s_lock_test
./s_lock_test
clean distclean maintainer-clean:
rm -f SUBSYS.o $(OBJS) s_lock_test
rm -f s_lock_test

View File

@@ -4,7 +4,7 @@
# Makefile for storage/page
#
# IDENTIFICATION
# $PostgreSQL: pgsql/src/backend/storage/page/Makefile,v 1.12 2007/01/20 17:16:13 petere Exp $
# $PostgreSQL: pgsql/src/backend/storage/page/Makefile,v 1.13 2008/02/19 10:30:08 petere Exp $
#
#-------------------------------------------------------------------------
@@ -14,10 +14,4 @@ include $(top_builddir)/src/Makefile.global
OBJS = bufpage.o itemptr.o
all: SUBSYS.o
SUBSYS.o: $(OBJS)
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
clean:
rm -f SUBSYS.o $(OBJS)
include $(top_srcdir)/src/backend/common.mk

View File

@@ -4,7 +4,7 @@
# Makefile for storage/smgr
#
# IDENTIFICATION
# $PostgreSQL: pgsql/src/backend/storage/smgr/Makefile,v 1.16 2007/01/20 17:16:13 petere Exp $
# $PostgreSQL: pgsql/src/backend/storage/smgr/Makefile,v 1.17 2008/02/19 10:30:08 petere Exp $
#
#-------------------------------------------------------------------------
@@ -14,10 +14,4 @@ include $(top_builddir)/src/Makefile.global
OBJS = md.o smgr.o smgrtype.o
all: SUBSYS.o
SUBSYS.o: $(OBJS)
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
clean:
rm -f SUBSYS.o $(OBJS)
include $(top_srcdir)/src/backend/common.mk