diff --git a/scripts/config.sh b/scripts/config.sh index 727d3e8cad1a3a5a26581a655cc7471a165f86fc..4857e06253a39086e01d3d13a143c80db4cb7a2e 100755 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -48,6 +48,7 @@ do ;; (has) action=has ;; (module) action=module ;; + (python_bin) action=python_bin ;; (*) checklist="$checklist $opt" esac @@ -89,5 +90,16 @@ case $action in git=$(echo "$configfile" | grep -v \# | awk '{ if($1=="version" && $2=="git") print $3 }') echo "Version: $long (git: $git)" ;; +(python_bin) + py=$(echo "$configfile" | grep -v \# | awk '{ if($1=="python_bin") print $2 }') + if test -n "$py" ; then + retval=0 + test "$quiet" = no && echo "$py" + else + retval=1 + test "$quiet" = no && echo "python not found" + fi + exit $retval +;; esac diff --git a/src/config/Makefile b/src/config/Makefile index b023915890f6b36f8ae27b768420d68bc535842b..640d415eacd226b1d8f58238d0e43580902da1b3 100644 --- a/src/config/Makefile +++ b/src/config/Makefile @@ -23,7 +23,7 @@ obj: all config.txt: ../../Makefile.conf @echo "Updating config.txt file" - @ ../maketools/update-config-txt.sh config.txt $(CPPFLAGS) + @python_bin="$(python_bin)" ../maketools/update-config-txt.sh config.txt $(CPPFLAGS) version.h: @echo "Updating version.h" diff --git a/src/maketools/update-config-txt.sh b/src/maketools/update-config-txt.sh index 4efebe16f2a083ab1a3f6d8ca5458ef8ff5fb4fb..a8953be96fff97786eb968fc6a443f52560e04ec 100755 --- a/src/maketools/update-config-txt.sh +++ b/src/maketools/update-config-txt.sh @@ -101,6 +101,8 @@ echo "# version strings" echo "# syntax: version short/long/git number" echo "$version" echo +echo "python_bin $python_bin" +echo echo "# list of 'has' options" echo "# syntax: has name on/of" echo "# if option xx is on then plumed has beeen compiled with -D__PLUMED_HAS_XX"