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

 
 

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

Submitted by:  None
Submitted on:  Thu 11 May 2006 02:57:14 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: DuplicatePrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.81Operating System: POSIX-Based
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.

 

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

 

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

Attach File(s):
   
   
Comment:
   

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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
Thu 11 May 2006 03:08:27 PM UTCpsmithStatusNone=>Duplicate
  Open/ClosedOpen=>Closed
Thu 11 May 2006 02:57:14 PM UTCNoneAttached File-=>Added Makefile.test, #9944

Back to the top


Powered by Savane 3.1-cleanup1