“Make install” vs “Make install clean”?
In *nix, when I compile software, when should I do:
# make install
# make install clean
When you call make with arguments, you are giving it a list of targets.
There is some discussion of this in the Upgrading Ports section of the FreeBSD Handbook where it says:
Unlike the usual make install clean command, it will upgrade all the dependencies prior to building and installing the selected port. [...] Note: You can save two extra steps by just running make install clean instead of make, make install and make clean as three separate steps.
Also, as a side note: Don't build your package as root unless you really need to. In general you should work in an unprivileged account and then as a final step you can do sudo make install if you have to. It would be better, though, to add the unprivileged user to a group with write-access to the install directories, or even better to install it into a non-system area (for example, with ./configure you can use --prefix=) since most systems, whether Linux or BSD, usually have packages and a packaging system that is used to install software.