Changeset 30 for trunk/src/kmk/parse.c
- Timestamp:
- Nov 30, 2002, 7:53:42 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/parse.c
r27 r30 2172 2172 lineno++; 2173 2173 lastc = ' '; 2174 #ifdef NMAKE 2175 do { 2176 while ((c = ParseReadc ()) == ' ' || c == '\t') { 2177 continue; 2178 } 2179 if (c != '#') 2180 break; 2181 /* comment - skip line */ 2182 while ((c = ParseReadc ()) != '\n' && c != EOF) { 2183 continue; 2184 } 2185 if (c == EOF) 2186 break; 2187 } while (1); 2188 #else 2174 2189 while ((c = ParseReadc ()) == ' ' || c == '\t') { 2175 2190 continue; 2176 2191 } 2192 #endif 2177 2193 if (c == EOF || c == '\n') { 2178 2194 goto line_read; … … 2297 2313 *ep = 0; 2298 2314 2315 #ifdef NMAKE 2316 if (line[0] == '.' || line[0] == '!') { 2317 #else 2299 2318 if (line[0] == '.') { 2319 #endif 2300 2320 /* 2301 2321 * The line might be a conditional. Ask the conditional module … … 2409 2429 do { 2410 2430 while ((line = ParseReadLine ()) != NULL) { 2431 //debugkso: fprintf(stderr, "%s(%d): inLine=%d line=%s\n", fname, lineno, inLine, line); 2411 2432 if (*line == '.') { 2412 2433 /* … … 2450 2471 * a creation command. 2451 2472 */ 2452 #if ndef POSIX2473 #if !defined(POSIX) || defined(NMAKE) 2453 2474 shellCommand: 2454 2475 #endif … … 2496 2517 * and add it to the current list of targets. 2497 2518 */ 2498 #if ndef POSIX2519 #if !defined(POSIX) || defined(NMAKE) 2499 2520 Boolean nonSpace = FALSE; 2500 2521 #endif … … 2508 2529 goto nextLine; 2509 2530 } 2510 #if ndef POSIX2531 #if !defined(POSIX) || defined(NMAKE) 2511 2532 while ((*cp != ':') && (*cp != '!') && (*cp != '\0')) { 2512 2533 nonSpace = TRUE; … … 2516 2537 } 2517 2538 2518 #if ndef POSIX2539 #if !defined(POSIX) || defined(NMAKE) 2519 2540 if (*cp == '\0') { 2520 2541 if (inLine) { 2542 #ifndef NMAKE 2521 2543 Parse_Error (PARSE_WARNING, 2522 2544 "Shell command needs a leading tab"); 2545 #endif 2523 2546 goto shellCommand; 2524 2547 } else if (nonSpace) { … … 2543 2566 2544 2567 ParseDoDependency (line); 2545 #if ndef POSIX2568 #if !defined(POSIX) || defined(NMAKE) 2546 2569 } 2547 2570 #endif
Note:
See TracChangeset
for help on using the changeset viewer.