ICU-3389 Output temporary files to the tmp directory.
Use a better naming scheme of temp files on Windows. Simplify static library generation, since pkgdata now supports -L. X-SVN-Rev: 15277
This commit is contained in:
parent
ca717cec1d
commit
9807380d2a
@ -18,7 +18,6 @@ subdir = data
|
||||
|
||||
#lib icu data for link
|
||||
LIB_ICUDATA_NAME=$(LIBPREFIX)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)
|
||||
LIB_STATIC_ICUDATA_NAME=$(LIBSICU)$(DATA_STUBNAME)$(ICULIBSUFFIX)
|
||||
|
||||
# Allow Windows to override these options
|
||||
ifeq ($(PKGDATA_OPTS),)
|
||||
@ -116,19 +115,7 @@ PKGDATA_INVOKE:=$(subst $(LIBDIR):$(top_builddir)/stubdata,$(top_builddir)/stubd
|
||||
|
||||
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 $(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 $(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 $(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
|
||||
$(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) -m static $(OUTTMPDIR)/icudata.lst
|
||||
endif
|
||||
$(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) $(PKGDATA_LIBNAME) $(OUTTMPDIR)/icudata.lst
|
||||
|
||||
@ -137,12 +124,7 @@ 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 $(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)
|
||||
$(PKGDATA_INVOKE) $(PKGDATA) -m static -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) $(OUTTMPDIR)/icudata.lst -I $(DESTDIR)$(ICUPKGDATA_DIR)
|
||||
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)
|
||||
|
||||
|
@ -55,6 +55,7 @@ else
|
||||
ifeq ($(PKGDATA_MODE),dll)
|
||||
ICUDATA_NAME = $(ICUDATA_PLATFORM_NAME)
|
||||
PKGDATA_LIBNAME = -L $(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)
|
||||
PKGDATA_LIBSTATICNAME = -L $(STATIC_PREFIX)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)
|
||||
ICUPKGDATA_DIR = $(libdir)
|
||||
else
|
||||
ICUDATA_NAME = $(ICUPREFIX)$(DATA_STUBNAME)
|
||||
|
@ -1,10 +1,10 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright (C) 2000-2003, International Business Machines
|
||||
* Copyright (C) 2000-2004, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
***************************************************************************
|
||||
* file name: nmake.c
|
||||
* file name: make.c
|
||||
* encoding: ANSI X3.4 (1968)
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
@ -49,6 +49,7 @@ pkg_mak_writeHeader(FileStream *f, const UPKGOptions *o)
|
||||
|
||||
sprintf(linebuf, "NAME=%s%s\n"
|
||||
"CNAME=%s\n"
|
||||
"LIBNAME=%s\n"
|
||||
"SRCDIR=%s\n"
|
||||
"TARGETDIR=%s\n"
|
||||
"TEMP_DIR=%s\n"
|
||||
@ -60,13 +61,14 @@ pkg_mak_writeHeader(FileStream *f, const UPKGOptions *o)
|
||||
o->shortName,
|
||||
(appendVersion ? appendVersion : ""),
|
||||
o->cShortName,
|
||||
o->libName,
|
||||
o->srcDir,
|
||||
o->targetDir,
|
||||
o->tmpDir,
|
||||
o->mode,
|
||||
o->makeFile,
|
||||
o->entryName,
|
||||
(appendVersion ? appendVersion : ""));
|
||||
o->version);
|
||||
T_FileStream_writeLine(f, linebuf);
|
||||
|
||||
sprintf(linebuf, "## List files [%d] containing data files to process (note: - means stdin)\n"
|
||||
|
@ -118,7 +118,7 @@ void pkg_mode_windows(UPKGOptions *o, FileStream *makefile, UErrorCode *status)
|
||||
|
||||
sprintf(tmp2,
|
||||
"LINK32 = link.exe\n"
|
||||
"LINK32_FLAGS = /nologo /out:\"$(TARGETDIR)\\$(DLLTARGET)\" /DLL /NOENTRY /base:\"0x4ad00000\" /implib:\"$(TARGETDIR)\\$(ENTRYPOINT).lib\" %s%s%s\n",
|
||||
"LINK32_FLAGS = /nologo /out:\"$(TARGETDIR)\\$(DLLTARGET)\" /DLL /NOENTRY /base:\"0x4ad00000\" /implib:\"$(TARGETDIR)\\$(LIBNAME).lib\" %s%s%s\n",
|
||||
(o->comment ? "/comment:\"" : ""),
|
||||
(o->comment ? o->comment : ""),
|
||||
(o->comment ? "\"" : ""),
|
||||
@ -153,10 +153,12 @@ void pkg_mode_windows(UPKGOptions *o, FileStream *makefile, UErrorCode *status)
|
||||
else if (isStatic)
|
||||
{
|
||||
uprv_strcpy(tmp, LIB_PREFIX);
|
||||
uprv_strcat(tmp, o->cShortName);
|
||||
uprv_strcat(tmp, o->libName);
|
||||
uprv_strcat(tmp, UDATA_LIB_SUFFIX);
|
||||
|
||||
pkg_sttc_writeReadme(o, tmp, status);
|
||||
if (!o->quiet) {
|
||||
pkg_sttc_writeReadme(o, tmp, status);
|
||||
}
|
||||
if(U_FAILURE(*status))
|
||||
{
|
||||
return;
|
||||
@ -177,7 +179,7 @@ void pkg_mode_windows(UPKGOptions *o, FileStream *makefile, UErrorCode *status)
|
||||
sprintf(tmp2,
|
||||
"LINK32 = LIB.exe\n"
|
||||
"LINK32_FLAGS = /nologo /out:\"$(TARGETDIR)\\$(DLLTARGET)\" /EXPORT:\"%s\"\n",
|
||||
o->cShortName
|
||||
o->libName
|
||||
);
|
||||
T_FileStream_writeLine(makefile, tmp2);
|
||||
|
||||
@ -203,12 +205,12 @@ void pkg_mode_windows(UPKGOptions *o, FileStream *makefile, UErrorCode *status)
|
||||
|
||||
uprv_strcpy(tmp, UDATA_CMN_PREFIX "$(NAME)" UDATA_CMN_INTERMEDIATE_SUFFIX OBJ_SUFFIX);
|
||||
|
||||
sprintf(tmp2, "# intermediate obj file:\nCMNOBJTARGET=%s\n\n", tmp);
|
||||
sprintf(tmp2, "# intermediate obj file\nCMNOBJTARGET=%s\n\n", tmp);
|
||||
T_FileStream_writeLine(makefile, tmp2);
|
||||
}
|
||||
uprv_strcpy(tmp, UDATA_CMN_PREFIX);
|
||||
uprv_strcat(tmp, o->cShortName);
|
||||
if (o->version) {
|
||||
if (o->version && !uprv_strstr(o->shortName,o->version)) {
|
||||
uprv_strcat(tmp, "$(TARGET_VERSION)");
|
||||
}
|
||||
uprv_strcat(tmp, UDATA_CMN_SUFFIX);
|
||||
@ -230,11 +232,11 @@ void pkg_mode_windows(UPKGOptions *o, FileStream *makefile, UErrorCode *status)
|
||||
sprintf(tmp, "all: \"$(TARGETDIR)\\$(DLLTARGET)\"\n\n");
|
||||
T_FileStream_writeLine(makefile, tmp);
|
||||
|
||||
sprintf(tmp, "\"$(TARGETDIR)\\$(DLLTARGET)\": \"$(TARGETDIR)\\$(CMNOBJTARGET)\"\n"
|
||||
"\t$(LINK32) $(LINK32_FLAGS) \"$(TARGETDIR)\\$(CMNOBJTARGET)\" $(DATA_VER_INFO)\n\n");
|
||||
sprintf(tmp, "\"$(TARGETDIR)\\$(DLLTARGET)\": \"$(TEMP_DIR)\\$(CMNOBJTARGET)\"\n"
|
||||
"\t$(LINK32) $(LINK32_FLAGS) \"$(TEMP_DIR)\\$(CMNOBJTARGET)\" $(DATA_VER_INFO)\n\n");
|
||||
T_FileStream_writeLine(makefile, tmp);
|
||||
sprintf(tmp, "\"$(TARGETDIR)\\$(CMNOBJTARGET)\": \"$(TARGETDIR)\\$(CMNTARGET)\"\n"
|
||||
"\t@\"$(GENCCODE)\" $(GENCOPTIONS) -e $(ENTRYPOINT) -o -d \"$(TARGETDIR)\" \"$(TARGETDIR)\\$(CMNTARGET)\"\n\n");
|
||||
sprintf(tmp, "\"$(TEMP_DIR)\\$(CMNOBJTARGET)\": \"$(TARGETDIR)\\$(CMNTARGET)\"\n"
|
||||
"\t@\"$(GENCCODE)\" $(GENCOPTIONS) -e $(ENTRYPOINT) -o -d \"$(TEMP_DIR)\" \"$(TARGETDIR)\\$(CMNTARGET)\"\n\n");
|
||||
T_FileStream_writeLine(makefile, tmp);
|
||||
|
||||
sprintf(tmp2,
|
||||
|
Loading…
Reference in New Issue
Block a user