summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1999-09-15 22:23:35 +0000
committerPaul Smith <psmith@gnu.org>1999-09-15 22:23:35 +0000
commitc8003673857919d2283e16c829325c9f14e10dfe (patch)
treeea63faf55b4f28c561444bc732c246b5345b17dc /main.c
parent0d366b668244112846554c42045ff1d9956276ed (diff)
downloadgunmake-c8003673857919d2283e16c829325c9f14e10dfe.tar.gz
* Cleanup the test suite.
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/main.c b/main.c
index f3e1135..0810a92 100644
--- a/main.c
+++ b/main.c
@@ -974,6 +974,13 @@ int main (int argc, char ** argv)
if (*p == '\\')
*p = '/';
}
+ /* If argv[0] is not in absolute form, prepend the current
+ directory. This can happen when Make is invoked by another DJGPP
+ program that uses a non-absolute name. */
+ if (current_directory[0] != '\0'
+ && argv[0] != 0
+ && (argv[0][0] != '/' && (argv[0][0] == '\0' || argv[0][1] != ':')))
+ argv[0] = concat (current_directory, "/", argv[0]);
#else /* !__MSDOS__ */
if (current_directory[0] != '\0'
&& argv[0] != 0 && argv[0][0] != '/' && index (argv[0], '/') != 0)