bugmake - Bugs: bug #38945, [PATCH] Fix CRLF backslash-newline...

 
 

bug #38945: [PATCH] Fix CRLF backslash-newline handing on non-WINDOWS32 platforms

Submitter:  Derek Buitenhuis <dwbuiten>
Submitted:  Wed 08 May 2013 11:36:31 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  4.0 Operating System:  POSIX-Based
Fixed Release:  4.0 Triage Status:  Verified
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 26 May 2013 06:42:22 PM UTC, comment #5: 

Fixed.  Thanks for the repro case!

Paul D. Smith <psmith>
Group administrator
Thu 23 May 2013 06:11:32 AM UTC, comment #4: 

Here's a minimal testcase to reproduce this bug.

Put the following in "Makefile" (Unix or DOS linebreaks):

include snippet

define RULES
clean::
        $(RM) $(OBJS) $(OBJS:.o=.d)
endef
$(eval $(RULES))

Put the following in "snippet" (DOS linebreaks):

OBJS = x86/cpu.o \

There must not be an empty line after OBJS in "snippet", otherwise the bug will not trigger.

Diego Biurrun <dondiego>
Wed 22 May 2013 05:18:17 PM UTC, comment #3: 

I'm actually having a hard time making a small reproducible file...

At the moment, you can easily reproduce this as:

$ git clone git://git.libav.org/libav.git
$ cd libav
$ ./configure
$ todos libavcodec/x86/Makefile
$ make
common.mak:65: * missing separator.  Stop.

Derek Buitenhuis <dwbuiten>
Wed 22 May 2013 03:42:55 PM UTC, comment #2: 

I'm trying to create a repro case for this.  I've created a file on Linux and forced it to contain CRLF line endings but I can't get it to fail with the errors you've described.  I'm not sure what you mean by "a rule/prefix name", and the makefile you point to as an example case doesn't contain any rules: it's simply a long list of variable assignments.  The name of that file doesn't match the error message you give, and there aren't 129 lines in that file, so that message is from a different file.

Can you attach a small, simple makefile to the bug that shows the error?

Paul D. Smith <psmith>
Group administrator
Thu 09 May 2013 12:13:20 AM UTC, comment #1: 

Also I should have added: I agree to GNU's CLA, so I hereby give you the copyright to this change, or however that is supposed to work.

Derek Buitenhuis <dwbuiten>
Wed 08 May 2013 11:36:31 PM UTC, original submission:  

Attached is a patch that will fix erroneous parsing for Makefile with CRLF line endings, and a backslash-newline before a rule/prefix name (which POSIX says should is allowed and should be ignored).

Example case:

http://git.libav.org/?p=libav.git;a=blob;f=libavcodec/x86/Makefile;h=f13f3e0ea8f45efb9050ff7439d7e2de108778d0;hb=HEAD#

When cloned on windows with autocrlf set to true, you get the following with MSYS Make:

common.mak:129: * missing separator.  Stop.

Also reproducible on Linux with CRLF endings.

The attached patch fixes the issue on non-WINDOWS32 platforms such as Linux and MSYS. Comments and opinions welcome!

- Derek

Derek Buitenhuis <dwbuiten>

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dondiego (Posted a comment)
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by dwbuiten (Submitted the item)
  • -email is unavailable- added by dwbuiten
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2013-05-26 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.0
        Triage StatusNeed Info Verified
    2013-05-22 psmith Triage StatusNone Need Info
    2013-05-08 dwbuiten Attached File- Added 0001-Fix-CRLF-backslash-newline-handing-on-non-WINDOWS32-.patch, #28051
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code