Hi, we observed issues with parallel make during RPM build in plpython,
seems like the attached patch 0002 should help.  Feel free to reject 0001,
but comment like that would save some time to me as a "newcomer" into that
Makefile.

Pavel
>From b8722c8fb1e3d5f752d75e4d0740d04793577185 Mon Sep 17 00:00:00 2001
From: Pavel Raiskup <prais...@redhat.com>
Date: Fri, 30 Sep 2016 14:26:24 +0200
Subject: [PATCH 1/2] Document that "Empty Recipe" is standard thing in GNU
 make

---
 src/backend/parser/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/parser/Makefile b/src/backend/parser/Makefile
new file mode 100644
index fdd8485..92acc00
*** a/src/backend/parser/Makefile
--- b/src/backend/parser/Makefile
*************** endif
*** 31,37 ****
  # shorthand for two otherwise separate rules.  To be safe for parallel
  # make, we must chain the dependencies like this.  The semicolon is
  # important, otherwise make will choose the built-in rule for
! # gram.y=>gram.c.
  
  gram.h: gram.c ;
  
--- 31,37 ----
  # shorthand for two otherwise separate rules.  To be safe for parallel
  # make, we must chain the dependencies like this.  The semicolon is
  # important, otherwise make will choose the built-in rule for
! # gram.y=>gram.c.  Run `info make -n "Empty Recipes"` for more info.
  
  gram.h: gram.c ;
  
-- 
2.7.4

>From dbd3a57775e3b177d1a9c974d89862ab8a24b9f1 Mon Sep 17 00:00:00 2001
From: Pavel Raiskup <prais...@redhat.com>
Date: Sat, 1 Oct 2016 07:53:29 +0200
Subject: [PATCH 2/2] Make makefile for plpython really self-standing

The submake-generated-headers can't be used as 'all' prerequisite
at the same level with with 'all-lib', because
'submake-generated-headers' is actually prerequisite for
'all-libs' in this makefile.  So use submake-generated-headers as
$(OBJS) prerequisite, as several object files depend on it.

Move the 'all' target before include statement, according to
documentation in Makefile.shlib.

This is follow-up for 548af97fcec5543603c20b61fec60f8147a05b29.
---
 src/pl/plpython/Makefile | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/pl/plpython/Makefile b/src/pl/plpython/Makefile
new file mode 100644
index 647b4b1..3a8b2c6
*** a/src/pl/plpython/Makefile
--- b/src/pl/plpython/Makefile
*************** REGRESS = \
*** 93,102 ****
  
  REGRESS_PLPYTHON3_MANGLE := $(REGRESS)
  
! include $(top_srcdir)/src/Makefile.shlib
  
! all: submake-generated-headers all-lib
  
  
  install: all install-lib install-data
  
--- 93,103 ----
  
  REGRESS_PLPYTHON3_MANGLE := $(REGRESS)
  
! $(OBJS): | submake-generated-headers
  
! all: all-lib
  
+ include $(top_srcdir)/src/Makefile.shlib
  
  install: all install-lib install-data
  
-- 
2.7.4

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to