- Timestamp:
- Sep 19, 2006, 6:29:18 AM (19 years ago)
- Location:
- trunk/src/gmake
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gmake/Makefile.kmk
r533 r535 30 30 CONFIG_WITH_VALUE_LENGTH \ 31 31 CONFIG_WITH_COMPARE 32 kmk_DEFS.win32 = HAVE_CYGWIN_SHELL 33 kmk_DEFS.win64 = HAVE_CYGWIN_SHELL 32 34 33 35 kmk_SOURCES = \ … … 272 274 echo "4" 273 275 274 # shell double and single quoting check. 276 277 # 278 # Shell execution tests. 279 # 280 test_shell: test_shell_quoting test_shell_newline 281 282 # shell double and single quoting check (was busted on windows in 3.81). 275 283 test_shell_quoting: 284 $(ECHO_EXT) "double quoted sTrInG" 276 285 $(ECHO_EXT) "double quoted sTrInG" | $(SED_EXT) -e "s/sTrInG/string/g" 277 286 $(ECHO_EXT) 'single quoted sTrInG' | $(SED_EXT) -e 's/sTrInG/string/g' 278 287 $(ECHO) "This string should not be printed with double quotes." 279 288 $(ECHO) 'This string should not be printed with single quotes.' 289 290 # when using batch mode shell, the newline got escaped twice and spoiling everything. 291 test_shell_newline: 292 $(ECHO_EXT) "foo foo foo" | $(SED_EXT) -e \ 293 's/foo/$@/' -e \ 294 's/foo/works/' \ 295 -e 's/foo/\!/' 296 -
trunk/src/gmake/job.c
r521 r535 2549 2549 # ifndef KMK 2550 2550 goto slow; 2551 # else /* KMK */2551 # else /* KMK */ 2552 2552 { 2553 2553 /* Allow ash from kBuild. */ … … 2904 2904 { 2905 2905 *(ap++) = '\\'; 2906 #ifdef KMK /* see test in Makefile.kmk, required on windows. */ 2907 if (!batch_mode_shell) 2908 #endif 2906 2909 *(ap++) = '\\'; 2907 2910 *(ap++) = '\n'; -
trunk/src/gmake/main.c
r534 r535 893 893 } 894 894 895 #if def KMK895 #if 0/* def KMK - has been fixed in sub_proc.c */ 896 896 /* WORKAROUND: 897 897 With GNU Make 3.81, this kludge was necessary to get double quotes -
trunk/src/gmake/w32/subproc/sub_proc.c
r503 r535 1073 1073 */ 1074 1074 bytes_required++; 1075 #ifdef KMK /* for the space before the final " in case we need it. */ 1076 bytes_required++; 1077 #endif 1075 1078 1076 1079 command_line = (char*) malloc(bytes_required); … … 1117 1120 } else { 1118 1121 1119 /*1120 * We have to insert a backslash for the "1121 * and each \ that precedes the ".1122 */1123 backslash_count++;1124 1125 while(backslash_count) {1126 *(command_line_i++) = '\\';1127 backslash_count--;1128 };1122 /* 1123 * We have to insert a backslash for the " 1124 * and each \ that precedes the ". 1125 */ 1126 backslash_count++; 1127 1128 while(backslash_count) { 1129 *(command_line_i++) = '\\'; 1130 backslash_count--; 1131 }; 1129 1132 } 1130 1133 #if !defined(HAVE_MKS_SHELL) && !defined(HAVE_CYGWIN_SHELL) … … 1152 1155 }; 1153 1156 #endif 1157 #ifdef KMK 1158 /* 1159 * ash it put off by echo "hello world" ending up as: 1160 * G:/.../kmk_ash.exe -c "echo ""hello world""" 1161 * It wants a space before the last '"'. 1162 * (The 'test_shell' goals in Makefile.kmk tests this problem.) 1163 */ 1164 if (command_line_i[-1] == '\"' && cygwin_mode && have_sh && !argvi[1]) { 1165 *(command_line_i++) = ' '; 1166 } 1167 #endif 1154 1168 *(command_line_i++) = '\"'; 1155 1169 }
Note:
See TracChangeset
for help on using the changeset viewer.