Coming from the world of C and C++, most build system have an
install target, notably Makefiles (where it is recommended by GNU for example) or CMake. This target copy the runtime files (executables, libraries, …) in the operating system (for example in
C:\Program Files\ on Windows).
This feels really hacky, since for me it is not the responsability of the build system to install programs (which is actually the responsability of the operating system / package manager). It also means the build system or build script must know the organization of installed programs, with environment variables, registry variables, symlinks, permissions…
At best, build systems should have a
release target that will output an installable package (for example
.msi), and then kindly ask the operating system to install that package. It would also allow the user to uninstall without having to type
So, my question: why do build system usually recommend having an
install target ?