bugmake - Bugs: bug #23468, end-of-line backslashes fails with...

 
 

bug #23468: end-of-line backslashes fails with perl (Cygwin, although I strongly believe it's general problem)

Submitted by:  None
Submitted on:  Tue 03 Jun 2008 03:47:20 AM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: Not A BugPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.81Operating System: Any
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.

 

Wed 04 Jun 2008 12:55:40 AM UTC, comment #2:

As Anonymous points out, this is a change that was required for POSIX conformance.

Note you can overcome this by putting your long perl script in a make variable; instead of:

foo:
perl -e 'my multi-\
line perl script'

you can use something like:

PERL_SCRIPT = my multi-\
line perl script
foo:
perl -e '$(PERL_SCRIPT)'

The latter will work the same in all versions of make, and is arguably easier to read and understand as well.

Paul D. Smith <psmith>
Project Administrator
Tue 03 Jun 2008 07:10:11 AM UTC, comment #1:

Look in the NEWS file:

  • WARNING: Backward-incompatibility!

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

This is a feature, not a bug.

Anonymous
Tue 03 Jun 2008 03:47:20 AM UTC, original submission:

Makefile that produce this bug is attached.
There are two targets in the makefile. These two targets should be identical, except that one of them is using backslashes to break lines.
As said in the summary (title), the target with backslashes fails.

Although this is seen in Cygwin, I believe it is a general issue.
An evidence is:
I did try to do both unix2dos, and dos2unix on Makefile. Same results.

Make v3.80 works well, but Make v3.81 fails on the backslash target.

See the attached Makefile (and input file) for detail.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #15786:  Makefile added by None (1KiB - application/octet-stream)
file #15787:  input.txt added by None (71B - text/plain)

 

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

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 04 Jun 2008 12:55:40 AM UTCpsmithStatusNone=>Not A Bug
      Open/ClosedOpen=>Closed
    Tue 03 Jun 2008 03:47:20 AM UTCNoneAttached File-=>Added Makefile, #15786
      Attached File-=>Added input.txt, #15787

    Back to the top


    Powered by Savane 3.1-cleanup1