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 - NormalItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 3.78Operating System: Any
Fixed Release: 3.81Triage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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 AdministratorIn charge of this item.
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 AdministratorIn charge of this item.
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 AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 01 Apr 2006 07:01:43 AM UTCpsmithFixed Release4.0=>3.81
    Sun 26 Jun 2005 03:16:13 AM UTCpsmithStatusNone=>Fixed
      Assigned toNone=>psmith
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.0

    Back to the top


    Powered by Savane 3.1-cleanup1