This change builds on Vincent Torri's changes.
This installs the ICU DLL files in $prefix/bin instead of $prefix/lib.
Note: In order to disable this change in behavior you can edit
the "mh-mingw*" file(s). If you set the variable MINGW_MOVEDLLSTOBINDIR
to NO instead of YES, then it will retain the previous behavior of
installing the DLLs into the bin folder.
## Source directory information
srcdir = @srcdir@
top_srcdir = @top_srcdir@
-platform = @platform@
top_builddir = ..
$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
endif
ifneq ($(ENABLE_SHARED),)
-ifeq ($(platform), U_MINGW)
- @$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
+# For MinGW, do we want the DLL to go in the bin location?
+ifeq ($(MINGW_MOVEDLLSTOBINDIR),YES)
+ $(MKINSTALLDIRS) $(DESTDIR)$(bindir)
$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir)
else
$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
## Copyright (c) 2002-2013, International Business Machines Corporation and
## others. All Rights Reserved.
-ICUUC_FILE="${libdir}/${ICULIBS_COMMON_LIB_NAME}"
+# For MinGW do we want the common DLL to go into the bin location?
+if [ "$MINGW_MOVEDLLSTOBINDIR" = "YES" ]; then
+ ICUUC_FILE="${bindir}/${ICULIBS_COMMON_LIB_NAME}"
+else
+ ICUUC_FILE="${libdir}/${ICULIBS_COMMON_LIB_NAME}"
+fi
+
ICUUC_FILE_A="${libdir}/${ICULIBS_COMMON_LIB_NAME_A}"
# echo ENABLE RPATH $ENABLE_RPATH and RPATHLDFLAGS=${RPATH_LDFLAGS}
# This file is similar to mh-mingw64
# Any changes made here may also need to be made in mh-mingw64
+# On Windows we generally have the DLLs in the bin directory rather than the lib directory.
+# This setting moves the ICU DLLs into the bin folder for MinGW/MSYS2 when "make install" is run.
+# If you prefer to have the DLLs in the lib folder, then set this to NO instead.
+MINGW_MOVEDLLSTOBINDIR = YES
+
# We install sbin tools into the same bin directory because
# pkgdata needs some of the tools in sbin, and we can't always depend on
# icu-config working on Windows.
## Special pkgdata information that is needed
PKGDATA_VERSIONING = -r $(SO_TARGET_VERSION_MAJOR)
-#ICUPKGDATA_INSTALL_DIR = $(shell cygpath -dma $(DESTDIR)$(ICUPKGDATA_DIR))#M#
-#ICUPKGDATA_INSTALL_LIBDIR = $(shell cygpath -dma $(DESTDIR)$(libdir))#M#
## Versioned libraries rules
#%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
# TODO: Finish the rest of this port. This platform port is incomplete.
+# On Windows we generally have the DLLs in the bin directory rather than the lib directory.
+# This setting moves the ICU DLLs into the bin folder for MinGW/MSYS2 when "make install" is run.
+# If you prefer to have the DLLs in the lib folder, then set this to NO instead.
+MINGW_MOVEDLLSTOBINDIR = YES
+
# This file is similar to mh-mingw
# Any changes made here may also need to be made in mh-mingw
## Special pkgdata information that is needed
PKGDATA_VERSIONING = -r $(SO_TARGET_VERSION_MAJOR)
-#ICUPKGDATA_INSTALL_DIR = $(shell cygpath -dma $(DESTDIR)$(ICUPKGDATA_DIR))#M#
-#ICUPKGDATA_INSTALL_LIBDIR = $(shell cygpath -dma $(DESTDIR)$(libdir))#M#
## Versioned libraries rules
#%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
endif
ifneq ($(ENABLE_STATIC),)
ifeq ($(PKGDATA_MODE),dll)
+# For MinGW, do we want the DLL to go in the bin location?
+ifeq ($(MINGW_MOVEDLLSTOBINDIR),YES)
+ $(PKGDATA_INVOKE) $(PKGDATA) -m static -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) $(PKGDATA_LIST) -I $(DESTDIR)$(bindir)
+else
$(PKGDATA_INVOKE) $(PKGDATA) -m static -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_LIBDIR)
endif
endif
+endif
ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES)
+# For MinGW, do we want the DLL to go in the bin location?
+ifeq ($(MINGW_MOVEDLLSTOBINDIR),YES)
+ $(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) -I $(DESTDIR)$(bindir)
+else
$(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_DIR)
+endif
else
$(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(DESTDIR)$(ICUPKGDATA_DIR)
endif
## Source directory information
srcdir = @srcdir@
top_srcdir = @top_srcdir@
-platform = @platform@
top_builddir = ..
$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
endif
ifneq ($(ENABLE_SHARED),)
-ifeq ($(platform), U_MINGW)
- @$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
+# For MinGW, do we want the DLL to go in the bin location?
+ifeq ($(MINGW_MOVEDLLSTOBINDIR),YES)
+ $(MKINSTALLDIRS) $(DESTDIR)$(bindir)
$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir)
else
$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
# Location of the executables before "make install" is used
BINDIR=$(top_builddir)/bin
+# Defined here so that it can be overriden by mh-mingw*.
+# For MinGW/MSYS2 we want the DLLs to go into the bin location.
+MINGW_MOVEDLLSTOBINDIR = NO
+
# overridden by icucross.mk
TOOLBINDIR=$(BINDIR)
TOOLLIBDIR=$(LIBDIR)
## Source directory information
srcdir = @srcdir@
top_srcdir = @top_srcdir@
-platform = @platform@
top_builddir = ..
$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
endif
ifneq ($(ENABLE_SHARED),)
-ifeq ($(platform), U_MINGW)
- @$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
+# For MinGW, do we want the DLL to go in the bin location?
+ifeq ($(MINGW_MOVEDLLSTOBINDIR),YES)
+ $(MKINSTALLDIRS) $(DESTDIR)$(bindir)
$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir)
else
$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
endif
ifneq ($(ENABLE_SHARED),)
+# For MinGW, do we want the DLL to go in the bin location?
+ifeq ($(MINGW_MOVEDLLSTOBINDIR),YES)
+ $(MKINSTALLDIRS) $(DESTDIR)$(bindir)
+ $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir)
+else
$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
endif
endif
+endif
ifneq ($(IMPORT_LIB_EXT),)
$(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
## Source directory information
srcdir = @srcdir@
top_srcdir = @top_srcdir@
-platform = @platform@
top_builddir = ..
$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
endif
ifneq ($(ENABLE_SHARED),)
-ifeq ($(platform), U_MINGW)
- @$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
+# For MinGW, do we want the DLL to go in the bin location?
+ifeq ($(MINGW_MOVEDLLSTOBINDIR),YES)
+ $(MKINSTALLDIRS) $(DESTDIR)$(bindir)
$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir)
else
$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
## Source directory information
srcdir = @srcdir@
top_srcdir = @top_srcdir@
-platform = @platform@
top_builddir = ../..
$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
endif
ifneq ($(ENABLE_SHARED),)
-ifeq ($(platform), U_MINGW)
- @$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
+# For MinGW, do we want the DLL to go in the bin location?
+ifeq ($(MINGW_MOVEDLLSTOBINDIR),YES)
+ $(MKINSTALLDIRS) $(DESTDIR)$(bindir)
$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir)
else
$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
include $(BUILDDIR)/icudefs.mk
endif
-COM=$(ICUDIR)/lib/libicuuc.$(SO)
-I18=$(ICUDIR)/lib/libicui18n.$(SO)
-LEX=$(ICUDIR)/lib/libiculx.$(SO)
+# For MinGW, do we want the DLL to go in the bin location?
+ifeq ($(MINGW_MOVEDLLSTOBINDIR),YES)
+installdir = bin
+else
+installdir = lib
+endif
+
+COM=$(ICUDIR)/$(installdir)/libicuuc.$(SO)
+I18=$(ICUDIR)/$(installdir)/libicui18n.$(SO)
+LEX=$(ICUDIR)/$(installdir)/libiculx.$(SO)
DAT=$(ICUDIR)/stubdata/libicudata.$(SO)
-UIO=$(ICUDIR)/lib/libicuio.$(SO)
+UIO=$(ICUDIR)/$(installdir)/libicuio.$(SO)
LIBS=$(COM) $(I18) $(LEX) $(UIO)
## Source directory information
srcdir = @srcdir@
top_srcdir = @top_srcdir@
-platform = @platform@
top_builddir = ../..
$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
endif
ifneq ($(ENABLE_SHARED),)
-ifeq ($(platform), U_MINGW)
- @$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
+# For MinGW, do we want the DLL to go in the bin location?
+ifeq ($(MINGW_MOVEDLLSTOBINDIR),YES)
+ $(MKINSTALLDIRS) $(DESTDIR)$(bindir)
$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir)
else
$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)