diff options
author | Paul Smith <psmith@gnu.org> | 2005-02-10 00:10:57 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2005-02-10 00:10:57 +0000 |
commit | c90f47e8320b41e3a5bfeb654543d9474f763e5d (patch) | |
tree | f1e18c8945deebecf1529c040d01602d9c997eaa /main.c | |
parent | 939167cfc151eae77c0d2a9d01fe2e73cab1a1b1 (diff) | |
download | gunmake-c90f47e8320b41e3a5bfeb654543d9474f763e5d.tar.gz |
Flush stdout after printing directory info.
Fix references to MINGW #define constants.
Remove WINDOWS32 ifdef from sub_proc.h.
Only add variables to the command line for recursion once.
New features in run_make_test: #PWD# and #MAKEPATH# replacements.
Test the multi-variable fix in the recursion regression test.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 25 |
1 files changed, 18 insertions, 7 deletions
@@ -2150,13 +2150,21 @@ handle_non_switch_argument (char *arg, int env) v = try_variable_definition (0, arg, o_command, 0); if (v != 0) { - /* It is indeed a variable definition. Record a pointer to - the variable for later use in define_makeflags. */ - struct command_variable *cv - = (struct command_variable *) xmalloc (sizeof (*cv)); - cv->variable = v; - cv->next = command_variables; - command_variables = cv; + /* It is indeed a variable definition. If we don't already have this + one, record a pointer to the variable for later use in + define_makeflags. */ + struct command_variable *cv; + + for (cv = command_variables; cv != 0; cv = cv->next) + if (cv->variable == v) + break; + + if (! cv) { + cv = (struct command_variable *) xmalloc (sizeof (*cv)); + cv->variable = v; + cv->next = command_variables; + command_variables = cv; + } } else if (! env) { @@ -2907,4 +2915,7 @@ log_working_directory (int entering) else printf (_("%s[%u]: Leaving directory `%s'\n"), program, makelevel, starting_directory); + + /* Flush stdout to be sure this comes before any stderr output. */ + fflush (stdout); } |