ICU-3389 Fix static library names
X-SVN-Rev: 15248
This commit is contained in:
parent
3883953d97
commit
dad60278cf
@ -32,6 +32,9 @@ LD_RPATH_PRE= -I
|
||||
## to the actual data versus the stub data
|
||||
POST_DATA_BUILD = os400-data-rebind
|
||||
|
||||
# The stubdata directory is the same directory as the normal data library.
|
||||
STUBDATA_LIBDIR = $(LIBDIR)/
|
||||
|
||||
## Versioned target for a shared library.
|
||||
FINAL_SO_TARGET = $(SO_TARGET)
|
||||
MIDDLE_SO_TARGET =
|
||||
|
@ -17,7 +17,7 @@ include $(top_builddir)/icudefs.mk
|
||||
subdir = data
|
||||
|
||||
#lib icu data for link
|
||||
LIB_ICUDATA_NAME=$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX)
|
||||
LIB_ICUDATA_NAME=$(LIBPREFIX)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)
|
||||
LIB_STATIC_ICUDATA_NAME=$(LIBSICU)$(DATA_STUBNAME)$(ICULIBSUFFIX)
|
||||
|
||||
# Allow Windows to override these options
|
||||
@ -28,9 +28,16 @@ ifeq ($(PKGDATA_VERSIONING),)
|
||||
PKGDATA_VERSIONING = -r $(SO_TARGET_VERSION)
|
||||
endif
|
||||
|
||||
# This allows all the data to be in one directory
|
||||
ifeq ($(PKGDATA_MODE),dll)
|
||||
ICUPKGDATA_OUTDIR = $(LIBDIR)
|
||||
else
|
||||
ICUPKGDATA_OUTDIR = $(OUTDIR)
|
||||
endif
|
||||
|
||||
top_builddir_from_tmp = $(patsubst ..%,../..%,$(top_builddir))
|
||||
CURDIR:=$(CURR_FULL_DIR)
|
||||
PKGDATA = $(BINDIR)/pkgdata $(PKGDATA_OPTS) -c -s $(CURDIR)/out/build/$(ICUDATA_PLATFORM_NAME) -d $(OUTDIR)
|
||||
PKGDATA = $(BINDIR)/pkgdata $(PKGDATA_OPTS) -c -s $(CURDIR)/out/build/$(ICUDATA_PLATFORM_NAME) -d $(ICUPKGDATA_OUTDIR)
|
||||
|
||||
|
||||
# OBJDATADIR must be a short path (with ..'s) to the data.
|
||||
@ -105,22 +112,22 @@ check-local:
|
||||
|
||||
# During this INVOKE we only want to use stubdata.
|
||||
# We don't want to try to write over files that we are using.
|
||||
PKGDATA_INVOKE:=$(subst :$(top_builddir)/data/out,,$(INVOKE)) $(PKGDATA_INVOKE_OPTS)
|
||||
PKGDATA_INVOKE:=$(subst $(LIBDIR):$(top_builddir)/stubdata,$(top_builddir)/stubdata:$(LIBDIR),$(INVOKE)) $(PKGDATA_INVOKE_OPTS)
|
||||
|
||||
packagedata: icupkg.inc $(OUTTMPDIR)/icudata.lst build-local
|
||||
ifneq ($(ENABLE_STATIC),)
|
||||
# Move the shared library out of the way while creating the static library
|
||||
# to prevent name collisions.
|
||||
ifeq ($(wildcard $(OUTDIR)/$(LIB_ICUDATA_NAME).$(SO)),$(OUTDIR)/$(LIB_ICUDATA_NAME).$(SO))
|
||||
mv -f $(OUTDIR)/$(LIB_ICUDATA_NAME).$(SO) $(OUTDIR)/$(LIB_ICUDATA_NAME)-temp.$(SO)
|
||||
ifeq ($(wildcard $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME).$(SO)),$(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME).$(SO))
|
||||
mv -f $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME).$(SO) $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME)-temp.$(SO)
|
||||
endif
|
||||
ifeq ($(wildcard $(OUTDIR)/$(LIB_STATIC_ICUDATA_NAME).$(A)),$(OUTDIR)/$(LIB_STATIC_ICUDATA_NAME).$(A))
|
||||
mv -f $(OUTDIR)/$(LIB_STATIC_ICUDATA_NAME).$(A) $(OUTDIR)/$(LIB_ICUDATA_NAME).$(A)
|
||||
ifeq ($(wildcard $(ICUPKGDATA_OUTDIR)/$(LIB_STATIC_ICUDATA_NAME).$(A)),$(ICUPKGDATA_OUTDIR)/$(LIB_STATIC_ICUDATA_NAME).$(A))
|
||||
mv -f $(ICUPKGDATA_OUTDIR)/$(LIB_STATIC_ICUDATA_NAME).$(A) $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME).$(A)
|
||||
endif
|
||||
$(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) -m static $(OUTTMPDIR)/icudata.lst
|
||||
mv -f $(OUTDIR)/$(LIB_ICUDATA_NAME).$(A) $(OUTDIR)/$(LIB_STATIC_ICUDATA_NAME).$(A)
|
||||
ifeq ($(wildcard $(OUTDIR)/$(LIB_ICUDATA_NAME)-temp.$(SO)),$(OUTDIR)/$(LIB_ICUDATA_NAME)-temp.$(SO))
|
||||
mv -f $(OUTDIR)/$(LIB_ICUDATA_NAME)-temp.$(SO) $(OUTDIR)/$(LIB_ICUDATA_NAME).$(SO)
|
||||
$(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) -m static $(OUTTMPDIR)/icudata.lst
|
||||
mv -f $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME).$(A) $(ICUPKGDATA_OUTDIR)/$(LIB_STATIC_ICUDATA_NAME).$(A)
|
||||
ifeq ($(wildcard $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME)-temp.$(SO)),$(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME)-temp.$(SO))
|
||||
mv -f $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME)-temp.$(SO) $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME).$(SO)
|
||||
endif
|
||||
endif
|
||||
$(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) $(PKGDATA_LIBNAME) $(OUTTMPDIR)/icudata.lst
|
||||
@ -130,14 +137,14 @@ install-local: $(OUTTMPDIR)/icudata.lst ./icupkg.inc packagedata $(OS390INSTALL)
|
||||
$(MKINSTALLDIRS) $(TMPDATADIR) $(DESTDIR)$(ICUPKGDATA_DIR)
|
||||
ifneq ($(ENABLE_STATIC),)
|
||||
# It is done this way just in case the $(SO) == $(A)
|
||||
mv -f $(OUTDIR)/$(LIB_ICUDATA_NAME).$(SO) $(OUTDIR)/$(LIB_ICUDATA_NAME)-temp.$(SO)
|
||||
mv -f $(OUTDIR)/$(LIB_STATIC_ICUDATA_NAME).$(A) $(OUTDIR)/$(LIB_ICUDATA_NAME).$(A)
|
||||
$(PKGDATA_INVOKE) $(PKGDATA) -m static -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(OUTTMPDIR)/icudata.lst
|
||||
mv -f $(OUTDIR)/$(LIB_ICUDATA_NAME).$(A) $(OUTDIR)/$(LIB_STATIC_ICUDATA_NAME).$(A)
|
||||
mv -f $(OUTDIR)/$(LIB_ICUDATA_NAME)-temp.$(SO) $(OUTDIR)/$(LIB_ICUDATA_NAME).$(SO)
|
||||
$(INSTALL-L) $(OUTDIR)/$(LIB_STATIC_ICUDATA_NAME).$(A) $(DESTDIR)$(ICUPKGDATA_DIR)/$(LIB_STATIC_ICUDATA_NAME).$(A)
|
||||
mv -f $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME).$(SO) $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME)-temp.$(SO)
|
||||
mv -f $(ICUPKGDATA_OUTDIR)/$(LIB_STATIC_ICUDATA_NAME).$(A) $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME).$(A)
|
||||
$(PKGDATA_INVOKE) $(PKGDATA) -m static -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(OUTTMPDIR)/icudata.lst
|
||||
mv -f $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME).$(A) $(ICUPKGDATA_OUTDIR)/$(LIB_STATIC_ICUDATA_NAME).$(A)
|
||||
mv -f $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME)-temp.$(SO) $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME).$(SO)
|
||||
$(INSTALL-L) $(ICUPKGDATA_OUTDIR)/$(LIB_STATIC_ICUDATA_NAME).$(A) $(DESTDIR)$(ICUPKGDATA_DIR)/$(LIB_STATIC_ICUDATA_NAME).$(A)
|
||||
endif
|
||||
$(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(OUTTMPDIR)/icudata.lst -I $(DESTDIR)$(ICUPKGDATA_DIR)
|
||||
$(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(OUTTMPDIR)/icudata.lst -I $(DESTDIR)$(ICUPKGDATA_DIR)
|
||||
|
||||
|
||||
####
|
||||
@ -147,14 +154,14 @@ install390: $(OUTTMPDIR)/icudata390.lst ./icupkg.inc
|
||||
$(MKINSTALLDIRS) $(TMPDATADIR) $(DESTDIR)$(libdir)
|
||||
$(INVOKE) $(PKGDATA) -s $(BUILDDIR) -T $(OUTTMPDIR)/tmp3901 -p $(ICUDATA_NAME)$(STUB_SUFFIX) -e $(ICUDATA_ENTRY_POINT) $(OUTTMPDIR)/icudata390.lst -m dll $(PKGDATA_VERSIONING) -I $(DESTDIR)$(ICUPKGDATA_DIR)
|
||||
ifeq ($(PKGDATA_MODE),dll)
|
||||
$(INSTALL-L) $(OUTDIR)/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX)$(SO_TARGET_VERSION)$(IMPORT_LIB_EXT) $(DESTDIR)$(ICUPKGDATA_DIR)/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX)$(SO_TARGET_VERSION)$(IMPORT_LIB_EXT)
|
||||
$(INSTALL-L) $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX)$(SO_TARGET_VERSION)$(IMPORT_LIB_EXT) $(DESTDIR)$(ICUPKGDATA_DIR)/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX)$(SO_TARGET_VERSION)$(IMPORT_LIB_EXT)
|
||||
endif
|
||||
|
||||
#### $(LIB_ICUDATA_NAME)$(BATCH_SUFFIX) is the subset data for batch mode
|
||||
package390: $(OUTTMPDIR)/icudata390.lst $(OUTTMPDIR)/icudata.lst ./icupkg.inc
|
||||
@$(MKINSTALLDIRS) $(BUILDDIR)/tmp3901
|
||||
$(INVOKE) $(PKGDATA) -s $(BUILDDIR) -T $(OUTTMPDIR)/tmp3901 -p $(ICUDATA_NAME)$(STUB_SUFFIX) -e $(ICUDATA_ENTRY_POINT) $(BUILDDIR)/icudata390.lst -m dll $(PKGDATA_VERSIONING)
|
||||
cp $(OUTDIR)/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO) $(top_builddir)/stubdata/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO)
|
||||
cp $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO) $(top_builddir)/stubdata/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO)
|
||||
|
||||
|
||||
##### Define all the data files. the build rule that depends on them is below.
|
||||
|
@ -198,7 +198,7 @@ TOOLUTIL_STUBNAME = tu
|
||||
CTESTFW_STUBNAME = test
|
||||
|
||||
# Link commands to link to ICU libs
|
||||
LIBICUDT= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
|
||||
LIBICUDT= -L$(LIBDIR) -L$(top_builddir)/stubdata -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
|
||||
LIBICUUC= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) $(LIBICUDT)
|
||||
LIBICUI18N= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
|
||||
LIBICULE= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUT_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
|
||||
@ -208,7 +208,7 @@ LIBICUTOOLUTIL= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(TOOLUTIL_S
|
||||
LIBICUIO= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
|
||||
|
||||
# Invoke, set library path for all ICU libraries.
|
||||
INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir)/data/out:$(LIBDIR):$(top_builddir)/tools/ctestfw:$$$(LDLIBRARYPATH_ENVVAR) $(LEAK_CHECKER)
|
||||
INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(LIBDIR):$(top_builddir)/stubdata:$(top_builddir)/tools/ctestfw:$$$(LDLIBRARYPATH_ENVVAR) $(LEAK_CHECKER)
|
||||
|
||||
# Platform-specific setup
|
||||
include @platform_make_fragment@
|
||||
|
@ -27,11 +27,11 @@ CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB)
|
||||
TARGET_STUBNAME=$(DATA_STUBNAME)
|
||||
|
||||
ifneq ($(ENABLE_STATIC),)
|
||||
TARGET = $(LIBDIR)/$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
|
||||
TARGET = $(STUBDATA_LIBDIR)$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
|
||||
endif
|
||||
|
||||
ifneq ($(ENABLE_SHARED),)
|
||||
SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX)$(STUB_SUFFIX).$(SO)
|
||||
SO_TARGET = $(STUBDATA_LIBDIR)$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX)$(STUB_SUFFIX).$(SO)
|
||||
ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(BATCH_STUB_TARGET)
|
||||
endif
|
||||
|
||||
|
@ -121,7 +121,7 @@ void pkg_mode_static(UPKGOptions *o, FileStream *makefile, UErrorCode *status)
|
||||
}
|
||||
|
||||
uprv_strcpy(tmp, LIB_STATIC_PREFIX);
|
||||
uprv_strcat(tmp, o->cShortName);
|
||||
uprv_strcat(tmp, o->libName);
|
||||
uprv_strcat(tmp, UDATA_LIB_SUFFIX);
|
||||
|
||||
o->outFiles = pkg_appendToList(o->outFiles, &tail, uprv_strdup(tmp));
|
||||
|
Loading…
Reference in New Issue
Block a user