Skip to content

Commit

Permalink
adding the possibility to ignore the addition of the extra files
Browse files Browse the repository at this point in the history
  • Loading branch information
Iximiel committed Dec 2, 2024
1 parent 405856b commit 01d3132
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
2 changes: 2 additions & 0 deletions patches/gromacs-2025.0.config
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ EOF
plumed_before_patch(){
plumed_patch_info
}

PLUMED_ONLY_PATCH=true
24 changes: 14 additions & 10 deletions patches/patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -284,16 +284,20 @@ case "$action" in
test -n "$quiet" || echo "Executing plumed_before_patch function"
plumed_before_patch
fi
if test -n "$include" ; then
test -n "$quiet" || echo "Including Plumed.h, Plumed.inc, and Plumed.cmake ($mode mode)"
echo "#include \"$PLUMED_INCLUDEDIR/$PLUMED_PROGRAM_NAME/wrapper/Plumed.h\"" > Plumed.h
echo "include $PLUMED_ROOT/src/lib/Plumed.inc.$mode" > Plumed.inc
echo "include($PLUMED_ROOT/src/lib/Plumed.cmake.$mode)" > Plumed.cmake
else
test -n "$quiet" || echo "Linking Plumed.h, Plumed.inc, and Plumed.cmake ($mode mode)"
ln -fs "$PLUMED_INCLUDEDIR/$PLUMED_PROGRAM_NAME/wrapper/Plumed.h" Plumed.h
ln -fs "$PLUMED_ROOT/src/lib/Plumed.inc.$mode" Plumed.inc
ln -fs "$PLUMED_ROOT/src/lib/Plumed.cmake.$mode" Plumed.cmake

if [[ -z $PLUMED_ONLY_PATCH ]]; then
#PLUMED_ONLY_PATCH is special for programs that have an embedded plumed integration
if test -n "$include" ; then
test -n "$quiet" || echo "Including Plumed.h, Plumed.inc, and Plumed.cmake ($mode mode)"
echo "#include \"$PLUMED_INCLUDEDIR/$PLUMED_PROGRAM_NAME/wrapper/Plumed.h\"" > Plumed.h
echo "include $PLUMED_ROOT/src/lib/Plumed.inc.$mode" > Plumed.inc
echo "include($PLUMED_ROOT/src/lib/Plumed.cmake.$mode)" > Plumed.cmake
else
test -n "$quiet" || echo "Linking Plumed.h, Plumed.inc, and Plumed.cmake ($mode mode)"
ln -fs "$PLUMED_INCLUDEDIR/$PLUMED_PROGRAM_NAME/wrapper/Plumed.h" Plumed.h
ln -fs "$PLUMED_ROOT/src/lib/Plumed.inc.$mode" Plumed.inc
ln -fs "$PLUMED_ROOT/src/lib/Plumed.cmake.$mode" Plumed.cmake
fi
fi

if [ -d "$diff" ]; then
Expand Down

0 comments on commit 01d3132

Please sign in to comment.