* main.c(main): Disable output sync without parallel builds.

This commit is contained in:
Paul Smith 2016-03-13 15:59:12 -04:00
parent e33f3d72bf
commit 247b71e690

25
main.c
View File

@ -1464,13 +1464,6 @@ main (int argc, char **argv, char **envp)
decode_env_switches (STRING_SIZE_TUPLE ("MAKEFLAGS"));
/* In output sync mode we need to sync any output generated by reading the
makefiles, such as in $(info ...) or stderr from $(shell ...) etc. */
syncing = make_sync.syncout = (output_sync == OUTPUT_SYNC_LINE
|| output_sync == OUTPUT_SYNC_TARGET);
OUTPUT_SET (&make_sync);
#if 0
/* People write things like:
MFLAGS="CC=gcc -pipe" "CFLAGS=-g"
@ -1478,6 +1471,13 @@ main (int argc, char **argv, char **envp)
decode_env_switches (STRING_SIZE_TUPLE ("MFLAGS"));
#endif
/* In output sync mode we need to sync any output generated by reading the
makefiles, such as in $(info ...) or stderr from $(shell ...) etc. */
syncing = make_sync.syncout = (output_sync == OUTPUT_SYNC_LINE
|| output_sync == OUTPUT_SYNC_TARGET);
OUTPUT_SET (&make_sync);
decode_switches (argc, (const char **)argv, 0);
/* Set a variable specifying whether stdout/stdin is hooked to a TTY. */
@ -2053,6 +2053,17 @@ main (int argc, char **argv, char **envp)
}
#endif
/* If we're not using parallel jobs, then we don't need output sync.
This is so people can enable output sync in GNUMAKEFLAGS or similar, but
not have it take effect unless parallel builds are enabled. */
if (syncing && job_slots == 1)
{
OUTPUT_UNSET ();
output_close (&make_sync);
syncing = 0;
output_sync = OUTPUT_SYNC_NONE;
}
#ifndef MAKE_SYMLINKS
if (check_symlink_flag)
{