From dd57f3c4b454650beb1242c6f0b5d938bcb91aea Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@Germany>
Date: Thu, 27 Jan 2011 16:22:32 +0100
Subject: [PATCH] STYLE: set makeOption before 'set -x' (cleaner output) in
 Allwmake

---
 src/Allwmake                                 | 4 +---
 src/Pstream/Allwmake                         | 5 ++---
 src/conversion/Allwmake                      | 4 +---
 src/dummyThirdParty/Allwmake                 | 4 +---
 src/fvAgglomerationMethods/Allwmake          | 4 +---
 src/lagrangian/Allwmake                      | 4 +---
 src/lagrangian/molecularDynamics/Allwmake    | 4 +---
 src/mesh/Allwmake                            | 4 +---
 src/parallel/Allwmake                        | 4 +---
 src/parallel/decompose/Allwmake              | 4 +---
 src/parallel/reconstruct/Allwmake            | 5 +----
 src/postProcessing/Allwmake                  | 4 +---
 src/postProcessing/functionObjects/Allwmake  | 4 +---
 src/thermophysicalModels/Allwmake            | 4 +---
 src/transportModels/Allwmake                 | 4 +---
 src/turbulenceModels/LES/Allwmake            | 4 +---
 src/turbulenceModels/compressible/Allwmake   | 4 +---
 src/turbulenceModels/incompressible/Allwmake | 4 +---
 18 files changed, 19 insertions(+), 55 deletions(-)

