]> granicus.if.org Git - postgresql/commitdiff
Make pgxs build executables with the right suffix.
authorAndrew Dunstan <andrew@dunslane.net>
Sat, 19 Jan 2013 19:54:29 +0000 (14:54 -0500)
committerAndrew Dunstan <andrew@dunslane.net>
Sat, 19 Jan 2013 19:54:29 +0000 (14:54 -0500)
Complaint and patch from Zoltán Böszörményi.

When cross-compiling, the native make doesn't know
about the Windows .exe suffix, so it only builds with
it when explicitly told to do so.

The native make will not see the link between the target
name and the built executable, and might this do unnecesary
work, but that's a bigger problem than this one, if in fact
we consider it a problem at all.

Back-patch to all live branches.

src/makefiles/pgxs.mk

index 2415038821664b5a7ac6f39e4cfae6481c4b0450..84e9071d1651f411d6e7b3120c5d485ffb645a72 100644 (file)
@@ -290,5 +290,5 @@ endif
 
 ifdef PROGRAM
 $(PROGRAM): $(OBJS)
-       $(CC) $(CFLAGS) $(OBJS) $(PG_LIBS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
+       $(CC) $(CFLAGS) $(OBJS) $(PG_LIBS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
 endif