- Timestamp:
- Apr 4, 2003, 2:03:50 AM (22 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/arch.c
r35 r46 117 117 # endif 118 118 #endif 119 120 #ifdef USE_ARCHIVES 121 119 122 120 123 static Lst archives; /* Lst of archives we've already examined */ … … 1253 1256 Lst_Destroy(archives, ArchFree); 1254 1257 } 1258 1259 #endif /* USE_ARCHIVES */ -
trunk/src/kmk/config.h
r25 r46 120 120 # endif 121 121 #endif 122 123 124 125 126 127 /* 128 * Inline file support. 129 */ 130 #if defined(NMAKE) || defined(KMK) 131 #define USE_INLINEFILES 1 132 #endif 133 134 135 /* 136 * No requirement to use tabs in front of commands. 137 */ 138 #if defined(NMAKE) || defined(KMK) 139 #define USE_NO_STUPID_TABS 1 140 #endif 141 142 143 /* 144 * Use the archive stuff. 145 */ 146 #if !defined(NMAKE) && !defined(KMK) 147 #define USE_ARCHIVES 1 148 #endif 149 150 151 /* 152 * USE_PARENTS 153 * If defined .PARENTS (^) is defined a local variable. 154 */ 155 #if defined(KMK) 156 #define USE_PARENTS 1 157 #endif 158 159 160 /* 161 * MAKE_NAME 162 * The name of the make program as shown in the messages. 163 */ 164 #if defined(KMK) 165 #define MAKE_NAME "kMk" 166 #else 167 #define MAKE_NAME "make" 168 #endif 169 170 171 -
trunk/src/kmk/dir.c
r35 r46 978 978 Hash_Entry *entry; 979 979 980 #ifdef USE_ARCHIVES 980 981 if (gn->type & OP_ARCHV) { 981 982 return Arch_MTime (gn); 982 } else if (gn->path == (char *)NULL) { 983 } else 984 #endif 985 if (gn->path == (char *)NULL) { 983 986 fullName = Dir_FindFile (gn->name, dirSearchPath); 984 987 } else { … … 1004 1007 Hash_DeleteEntry(&mtimes, entry); 1005 1008 } else if (stat (fullName, &stb) < 0) { 1009 #ifdef USE_ARCHIVES 1006 1010 if (gn->type & OP_MEMBER) { 1007 1011 if (fullName != gn->path) 1008 1012 efree(fullName); 1009 1013 return Arch_MemMTime (gn); 1010 } else { 1014 } else 1015 #endif 1011 1016 stb.st_mtime = 0; 1012 }1013 1017 } 1014 1018 if (fullName && gn->path == (char *)NULL) { -
trunk/src/kmk/job.c
r45 r46 1067 1067 } 1068 1068 1069 #ifdef USE_ARCHIVES 1069 1070 if (gn->type & OP_ARCHV) { 1070 1071 Arch_Touch(gn); … … 1072 1073 Arch_TouchLib(gn); 1073 1074 } else { 1075 #else 1076 { 1077 #endif 1078 1074 1079 char *file = gn->path ? gn->path : gn->name; 1075 1080 … … 1120 1125 /* Function to abort with message */ 1121 1126 { 1122 if (OP_NOP(gn->type) && Lst_IsEmpty(gn->commands) && 1123 (gn->type & OP_LIB) == 0) { 1127 if (OP_NOP(gn->type) && Lst_IsEmpty(gn->commands) 1128 #ifdef USE_ARCHIVES 1129 && (gn->type & OP_LIB) == 0 1130 #endif 1131 ) 1132 { 1124 1133 /* 1125 1134 * No commands. Look for .DEFAULT rule from which we might infer … … 1148 1157 * this node's parents so they never get examined. 1149 1158 */ 1150 static const char msg[] = "make: don't know how to make";1159 static const char msg[] = MAKE_NAME ": don't know how to make"; 1151 1160 1152 1161 if (gn->type & OP_OPTIONAL) { … … 1162 1171 (*abortProc)("Not war."); 1163 1172 #if defined(NMAKE) || defined(KMK) 1164 else if (strcmp(gn->name,"fire") == 0)1173 else if (strcmp(gn->name,"fire") == 0) 1165 1174 (*abortProc)("No match."); 1166 1175 #endif 1167 else1176 else 1168 1177 #endif 1169 1178 (*abortProc)("%s %s. Stop", msg, gn->name); -
trunk/src/kmk/kMk-emx.mak
r45 r46 3 3 4 4 CC = gcc 5 #CC = gcc -Zomf5 CC = gcc -Zomf 6 6 CFLAGS = -g -I. -I./include -I../kLib/Generic/include \ 7 7 # -DUSE_KLIB \ 8 8 -Dregister= \ 9 9 -DKMK \ 10 -DOS2 -D__i386__ -D__32BIT__ -DNMAKE -DMACHINE=\"ibmos2\" -DMACHINE_ARCH=\"x86\" -DMACHINE_CPU=\"386\" \ 10 # -DNMAKE \ 11 -DOS2 -D__i386__ -D__32BIT__ -DMACHINE=\"ibmos2\" -DMACHINE_ARCH=\"x86\" -DMACHINE_CPU=\"386\" \ 11 12 12 13 OBJDIR=obj.ke -
trunk/src/kmk/main.c
r45 r46 275 275 break; 276 276 case 'a': 277 #ifdef USE_ARCHIVES 277 278 debug |= DEBUG_ARCH; 279 #endif /* else ignore */ 278 280 break; 279 281 case 'c': … … 606 608 607 609 if (uname(&utsname) == -1) { 608 perror( "make: uname");610 perror(MAKE_NAME ": uname"); 609 611 exit(2); 610 612 } … … 775 777 * parsing the makefile(s) 776 778 */ 779 #ifdef USE_ARCHIVES 777 780 Arch_Init(); 781 #endif 778 782 Targ_Init(); 779 783 Suff_Init(); … … 855 859 sysMkPath = Lst_Init (FALSE); 856 860 Dir_Expand (_PATH_DEFSYSMK, sysIncPath, sysMkPath); 857 861 #ifdef NMAKE 858 862 if (!Lst_IsEmpty(sysMkPath)) 859 863 { 860 864 ln = Lst_Find(sysMkPath, (ClientData)NULL, ReadMakefile); 861 865 if (ln != NILLNODE) 862 Fatal( "make: cannot open %s.", (char *)Lst_Datum(ln));866 Fatal(MAKE_NAME ": cannot open %s.", (char *)Lst_Datum(ln)); 863 867 } 864 /* Fatal("make: no system rules (%s).", _PATH_DEFSYSMK); */ 865 #else 868 869 #elif defined(KMK) 870 if (!Lst_IsEmpty(sysMkPath)) 871 { 872 ln = Lst_Find(sysMkPath, (ClientData)NULL, ReadMakefile); 873 if (ln != NILLNODE) 874 Fatal(MAKE_NAME ": cannot open %s.", (char *)Lst_Datum(ln)); 875 876 } 877 Error(MAKE_NAME ": no config rules (%s).", _PATH_DEFSYSMK); 878 #else 866 879 if (Lst_IsEmpty(sysMkPath)) 867 Fatal( "make: no system rules (%s).", _PATH_DEFSYSMK);880 Fatal(MAKE_NAME ": no system rules (%s).", _PATH_DEFSYSMK); 868 881 ln = Lst_Find(sysMkPath, (ClientData)NULL, ReadMakefile); 869 882 if (ln != NILLNODE) 870 Fatal( "make: cannot open %s.", (char *)Lst_Datum(ln));871 883 Fatal(MAKE_NAME ": cannot open %s.", (char *)Lst_Datum(ln)); 884 #endif 872 885 } 873 886 … … 877 890 ln = Lst_Find(makefiles, (ClientData)NULL, ReadMakefile); 878 891 if (ln != NILLNODE) 879 Fatal( "make: cannot open %s.", (char *)Lst_Datum(ln));892 Fatal(MAKE_NAME ": cannot open %s.", (char *)Lst_Datum(ln)); 880 893 } else 881 894 #ifdef KMK … … 1025 1038 Suff_End(); 1026 1039 Targ_End(); 1040 #ifdef USE_ARCHIVES 1027 1041 Arch_End(); 1042 #endif 1028 1043 str_end(); 1029 1044 Var_End(); … … 1357 1372 #endif 1358 1373 1359 (void)fprintf(stderr, "make: ");1374 (void)fprintf(stderr, MAKE_NAME ": "); 1360 1375 (void)vfprintf(stderr, fmt, ap); 1361 1376 va_end(ap); … … 1503 1518 (void)fprintf(stderr, "%s\n%s\n%s\n" 1504 1519 #ifdef NMAKE 1520 "%s\n" 1521 #endif 1522 #ifdef KMK 1505 1523 "%s\n" 1506 1524 #endif … … 1511 1529 #ifdef NMAKE 1512 1530 ,"NMAKE compatible mode enabled." 1513 1531 #endif 1532 #ifdef KMK 1533 ,"kMk extensions enabled." 1514 1534 #endif 1515 1535 ); -
trunk/src/kmk/make.c
r45 r46 194 194 } 195 195 oodate = FALSE; 196 #ifdef USE_ARCHIVES 196 197 } else if (gn->type & OP_LIB) { 197 198 if (DEBUG(MAKE)) { … … 205 206 oodate = Arch_LibOODate (gn) || 206 207 ((gn->cmtime == 0) && (gn->type & OP_DOUBLEDEP)); 208 #endif 207 209 } else if (gn->type & OP_JOIN) { 208 210 /* … … 624 626 625 627 626 #ifdef KMK628 #ifdef USE_PARENTS 627 629 /*- 628 630 *----------------------------------------------------------------------- … … 637 639 */ 638 640 static int 639 MakeAddParents ( cgnp, pgnp)641 MakeAddParents (pgnp, cgnp) 640 642 ClientData pgnp; /* The parent to add to add */ 641 643 ClientData cgnp; /* The child to whose PARENTS variable it should be */ … … 647 649 char *p1 = NULL; 648 650 649 if (OP_NOP(pgn->type)) { 650 /* 651 * this node is only source; use the specific pathname for it 652 */ 651 652 if (OP_NOP(pgn->type) || !(parent = Var_Value(TARGET, pgn, &p1))) { 653 /* this node is only source; use the specific pathname for it */ 653 654 parent = pgn->path ? pgn->path : pgn->name; 654 } 655 else 656 parent = Var_Value(TARGET, pgn, &p1); 655 } 657 656 Var_Append(PARENTS, parent, cgn); 658 657 efree(p1); … … 690 689 { 691 690 Lst_ForEach (gn->children, MakeAddAllSrc, (ClientData) gn); 692 #ifdef KMK 691 #ifdef USE_PARENTS 693 692 Lst_ForEach (gn->parents, MakeAddParents, (ClientData) gn); 694 693 #endif 695 694 696 695 if (!Var_Exists (OODATE, gn)) { -
trunk/src/kmk/make.h
r45 r46 218 218 /* Attributes applied by PMake */ 219 219 #define OP_TRANSFORM 0x80000000 /* The node is a transformation rule */ 220 #ifdef USE_ARCHIVES 220 221 #define OP_MEMBER 0x40000000 /* Target is a member of an archive */ 221 222 #define OP_LIB 0x20000000 /* Target is a library */ 222 223 #define OP_ARCHV 0x10000000 /* Target is an archive construct */ 224 #endif 223 225 #define OP_HAS_COMMANDS 0x08000000 /* Target has all the commands it should. 224 226 * Used when parsing to catch multiple … … 294 296 #define PARENTS "^" /* Parent of this target (if any) (long name .PARENTS) */ 295 297 #endif 298 #ifdef USE_ARCHIVES 296 299 #define ARCHIVE "!" /* Archive in "archive(member)" syntax */ 297 300 #define MEMBER "%" /* Member in "archive(member)" syntax */ 301 #endif 298 302 299 303 #define FTARGET "@F" /* file part of TARGET */ … … 361 365 */ 362 366 extern int debug; 367 #ifdef USE_ARCHIVES 363 368 #define DEBUG_ARCH 0x0001 369 #endif 364 370 #define DEBUG_COND 0x0002 365 371 #define DEBUG_DIR 0x0004 -
trunk/src/kmk/nonints.h
r35 r46 41 41 42 42 /* arch.c */ 43 #ifdef USE_ARCHIVES 43 44 ReturnStatus Arch_ParseArchive __P((char **, Lst, GNode *)); 44 45 void Arch_Touch __P((GNode *)); … … 50 51 void Arch_Init __P((void)); 51 52 void Arch_End __P((void)); 53 #endif 52 54 53 55 /* compat.c */ … … 110 112 void Suff_DoPaths __P((void)); 111 113 void Suff_AddInclude __P((char *)); 114 #ifdef USE_ARCHIVES 112 115 void Suff_AddLib __P((char *)); 116 #endif 113 117 void Suff_FindDeps __P((GNode *)); 114 118 void Suff_SetNull __P((char *)); -
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 -
trunk/src/kmk/pathnames.h
r45 r46 36 36 37 37 #ifdef KMK 38 # undef _PATH_OBJDIR38 #define _PATH_OBJDIR "obj" 39 39 #undef _PATH_OBJDIRPREFIX 40 40 #undef _PATH_DEFSHELLDIR 41 #define _PATH_DEFSYSMK " Config.kMk"41 #define _PATH_DEFSYSMK "config.kMk" 42 42 #undef _PATH_DEFSYSPATH 43 43 -
trunk/src/kmk/suff.c
r35 r46 117 117 short flags; /* Type of suffix */ 118 118 #define SUFF_INCLUDE 0x01 /* One which is #include'd */ 119 #ifdef USE_ARCHIVES 119 120 #define SUFF_LIBRARY 0x02 /* One which contains a library */ 121 #endif 120 122 #define SUFF_NULL 0x04 /* The empty suffix */ 121 123 Lst searchPath; /* The path along which files of this suffix … … 177 179 static Boolean SuffApplyTransform __P((GNode *, GNode *, Suff *, Suff *)); 178 180 static void SuffFindDeps __P((GNode *, Lst)); 181 #ifdef USE_ARCHIVES 179 182 static void SuffFindArchiveDeps __P((GNode *, Lst)); 183 #endif 180 184 static void SuffFindNormalDeps __P((GNode *, Lst)); 181 185 static int SuffPrintName __P((ClientData, ClientData)); … … 892 896 } 893 897 #endif /* INCLUDES */ 898 #ifdef USE_ARCHIVES 894 899 #ifdef LIBRARIES 895 900 if (s->flags & SUFF_LIBRARY) { … … 897 902 } 898 903 #endif /* LIBRARIES */ 904 #endif 899 905 Dir_Concat(s->searchPath, dirSearchPath); 900 906 } else { … … 944 950 } 945 951 952 #ifdef USE_ARCHIVES 946 953 /*- 947 954 *----------------------------------------------------------------------- … … 973 980 } 974 981 } 982 #endif /* USE_ARCHIVES */ 975 983 976 984 /********** Implicit Source Search Functions *********/ … … 1347 1355 Lst members = Lst_Init(FALSE); 1348 1356 1357 #ifdef USE_ARCHIVES 1349 1358 if (cgn->type & OP_ARCHV) { 1350 1359 /* … … 1356 1365 1357 1366 (void)Arch_ParseArchive(&sacrifice, members, pgn); 1358 } else { 1367 } else 1368 #endif 1369 { 1359 1370 /* 1360 1371 * Break the result into a vector of strings whose nodes … … 1649 1660 1650 1661 1662 #ifdef USE_ARCHIVES 1651 1663 /*- 1652 1664 *----------------------------------------------------------------------- … … 1785 1797 mem->type |= OP_MEMBER; 1786 1798 } 1799 #endif /* USE_ARCHIVES */ 1787 1800 1788 1801 /*- … … 2056 2069 } 2057 2070 2071 #ifdef USE_ARCHIVES 2058 2072 /* 2059 2073 * If the suffix indicates that the target is a library, mark that in … … 2063 2077 gn->type |= OP_LIB; 2064 2078 } 2079 #endif 2065 2080 2066 2081 /* … … 2226 2241 } 2227 2242 2243 #ifdef USE_ARCHIVES 2228 2244 if (gn->type & OP_ARCHV) { 2229 2245 SuffFindArchiveDeps(gn, slst); … … 2257 2273 */ 2258 2274 Var_Set(PREFIX, "", gn); 2259 } else { 2275 } else 2276 #endif /* USE_ARCHIVES */ 2260 2277 SuffFindNormalDeps(gn, slst); 2261 }2262 2278 } 2263 2279 … … 2404 2420 printf ("INCLUDE"); 2405 2421 break; 2422 #ifdef USE_ARCHIVES 2406 2423 case SUFF_LIBRARY: 2407 2424 printf ("LIBRARY"); 2408 2425 break; 2426 #endif 2409 2427 } 2410 2428 fputc(flags ? '|' : ')', stdout); -
trunk/src/kmk/targ.c
r35 r46 166 166 gn->name = estrdup (name); 167 167 gn->path = (char *) 0; 168 #ifdef USE_ARCHIVES 168 169 if (name[0] == '-' && name[1] == 'l') { 169 170 gn->type = OP_LIB; … … 171 172 gn->type = 0; 172 173 } 174 #else 175 gn->type = 0; 176 #endif 173 177 gn->unmade = 0; 174 178 gn->make = FALSE; … … 517 521 PRINTBIT(INVISIBLE); 518 522 PRINTBIT(NOTMAIN); 523 #ifdef USE_ARCHIVES 519 524 PRINTDBIT(LIB); 520 525 /*XXX: MEMBER is defined, so CONCAT(OP_,MEMBER) gives OP_"%" */ 521 526 case OP_MEMBER: if (DEBUG(TARG)) printf(".MEMBER "); break; 522 527 PRINTDBIT(ARCHV); 528 #endif 523 529 } 524 530 } -
trunk/src/kmk/testcase/parent.kMk
r45 r46 1 # infernece rules. 2 .SUFFIXES: .c .o .obj 3 .c.obj: 4 echo compiling $< into $@ for $(.PARENTS) while .IMPSRC is $(.IMPSRC) 1 5 6 # the rules/targets. 2 7 all: parent 3 8 9 parent: child child2 10 echo "parent: $(.PARENTS)" 4 11 5 parent: child 6 echo parent: ${.PARENTS} 12 child: arch.obj 13 echo "child: .PARENTS = $(.PARENTS)" 14 echo "child: .TARGET = $(.TARGET)" 15 echo "child: .IMPSRC = $(.IMPSRC)" 7 16 8 17 9 child: 10 echo child: ${.PARENTS} 11 12 18 child2: arch.obj hash.obj 19 echo "child2: .PARENTS = $(.PARENTS)" 20 echo "child2: .TARGET = $(.TARGET)" 21 echo "child2: .IMPSRC = $(.IMPSRC)" 22 -
trunk/src/kmk/testcase/smoketest.kMk
r45 r46 2 2 3 3 4 notall: # comment4 notall: # comment 5 5 echo notall, but it's the first rule. 6 6 7 8 #.MAIN: all 7 9 8 10 all: -
trunk/src/kmk/var.c
r45 r46 288 288 if (!strcmp(name, ".ALLSRC")) 289 289 name = ALLSRC; 290 #ifdef USE_ARCHIVES 290 291 if (!strcmp(name, ".ARCHIVE")) 291 292 name = ARCHIVE; 293 #endif 292 294 break; 293 295 case 'I': … … 295 297 name = IMPSRC; 296 298 break; 299 #ifdef USE_ARCHIVES 297 300 case 'M': 298 301 if (!strcmp(name, ".MEMBER")) 299 302 name = MEMBER; 300 303 break; 304 #endif 301 305 case 'O': 302 306 if (!strcmp(name, ".OODATE")) … … 306 310 if (!strcmp(name, ".PREFIX")) 307 311 name = PREFIX; 308 #ifdef KMK312 #ifdef USE_PARENTS 309 313 else if (!strcmp(name, ".PARENTS")) 310 314 name = PARENTS; … … 1626 1630 case '!': 1627 1631 return("$(.MEMBER)"); 1628 #ifdef KMK1632 #ifdef USE_PARENTS 1629 1633 case '^': 1630 1634 return("$(.PARENTS)"); … … 1780 1784 case '*': 1781 1785 case '!': 1782 #ifdef KMK1786 #ifdef USE_PARENTS 1783 1787 case '^': 1784 1788 #endif … … 1796 1800 (strncmp(str, ".ARCHIVE", len) == 0) || 1797 1801 (strncmp(str, ".PREFIX", len) == 0) || 1798 #ifdef KMK1802 #ifdef USE_PARENTS 1799 1803 (strncmp(str, ".PARENTS", len) == 0) || 1800 1804 #endif
Note:
See TracChangeset
for help on using the changeset viewer.