[GNU Make 4.2.1] Implicit rule not used

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[GNU Make 4.2.1] Implicit rule not used

Jari Vetoniemi
Hi,

I have Makefile where implict rule is not used for target that is
prerequisite of another target.

You can see the Makefile here:
https://ptpb.pw/WxM9

If I remove the recipe from vitaserve target GNU/Make will not use the
implicit rule '%: %.c' for the target.
Is this a bug in GNU/Make or am I understanding the implicit rule
search algorithm wrong?

_______________________________________________
Help-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-make
Reply | Threaded
Open this post in threaded view
|

Re: [GNU Make 4.2.1] Implicit rule not used

Philip Guenther-2
On Sat, Oct 1, 2016 at 12:55 PM, Jari Vetoniemi <[hidden email]> wrote:
> I have Makefile where implict rule is not used for target that is
> prerequisite of another target.
>
> You can see the Makefile here:
> https://ptpb.pw/WxM9

(putting a makefile that's about the same size as your email message
behind a link.  WTH?)

> If I remove the recipe from vitaserve target GNU/Make will not use the
> implicit rule '%: %.c' for the target.
> Is this a bug in GNU/Make or am I understanding the implicit rule
> search algorithm wrong?

All the %s in a pattern rule have to match exactly the same string.
So, how is make going to match this:

vitaserve: vitac.c
        $(LINK.c) $^ $(LDLIBS) -o $@

with a %:%.c rule?  What would the %s *both* match?


Philip Guenther

_______________________________________________
Help-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-make