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

 
 

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

Submitted by:  None
Submitted on:  Fri 07 Sep 2007 12:53:47 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: Not A BugPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.81Operating System: None
Fixed Release: NoneTriage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

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

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

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 07 Sep 2007 01:06:11 PM UTCpsmithStatusNone=>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.1-cleanup1