1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

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
This commit is contained in:
Peter Eisentraut
2020-01-15 10:15:06 +01:00
parent ac5bdf6261
commit 16a4a3d59c
12 changed files with 30 additions and 85 deletions

View File

@ -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