summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1999-08-22 17:50:57 +0000
committerPaul Smith <psmith@gnu.org>1999-08-22 17:50:57 +0000
commit6fa76a7d153a9ec19d0f19dd19f6d456e044fcbe (patch)
treee968d88c7860b87a674111d68a932c1ff119a9ff /main.c
parent4ff6c6245665ba7b611bd1f3ee2f5141895d9d69 (diff)
downloadgunmake-6fa76a7d153a9ec19d0f19dd19f6d456e044fcbe.tar.gz
* Various changes.
Diffstat (limited to 'main.c')
-rw-r--r--main.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/main.c b/main.c
index af77d5f..7dde4f6 100644
--- a/main.c
+++ b/main.c
@@ -945,7 +945,7 @@ int main (int argc, char ** argv)
if (print_version_flag)
die (0);
-#if !defined(__MSDOS__) && !defined(VMS)
+#ifndef VMS
/* Set the "MAKE_COMMAND" variable to the name we were invoked with.
(If it is a relative pathname with a slash, prepend our directory name
so the result will run the same program regardless of the current dir.
@@ -963,9 +963,21 @@ int main (int argc, char ** argv)
strneq(argv[0], "//", 2))
argv[0] = xstrdup(w32ify(argv[0],1));
#else /* WINDOWS32 */
+#ifdef __MSDOS__
+ if (strchr (argv[0], '\\'))
+ {
+ char *p;
+
+ argv[0] = xstrdup (argv[0]);
+ for (p = argv[0]; *p; p++)
+ if (*p == '\\')
+ *p = '/';
+ }
+#else /* !__MSDOS__ */
if (current_directory[0] != '\0'
&& argv[0] != 0 && argv[0][0] != '/' && index (argv[0], '/') != 0)
argv[0] = concat (current_directory, "/", argv[0]);
+#endif /* !__MSDOS__ */
#endif /* WINDOWS32 */
#endif
@@ -1339,6 +1351,8 @@ int main (int argc, char ** argv)
submakes it's the token they were given by their parent. For the
top make, we just subtract one from the number the user wants. */
+ job_slots = 1; /* !!!!!DEBUG!!!!! */
+
while (--job_slots)
{
write (job_fds[1], &c, 1);