From 1dedccb8ea8dbcbbd49a52ee75feae81a9d14e7c Mon Sep 17 00:00:00 2001 From: Giovanni Bussi Date: Thu, 2 Jul 2015 08:15:17 +0200 Subject: [PATCH] Allow space in build directory Now plumed should work if built on a directory which has a space in the path. Notice that install directory should still not contain spaces. This is because of some difficulties in making the src/lib/Makefile rules compatible with names with spaces. Addresses #157 --- patches/patch.sh | 2 +- scripts/mklib.sh | 2 +- scripts/newcv.sh | 2 +- scripts/patch.sh | 2 +- src/config/Makefile | 2 +- src/core/CLToolMain.cpp | 4 ++-- src/lib/Makefile | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/patches/patch.sh b/patches/patch.sh index 775bd6d5d3..dafd2525f9 100755 --- a/patches/patch.sh +++ b/patches/patch.sh @@ -259,7 +259,7 @@ case "$action" in fi echo "" - if grep -q "D__PLUMED_MPI=1" $PLUMED_ROOT/src/config/compile_options.sh ; then + if grep -q "D__PLUMED_MPI=1" "$PLUMED_ROOT"/src/config/compile_options.sh ; then echo "PLUMED is compiled with MPI support so you can configure $engine with MPI" else echo "PLUMED is compiled WITHOUT MPI support so you CANNOT configure $engine with MPI" diff --git a/scripts/mklib.sh b/scripts/mklib.sh index 742aa37658..2612a488ab 100755 --- a/scripts/mklib.sh +++ b/scripts/mklib.sh @@ -1,6 +1,6 @@ #! /bin/bash -source $PLUMED_ROOT/src/config/compile_options.sh +source "$PLUMED_ROOT"/src/config/compile_options.sh if [ "$1" = --description ] ; then echo "compile a .cpp file into a shared library" diff --git a/scripts/newcv.sh b/scripts/newcv.sh index d0c99d0705..b3b5737393 100755 --- a/scripts/newcv.sh +++ b/scripts/newcv.sh @@ -17,5 +17,5 @@ directive=$1 classname=$2 sed "s/TEMPLATE/$directive/g - s/Template/$classname/g" $PLUMED_ROOT/src/colvar/Template.cpp > ${classname}.cpp + s/Template/$classname/g" "$PLUMED_ROOT"/src/colvar/Template.cpp > ${classname}.cpp diff --git a/scripts/patch.sh b/scripts/patch.sh index b3b00e0521..d9bfe5d30b 100755 --- a/scripts/patch.sh +++ b/scripts/patch.sh @@ -1,4 +1,4 @@ #! /bin/bash -${PLUMED_ROOT}/patches/patch.sh "$@" +"${PLUMED_ROOT}"/patches/patch.sh "$@" diff --git a/src/config/Makefile b/src/config/Makefile index a4b9d0dbd5..fae0e2748e 100644 --- a/src/config/Makefile +++ b/src/config/Makefile @@ -51,7 +51,7 @@ Makefile.conf.xxd: ../../Makefile.conf # file to import compilation options inside a bash script compile_options.sh: @echo Building compile_options.sh, a sourceable bash script with some compilation options - @echo "compile='"$(CXX) -c -I'$$PLUMED_ROOT'/src $(CPPFLAGS) $(CXXFLAGS) -o"'" > $@ + @echo "compile='"$(CXX) -c -I'"$$PLUMED_ROOT"'/src $(CPPFLAGS) $(CXXFLAGS) -o"'" > $@ @echo "link='"$(LDSO) -o"'" >> $@ @echo "soext='"$(SOEXT)"'" >> $@ diff --git a/src/core/CLToolMain.cpp b/src/core/CLToolMain.cpp index a77e2b1cc3..891920ea74 100644 --- a/src/core/CLToolMain.cpp +++ b/src/core/CLToolMain.cpp @@ -210,7 +210,7 @@ int CLToolMain::run(int argc, char **argv,FILE*in,FILE*out,Communicator& pc){ fprintf(out," plumed %s\n", manual.c_str()); } for(unsigned j=0;j