mirror of
https://github.com/postgres/postgres.git
synced 2025-05-08 07:21:33 +03:00
Link $(WIN32RES) into single-file modules only when PGFILEDESC is set.
Commit 0ffc201a51395ca71fe429ef86c872850a5850ee included this object unconditionally. Being unprepared for that, most external, single-file modules failed to build. This better aligns the GNU make build system with the heuristic in the MSVC build's Project::AddDirResourceFile(). In-tree, installed modules set PGFILEDESC, so they will see no change. Also, under PGXS, omit the nonfunctioning rule to build win32ver.rc. Back-patch to 9.5, where the aforementioned commit first appeared.
This commit is contained in:
parent
7c29764a35
commit
c26170668c
@ -62,12 +62,18 @@ ifneq (,$(PGAPPICON))
|
|||||||
PGICOSTR = $(subst /,\/,IDI_ICON ICON \"$(top_builddir)/src/port/$(PGAPPICON).ico\")
|
PGICOSTR = $(subst /,\/,IDI_ICON ICON \"$(top_builddir)/src/port/$(PGAPPICON).ico\")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# We do not install src/port/win32ver.rc, its content being specific to
|
||||||
|
# PostgreSQL Global Development Group software. Any module can ship a
|
||||||
|
# win32ver.rc or furnish a rule for generating one. Set $(PGFILEDESC) to
|
||||||
|
# signal win32ver.rc availability to the dll build rule below.
|
||||||
|
ifndef PGXS
|
||||||
win32ver.rc: $(top_srcdir)/src/port/win32ver.rc
|
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*//'`';' $< >$@
|
||||||
|
endif
|
||||||
|
|
||||||
win32ver.o: win32ver.rc
|
win32ver.o: win32ver.rc
|
||||||
$(WINDRES) -i $< -o $@ --include-dir=$(top_builddir)/src/include --include-dir=$(srcdir)
|
$(WINDRES) -i $< -o $@ --include-dir=$(top_builddir)/src/include --include-dir=$(srcdir)
|
||||||
|
|
||||||
# Rule for building a shared library from a single .o file
|
# Rule for building a shared library from a single .o file
|
||||||
%.dll: %.o $(WIN32RES)
|
%.dll: %.o $(if $(PGFILEDESC),$(WIN32RES))
|
||||||
$(CC) $(CFLAGS) -shared -static-libgcc -o $@ $^ -Wl,--export-all-symbols $(LDFLAGS) $(LDFLAGS_SL) $(BE_DLLLIBS)
|
$(CC) $(CFLAGS) -shared -static-libgcc -o $@ $^ -Wl,--export-all-symbols $(LDFLAGS) $(LDFLAGS_SL) $(BE_DLLLIBS)
|
||||||
|
@ -202,7 +202,7 @@ endif # MODULE_big
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
ifdef MODULES
|
ifdef MODULES
|
||||||
rm -f $(addsuffix $(DLSUFFIX), $(MODULES)) $(addsuffix .o, $(MODULES)) $(WIN32RES)
|
rm -f $(addsuffix $(DLSUFFIX), $(MODULES)) $(addsuffix .o, $(MODULES)) $(if $(PGFILEDESC),$(WIN32RES))
|
||||||
endif
|
endif
|
||||||
ifdef DATA_built
|
ifdef DATA_built
|
||||||
rm -f $(DATA_built)
|
rm -f $(DATA_built)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user