diff --git a/src/Pstream/Allwmake b/src/Pstream/Allwmake
index cb2c43e843246ec3b50afc715b2492a8a4228db8..a24dd16a5db6d9e5af462c67d9fd014c668852e9 100755
--- a/src/Pstream/Allwmake
+++ b/src/Pstream/Allwmake
@@ -5,18 +5,18 @@ set -x
 wmake libso dummy
 
 case "$WM_MPLIB" in
-GAMMA)
-    wmake libso gamma
-    ;;
-
 LAM | *MPI* )
-    WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB
     set +x
     echo
     echo "Note: ignore spurious warnings about missing mpicxx.h headers"
     set -x
-    wmake libso mpi
+    (WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB; wmake libso mpi)
     ;;
+
+#GAMMA)
+#    wmake libso gamma
+#    ;;
 esac
 
+
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/decompositionAgglomeration/Allwmake b/src/decompositionAgglomeration/Allwmake
index 144244776fe0ba056d03216495084e4542068531..3294fe48c349607d3862d65dffa0d74af840a46d 100755
--- a/src/decompositionAgglomeration/Allwmake
+++ b/src/decompositionAgglomeration/Allwmake
@@ -6,7 +6,7 @@ wmake libso decompositionMethods
 
 if [ -d "$FOAM_MPI_LIBBIN" ]
 then
-    wmake libso parMetisDecomp
+    (WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB; wmake libso parMetisDecomp)
 fi
 
 wmake libso MGridGenGamgAgglomeration