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


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

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

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


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

Fixed. Thanks for the repro case!

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
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
$(RM) $(OBJS) $(OBJS:.o=.d)
$(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>
Project AdministratorIn charge of this item.
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:


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:

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

    Do you think this task is very important?
    If so, you can 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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    Sun 26 May 2013 06:42:22 PM UTC psmith StatusNone => Fixed
        Assigned toNone => psmith
        Open/ClosedOpen => Closed
        Fixed ReleaseNone => 4.0
        Triage StatusNeed Info => Verified
    Wed 22 May 2013 03:42:55 PM UTC psmith Triage StatusNone => Need Info
    Wed 08 May 2013 11:36:31 PM UTC 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.3