summaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2008-09-30 11:19:58 +0000
committerEli Zaretskii <eliz@gnu.org>2008-09-30 11:19:58 +0000
commit4c995f262aa93fa41e0e6075b9c71a4db3bc6632 (patch)
treeef8792d8dcc9514e2601cebcd5ca8c469c11062c /job.c
parentc7f2c384ee71a078d169bed5cf2440616d7980da (diff)
downloadgunmake-4c995f262aa93fa41e0e6075b9c71a4db3bc6632.tar.gz
* job.c (construct_command_argv_internal): Avoid extra backslash
in batch-mode Unixy shells. Under DB_JOBS, display the contents of the batch file.
Diffstat (limited to 'job.c')
-rw-r--r--job.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/job.c b/job.c
index 82f7c0b..27999f8 100644
--- a/job.c
+++ b/job.c
@@ -2746,7 +2746,11 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
if (PRESERVE_BSNL)
{
*(ap++) = '\\';
- *(ap++) = '\\';
+ /* Only non-batch execution needs another backslash,
+ because it will be passed through a recursive
+ invocation of this function. */
+ if (!batch_mode_shell)
+ *(ap++) = '\\';
*(ap++) = '\n';
}
++p;
@@ -2807,6 +2811,8 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
fputs (command_ptr, batch);
fputc ('\n', batch);
fclose (batch);
+ DB (DB_JOBS, (_("Batch file contents:%s\n\t%s\n"),
+ !unixy_shell ? "\n\t@echo off" : "", command_ptr));
/* create argv */
new_argv = xmalloc(3 * sizeof (char *));