diff --git a/src/Allwmake b/src/Allwmake
index c2815e58c8b..00bbf8e5e6e 100755
--- a/src/Allwmake
+++ b/src/Allwmake
@@ -1,8 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-
-makeOption=libso
-[ $# -ge 1 ] && makeOption=$1
+[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
 
 wmakeCheckPwd "$WM_PROJECT_DIR/src" || {
     echo "Error: Current directory is not \$WM_PROJECT_DIR/src"
diff --git a/src/Pstream/Allwmake b/src/Pstream/Allwmake
index 7a2f2cd308a..742d3d4478e 100755
--- a/src/Pstream/Allwmake
+++ b/src/Pstream/Allwmake
@@ -1,10 +1,8 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
 set -x
 
-makeOption=libso
-[ $# -ge 1 ] && makeOption=$1
-
 wmake $makeOption dummy
 
 case "$WM_MPLIB" in
@@ -12,6 +10,7 @@ case "$WM_MPLIB" in
     set +x
     echo
     echo "Note: ignore spurious warnings about missing mpicxx.h headers"
+    echo
     set -x
     # force compilation into qualified directory
     WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB  wmake $makeOption mpi
diff --git a/src/conversion/Allwmake b/src/conversion/Allwmake
index cf1e61d47d0..444d3f65491 100755
--- a/src/conversion/Allwmake
+++ b/src/conversion/Allwmake
@@ -1,10 +1,8 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
 set -x
 
-makeOption=libso
-[ $# -ge 1 ] && makeOption=$1
-
 wmake $makeOption
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/dummyThirdParty/Allwmake b/src/dummyThirdParty/Allwmake
index afd49cd5d9d..5076d8d2b72 100755
--- a/src/dummyThirdParty/Allwmake
+++ b/src/dummyThirdParty/Allwmake
@@ -1,10 +1,8 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
 set -x
 
-makeOption=libso
-[ $# -ge 1 ] && makeOption=$1
-
 wmake $makeOption scotchDecomp
 wmake $makeOption ptscotchDecomp
 wmake $makeOption metisDecomp
diff --git a/src/fvAgglomerationMethods/Allwmake b/src/fvAgglomerationMethods/Allwmake
index 27f2fea53ae..fcccbcbe9aa 100755
--- a/src/fvAgglomerationMethods/Allwmake
+++ b/src/fvAgglomerationMethods/Allwmake
@@ -1,10 +1,8 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
 set -x
 
-makeOption=libso
-[ $# -ge 1 ] && makeOption=$1
-
 wmake $makeOption MGridGenGamgAgglomeration
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/lagrangian/Allwmake b/src/lagrangian/Allwmake
index 26fd814f633..e04d7480fbf 100755
--- a/src/lagrangian/Allwmake
+++ b/src/lagrangian/Allwmake
@@ -1,10 +1,8 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
 set -x
 
-makeOption=libso
-[ $# -ge 1 ] && makeOption=$1
-
 wmake $makeOption basic
 wmake $makeOption solidParticle
 wmake $makeOption intermediate
diff --git a/src/lagrangian/molecularDynamics/Allwmake b/src/lagrangian/molecularDynamics/Allwmake
index 131ec5d458e..60b24dea4dd 100755
--- a/src/lagrangian/molecularDynamics/Allwmake
+++ b/src/lagrangian/molecularDynamics/Allwmake
@@ -1,10 +1,8 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
 set -x
 
-makeOption=libso
-[ $# -ge 1 ] && makeOption=$1
-
 wmake $makeOption potential
 wmake $makeOption molecularMeasurements
 wmake $makeOption molecule
diff --git a/src/mesh/Allwmake b/src/mesh/Allwmake
index 57df2d57bf0..f980e0e73fa 100755
--- a/src/mesh/Allwmake
+++ b/src/mesh/Allwmake
@@ -1,10 +1,8 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
 set -x
 
-makeOption=libso
-[ $# -ge 1 ] && makeOption=$1
-
 wmake $makeOption autoMesh
 wmake $makeOption blockMesh
 
diff --git a/src/parallel/Allwmake b/src/parallel/Allwmake
index 92d80e20a8c..d3600e13b19 100755
--- a/src/parallel/Allwmake
+++ b/src/parallel/Allwmake
@@ -1,10 +1,8 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
 set -x
 
-makeOption=libso
-[ $# -ge 1 ] && makeOption=$1
-
 decompose/Allwmake $*
 reconstruct/Allwmake $*
 wmake $makeOption distributed
diff --git a/src/parallel/decompose/Allwmake b/src/parallel/decompose/Allwmake
index 93835f6a244..3848e66478c 100755
--- a/src/parallel/decompose/Allwmake
+++ b/src/parallel/decompose/Allwmake
@@ -1,8 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-
-makeOption=libso
-[ $# -ge 1 ] && makeOption=$1
+[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
 
 # get SCOTCH_VERSION, SCOTCH_ARCH_PATH
 settings=`$WM_PROJECT_DIR/bin/foamEtcFile apps/scotch/bashrc`
diff --git a/src/parallel/reconstruct/Allwmake b/src/parallel/reconstruct/Allwmake
index 453d88f50b3..3d651d5a003 100755
--- a/src/parallel/reconstruct/Allwmake
+++ b/src/parallel/reconstruct/Allwmake
@@ -1,11 +1,8 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
 set -x
 
-makeOption=libso
-[ $# -ge 1 ] && makeOption=$1
-
 wmake $makeOption reconstruct
 
-
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/postProcessing/Allwmake b/src/postProcessing/Allwmake
index d543c26fe1c..5a1caf16606 100755
--- a/src/postProcessing/Allwmake
+++ b/src/postProcessing/Allwmake
@@ -1,10 +1,8 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
 set -x
 
-makeOption=libso
-[ $# -ge 1 ] && makeOption=$1
-
 wmake libo postCalc
 wmake $makeOption foamCalcFunctions
 
diff --git a/src/postProcessing/functionObjects/Allwmake b/src/postProcessing/functionObjects/Allwmake
index 14bdd330e1e..9ae9bd3dca1 100755
--- a/src/postProcessing/functionObjects/Allwmake
+++ b/src/postProcessing/functionObjects/Allwmake
@@ -1,10 +1,8 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
 set -x
 
-makeOption=libso
-[ $# -ge 1 ] && makeOption=$1
-
 wmake $makeOption field
 wmake $makeOption forces
 wmake $makeOption IO
diff --git a/src/thermophysicalModels/Allwmake b/src/thermophysicalModels/Allwmake
index e622e3c15b6..0695c1fba4e 100755
--- a/src/thermophysicalModels/Allwmake
+++ b/src/thermophysicalModels/Allwmake
@@ -1,10 +1,8 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
 set -x
 
-makeOption=libso
-[ $# -ge 1 ] && makeOption=$1
-
 wmake $makeOption specie
 wmake $makeOption solid
 wmake $makeOption thermophysicalFunctions
diff --git a/src/transportModels/Allwmake b/src/transportModels/Allwmake
index 703920418da..f0eba94263e 100755
--- a/src/transportModels/Allwmake
+++ b/src/transportModels/Allwmake
@@ -1,10 +1,8 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
 set -x
 
-makeOption=libso
-[ $# -ge 1 ] && makeOption=$1
-
 wmake $makeOption incompressible
 wmake $makeOption interfaceProperties
 wmake $makeOption twoPhaseInterfaceProperties
diff --git a/src/turbulenceModels/LES/Allwmake b/src/turbulenceModels/LES/Allwmake
index 107251b4221..d24309692e2 100755
--- a/src/turbulenceModels/LES/Allwmake
+++ b/src/turbulenceModels/LES/Allwmake
@@ -1,10 +1,8 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
 set -x
 
-makeOption=libso
-[ $# -ge 1 ] && makeOption=$1
-
 wmakeLnInclude ../incompressible/LES
 
 wmake $makeOption LESfilters
diff --git a/src/turbulenceModels/compressible/Allwmake b/src/turbulenceModels/compressible/Allwmake
index a16b5f9c81f..60605f926d6 100755
--- a/src/turbulenceModels/compressible/Allwmake
+++ b/src/turbulenceModels/compressible/Allwmake
@@ -1,10 +1,8 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
 set -x
 
-makeOption=libso
-[ $# -ge 1 ] && makeOption=$1
-
 wmake $makeOption turbulenceModel
 wmake $makeOption RAS
 wmake $makeOption LES
diff --git a/src/turbulenceModels/incompressible/Allwmake b/src/turbulenceModels/incompressible/Allwmake
index a16b5f9c81f..60605f926d6 100755
--- a/src/turbulenceModels/incompressible/Allwmake
+++ b/src/turbulenceModels/incompressible/Allwmake
@@ -1,10 +1,8 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ $# -ge 1 ] && makeOption=$1 || makeOption=libso
 set -x
 
-makeOption=libso
-[ $# -ge 1 ] && makeOption=$1
-
 wmake $makeOption turbulenceModel
 wmake $makeOption RAS
 wmake $makeOption LES
-- 
GitLab