mirror of
https://github.com/mirror/make.git
synced 2025-01-03 00:40:34 +08:00
* main.c(main): Disable output sync without parallel builds.
This commit is contained in:
parent
e33f3d72bf
commit
247b71e690
25
main.c
25
main.c
@ -1464,13 +1464,6 @@ main (int argc, char **argv, char **envp)
|
|||||||
|
|
||||||
decode_env_switches (STRING_SIZE_TUPLE ("MAKEFLAGS"));
|
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
|
#if 0
|
||||||
/* People write things like:
|
/* People write things like:
|
||||||
MFLAGS="CC=gcc -pipe" "CFLAGS=-g"
|
MFLAGS="CC=gcc -pipe" "CFLAGS=-g"
|
||||||
@ -1478,6 +1471,13 @@ main (int argc, char **argv, char **envp)
|
|||||||
decode_env_switches (STRING_SIZE_TUPLE ("MFLAGS"));
|
decode_env_switches (STRING_SIZE_TUPLE ("MFLAGS"));
|
||||||
#endif
|
#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);
|
decode_switches (argc, (const char **)argv, 0);
|
||||||
|
|
||||||
/* Set a variable specifying whether stdout/stdin is hooked to a TTY. */
|
/* Set a variable specifying whether stdout/stdin is hooked to a TTY. */
|
||||||
@ -2053,6 +2053,17 @@ main (int argc, char **argv, char **envp)
|
|||||||
}
|
}
|
||||||
#endif
|
#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
|
#ifndef MAKE_SYMLINKS
|
||||||
if (check_symlink_flag)
|
if (check_symlink_flag)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user