summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1999-06-14 05:26:28 +0000
committerPaul Smith <psmith@gnu.org>1999-06-14 05:26:28 +0000
commit187787286d9bc2f41696090917f47d9935651ddf (patch)
treece669419e8b2442a20e001ef3ec32090e07c3812
parentfc0fe4103ac983d88b83dad0daf97664ffa8e04b (diff)
downloadmake-187787286d9bc2f41696090917f47d9935651ddf.tar.gz
* Various bug fixes.
-rw-r--r--ChangeLog14
-rw-r--r--commands.c2
-rw-r--r--expand.c2
-rw-r--r--job.c10
-rw-r--r--main.c5
5 files changed, 28 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index cb8832a..07c495b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,22 @@
+1999-04-26 Paul D. Smith <psmith@gnu.org>
+
+ * main.c (main): Reset read_makefiles to empty after processing so
+ we get the right error message.
+
1999-04-25 Paul D. Smith <psmith@gnu.org>
* make.texinfo: Updates to @dircategory and @direntry suggested by
Karl Berry <karl@cs.umb.edu>.
+1999-04-23 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * job.c (start_job_command) [__MSDOS__]: Call unblock_sigs before
+ turning off dos_command_running, so child's signals produce the
+ right effect.
+
+ * commands.c (fatal_error_signal) [__MSDOS__]: Use EXIT_FAILURE
+ instead of 1.
+
1999-04-18 Eli Zaretskii <eliz@is.elta.co.il>
* configh.dos.template: Update to recognize that version 2.02 of
diff --git a/commands.c b/commands.c
index 58107ef..dd7b1be 100644
--- a/commands.c
+++ b/commands.c
@@ -380,7 +380,7 @@ fatal_error_signal (sig)
return;
}
remove_intermediates (1);
- exit (1);
+ exit (EXIT_FAILURE);
#else /* not __MSDOS__ */
#ifdef _AMIGA
remove_intermediates (1);
diff --git a/expand.c b/expand.c
index db29174..0b1d41d 100644
--- a/expand.c
+++ b/expand.c
@@ -398,7 +398,7 @@ char *
variable_expand (line)
char *line;
{
- return variable_expand_string(NULL, line, -1);
+ return variable_expand_string(NULL, line, (long)-1);
}
/* Expand an argument for an expansion function.
diff --git a/job.c b/job.c
index 8a998ea..787678d 100644
--- a/job.c
+++ b/job.c
@@ -1024,7 +1024,6 @@ start_job_command (child)
dos_command_running = 1;
proc_return = system (cmdline);
- dos_command_running = 0;
environ = parent_environ;
execute_by_shell = 0; /* for the next time */
}
@@ -1032,9 +1031,16 @@ start_job_command (child)
{
dos_command_running = 1;
proc_return = spawnvpe (P_WAIT, argv[0], argv, child->environment);
- dos_command_running = 0;
}
+ /* Need to unblock signals before turning off
+ dos_command_running, so that child's signals
+ will be treated as such (see fatal_error_signal). */
+ unblock_sigs ();
+ dos_command_running = 0;
+
+ /* If the child got a signal, dos_status has its
+ high 8 bits set, so be careful not to alter them. */
if (proc_return == -1)
dos_status |= 0xff;
else
diff --git a/main.c b/main.c
index 9850fbc..fc5b335 100644
--- a/main.c
+++ b/main.c
@@ -1496,10 +1496,13 @@ int main (int argc, char ** argv)
else
{
/* A normal makefile. We must die later. */
- error (NILF, "Makefile `%s' was not found", dep_name (d));
+ error (NILF, "Makefile `%s' was not found",
+ dep_name (d));
any_failed = 1;
}
}
+ /* Reset this to empty so we get the right error message below. */
+ read_makefiles = 0;
if (any_remade)
goto re_exec;