Changeset 46 for trunk/src/kmk/parse.c
- Timestamp:
- Apr 4, 2003, 2:03:50 AM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/parse.c
r45 r46 103 103 #include "pathnames.h" 104 104 105 #if defined(NMAKE) || defined(KMK)106 #define SUPPORT_INLINEFILES 1107 #endif108 105 109 106 /* … … 118 115 static Boolean inLine; /* true if currently in a dependency 119 116 * line or its commands */ 120 #if defined( NMAKE) || defined(KMK)117 #if defined(USE_INLINEFILES) 121 118 static Boolean inInlineFile; /* true if currently in a inline file.*/ 122 119 #endif … … 165 162 Includes, /* .INCLUDES */ 166 163 Interrupt, /* .INTERRUPT */ 164 #ifdef USE_ARCHIVES 167 165 Libs, /* .LIBS */ 166 #endif 168 167 MFlags, /* .MFLAGS or .MAKEFLAGS */ 169 168 Main, /* .MAIN and we don't have anything user-specified to … … 219 218 { ".INVISIBLE", Attribute, OP_INVISIBLE }, 220 219 { ".JOIN", Attribute, OP_JOIN }, 220 #ifdef USE_ARCHIVES 221 221 { ".LIBS", Libs, 0 }, 222 #endif 222 223 { ".MAIN", Main, 0 }, 223 224 { ".MAKE", Attribute, OP_MAKE }, … … 256 257 static void ParseDoDependency __P((char *)); 257 258 static int ParseAddCmd __P((ClientData, ClientData)); 258 #ifdef SUPPORT_INLINEFILES259 #ifdef USE_INLINEFILES 259 260 static int ParseAppendInline __P((ClientData, ClientData)); 260 261 static Boolean ParseCmdIsComponent __P((const char *, const char *)); … … 740 741 * a list of .PATH targets */ 741 742 int tOp; /* operator from special target */ 743 #ifdef USE_ARCHIVES 742 744 Lst sources; /* list of archive source names after 743 745 * expansion */ 746 #endif 744 747 Lst curTargs; /* list of target names to be found and added 745 748 * to the targets list */ … … 783 786 } 784 787 if (*cp == '(') { 788 #ifdef USE_ARCHIVES 785 789 /* 786 790 * Archives must be handled specially to make sure the OP_ARCHV … … 797 801 "Error in archive specification: \"%s\"", line); 798 802 return; 799 } else {803 } else 800 804 continue; 801 } 805 #else 806 Parse_Error(PARSE_FATAL, "Archives are not supported!", line); 807 return; 808 #endif /* USE_ARCHIVES */ 802 809 } 803 810 savec = *cp; … … 1089 1096 } else if (specType == ExShell) { 1090 1097 #ifdef KMK 1091 Parse_Error(PARSE_FATAL, "s pecification not supported by kMk!");1098 Parse_Error(PARSE_FATAL, "shell specification not supported by kMk!"); 1092 1099 return; 1093 1100 #else … … 1106 1113 */ 1107 1114 if ((specType == Suffixes) || (specType == ExPath) || 1108 (specType == Includes) || (specType == Libs) || 1115 (specType == Includes) || 1116 #ifdef USE_ARCHIVES 1117 (specType == Libs) || 1118 #endif 1109 1119 (specType == Null)) 1110 1120 { … … 1150 1160 Suff_AddInclude (line); 1151 1161 break; 1162 #ifdef USE_ARCHIVES 1152 1163 case Libs: 1153 1164 Suff_AddLib (line); 1154 1165 break; 1166 #endif 1155 1167 case Null: 1156 1168 Suff_SetNull (line); … … 1193 1205 1194 1206 if (*cp == '(') { 1207 #ifdef USE_ARCHIVES 1195 1208 GNode *gn; 1196 1209 … … 1208 1221 Lst_Destroy (sources, NOFREE); 1209 1222 cp = line; 1223 #else 1224 Parse_Error(PARSE_FATAL, "Archives are not supported!", line); 1225 return; 1226 #endif /* USE_ARCHIVES */ 1210 1227 } else { 1211 1228 if (*cp) { … … 1528 1545 1529 1546 1530 #ifdef SUPPORT_INLINEFILES1547 #ifdef USE_INLINEFILES 1531 1548 /*- 1532 1549 * ParseAppendInline -- … … 2256 2273 semiNL = FALSE; 2257 2274 ignDepOp = FALSE; 2258 #ifdef SUPPORT_INLINEFILES2275 #ifdef USE_INLINEFILES 2259 2276 ignComment = inInlineFile; 2260 2277 #else … … 2271 2288 for (;;) { 2272 2289 c = ParseReadc(); 2273 #ifdef SUPPORT_INLINEFILES2290 #ifdef USE_INLINEFILES 2274 2291 if (inInlineFile) 2275 2292 break; … … 2306 2323 switch(c) { 2307 2324 case '\n': 2308 #ifdef SUPPORT_INLINEFILES2325 #ifdef USE_INLINEFILES 2309 2326 /* No newline escaping in inline files, unless it's a directive. */ 2310 2327 if (inInlineFile) { … … 2367 2384 #ifndef KMK 2368 2385 case ';': 2369 #ifdef SUPPORT_INLINEFILES2386 #ifdef USE_INLINEFILES 2370 2387 if (inInlineFile) 2371 2388 break; … … 2389 2406 break; 2390 2407 case '=': 2391 #ifdef SUPPORT_INLINEFILES2408 #ifdef USE_INLINEFILES 2392 2409 if (inInlineFile) 2393 2410 break; … … 2442 2459 case ':': 2443 2460 case '!': 2444 #ifdef SUPPORT_INLINEFILES2461 #ifdef USE_INLINEFILES 2445 2462 if (inInlineFile) 2446 2463 break; … … 2479 2496 * a '\' 2480 2497 */ 2481 #ifdef SUPPORT_INLINEFILES2498 #ifdef USE_INLINEFILES 2482 2499 if (!inInlineFile) { 2483 2500 #endif … … 2491 2508 } 2492 2509 *ep = 0; 2493 #ifdef SUPPORT_INLINEFILES2510 #ifdef USE_INLINEFILES 2494 2511 } 2495 2512 #endif … … 2604 2621 2605 2622 inLine = FALSE; 2606 #if defined( NMAKE) || defined(KMK)2623 #if defined(USE_INLINEFILES) 2607 2624 inInlineFile = FALSE; 2608 2625 #endif … … 2652 2669 } 2653 2670 2654 #ifdef SUPPORT_INLINEFILES2671 #ifdef USE_INLINEFILES 2655 2672 if (inInlineFile) 2656 2673 { … … 2702 2719 * a creation command. 2703 2720 */ 2704 #if !defined(POSIX) || defined( NMAKE)2721 #if !defined(POSIX) || defined(USE_NO_STUPID_TABS) 2705 2722 shellCommand: 2706 2723 #endif … … 2710 2727 if (*cp) { 2711 2728 if (inLine) { 2712 #ifdef SUPPORT_INLINEFILES2729 #ifdef USE_INLINEFILES 2713 2730 if (ParseCmdIsComponent(cp, "<<")) 2714 2731 { … … 2757 2774 * and add it to the current list of targets. 2758 2775 */ 2759 #if !defined(POSIX) || defined( NMAKE) || defined(KMK)2776 #if !defined(POSIX) || defined(USE_NO_STUPID_TABS) 2760 2777 Boolean nonSpace = FALSE; 2761 2778 #endif … … 2769 2786 goto nextLine; 2770 2787 } 2771 #if !defined(POSIX) || defined( NMAKE) || defined(KMK)2788 #if !defined(POSIX) || defined(USE_NO_STUPID_TABS) 2772 2789 while ((*cp != ':') && (*cp != '!') && (*cp != '\0')) { 2773 2790 nonSpace = TRUE; … … 2777 2794 } 2778 2795 2779 #if !defined(POSIX) || defined( NMAKE) || defined(KMK)2796 #if !defined(POSIX) || defined(USE_NO_STUPID_TABS) 2780 2797 if (*cp == '\0') { 2781 2798 if (inLine) { 2782 #if !defined( NMAKE) && !defined(KMK)2799 #if !defined(USE_NO_STUPID_TABS) 2783 2800 Parse_Error (PARSE_WARNING, 2784 2801 "Shell command needs a leading tab"); … … 2806 2823 2807 2824 ParseDoDependency (line); 2808 #if !defined(POSIX) || defined( NMAKE) || defined(KMK)2825 #if !defined(POSIX) || defined(USE_NO_STUPID_TABS) 2809 2826 } 2810 2827 #endif
Note:
See TracChangeset
for help on using the changeset viewer.