This doesn't seem like a well thought out introduction. There's quite a lot of randomness. For example, the first makefile says:
This makefile will always run. The default target is some_binary,
because it is first.
some_binary:
echo "nothing"
Actually, it's not true that that will always echo nothing because some_binary isn't declared as phony and so if some_binary exists on the CWD echo "nothing" will not happen.
Also, the language here is weird. The tutorial talks about makefiles running and targets calling targets.
4.8 states:
1) We do not use *.o, because that is just the string *.o,
which might be useful in the commands, but is only one
target and does not expand."
That's not true. Consider the following
*.foo: ; @echo $@
If there are any files in the CWD that match *.foo then it is expanded and rules created for each file.
I appreciate what the person is trying to do, just quickly jot down some notes for new people.
For the first concern, phony is mentioned a bit later, likely did not want to start-off with added complexity for the reader.
For the second point, but then bar.foo and baz.foo are already there and would be up to date, so what's the point in that? Most cases it's not what you want, that note is pointing-out a common gotcha.
So though precisely you are totally correct, it's not what the author was going for.
Some opinion of mine now. I do not like GNU make document linked. It goes into too much detail and then close to the end is just a short warnings about how so much of the above was GNU specific. I prefer the BSD make man page, but obviously that is not a good starting point for someone new to make. I recommend the book "Managing Projects with make" personally.
This is a good compromise between abstract and concrete knowledge.
Most manuals either cover only some special cases and leave you alone to find out what's more. Then they cover only the whole syntax as BNF, or a whole API doc, or something. But nothing in between, drawing the connection between practical usage and abstract description of what's all possible.
https://www.gnu.org/software/make/manual/
This doesn't seem like a well thought out introduction. There's quite a lot of randomness. For example, the first makefile says:
Actually, it's not true that that will always echo nothing because some_binary isn't declared as phony and so if some_binary exists on the CWD echo "nothing" will not happen.Also, the language here is weird. The tutorial talks about makefiles running and targets calling targets.
4.8 states:
That's not true. Consider the following If there are any files in the CWD that match *.foo then it is expanded and rules created for each file.