Closed nuclearGoblin closed 2 years ago
From https://github.com/openjournals/joss-reviews/issues/3993#issuecomment-1015075303:
The install
Make target
hardcodes the install target directory to /usr/local/bin
. Install locations can have defaults, but should allow for user input — there are many situations on remotes (example: CERN's LXPLUS) where users do not have access to /usr/local/
and the users would need to manually edit the Makefile
.
Also, the clean
Make target should for the same reasons not try to rm -f
anything under /usr/local
.
This is also probably never what a user wants to have happen when make clean
is run — clean
targets are not uninstallers. Similarly, advocating directly for the use of sudo
for installation of local software should be avoided. Anyone who needs to use sudo
should not need to be told to use sudo
and all software should also be able to be installed and used locally without sudo
powers.
A better alternative default is to assume the user is NOT root, and to attempt to install in the user's ~/bin
where they will be assured write access.
As mentioned, if Issue #64 is able to be resolved you can get this one basically for free, as you can specify the installation path with CMAKE_INSTALL_PREFIX
e.g.
cmake \
-DCMAKE_INSTALL_PREFIX=/home/physicist/bin \
-S . \
-B ../build
Migrated to CMake in PR #91 which has a consistent and standard way to specify an install directory whether it's local or system-wide.
From the review thread: