bugmake - Bugs: bug #1332, continued command lines are not...

 
 

bug #1332: continued command lines are not passed to the shell correctly

Submitted by:  Paul D. Smith <psmith>
Submitted on:  Fri 04 Oct 2002 05:55:19 PM UTC
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  3.78 Operating System:  Any
Fixed Release:  3.81 Triage Status:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Sun 26 Jun 2005 03:16:13 AM UTC, comment #2: 

This has been fixed and will be in the next version of GNU make.

Paul D. Smith <psmith>
Project Administrator
Fri 04 Oct 2002 06:03:47 PM UTC, comment #1: 

I've checked the POSIX standard for make, and it says this:

IEEE 1003.1-2001 / Shells and Utilities, Issue 6
P. 610-611 lines 23540-23544:

When an escaped <newline> (one preceded by a backslash) is found anywhere in the makefile except in a command line, it shall be replaced, along with any leading white space on the following line, with a single <space>.  When an escaped <newline> is found in a command line in a makefile, the command line shall contain the backslash, the <newline>, and the next line, except that the first character of the next line shall not be included if it is a <tab>.

So, it does appear that GNU make is not conforming to the POSIX standard in its behavior.  I'll look into this.

Paul D. Smith <psmith>
Project Administrator
Fri 04 Oct 2002 05:55:19 PM UTC, original submission:  

The info manual for make reads:
----------------------------------------------------------------------
   If you would like to split a single shell command into multiple
lines of text, you must use a backslash at the end of all but the last
subline.  Such a sequence of lines is combined into a single line, by
deleting the backslash-newline sequences, before passing it to the
shell.
----------------------------------------------------------------------

Unfortunately, this is not exactly what happens: look at shis simple makefile:
----------------------------------------------------------------------
all:
@echo "1234""5678"
@echo "1234"\
"5678"
----------------------------------------------------------------------

The following invocation shows the difference between the two lines:

__> make
12345678
1234 5678

Observe the addition of a space in the second case.

Paul D. Smith <psmith>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Debian Bug Tracking System)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2006-04-01 psmith Fixed Release4.0 => 3.81
    2005-06-26 psmith StatusNone => Fixed
        Assigned toNone => psmith
        Open/ClosedOpen => Closed
        Fixed ReleaseNone => 4.0

    Back to the top


    Powered by Savane 3.9