[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #24405] BATCH_MODE_ONLY_SHELL configuration fails with unixy shells
From: |
anonymous |
Subject: |
[bug #24405] BATCH_MODE_ONLY_SHELL configuration fails with unixy shells |
Date: |
Mon, 29 Sep 2008 18:43:05 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 |
URL:
<http://savannah.gnu.org/bugs/?24405>
Summary: BATCH_MODE_ONLY_SHELL configuration fails with
unixy shells
Project: make
Submitted by: None
Submitted on: Mon 29 Sep 2008 06:43:03 PM UTC
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: 3.81
Operating System: MS Windows
Fixed Release: None
_______________________________________________________
Details:
If make determines that the shell is "unixy", the generated shell script used
to run a rule containing a continuation character will have one too many '\'s.
For example, the following makefile fails:
all:
echo this is\
a test
because the generated "batch" file used to run the echo command above is:
echo this is\\
a test
This results in two commands being executed (by unixy shells); "echo" and
"a". Clearly not what was intended.
The attached patch fixes this for me. Note the "DB (DB_JOBS" line is, of
course, unnecessary but it's invaluable when trying to debug a
BATCH_MODE_ONLY_SHELL configured make.
diff -Naur make-3.81,orig/job.c make-3.81/job.c
--- make-3.81,orig/job.c 2006-03-19 19:03:04.000000000 -0800
+++ make-3.81/job.c 2008-09-27 19:29:03.283931000 -0700
@@ -2733,7 +2733,7 @@
if (PRESERVE_BSNL)
{
*(ap++) = '\\';
- *(ap++) = '\\';
+ if (!batch_mode_shell) *(ap++) = '\\';
*(ap++) = '\n';
}
@@ -2799,6 +2799,9 @@
fputc ('\n', batch);
fclose (batch);
+ DB (DB_JOBS, (_("Batch file contents:%s\n\t%s\n"),
+ !unixy_shell ? "address@hidden off" : "", command_ptr));
+
/* create argv */
new_argv = (char **) xmalloc(3 * sizeof (char *));
if (unixy_shell) {
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 29 Sep 2008 06:43:03 PM UTC Name: batch_only_patch.txt Size: 753B
By: None
patch to fix reported problem
<http://savannah.gnu.org/bugs/download.php?file_id=16586>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?24405>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #24405] BATCH_MODE_ONLY_SHELL configuration fails with unixy shells,
anonymous <=