bugmake - Bugs: bug #16562, Backslashes copied from Makefile...

 
 

bug #16562: Backslashes copied from Makefile to Shell (3.80 behaved differently)

Submitter:  None
Submitted:  Thu 11 May 2006 02:57:14 PM UTC
   
 
Severity:  3 - Normal Priority:  5 - Normal
Item Group:  Bug Status:  Duplicate
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Component Version:  3.81
Operating System:  POSIX-Based Fixed Release:  None
Triage Status:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Thu 11 May 2006 06:40:41 PM UTC, comment #2: 

It is possible to pass multiline arguments to the shell: either use double quotes instead of single quotes, or introduce a variable whose value is the multiline argument.  (The latter works because the new Posix-compliant behavior retains backslashes only in shell commands of a rule, not in variable definitions.)

Eli Zaretskii <eliz>
Group Member
Thu 11 May 2006 03:08:27 PM UTC, comment #1: 

(a) this is not a bug; please read the NEWS file for GNU make 3.81 for more information.

And (b) if it is a bug, it's a duplicate of bug #16505

Paul D. Smith <psmith>
Group administrator
Thu 11 May 2006 02:57:14 PM UTC, original submission:  

The following Makefile works with 3.80 but fails with 3.81:

all:
    perl -e 'BEGIN { print 5; } \
             END { print 6; }'

This is because 3.80 removed the continuation backslashes before passing the command to the shell, while 3.81 keeps them.  Thus Perl finds a backslash where it does not expect it in 3.81.  Perl then complains:

> Can't call method "END" without a package or object reference at -e line 2.


Replace 'perl -e' with 'echo' to see the pure effect of this difference.

I think this is bad: a) because it's different than before, b) because it is currently not possible to pass multiline arguments to the shell without backslashes, since the backslash is the only way to continue a line in the Makefile.

Anonymous

 

Attached Files

Attached Files
file #9944:  Makefile.test added by None (74B - application/octet-stream - Makefile that triggers the problem)

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

 

Votes

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.

 

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

History

Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-05-11 psmith StatusNone Duplicate
    Open/ClosedOpen Closed
2006-05-11 None Attached File- Added Makefile.test, #9944

Back to the top

Powered by Savane 3.16-2753.
Corresponding source code