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)

Submitter:  None
Submitted:  Tue 03 Jun 2008 03:47:20 AM 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
   

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>
Group 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 Files:
   
   
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
  • -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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-06-04 psmith StatusNone Not A Bug
        Open/ClosedOpen Closed
    2008-06-03 None Attached File- Added Makefile, #15786
        Attached File- Added input.txt, #15787

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code