=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/job.c,v retrieving revision 1.85 retrieving revision 1.86 diff -c -r1.85 -r1.86 *** src/usr.bin/make/job.c 2007/09/23 12:49:04 1.85 --- src/usr.bin/make/job.c 2007/09/23 12:51:59 1.86 *************** *** 1,5 **** /* $OpenPackages$ */ ! /* $OpenBSD: job.c,v 1.85 2007/09/23 12:49:04 espie Exp $ */ /* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */ /* --- 1,5 ---- /* $OpenPackages$ */ ! /* $OpenBSD: job.c,v 1.86 2007/09/23 12:51:59 espie Exp $ */ /* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */ /* *************** *** 291,297 **** static void JobExec(Job *, char **); static void JobMakeArgv(Job *, char **); static void JobRestart(Job *); ! static int JobStart(GNode *, int, Job *); static char *JobOutput(Job *, char *, char *, int); static void JobDoOutput(Job *, bool); static void JobInterrupt(int, int); --- 291,297 ---- static void JobExec(Job *, char **); static void JobMakeArgv(Job *, char **); static void JobRestart(Job *); ! static int JobStart(GNode *, int); static char *JobOutput(Job *, char *, char *, int); static void JobDoOutput(Job *, bool); static void JobInterrupt(int, int); *************** *** 1179,1204 **** */ static int JobStart(GNode *gn, /* target to create */ ! int flags, /* flags for the job to override normal ones. ! * e.g. JOB_SPECIAL or JOB_IGNDOTS */ ! Job *previous) /* The previous Job structure for this node, ! * if any. */ { Job *job; /* new job descriptor */ char *argv[4]; /* Argument vector to shell */ bool cmdsOK; /* true if the nodes commands were all right */ bool noExec; /* Set true if we decide not to run the job */ ! if (previous != NULL) { ! previous->flags &= ~(JOB_FIRST|JOB_IGNERR|JOB_SILENT); ! job = previous; ! } else { ! job = emalloc(sizeof(Job)); ! if (job == NULL) { ! Punt("JobStart out of memory"); ! } ! flags |= JOB_FIRST; } job->node = gn; job->tailCmds = NULL; --- 1179,1197 ---- */ static int JobStart(GNode *gn, /* target to create */ ! int flags) /* flags for the job to override normal ones. ! * e.g. JOB_SPECIAL */ { Job *job; /* new job descriptor */ char *argv[4]; /* Argument vector to shell */ bool cmdsOK; /* true if the nodes commands were all right */ bool noExec; /* Set true if we decide not to run the job */ ! job = emalloc(sizeof(Job)); ! if (job == NULL) { ! Punt("JobStart out of memory"); } + flags |= JOB_FIRST; job->node = gn; job->tailCmds = NULL; *************** *** 1717,1723 **** void Job_Make(GNode *gn) { ! (void)JobStart(gn, 0, NULL); } /*- --- 1710,1716 ---- void Job_Make(GNode *gn) { ! (void)JobStart(gn, 0); } /*- *************** *** 1799,1805 **** #endif if ((begin_node->type & OP_DUMMY) == 0) { ! JobStart(begin_node, JOB_SPECIAL, (Job *)0); while (nJobs) { Job_CatchOutput(); Job_CatchChildren(); --- 1792,1798 ---- #endif if ((begin_node->type & OP_DUMMY) == 0) { ! JobStart(begin_node, JOB_SPECIAL); while (nJobs) { Job_CatchOutput(); Job_CatchChildren(); *************** *** 1898,1904 **** if ((interrupt_node->type & OP_DUMMY) == 0) { ignoreErrors = false; ! JobStart(interrupt_node, JOB_IGNDOTS, (Job *)0); while (nJobs) { Job_CatchOutput(); Job_CatchChildren(); --- 1891,1897 ---- if ((interrupt_node->type & OP_DUMMY) == 0) { ignoreErrors = false; ! JobStart(interrupt_node, JOB_IGNDOTS); while (nJobs) { Job_CatchOutput(); Job_CatchChildren(); *************** *** 1930,1936 **** if (errors) { Error("Errors reported so .END ignored"); } else { ! JobStart(end_node, JOB_SPECIAL | JOB_IGNDOTS, NULL); while (nJobs) { Job_CatchOutput(); --- 1923,1929 ---- if (errors) { Error("Errors reported so .END ignored"); } else { ! JobStart(end_node, JOB_SPECIAL | JOB_IGNDOTS); while (nJobs) { Job_CatchOutput();