bugmake - Bugs: bug #31621, interaction of pattern rules and...


bug #31621: interaction of pattern rules and globs

Submitted by:  Petr Machata <pmachata>
Submitted on:  Thu Nov 11 15:39:36 2010  
Severity: 3 - NormalItem Group: Bug
Status: DuplicatePrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 4.0Operating System: None
Fixed Release: NoneTriage Status: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

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


Sun Sep 22 20:18:49 2013, comment #4:

I can reproduce this with GNU make 3.82; however it is working properly for me with the current release candidate for the next release of GNU make, so this problem has been fixed.

Paul D. Smith <psmith>
Project Administrator
Fri Jul 29 11:15:37 2011, comment #3:

One solution is to enable second expansion and to use the $(wildcard ...) function:

$ cat x.mk

%/md5: $$(wildcard %/sums/*.md5)
echo action

Fri Jul 29 10:38:30 2011, comment #2:

This is a regression introduced in make-3.82.
make-3.81 handles this wihtout problems.

Directory names build from patterns seem to prevent wildcard expansion.

Thu Nov 11 15:40:21 2010, comment #1:

Forgot to post this:

Petr Machata <pmachata>
Thu Nov 11 15:39:36 2010, original submission:

make doesn't seem to like pattern rule prerequisites that use globs. I found no reference in the manual that states that this should be supported, so I don't actually know if what I'm asking for is a bug fix or enhancement. Anyway:

... the problem being that the wildcard expansion takes place in read.c:parse_file_seq, when reading the makefile. That doesn't find any file matching the %/... path, so it leaves the wild card as is, and later after the stem-replacement, make looks for xxx/sums/*.md5.

Petr Machata <pmachata>


(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)
  • -unavailable- added by pmachata (Submitted the item)

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

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Sep 22 20:18:49 2013psmithStatusNone=>Duplicate

    Back to the top

    Powered by Savane 3.1-cleanup1