bugmake - Bugs: bug #20995, \ along multiple lines lines for...

 
 

bug #20995: \ along multiple lines lines for '...' doesn't work

Submitter:  None
Submitted:  Fri 07 Sep 2007 12:53:47 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Not A Bug Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  3.81 Operating System:  None
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 07 Sep 2007 01:06:23 PM UTC, comment #2: 

you can forget about it - it's a feature
(http://www.gnu.org/software/make/manual/make.html#Splitting-Lines)

RTFM :-)

rgds!

Frank

Anonymous
Fri 07 Sep 2007 01:06:11 PM UTC, comment #1: 

Hi Frank; the 3.81 behavior is correct.  The POSIX spec for make says:

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>.

See the GNU make manual subsection "Splitting Command Lines" (node "Splitting Lines"), in section "Command Syntax", chapter "Writing the Commands in Rules", for details.

We are discussing adding a ".ONESHELL" feature for the next version of GNU make; if we do that then this could be used to get the kind of behavior you're looking for.

Paul D. Smith <psmith>
Group administrator
Fri 07 Sep 2007 12:53:47 PM UTC, original submission:  


> cat Makefile

test::
        echo "test1"
        echo "test2"
        echo "hallo \
        this is a broken line"
        echo 'hello \
        this is another broke line'

3.80 (old behavior):

> make test

echo "test1"
test1
echo "test2"
test2
echo "hallo \
this is a broken line"
hallo  this is a broken line
echo 'hello \
this is another broke line'
hello this is another broke line    ### !!!

3.81 (new behavior):

> make test

echo "test1"
test1
echo "test2"
test2
echo "hallo \
        this is a broken line"
hallo this is a broken line
echo 'hello \
        this is another broke line'
hello \                             ### !!!
this is another broke line          ### !!!


This break execution of s.th. else than 'echo' (e.g. 'perl').

I guess it's a bug?

rgds!

Frank

Anonymous

 

(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 (Posted a comment)
  •  

    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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-09-07 psmith StatusNone Not A Bug
        Open/ClosedOpen Closed
        Summary\\ along multiple lines lines for \'...\' doesn\'t work \ along multiple lines lines for '...' doesn't work

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code