Re:How We Use Make
by bartbes on Friday April 03, 2015 @04:17PM
(#9318203)
I realise their standard probably doesn't include all, but it seems like the obvious choice. Maybe I've just been conditioned by autotools, but I think it's standard practice to have all be your default target.
[ Parent
| on HN ]
¯\_(ツ)_/¯
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.
It's really only relevant when specifying multiple targets, like 'make clean all', or the more common 'make all install'. It just seemed odd to me.
Re:How We Use Make
by xyzzy_plugh on Friday April 03, 2015 @05:40PM
(#9318746)
Why would you have `make all install' behave differently than `make install'? I'm imagining specifically when you have the install target present.
Because `make all install` would first build, then install, while `make install` would just do the installation, regardless of build state.
Wouldn't any sane install target depend on the build products it seeks to install, and consequently build before installing?
Re:How We Use Make
by ianstormtaylor on Friday April 03, 2015 @09:16PM
(#9319485)
Why not have install do the build state, and then in most cases it wouldn't need to be run at all since the target would be up-to-date? Just curious.
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.