* Various bug fixes.
authorPaul Smith <psmith@gnu.org>
Mon, 14 Jun 1999 05:26:28 +0000 (05:26 +0000)
committerPaul Smith <psmith@gnu.org>
Mon, 14 Jun 1999 05:26:28 +0000 (05:26 +0000)
ChangeLog
commands.c
expand.c
job.c
main.c

index cb8832a16688651d181c7be4a029912882337cb6..07c495b178ca3fc9ebe34bcf3653b080501378a6 100644 (file)
--- 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
index 58107efec388f2962f3fcd2910b562ec625dd31d..dd7b1bef42337f886f0329c129466cb936111bdb 100644 (file)
@@ -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);
index db29174ba2e9223f3e55faaada60d34c249f14a1..0b1d41db6fe2dd311d0a6281fda95276774dd835 100644 (file)
--- 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);
 }
 \f
 /* Expand an argument for an expansion function.
diff --git a/job.c b/job.c
index 8a998ea4026d7f1b01708bc6f49fe6b97b24291f..787678d048ad02d845d63eb905ea60a7e4ee7c85 100644 (file)
--- 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 9850fbce0f5524eb80b149bad4cda47fd92f60d9..fc5b33580b9e3ad033d4fb80807c80bbb65d66bc 100644 (file)
--- 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;