aix: Fix SHLIB_EXPORTS reference in VPATH builds
authorAndres Freund <[email protected]>
Thu, 25 Aug 2022 03:38:28 +0000 (20:38 -0700)
committerAndres Freund <[email protected]>
Thu, 25 Aug 2022 03:39:46 +0000 (20:39 -0700)
The dependencies here aren't quite right independent of vpath builds or not,
but this at least makes vpath builds succeed. And it's pretty rare to change
the exports.txt file anyway... The referenced thread has a patch that will
clean that up further.

Discussion: https://postgr.es/m/20220820174213[email protected]

src/Makefile.shlib

index b868c8cea6b4b8f14a85e7aca1ead4c0b00ef74a..1e09ab8ea626e8f9d9b98c5e08c3b1ae403a75b1 100644 (file)
@@ -307,7 +307,7 @@ $(shlib): $(OBJS) | $(SHLIB_PREREQS)
 ifeq (,$(SHLIB_EXPORTS))
        $(MKLDEXPORT) $(stlib) $(shlib) >$(exports_file)
 else
-       ( echo '#! $(shlib)'; $(AWK) '/^[^#]/ {printf "%s\n",$$1}' $(SHLIB_EXPORTS) ) >$(exports_file)
+       ( echo '#! $(shlib)'; $(AWK) '/^[^#]/ {printf "%s\n",$$1}' ${srcdir}/$(SHLIB_EXPORTS) ) >$(exports_file)
 endif
        $(COMPILER) -o $(shlib) $(stlib) -Wl,-bE:$(exports_file) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK)
        rm -f $(stlib)