I'm also intrigued by their claim they used @ in the recipes, yet they never did.
I'm also intrigued by their claim they used @ in the recipes, yet they never did.
I think what he means is that their Makefiles effectively start having a common API across projects, by having similar target names.
No need to use "all" if you put the default target first (see `default` subsection in the post).
> I'm also intrigued by their claim they used @ in the recipes, yet they never did.
Yea seems that got stripped out.
Still, this is a good practical example for using a Makefile. I'm a fan of this too.
As long as running `make` does the Right Thing, does it matter if it does it via an `all` target or by defaulting to a different first target?
I do agree that generally `all` is a common convention, though.
I usually structure my targets so that I can run `make test` immediately without having to know what all the random commands are to build/install.
> No need to use "all" if you put the default target first (see `default` subsection in the post).
That's obviously the reason they're doing that, but it's an odd decision. Especially since "all" is a common name for a Makefile target and .DEFAULT_GOAL can be used to override the "first target" convention of Makefiles.
firsttarget: mysource.txt
cp $< $@
.DEFAULT_GOAL=all # no need to put it first
.PHONY: all
all: firsttarget secondtarget
secondtarget:
touch $@ $ man make | grep -A2 silent
-s, --silent, --quiet
Silent operation; do not print the commands as they are executed.