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"
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. */
}
#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)
{