diff --git a/scripts/config.sh b/scripts/config.sh index 727d3e8cad1a3a5a26581a655cc7471a165f86fc..a5a0df583fa64892b5bc1576ec6f4c978edbfa82 100755 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -13,6 +13,8 @@ Options: check if plumed has features words module [word1 [word2]..] check if plumed has enables modules words + makefile_conf + dumps the Makefile.conf file Examples: @@ -48,6 +50,10 @@ do ;; (has) action=has ;; (module) action=module ;; + (makefile_conf) + echo "$configfile" | awk '{if($1=="makefile_conf") { gsub("^makefile_conf ",""); print} }' + exit 0 + ;; (*) checklist="$checklist $opt" esac diff --git a/src/config/Makefile b/src/config/Makefile index b023915890f6b36f8ae27b768420d68bc535842b..815ca69729e14f97454b39cb44a3046bf390c5d5 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) + @makefile_conf="$(realpath ../../Makefile.conf)" ../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..887e0c747b006f8fa0368d58dcff779dedddba37 100755 --- a/src/maketools/update-config-txt.sh +++ b/src/maketools/update-config-txt.sh @@ -131,6 +131,10 @@ echo echo "# list of modules" echo "# syntax: module name on/off (default-on/default-off/always)" echo "$modules" | sort +echo +echo "# Makefile.conf file" +echo "# syntax: makefile_conf followed by a single space followed by a line from makefile_conf" +cat "$makefile_conf" | awk '{printf("makefile_conf %s\n",$0)}' }> $file~