makefile pattern rules without recipes
问题 I'm observing an interesting behavior of make and I wonder if there is a reasonable explanation to it besides a bug in gmake. Let's say we have the following in makefile: %-animal: echo "$* is an animal" %-fox: %-fox-animal %-wolf: %-wolf-animal The difference between the last two targets is that "%-wolf" does not have any recipe, and "%-fox" has an empty recipe (i.e. just a line with a tab at the beginning). When we try to execute the rules, here's what happens: [root@cv19 tmp]# make freddy