Changeset 225 in kBuild
- Timestamp:
- Feb 9, 2005 8:31:14 AM (20 years ago)
- Location:
- trunk/src/gmake
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gmake/Makefile.kmk
r202 r225 27 27 CONFIG_NO_DEFAULT_TERMINAL_RULES \ 28 28 CONFIG_NO_DEFAULT_SUFFIX_RULES \ 29 CONFIG_NO_DEFAULT_VARIABLES 29 CONFIG_NO_DEFAULT_VARIABLES \ 30 CONFIG_WITH_KMK_BUILTIN 30 31 kmk_DEFS.win32 = WINDOWS32 _CONSOLE WIN32 31 32 kmk_DEFS.win32.release = NDEBUG 32 33 33 kmk_LDFLAGS.linux.release = -s 34 kmk_LDFLAGS.linux.release = -s 34 35 kmk_LDFLAGS.os2 = -Zhigh-mem -Zstack=1024 35 36 kmk_LDFLAGS.os2.release = -s … … 42 43 $(PATH_DEV)/x86.win32/sdk200209/lib/Kernel32.Lib \ 43 44 $(PATH_DEV)/x86.win32/sdk200209/lib/User32.Lib \ 44 $(PATH_DEV)/x86.win32/sdk200209/lib/AdvAPI32.Lib 45 $(PATH_DEV)/x86.win32/sdk200209/lib/AdvAPI32.Lib 45 46 46 47 kmk_SOURCES = \ … … 65 66 version.c \ 66 67 vpath.c \ 67 remote-stub.c 68 remote-stub.c \ 69 kmkbuiltin.c 68 70 69 71 kmk_SOURCES.os2 = \ -
trunk/src/gmake/commands.c
r154 r225 350 350 flags |= COMMANDS_RECURSE; 351 351 } 352 #ifdef CONFIG_WITH_KMK_BUILTIN 353 if (!strncmp(p, "kmk_builtin_", sizeof("kmk_builtin_") - 1)) 354 flags |= COMMANDS_BUILTIN; 355 #endif 352 356 353 357 cmds->lines_flags[idx] = flags; -
trunk/src/gmake/commands.h
r217 r225 36 36 #define COMMANDS_SILENT 2 /* Silent: @. */ 37 37 #define COMMANDS_NOERROR 4 /* No errors: -. */ 38 #define COMMANDS_NOTPARALLEL 64 /* kmk: the commands must be executed alone. */ 38 #define COMMANDS_NOTPARALLEL 32 /* kmk: the commands must be executed alone. */ 39 #define COMMANDS_BUILTIN 64 /* kmk: builtin command. */ 39 40 40 41 extern void execute_file_commands PARAMS ((struct file *file)); -
trunk/src/gmake/job.c
r218 r225 28 28 #include "variable.h" 29 29 #include "debug.h" 30 #ifdef CONFIG_WITH_KMK_BUILTIN 31 #include "kmkbuiltin.h" 32 #endif 33 30 34 31 35 #include <string.h> … … 965 969 child->noerror = 1; 966 970 else if (!isblank ((unsigned char)*p)) 967 break; 971 { 972 #ifdef CONFIG_WITH_KMK_BUILTIN 973 if ( !(flags & COMMANDS_BUILTIN) 974 && !strncmp(p, "kmk_builtin_", sizeof("kmk_builtin_") - 1)) 975 flags |= COMMANDS_BUILTIN; 976 #endif /* CONFIG_WITH_KMK_BUILTIN */ 977 break; 978 } 968 979 ++p; 969 980 } … … 1095 1106 goto next_command; 1096 1107 } 1108 1109 #ifdef CONFIG_WITH_KMK_BUILTIN 1110 /* If builtin command then pass it on to the builtin shell interpreter. */ 1111 1112 if ((flags & COMMANDS_BUILTIN) && !just_print_flag) 1113 { 1114 char **p2 = argv; 1115 while (*p2 && strncmp(*p2, "kmk_builtin_", sizeof("kmk_builtin_") - 1)) 1116 p2++; 1117 assert(*p2); 1118 set_command_state (child->file, cs_running); 1119 int rc = kmk_builtin_command(p2); 1120 #ifndef VMS 1121 free (argv[0]); 1122 free ((char *) argv); 1123 #endif 1124 if (!rc) 1125 goto next_command; 1126 child->file->update_status = 2; 1127 notice_finished_file (child->file); 1128 return; 1129 } 1130 #endif /* CONFIG_WITH_KMK_BUILTIN */ 1097 1131 1098 1132 /* Flush the output streams so they won't have things written twice. */ … … 1388 1422 { 1389 1423 struct file *f = c->file; 1424 DB (DB_KMK, (_("start_waiting_job %p (`%s') command_flags=%#x\n"), c, c->file->name, c->file->command_flags)); 1390 1425 1391 1426 /* If we can start a job remotely, we always want to, and don't care about … … 1397 1432 /* If we are running at least one job already and the load average 1398 1433 is too high, make this one wait. */ 1399 if (!c->remote && job_slots_used > 0 && 1434 if (!c->remote && job_slots_used > 0 && 1400 1435 (not_parallel || (c->file->command_flags & COMMANDS_NOTPARALLEL) || load_too_high ())) 1401 1436 { … … 1405 1440 c->next = waiting_jobs; 1406 1441 if (c->next && (c->file->command_flags & COMMANDS_NOTPARALLEL)) 1407 { 1442 { 1408 1443 struct child *prev = waiting_jobs; 1409 1444 while (prev->next) … … 1414 1449 else 1415 1450 waiting_jobs = c; 1451 DB (DB_KMK, (_("queued child %p (`%s')\n"), c, c->file->name)); 1416 1452 return 0; 1417 1453 } -
trunk/src/gmake/variable.c
r53 r225 654 654 ? "" : remote_description); 655 655 (void) define_variable ("MAKE_VERSION", 12, buf, o_default, 0); 656 657 /* Define KMK_VERSION to indicate kMk. */ 658 (void) define_variable ("KMK_VERSION", 11, buf, o_default, 0); 659 660 #ifdef CONFIG_WITH_KMK_BUILTIN 661 /* The kMk Builtin Level. */ 662 (void) define_variable ("KMK_BUILTIN", 11, "1", o_default, 0); 663 #endif 656 664 657 665 #ifdef __MSDOS__
Note:
See TracChangeset
for help on using the changeset viewer.