bugmake - Bugs: bug #41417, \* in a prerequisite matches \* as...


bug #41417: \* in a prerequisite matches \* as well as *

Submitted by:  None
Submitted on:  Sat 01 Feb 2014 05:35:19 AM UTC  
Severity: 3 - NormalItem Group: Bug
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: 4.0Operating 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.


Mon 03 Feb 2014 12:29:48 AM UTC, comment #1:

Yes, this is tricky. Make invokes the standard globbing facilities which escapes the * as expected, and then does not find any files matching the static filename *.o.

So, it returns to make that no matches were found. When no matches are found for globbing make just uses the filename as-is. In this case, that's \*.o which is why it matches.

I guess the only way to solve this would be for make to go through the filename and try to un-escape the globbing characters itself if no matches were found by the globbing facilities.

Paul D. Smith <psmith>
Project Administrator
Sat 01 Feb 2014 05:35:19 AM UTC, original submission:

In a prerequisite, the manual states that an asterisk can be escaped with a backslash to suppress globbing. However, \.o also matches \.o, as well as the expected *.o.

This means that make cannot handle asterisks in filenames reliably.



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

Attach File(s):

No files currently attached


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):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 03 Feb 2014 12:29:48 AM UTCpsmithSummary\\* in a prerequisite matches \\* as well as *=>\* in a prerequisite matches \* as well as *

    Back to the top

    Powered by Savane 3.1-cleanup1