I'm wondering what are good practices about compilation and manual installation of software on Linux systems. I mean getting, building and installing code by this usual way :
git clone https://a-repo/foo.git
cd foo/
./configure
make
make install
- Should that be avoided ? Or is it recommended ? Maybe it is better to make a package for the distribution in use ?
- Are there some tricks to manage versions and updates ?
- Does good practices exists when doing
./configure, particularly with--prefix=? - How can I install / uninstall properly ? Should I always keep the
sources to do
make uninstall? - I have seen some tools like
stow, but this seems to be a controversial solution... Maybe an other one ?
I prefer solutions that are independents of distro, but all suggestions and advices are welcome !
Thank you !
EDIT: It seems that people don't understand my question. I'm not opening a debate, I just want an answer as clear as possible for the various points above. I really think this could be helpful for some people. Thank you for your contribution.
--prefix=/opt/somethingor even--prefix=/opt/something-VERSION. No issues with deinstalling, installing, keeping track of versions, etc. Don't wanna write an answer - there's just too much to talk about.stow, I like the concept of this minimalistic software. The problems I encountered withstowwere about some symlinks not working, mainly forsystemdservices.