Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitea9e06a

Browse files
committed
Clean up MinGW def file generation
There were some leftovers from ancient ad-hoc ways to build onWindows, prior to the standardization on MSVC and MinGW. We don'tneed to build a lib$(NAME)ddll.def (debug build, as opposed tolib$(NAME)dll.def) for MinGW, since nothing uses that. We also don'tneed to build the regular .def file during distprep, since the MinGWbuild environment is perfectly capable of creating that normally atbuild time.Discussion:https://www.postgresql.org/message-id/flat/0f9db9f8-47b8-a48b-6ccc-15b22b412316%402ndquadrant.com
1 parent5d3587d commitea9e06a

File tree

5 files changed

+13
-35
lines changed

5 files changed

+13
-35
lines changed

‎src/Makefile.shlib

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
# installdirs-lib create installation directory $(libdir)
5050
# uninstall-lib remove the libraries from $(libdir)
5151
# clean-lib delete the static and shared libraries from the build dir
52-
# maintainer-clean-lib delete .def files built for win32
5352
#
5453
# Typically you would add `all-lib' to the `all' target so that `make all'
5554
# builds the libraries. In the most simple case it would look like this:
@@ -374,6 +373,13 @@ DLL_DEFFILE = lib$(NAME)dll.def
374373

375374
$(shlib): $(OBJS) $(DLL_DEFFILE) | $(SHLIB_PREREQS)
376375
$(CC) $(CFLAGS) -shared -static-libgcc -o $@ $(OBJS) $(DLL_DEFFILE) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) $(LIBS) -Wl,--out-implib=$(stlib)
376+
377+
UC_NAME = $(shell echo $(NAME) | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')
378+
379+
$(DLL_DEFFILE): $(SHLIB_EXPORTS)
380+
echo 'LIBRARY LIB$(UC_NAME).dll' >$@
381+
echo 'EXPORTS' >>$@
382+
sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ \1@ \2/' $< >>$@
377383
endif
378384

379385
endif # PORTNAME == cygwin
@@ -397,32 +403,6 @@ endif # PORTNAME == cygwin || PORTNAME == win32
397403
echo 'Libs.private: $(sort $(filter-out -L.% -L$(top_srcdir)/%,$(filter -L%,$(LDFLAGS) $(SHLIB_LINK)))) $(filter-out $(PKG_CONFIG_REQUIRES_PRIVATE:lib%=-l%),$(filter -l%,$(SHLIB_LINK)))' >>$@
398404

399405

400-
# We need several not-quite-identical variants of .DEF files to build
401-
# DLLs for Windows. These are made from the single source file
402-
# exports.txt. Since we can't assume that Windows boxes will have
403-
# sed, the .DEF files are always built and included in distribution
404-
# tarballs.
405-
406-
ifneq (,$(SHLIB_EXPORTS))
407-
distprep: lib$(NAME)dll.def lib$(NAME)ddll.def
408-
409-
UC_NAME = $(shell echo $(NAME) | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')
410-
411-
lib$(NAME)dll.def: $(SHLIB_EXPORTS)
412-
echo '; DEF file for Makefile.shlib (MinGW)' >$@
413-
echo 'LIBRARY LIB$(UC_NAME).dll' >>$@
414-
echo 'EXPORTS' >>$@
415-
sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ \1@ \2/' $< >>$@
416-
417-
lib$(NAME)ddll.def: $(SHLIB_EXPORTS)
418-
echo '; DEF file for Makefile.shlib (MinGW)' >$@
419-
echo 'LIBRARY LIB$(UC_NAME)D.dll' >>$@
420-
echo 'EXPORTS' >>$@
421-
sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ \1@ \2/' $< >>$@
422-
423-
endif # SHLIB_EXPORTS
424-
425-
426406
##
427407
## INSTALL
428408
##
@@ -505,8 +485,6 @@ endif # no soname
505485
.PHONY: clean-lib
506486
clean-lib:
507487
rm -f $(shlib) $(shlib_bare) $(shlib_major) $(stlib) $(exports_file) lib$(NAME).pc
508-
509-
ifneq (,$(SHLIB_EXPORTS))
510-
maintainer-clean-lib:
511-
rm -f lib$(NAME)dll.def lib$(NAME)ddll.def
488+
ifneq (,$(DLL_DEFFILE))
489+
rm -f $(DLL_DEFFILE)
512490
endif

‎src/interfaces/ecpg/compatlib/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ uninstall: uninstall-lib
5454
cleandistclean: clean-lib
5555
rm -f$(OBJS)
5656

57-
maintainer-clean: distclean maintainer-clean-lib
57+
maintainer-clean: distclean

‎src/interfaces/ecpg/ecpglib/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ uninstall: uninstall-lib
5757
cleandistclean: clean-lib
5858
rm -f$(OBJS)
5959

60-
maintainer-clean: distclean maintainer-clean-lib
60+
maintainer-clean: distclean

‎src/interfaces/ecpg/pgtypeslib/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ uninstall: uninstall-lib
4444
cleandistclean: clean-lib
4545
rm -f$(OBJS)
4646

47-
maintainer-clean: distclean maintainer-clean-lib
47+
maintainer-clean: distclean

‎src/interfaces/libpq/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,6 @@ clean distclean: clean-lib
139139
# Remove files we (may have) symlinked in from other places
140140
rm -f encnames.c wchar.c
141141

142-
maintainer-clean: distclean maintainer-clean-lib
142+
maintainer-clean: distclean
143143
$(MAKE) -Ctest$@
144144
rm -f libpq-dist.rc

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp