Changeset 227 for trunk/src/gmake/job.c


Ignore:
Timestamp:
Feb 9, 2005, 11:21:34 AM (20 years ago)
Author:
bird
Message:

builtin stuff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gmake/job.c

    r225 r227  
    490490      int child_failed;
    491491      int any_remote, any_local;
    492 #ifdef MAKE_DLLSHELL
    493       struct child *dllshelled_child = 0;
     492#if defined(CONFIG_WITH_KMK_BUILTIN) || defined(MAKE_DLLSHELL)
     493      struct child *completed_child = 0;
    494494#endif
    495495
     
    527527          any_remote |= c->remote;
    528528          any_local |= ! c->remote;
    529 #ifdef MAKE_DLLSHELL
    530           if (c->dllshell_done)
    531             dllshelled_child = c;
     529#if defined(CONFIG_WITH_KMK_BUILTIN) || defined(MAKE_DLLSHELL)
     530          if (c->have_status)
     531              completed_child = c;
    532532#endif
    533533          DB (DB_JOBS, (_("Live child 0x%08lx (%s) PID %ld %s\n"),
     
    557557        {
    558558          /* No remote children.  Check for local children.  */
    559 #ifdef MAKE_DLLSHELL
    560           if (dllshelled_child)
     559#if defined(CONFIG_WITH_KMK_BUILTIN) || defined(MAKE_DLLSHELL)
     560          if (completed_child)
    561561            {
    562               pid = dllshelled_child->pid;
    563               status = (WAIT_T)dllshelled_child->status;
     562              pid = completed_child->pid;
     563              status = (WAIT_T)completed_child->status;
    564564            }
    565565          else
     
    11121112  if ((flags & COMMANDS_BUILTIN) && !just_print_flag)
    11131113    {
     1114      int    rc;
    11141115      char **p2 = argv;
    11151116      while (*p2 && strncmp(*p2, "kmk_builtin_", sizeof("kmk_builtin_") - 1))
     
    11171118      assert(*p2);
    11181119      set_command_state (child->file, cs_running);
    1119       int rc = kmk_builtin_command(p2);
     1120      if (p2 != argv)
     1121          rc = kmk_builtin_command(*p2);
     1122      else
     1123      {
     1124          int argc = 1;
     1125          while (argv[argc])
     1126              argc++;
     1127          rc = kmk_builtin_command_parsed(argc, argv);
     1128      }
     1129      printf("rc=%d\n", rc);
    11201130#ifndef VMS
    11211131      free (argv[0]);
     
    11241134      if (!rc)
    11251135          goto next_command;
    1126       child->file->update_status = 2;
    1127       notice_finished_file (child->file);
     1136      child->pid = (pid_t)42424242;
     1137      child->status = rc << 8;
     1138      child->have_status = 1;
    11281139      return;
    11291140    }
Note: See TracChangeset for help on using the changeset viewer.