Skip to content
Snippets Groups Projects
Commit 922b3885 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Safer install

Do not "make uninstall" on "make install"

This could lead to data loss if prefixes are not properly set
parent 40a7b179
No related branches found
No related tags found
No related merge requests found
......@@ -88,5 +88,7 @@ For users:
DESTDIR and other standard autoconf directories (e.g. bindir) are completely supported.
Additionally, everything should work properly also when directory names include spaces (\issue{157}).
Finally, compiler is not invoked on install unless path are explicitly changed (\issue{107}).
- Related to installation refactoring, upon install a previusly installed plumed is not removed.
This is to avoid data loss if prefix variable is not properly set
*/
......@@ -116,7 +116,11 @@ ifdef PLUMED_LIBSUFFIX
@echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
endif
cd ../config ; $(MAKE)
$(MAKE) uninstall
# in principle we should uninstall before install
# however, I think it is safer not to do it here since users could make mistake
# and remove important files by just typing "sudo make install" with a
# malformed prefix variables
# $(MAKE) uninstall
mkdir -p "$(DESTDIR)$(bindir)"
mkdir -p "$(DESTDIR)$(libdir)"
mkdir -p "$(DESTDIR)$(includedir)/$(program_name)"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment