1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-28 11:44:57 +03:00

Repair parallel make in backend tree (and make it really parallel).

Make Gen_fmgrtab.sh reasonably robust against concurrent invocation.
This commit is contained in:
Peter Eisentraut
2000-07-13 16:07:14 +00:00
parent 9191d684a7
commit 8a3cbc84ef
8 changed files with 110 additions and 160 deletions

View File

@@ -1,48 +1,41 @@
#-------------------------------------------------------------------------
#
# Makefile--
# Makefile for utils
# Makefile for utils
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/utils/Makefile,v 1.16 2000/07/01 21:16:44 petere Exp $
# $Header: /cvsroot/pgsql/src/backend/utils/Makefile,v 1.17 2000/07/13 16:07:06 petere Exp $
#
#-------------------------------------------------------------------------
SRCDIR = ../..
include $(SRCDIR)/Makefile.global
all: submake SUBSYS.o
OBJS = fmgrtab.o adt/SUBSYS.o cache/SUBSYS.o error/SUBSYS.o \
fmgr/SUBSYS.o hash/SUBSYS.o init/SUBSYS.o misc/SUBSYS.o mmgr/SUBSYS.o \
sort/SUBSYS.o time/SUBSYS.o
DIRS = adt cache error fmgr hash init misc mmgr sort time
subdir = src/backend/utils/
top_builddir = ../../..
include ../../Makefile.global
SUBDIRS := adt cache error fmgr hash init misc mmgr sort time
ifdef MULTIBYTE
OBJS += mb/SUBSYS.o
DIRS += mb
SUBDIRS += mb
endif
SUBSYS.o: $(OBJS)
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
.PHONY: submake clean dep depend
submake:
for i in $(DIRS); do $(MAKE) -C $$i SUBSYS.o; done
SUBDIROBJS := $(SUBDIRS:%=%/SUBSYS.o)
fmgroids.h fmgrtab.c: Gen_fmgrtab.sh $(SRCDIR)/include/catalog/pg_proc.h
CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $< $(SRCDIR)/include/catalog/pg_proc.h
all: SUBSYS.o fmgroids.h
SUBSYS.o: fmgrtab.o $(SUBDIROBJS)
$(LD) $(LDREL) $(LDOUT) $@ $^
$(SUBDIROBJS): $(SUBDIRS:%=%-recursive)
.PHONY: $(SUBDIRS:%=%-recursive)
$(SUBDIRS:%=%-recursive): fmgroids.h
$(MAKE) -C $(subst -recursive,,$@) SUBSYS.o
fmgroids.h fmgrtab.c: Gen_fmgrtab.sh $(top_srcdir)/src/include/catalog/pg_proc.h
CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $< $(top_srcdir)/src/include/catalog/pg_proc.h
clean:
for dir in $(SUBDIRS); do $(MAKE) -C $$dir $@ || exit; done
rm -f SUBSYS.o fmgrtab.o fmgroids.h fmgrtab.c
for i in $(DIRS); do $(MAKE) -C $$i clean; done
dep depend: fmgroids.h fmgrtab.c
for i in $(DIRS); do $(MAKE) -C $$i depend; done
for dir in $(SUBDIRS); do $(MAKE) -C $$dir $@ || exit; done
ifeq (depend,$(wildcard depend))
include depend