summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2016-07-23 20:30:03 -0400
committerNoah Misch <noah@leadboat.com>2016-07-23 20:30:44 -0400
commitf0c9e4697757d27b9e8ccd76d8b330af09f58bf7 (patch)
treeb357b28e87c344e30c5c1202dace5bc2658fd0a2 /src
parent1156a9db8d70922553d15f72d8dab2ed2c8ac8f3 (diff)
Make the AIX case of Makefile.shlib safe for parallel make.
Use our typical approach, from src/backend/parser. Back-patch to 9.1 (all supported versions).
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.shlib11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index c6d184f6601..33e15b793b3 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -341,7 +341,16 @@ endif
else # PORTNAME == aix
# AIX case
-$(shlib) $(stlib): $(OBJS) | $(SHLIB_PREREQS)
+
+# There is no correct way to write a rule that generates two files.
+# Rules with two targets don't have that meaning, they are merely
+# 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 some built-in rule.
+
+$(stlib): $(shlib) ;
+
+$(shlib): $(OBJS) | $(SHLIB_PREREQS)
rm -f $(stlib)
$(LINK.static) $(stlib) $^
$(RANLIB) $(stlib)