Index: source/tools/pkgdata/pkgdata.cpp =================================================================== --- source.orig/tools/pkgdata/pkgdata.cpp 2009-06-26 14:57:38.000000000 -0400 +++ source/tools/pkgdata/pkgdata.cpp 2009-06-28 09:49:51.013264666 -0400 @@ -77,6 +77,13 @@ #define CAN_WRITE_OBJ_CODE #endif +// Temporary fix until http://bugs.icu-project.org/trac/ticket/6969 is +// resolved. +#ifdef CAN_WRITE_OBJ_CODE +# undef CAN_WRITE_OBJ_CODE +# define BUILD_DATA_WITHOUT_ASSEMBLY +#endif + /* Need to fix the file seperator character when using MinGW. */ #ifdef WINDOWS_WITH_GNUC #define PKGDATA_FILE_SEP_STRING "/" @@ -108,6 +115,7 @@ static void createFileNames(const char *version_major, const char *version, const char *libName, const UBool reverseExt); static int32_t pkg_getOptionsFromICUConfig(UOption *option); +static int runCommand(const char* command); enum { NAME, @@ -451,6 +459,17 @@ return result; } +static int runCommand(const char* command) +{ + printf("pkgdata: %s\n", command); + int result = system(command); + if (result != 0) + { + printf("-- return status = %d\n", result); + } + return result; +} + #define LN_CMD "ln -s" #define RM_CMD "rm -f" @@ -709,7 +728,7 @@ LN_CMD, libFileNames[LIB_FILE_VERSION], libFileNames[LIB_FILE_VERSION_MAJOR]); - result = system(cmd); + result = runCommand(cmd); if (result != 0) { return result; } @@ -722,7 +741,7 @@ libFileNames[LIB_FILE_VERSION], libFileNames[LIB_FILE], pkgDataFlags[SO_EXT]); - result = system(cmd); + result = runCommand(cmd); return result; } @@ -738,7 +757,7 @@ installDir, PKGDATA_FILE_SEP_STRING, libFileNames[LIB_FILE_VERSION] ); - result = system(cmd); + result = runCommand(cmd); if (result != 0) { return result; @@ -780,7 +799,7 @@ srcDir, PKGDATA_FILE_SEP_STRING, buffer, installDir, PKGDATA_FILE_SEP_STRING, buffer); - result = system(cmd); + result = runCommand(cmd); if (result != 0) { fprintf(stderr, "Failed to install data file with command: %s\n", cmd); break; @@ -800,7 +819,7 @@ } #else sprintf(cmd, "%s %s %s %s", WIN_INSTALL_CMD, srcDir, installDir, WIN_INSTALL_CMD_FLAGS); - result = system(cmd); + result = runCommand(cmd); if (result != 0) { fprintf(stderr, "Failed to install data file with command: %s\n", cmd); } @@ -834,7 +853,17 @@ targetDir, libFileNames[LIB_FILE_VERSION_TMP]); - result = system(cmd); + result = runCommand(cmd); + if (result != 0) { + return result; + } + + sprintf(cmd, "%s %s%s", + pkgDataFlags[RANLIB], + targetDir, + libFileNames[LIB_FILE_VERSION]); + + result = runCommand(cmd); if (result != 0) { return result; } @@ -845,7 +874,7 @@ targetDir, libFileNames[LIB_FILE_VERSION_TMP]); - result = system(cmd); + result = runCommand(cmd); if (result != 0) { return result; } @@ -889,7 +918,21 @@ pkgDataFlags[A_EXT], objectFile); - return system(cmd); + result = runCommand(cmd); + if (result == 0) + { +#ifdef OS400 + sprintf(cmd, "QSH CMD('%s %s%s.%s')", +#else + sprintf(cmd, "%s %s%s.%s", +#endif + pkgDataFlags[RANLIB], + targetDir, + libFileNames[LIB_FILE], + pkgDataFlags[A_EXT]); + + result = runCommand(cmd); + } } else /* if (mode == MODE_DLL) */ { #ifdef U_CYGWIN sprintf(cmd, "%s%s%s %s -o %s%s %s %s%s %s %s", @@ -912,7 +955,7 @@ pkgDataFlags[BIR_FLAGS]); /* Generate the library file. */ - result = system(cmd); + result = runCommand(cmd); } if (freeCmd) { @@ -938,7 +981,7 @@ tempObjectFile, gencFilePath); - result = system(cmd); + result = runCommand(cmd); if (result != 0) { return result; } @@ -1045,7 +1088,7 @@ pkgDataFlags[LIBFLAGS], tempObjectFile, gencmnFile); - result = system(cmd); + result = runCommand(cmd); if (result != 0) { break; } @@ -1134,7 +1177,7 @@ ); } - return system(cmd); + return runCommand(cmd); } #endif