From 01fb97f9e20c7f62a7a790aabb0cb132d63fba4b Mon Sep 17 00:00:00 2001
From: Giovanni Bussi <giovanni.bussi@gmail.com>
Date: Wed, 22 Nov 2017 13:09:40 +0100
Subject: [PATCH] Solved small bug in stored PLUMED_ROOT

The value of PLUMED_ROOT stored in statically patched MD code was
incorrectly set to the compilation directory rather than the installed one.

The only way to trigger the bug from regtest was by observing the behavior
of rt-make-exceptions when plumed was installed by macports (since in this
case the compilation directory is removed).
---
 src/lib/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/Makefile b/src/lib/Makefile
index 429f7c0dc..c6c119bea 100644
--- a/src/lib/Makefile
+++ b/src/lib/Makefile
@@ -83,7 +83,7 @@ install-build:
 	mkdir -p install/
 	$(MAKE) PLUMED_INSTALL=Install all
 ifdef LD_RO
-	$(MAKE) install/kernel.o
+	$(MAKE) PLUMED_INSTALL=Install install/kernel.o
 endif
 # modulefile
 	@cat modulefile.in | \
@@ -168,7 +168,7 @@ endif
 ifdef LD_RO
 	cp install/kernel.o "$(DESTDIR)$(libdir)/$(program_name)/obj/kernel.o"
 else
-	../maketools/copyobjects "$(DESTDIR)$(libdir)/$(program_name)/obj/k" $(OBJ_KERNEL)
+	../maketools/copyobjects "$(DESTDIR)$(libdir)/$(program_name)/obj/k" $(subst ../config/Config.o,../config/ConfigInstall.o,$(OBJ_KERNEL))
 endif
 	cp $(OBJ_WRAPPER) "$(DESTDIR)$(libdir)/$(program_name)/obj/PlumedStatic.o"
 	cp $(OBJ_DYNAMIC_WRAPPER) "$(DESTDIR)$(libdir)/$(program_name)/obj/Plumed.o"
-- 
GitLab