Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Make the AIX case of Makefile.shlib safe for parallel make.
authorNoah Misch <noah@leadboat.com>
Sun, 24 Jul 2016 00:30:03 +0000 (20:30 -0400)
committerNoah Misch <noah@leadboat.com>
Sun, 24 Jul 2016 00:30:55 +0000 (20:30 -0400)
Use our typical approach, from src/backend/parser.  Back-patch to 9.1
(all supported versions).

src/Makefile.shlib

index e728801f5fc858ad5a6a5368da6dc373be062d65..3b20df6388d57751253e29078a810ee567016f92 100644 (file)
@@ -360,7 +360,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)