bugmake - Bugs: bug #29403, Make does not resolve backslashes

 
 

bug #29403: Make does not resolve backslashes

Submitter:  None
Submitted:  Thu 01 Apr 2010 04:54:06 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:  Any
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 01 Apr 2010 05:15:31 PM UTC, comment #1: 

The new behavior is intended, and is required by the POSIX standard for make.  Please see the NEWS file in the GNU make distribution and the GNU make manual for more details.


* WARNING: Backward-incompatibility!
  In order to comply with POSIX, the way in which GNU make processes
  backslash-newline sequences in recipes has changed.  If your makefiles
  use backslash-newline sequences inside of single-quoted strings in
  recipes you will be impacted by this change.  See the GNU make manual
  subsection "Splitting Recipe Lines" (node "Splitting Lines"), in
  section "Recipe Syntax", chapter "Writing Recipe in Rules", for
  details.


A simple fix is to put the backslashed text into a variable assignment then use that variable instead of the literal string: backslash/newlines within variable assignment still work as before.

Paul D. Smith <psmith>
Group administrator
Thu 01 Apr 2010 04:54:06 PM UTC, original submission:  

Hello Gnu Make Developers,

Here is my issue:

Makefile:

aaa:
@echo '\
system("echo HALLO"); \
'

# prints
% gmake aaa

\
system("echo HALLO"); \

This is wrong, the backslash-return (\\n) should have been
evaluated to a  newline (\n)
Now gmake does not resolve the backslash and passes it to
calling program, which might not know what to do with it.
This works fine in make 3.80 and fails in make 3.81


% uname -a
Linux lna0918363.tif.ti.com 2.6.9-89.0.16.ELsmp #1 SMP Tue Oct 27 03:51:52 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux


regards,
 Walter Lavinop

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #20088:  makefile added by None (44B - text/plain - makefile )

 

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
    2010-04-01 psmith StatusNone Not A Bug
        Open/ClosedOpen Closed
    2010-04-01 None Attached File- Added makefile, #20088

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code