diff options
author | bsiegert <bsiegert@pkgsrc.org> | 2011-06-18 22:17:41 +0000 |
---|---|---|
committer | bsiegert <bsiegert@pkgsrc.org> | 2011-06-18 22:17:41 +0000 |
commit | 7cb16bb66575467ac59352068eaec344242b439a (patch) | |
tree | c8f5dd7d540977ec601c02e7d04c13e80115f641 /devel/bmake/files/job.c | |
parent | 92219014db9b676e01e78bbe73c3877f94f2a471 (diff) | |
download | pkgsrc-7cb16bb66575467ac59352068eaec344242b439a.tar.gz |
Import bmake-20110606. Many changes, among them:
- unit-tests/modts now works on MirBSD
- meta mode
- ApplyModifiers: when we parse a variable which is not the entire modifier
string, or not followed by ':', do not consider it as containing modifiers.
- when long modifiers fail to match, check sysV style.
- :hash - cheap 32bit hash of value
- :localtime, :gmtime - use value as format string for strftime.
- fix for use after free() in CondDoExists().
- boot-strap (TOOL_DIFF): aparently at least on linux distro
formats the output of 'type' differently - so eat any "()"
- correct sysV substitution handling of empty lhs and variable
- correct exists() check for dir with trailing /
- correct handling of modifiers for non-existant variables during evaluation
of conditionals.
- fix for incorrect .PARSEDIR when .OBJDIR is re-computed after makefiles
have been read.
- fix example of :? modifier in man page.
- sigcompat.c: convert to ansi so we can use higher warning levels.
- parse.c: SunOS 5.8 at least does not have MAP_FILE
- use mmap(2) if available, for reading makefiles
- to ensure unit-tests results match, need to control LC_ALL as well as LANG.
- if stale dependency is an IMPSRC, search via .PATH
- machine.sh: like os.sh, allow for uname -p producing useless drivel
- boot-strap: document configure knobs for meta and filemon.
Diffstat (limited to 'devel/bmake/files/job.c')
-rw-r--r-- | devel/bmake/files/job.c | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/devel/bmake/files/job.c b/devel/bmake/files/job.c index 9c7adc9ad86..c7732eeafa0 100644 --- a/devel/bmake/files/job.c +++ b/devel/bmake/files/job.c @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.1.1.8 2010/09/07 14:11:44 joerg Exp $ */ +/* $NetBSD: job.c,v 1.1.1.9 2011/06/18 22:17:58 bsiegert Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.1.1.8 2010/09/07 14:11:44 joerg Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.1.1.9 2011/06/18 22:17:58 bsiegert Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.1.1.8 2010/09/07 14:11:44 joerg Exp $"); +__RCSID("$NetBSD: job.c,v 1.1.1.9 2011/06/18 22:17:58 bsiegert Exp $"); #endif #endif /* not lint */ #endif @@ -1030,6 +1030,11 @@ JobFinish (Job *job, WAIT_T status) MESSAGE(stdout, job->node); lastNode = job->node; } +#ifdef USE_META + if (useMeta) { + meta_job_error(job, job->node, job->flags, WEXITSTATUS(status)); + } +#endif (void)printf("*** [%s] Error code %d%s\n", job->node->name, WEXITSTATUS(status), @@ -1058,6 +1063,12 @@ JobFinish (Job *job, WAIT_T status) (void)fflush(stdout); } +#ifdef USE_META + if (useMeta) { + meta_job_finish(job); + } +#endif + return_job_token = FALSE; Trace_Log(JOBEND, job); @@ -1325,6 +1336,11 @@ JobExec(Job *job, char **argv) /* Child */ sigset_t tmask; +#ifdef USE_META + if (useMeta) { + meta_job_child(job); + } +#endif /* * Reset all signal handlers; this is necessary because we also * need to unblock signals before we exec(2). @@ -1588,6 +1604,11 @@ JobStart(GNode *gn, int flags) */ noExec = FALSE; +#ifdef USE_META + if (useMeta) { + meta_job_start(job, gn); + } +#endif /* * We can do all the commands at once. hooray for sanity */ @@ -1860,6 +1881,11 @@ end_loop: MESSAGE(stdout, job->node); lastNode = job->node; } +#ifdef USE_META + if (useMeta) { + meta_job_output(job, cp, gotNL ? "\n" : ""); + } +#endif (void)fprintf(stdout, "%s%s", cp, gotNL ? "\n" : ""); (void)fflush(stdout); } |