Lines 77-82
Link Here
|
77 |
#define CAN_WRITE_OBJ_CODE |
77 |
#define CAN_WRITE_OBJ_CODE |
78 |
#endif |
78 |
#endif |
79 |
|
79 |
|
|
|
80 |
// Temporary fix until http://bugs.icu-project.org/trac/ticket/6969 is |
81 |
// resolved. |
82 |
#ifdef CAN_WRITE_OBJ_CODE |
83 |
# undef CAN_WRITE_OBJ_CODE |
84 |
# define BUILD_DATA_WITHOUT_ASSEMBLY |
85 |
#endif |
86 |
|
80 |
/* |
87 |
/* |
81 |
* When building the data library without assembly, |
88 |
* When building the data library without assembly, |
82 |
* some platforms use a single c code file for all of |
89 |
* some platforms use a single c code file for all of |
Lines 118-123
Link Here
|
118 |
static void createFileNames(const char *version_major, const char *version, const char *libName, const UBool reverseExt); |
125 |
static void createFileNames(const char *version_major, const char *version, const char *libName, const UBool reverseExt); |
119 |
|
126 |
|
120 |
static int32_t pkg_getOptionsFromICUConfig(UOption *option); |
127 |
static int32_t pkg_getOptionsFromICUConfig(UOption *option); |
|
|
128 |
static int runCommand(const char* command); |
121 |
|
129 |
|
122 |
enum { |
130 |
enum { |
123 |
NAME, |
131 |
NAME, |
Lines 461-466
Link Here
|
461 |
return result; |
469 |
return result; |
462 |
} |
470 |
} |
463 |
|
471 |
|
|
|
472 |
static int runCommand(const char* command) |
473 |
{ |
474 |
printf("pkgdata: %s\n", command); |
475 |
int result = system(command); |
476 |
if (result != 0) |
477 |
{ |
478 |
printf("-- return status = %d\n", result); |
479 |
} |
480 |
return result; |
481 |
} |
482 |
|
464 |
#define LN_CMD "ln -s" |
483 |
#define LN_CMD "ln -s" |
465 |
#define RM_CMD "rm -f" |
484 |
#define RM_CMD "rm -f" |
466 |
|
485 |
|
Lines 724-730
Link Here
|
724 |
LN_CMD, |
743 |
LN_CMD, |
725 |
libFileNames[LIB_FILE_VERSION], |
744 |
libFileNames[LIB_FILE_VERSION], |
726 |
libFileNames[LIB_FILE_VERSION_MAJOR]); |
745 |
libFileNames[LIB_FILE_VERSION_MAJOR]); |
727 |
result = system(cmd); |
746 |
result = runCommand(cmd); |
728 |
if (result != 0) { |
747 |
if (result != 0) { |
729 |
return result; |
748 |
return result; |
730 |
} |
749 |
} |
Lines 737-743
Link Here
|
737 |
libFileNames[LIB_FILE_VERSION], |
756 |
libFileNames[LIB_FILE_VERSION], |
738 |
libFileNames[LIB_FILE], pkgDataFlags[SO_EXT]); |
757 |
libFileNames[LIB_FILE], pkgDataFlags[SO_EXT]); |
739 |
|
758 |
|
740 |
result = system(cmd); |
759 |
result = runCommand(cmd); |
741 |
|
760 |
|
742 |
return result; |
761 |
return result; |
743 |
} |
762 |
} |
Lines 753-759
Link Here
|
753 |
installDir, PKGDATA_FILE_SEP_STRING, libFileNames[LIB_FILE_VERSION] |
772 |
installDir, PKGDATA_FILE_SEP_STRING, libFileNames[LIB_FILE_VERSION] |
754 |
); |
773 |
); |
755 |
|
774 |
|
756 |
result = system(cmd); |
775 |
result = runCommand(cmd); |
757 |
|
776 |
|
758 |
if (result != 0) { |
777 |
if (result != 0) { |
759 |
return result; |
778 |
return result; |
Lines 795-801
Link Here
|
795 |
srcDir, PKGDATA_FILE_SEP_STRING, buffer, |
814 |
srcDir, PKGDATA_FILE_SEP_STRING, buffer, |
796 |
installDir, PKGDATA_FILE_SEP_STRING, buffer); |
815 |
installDir, PKGDATA_FILE_SEP_STRING, buffer); |
797 |
|
816 |
|
798 |
result = system(cmd); |
817 |
result = runCommand(cmd); |
799 |
if (result != 0) { |
818 |
if (result != 0) { |
800 |
fprintf(stderr, "Failed to install data file with command: %s\n", cmd); |
819 |
fprintf(stderr, "Failed to install data file with command: %s\n", cmd); |
801 |
break; |
820 |
break; |
Lines 815-821
Link Here
|
815 |
} |
834 |
} |
816 |
#else |
835 |
#else |
817 |
sprintf(cmd, "%s %s %s %s", WIN_INSTALL_CMD, srcDir, installDir, WIN_INSTALL_CMD_FLAGS); |
836 |
sprintf(cmd, "%s %s %s %s", WIN_INSTALL_CMD, srcDir, installDir, WIN_INSTALL_CMD_FLAGS); |
818 |
result = system(cmd); |
837 |
result = runCommand(cmd); |
819 |
if (result != 0) { |
838 |
if (result != 0) { |
820 |
fprintf(stderr, "Failed to install data file with command: %s\n", cmd); |
839 |
fprintf(stderr, "Failed to install data file with command: %s\n", cmd); |
821 |
} |
840 |
} |
Lines 849-855
Link Here
|
849 |
targetDir, |
868 |
targetDir, |
850 |
libFileNames[LIB_FILE_VERSION_TMP]); |
869 |
libFileNames[LIB_FILE_VERSION_TMP]); |
851 |
|
870 |
|
852 |
result = system(cmd); |
871 |
result = runCommand(cmd); |
|
|
872 |
if (result != 0) { |
873 |
return result; |
874 |
} |
875 |
|
876 |
sprintf(cmd, "%s %s%s", |
877 |
pkgDataFlags[RANLIB], |
878 |
targetDir, |
879 |
libFileNames[LIB_FILE_VERSION]); |
880 |
|
881 |
result = runCommand(cmd); |
853 |
if (result != 0) { |
882 |
if (result != 0) { |
854 |
return result; |
883 |
return result; |
855 |
} |
884 |
} |
Lines 860-866
Link Here
|
860 |
targetDir, |
889 |
targetDir, |
861 |
libFileNames[LIB_FILE_VERSION_TMP]); |
890 |
libFileNames[LIB_FILE_VERSION_TMP]); |
862 |
|
891 |
|
863 |
result = system(cmd); |
892 |
result = runCommand(cmd); |
864 |
if (result != 0) { |
893 |
if (result != 0) { |
865 |
return result; |
894 |
return result; |
866 |
} |
895 |
} |
Lines 908-914
Link Here
|
908 |
pkgDataFlags[A_EXT], |
937 |
pkgDataFlags[A_EXT], |
909 |
objectFile); |
938 |
objectFile); |
910 |
|
939 |
|
911 |
result = system(cmd); |
940 |
result = runCommand(cmd); |
|
|
941 |
if (result == 0) |
942 |
{ |
943 |
#ifdef OS400 |
944 |
sprintf(cmd, "QSH CMD('%s %s%s.%s')", |
945 |
#else |
946 |
sprintf(cmd, "%s %s%s.%s", |
947 |
#endif |
948 |
pkgDataFlags[RANLIB], |
949 |
targetDir, |
950 |
libFileNames[LIB_FILE], |
951 |
pkgDataFlags[A_EXT]); |
952 |
|
953 |
result = runCommand(cmd); |
954 |
} |
912 |
} else /* if (mode == MODE_DLL) */ { |
955 |
} else /* if (mode == MODE_DLL) */ { |
913 |
#ifdef U_CYGWIN |
956 |
#ifdef U_CYGWIN |
914 |
sprintf(cmd, "%s%s%s %s -o %s%s %s %s%s %s %s", |
957 |
sprintf(cmd, "%s%s%s %s -o %s%s %s %s%s %s %s", |
Lines 935-941
Link Here
|
935 |
pkgDataFlags[BIR_FLAGS]); |
978 |
pkgDataFlags[BIR_FLAGS]); |
936 |
|
979 |
|
937 |
/* Generate the library file. */ |
980 |
/* Generate the library file. */ |
938 |
result = system(cmd); |
981 |
result = runCommand(cmd); |
939 |
} |
982 |
} |
940 |
|
983 |
|
941 |
if (freeCmd) { |
984 |
if (freeCmd) { |
Lines 961-967
Link Here
|
961 |
tempObjectFile, |
1004 |
tempObjectFile, |
962 |
gencFilePath); |
1005 |
gencFilePath); |
963 |
|
1006 |
|
964 |
result = system(cmd); |
1007 |
result = runCommand(cmd); |
965 |
if (result != 0) { |
1008 |
if (result != 0) { |
966 |
return result; |
1009 |
return result; |
967 |
} |
1010 |
} |
Lines 1043-1049
Link Here
|
1043 |
tempObjectFile, |
1086 |
tempObjectFile, |
1044 |
gencmnFile); |
1087 |
gencmnFile); |
1045 |
|
1088 |
|
1046 |
result = system(cmd); |
1089 |
result = runCommand(cmd); |
1047 |
if (result != 0) { |
1090 |
if (result != 0) { |
1048 |
break; |
1091 |
break; |
1049 |
} |
1092 |
} |
Lines 1094-1100
Link Here
|
1094 |
sprintf(cmd, "cat %s >> %s", gencmnFile, icudtAll); |
1137 |
sprintf(cmd, "cat %s >> %s", gencmnFile, icudtAll); |
1095 |
#endif |
1138 |
#endif |
1096 |
|
1139 |
|
1097 |
result = system(cmd); |
1140 |
result = runCommand(cmd); |
1098 |
if (result != 0) { |
1141 |
if (result != 0) { |
1099 |
break; |
1142 |
break; |
1100 |
} |
1143 |
} |
Lines 1110-1116
Link Here
|
1110 |
pkgDataFlags[LIBFLAGS], |
1153 |
pkgDataFlags[LIBFLAGS], |
1111 |
tempObjectFile, |
1154 |
tempObjectFile, |
1112 |
gencmnFile); |
1155 |
gencmnFile); |
1113 |
result = system(cmd); |
1156 |
result = runCommand(cmd); |
1114 |
if (result != 0) { |
1157 |
if (result != 0) { |
1115 |
break; |
1158 |
break; |
1116 |
} |
1159 |
} |
Lines 1139-1145
Link Here
|
1139 |
tempObjectFile, |
1182 |
tempObjectFile, |
1140 |
icudtAll); |
1183 |
icudtAll); |
1141 |
|
1184 |
|
1142 |
result = system(cmd); |
1185 |
result = runCommand(cmd); |
1143 |
if (result == 0) { |
1186 |
if (result == 0) { |
1144 |
sprintf(buffer, "%s %s", |
1187 |
sprintf(buffer, "%s %s", |
1145 |
buffer, |
1188 |
buffer, |
Lines 1222-1228
Link Here
|
1222 |
); |
1265 |
); |
1223 |
} |
1266 |
} |
1224 |
|
1267 |
|
1225 |
return system(cmd); |
1268 |
return runCommand(cmd); |
1226 |
} |
1269 |
} |
1227 |
#endif |
1270 |
#endif |
1228 |
|
1271 |
|