mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Refactor backend makefiles to remove lots of duplicate code
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Makefile for the access methods module
|
||||
#
|
||||
# $PostgreSQL: pgsql/src/backend/access/Makefile,v 1.13 2007/02/09 15:55:58 petere Exp $
|
||||
# $PostgreSQL: pgsql/src/backend/access/Makefile,v 1.14 2008/02/19 10:30:06 petere Exp $
|
||||
#
|
||||
|
||||
subdir = src/backend/access
|
||||
@@ -9,19 +9,5 @@ top_builddir = ../../..
|
||||
include $(top_builddir)/src/Makefile.global
|
||||
|
||||
SUBDIRS = common gist hash heap index nbtree transam gin
|
||||
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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Makefile for access/common
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $PostgreSQL: pgsql/src/backend/access/common/Makefile,v 1.23 2007/01/20 17:16:10 petere Exp $
|
||||
# $PostgreSQL: pgsql/src/backend/access/common/Makefile,v 1.24 2008/02/19 10:30:06 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -16,8 +16,4 @@ OBJS = heaptuple.o indextuple.o printtup.o reloptions.o scankey.o tupdesc.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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Makefile for access/gin
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $PostgreSQL: pgsql/src/backend/access/gin/Makefile,v 1.2 2007/01/20 17:16:10 petere Exp $
|
||||
# $PostgreSQL: pgsql/src/backend/access/gin/Makefile,v 1.3 2008/02/19 10:30:06 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -16,10 +16,4 @@ OBJS = ginutil.o gininsert.o ginxlog.o ginentrypage.o gindatapage.o \
|
||||
ginbtree.o ginscan.o ginget.o ginvacuum.o ginarrayproc.o \
|
||||
ginbulk.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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Makefile for access/gist
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $PostgreSQL: pgsql/src/backend/access/gist/Makefile,v 1.17 2007/01/20 17:16:10 petere Exp $
|
||||
# $PostgreSQL: pgsql/src/backend/access/gist/Makefile,v 1.18 2008/02/19 10:30:06 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -15,10 +15,4 @@ include $(top_builddir)/src/Makefile.global
|
||||
OBJS = gist.o gistutil.o gistxlog.o gistvacuum.o gistget.o gistscan.o \
|
||||
gistproc.o gistsplit.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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Makefile for access/hash
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $PostgreSQL: pgsql/src/backend/access/hash/Makefile,v 1.13 2007/01/20 17:16:10 petere Exp $
|
||||
# $PostgreSQL: pgsql/src/backend/access/hash/Makefile,v 1.14 2008/02/19 10:30:06 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -15,10 +15,4 @@ include $(top_builddir)/src/Makefile.global
|
||||
OBJS = hash.o hashfunc.o hashinsert.o hashovfl.o hashpage.o hashscan.o \
|
||||
hashsearch.o hashutil.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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Makefile for access/heap
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $PostgreSQL: pgsql/src/backend/access/heap/Makefile,v 1.17 2007/09/20 17:56:30 tgl Exp $
|
||||
# $PostgreSQL: pgsql/src/backend/access/heap/Makefile,v 1.18 2008/02/19 10:30:06 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -14,10 +14,4 @@ include $(top_builddir)/src/Makefile.global
|
||||
|
||||
OBJS = heapam.o hio.o pruneheap.o rewriteheap.o syncscan.o tuptoaster.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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Makefile for access/index
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $PostgreSQL: pgsql/src/backend/access/index/Makefile,v 1.13 2007/01/20 17:16:10 petere Exp $
|
||||
# $PostgreSQL: pgsql/src/backend/access/index/Makefile,v 1.14 2008/02/19 10:30:06 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -14,10 +14,4 @@ include $(top_builddir)/src/Makefile.global
|
||||
|
||||
OBJS = genam.o indexam.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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Makefile for access/nbtree
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $PostgreSQL: pgsql/src/backend/access/nbtree/Makefile,v 1.15 2007/01/20 17:16:10 petere Exp $
|
||||
# $PostgreSQL: pgsql/src/backend/access/nbtree/Makefile,v 1.16 2008/02/19 10:30:06 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -15,10 +15,4 @@ include $(top_builddir)/src/Makefile.global
|
||||
OBJS = nbtcompare.o nbtinsert.o nbtpage.o nbtree.o nbtsearch.o \
|
||||
nbtutils.o nbtsort.o nbtxlog.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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Makefile for access/transam
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $PostgreSQL: pgsql/src/backend/access/transam/Makefile,v 1.21 2005/06/17 22:32:42 tgl Exp $
|
||||
# $PostgreSQL: pgsql/src/backend/access/transam/Makefile,v 1.22 2008/02/19 10:30:07 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -14,13 +14,7 @@ include $(top_builddir)/src/Makefile.global
|
||||
|
||||
OBJS = clog.o transam.o varsup.o xact.o xlog.o xlogutils.o rmgr.o slru.o subtrans.o multixact.o twophase.o twophase_rmgr.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
|
||||
|
||||
# ensure that version checks in xlog.c get recompiled when catversion.h changes
|
||||
xlog.o: xlog.c $(top_srcdir)/src/include/catalog/catversion.h
|
||||
|
||||
Reference in New Issue
Block a user