diff options
author | Paul Smith <psmith@gnu.org> | 2013-09-12 04:07:52 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2013-09-12 04:07:52 -0400 |
commit | deff9dacc97cc20015d3018992f2c77cb7fab102 (patch) | |
tree | 3da393310f9936a22aa211e6870a23e98b6fdebe /job.h | |
parent | 40a49f244da5b417af8bede84ac221cee2318d88 (diff) | |
download | gunmake-deff9dacc97cc20015d3018992f2c77cb7fab102.tar.gz |
Enhance the output sync mode.
Create a new file, output.c, and collect functions that generate output there.
We introduce a new global context specifying where output should go (to stdout
or to a sync file), and the lowest level output generator chooses where to
write output based on that context.
This allows us to set the context globally, and all operations that write
output (including functions like $(info ...) etc.) will use it.
Removed the "--trace=dir" capability. It was too confusing. If you have
directory tracking enabled then output sync will print the enter/leave message
for each synchronized block. If you don't want that, disable directory
tracking.
Diffstat (limited to 'job.h')
-rw-r--r-- | job.h | 22 |
1 files changed, 9 insertions, 13 deletions
@@ -14,8 +14,7 @@ A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SEEN_JOB_H -#define SEEN_JOB_H +#include "output.h" #ifdef HAVE_FCNTL_H # include <fcntl.h> @@ -103,15 +102,14 @@ struct child int cstatus; /* Completion status */ #endif - unsigned int command_line; /* Index into command_lines. */ - int outfd; /* File descriptor for saving stdout */ - int errfd; /* File descriptor for saving stderr */ - pid_t pid; /* Child process's ID number. */ - unsigned int remote:1; /* Nonzero if executing remotely. */ - unsigned int noerror:1; /* Nonzero if commands contained a '-'. */ - unsigned int good_stdin:1; /* Nonzero if this child has a good stdin. */ - unsigned int deleted:1; /* Nonzero if targets have been deleted. */ - unsigned int dontcare:1; /* Saved dontcare flag. */ + unsigned int command_line; /* Index into command_lines. */ + struct output output; /* Output for this child. */ + pid_t pid; /* Child process's ID number. */ + unsigned int remote:1; /* Nonzero if executing remotely. */ + unsigned int noerror:1; /* Nonzero if commands contained a '-'. */ + unsigned int good_stdin:1; /* Nonzero if this child has a good stdin. */ + unsigned int deleted:1; /* Nonzero if targets have been deleted. */ + unsigned int dontcare:1; /* Saved dontcare flag. */ }; extern struct child *children; @@ -153,5 +151,3 @@ extern int fatal_signal_mask; #endif extern unsigned int jobserver_tokens; - -#endif /* SEEN_JOB_H */ |