aboutsummaryrefslogtreecommitdiff
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:03 -0400
commite8564ef034333c6ba6fd3d0c6ecf18214a4e988b (patch)
tree81177acd58ba6cf8d0ee028aaba399d0a14f8cd7 /src
parent6d85bb1ba79c2792214df9fa17bcc8fac229c11c (diff)
downloadpostgresql-e8564ef034333c6ba6fd3d0c6ecf18214a4e988b.tar.gz
postgresql-e8564ef034333c6ba6fd3d0c6ecf18214a4e988b.zip
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 86db52fe5e1..924d21f443c 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -338,7 +338,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)