Changeset 225 for trunk/src/gmake/job.c
- Timestamp:
- Feb 9, 2005, 9:31:14 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note:
See TracChangeset
for help on using the changeset viewer.