summaryrefslogtreecommitdiff
path: root/src/makefiles
diff options
context:
space:
mode:
authorPeter Eisentraut2020-01-15 09:15:06 +0000
committerPeter Eisentraut2020-01-15 14:06:12 +0000
commit16a4a3d59cd5574fdc697ea16ef5692ce34c54d5 (patch)
treee0d2ee9337cb9c2b05e0fcc3389c128be16cf283 /src/makefiles
parentac5bdf62617507b1942f6124a2696c04a16fca04 (diff)
Remove libpq.rc, use win32ver.rc for libpq
For historical reasons, libpq used a separate libpq.rc file for the Windows builds while all other components use a common file win32ver.rc. With a bit of tweaking, the libpq build can also use the win32ver.rc file. This removes a bit of duplicative code. Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://www.postgresql.org/message-id/flat/ad505e61-a923-e114-9f38-9867d161073f@2ndquadrant.com
Diffstat (limited to 'src/makefiles')
-rw-r--r--src/makefiles/Makefile.win3217
1 files changed, 11 insertions, 6 deletions
diff --git a/src/makefiles/Makefile.win32 b/src/makefiles/Makefile.win32
index 8a7d6fff3e5..e72cb2db0e5 100644
--- a/src/makefiles/Makefile.win32
+++ b/src/makefiles/Makefile.win32
@@ -56,11 +56,7 @@ endif
# Build rules to add versioninfo resources to win32 binaries
WIN32RES += win32ver.o
-ifeq ($(PGFILESHLIB),1)
-PGFTYPE = VFT_DLL
-else
-PGFTYPE = VFT_APP
-endif
+PGFTYPE = $(if $(shlib),VFT_DLL,VFT_APP)
ifneq (,$(PGAPPICON))
PGICOSTR = $(subst /,\/,IDI_ICON ICON \"$(top_builddir)/src/port/$(PGAPPICON).ico\")
endif
@@ -71,7 +67,16 @@ endif
# signal win32ver.rc availability to the dll build rule below.
ifndef PGXS
win32ver.rc: $(top_srcdir)/src/port/win32ver.rc
- sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' -e 's;\(VERSION.*\),0 *$$;\1,'`date '+%y%j' | sed 's/^0*//'`';' $< >$@
+ sed -e 's;FILEDESC;$(PGFILEDESC);' \
+ -e 's;VFT_APP;$(PGFTYPE);' \
+ -e 's;_ICO_;$(PGICOSTR);' \
+ -e 's;\(VERSION.*\),0 *$$;\1,'`date '+%y%j' | sed 's/^0*//'`';' \
+ -e '/_INTERNAL_NAME_/$(if $(shlib),s;_INTERNAL_NAME_;"$(basename $(shlib))";,d)' \
+ -e '/_ORIGINAL_NAME_/$(if $(shlib),s;_ORIGINAL_NAME_;"$(shlib)";,d)' \
+ $< >$@
+
+# Depend on Makefile.global to force rebuild on re-run of configure.
+win32ver.rc: $(top_builddir)/src/Makefile.global
endif
win32ver.o: win32ver.rc