From 7f01830927969a8386050617385e59070fe9f34b Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 28 Apr 2013 01:19:19 -0400 Subject: Add support for per-job output sync. A new flag to the -O/--output-sync, "job", selects a per-job (that is, per line of a recipe) output synchronization. To support this move the close of the temp file out of the sync_output() function and don't do it until we free the child, since we may call sync_output() multiple times in a given recipe. When we set up for a new temp file, if we're in per-job mode we truncate the file and seek to the beginning to re-use it for every job. --- makeint.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'makeint.h') diff --git a/makeint.h b/makeint.h index d1b00c6..643b611 100644 --- a/makeint.h +++ b/makeint.h @@ -538,8 +538,10 @@ int strncasecmp (const char *s1, const char *s2, int n); # define OUTPUT_SYNC #endif -#define OUTPUT_SYNC_TARGET 1 -#define OUTPUT_SYNC_MAKE 2 +#define OUTPUT_SYNC_NONE 0 +#define OUTPUT_SYNC_JOB 1 +#define OUTPUT_SYNC_TARGET 2 +#define OUTPUT_SYNC_MAKE 3 extern const gmk_floc *reading_file; extern const gmk_floc **expanding_var; -- cgit v1.2.3