From 5d0b3348c59a9d7686d9e4bbdfca0d14109efd43 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@Germany>
Date: Wed, 5 Nov 2008 10:39:06 +0100
Subject: [PATCH] can call Allwmake scripts directly instead of with ( cd foo
 && ./Allwmake )

---
 Allwmake                                         |  8 ++++----
 applications/Allwmake                            |  4 ++--
 .../utilities/mesh/conversion/Optional/Allwmake  |  8 +++-----
 .../utilities/mesh/manipulation/setSet/Allwmake  |  5 +++--
 doc/Allwmake                                     |  2 +-
 src/Allwmake                                     | 16 ++++++++--------
 src/lagrangian/Allwmake                          |  4 ++--
 src/lagrangian/molecularDynamics/Allwmake        |  8 ++++++++
 src/turbulenceModels/Allwmake                    |  4 ++--
 9 files changed, 33 insertions(+), 26 deletions(-)
 create mode 100755 src/lagrangian/molecularDynamics/Allwmake

diff --git a/Allwmake b/Allwmake
index d0110357f83..ca2113e522c 100755
--- a/Allwmake
+++ b/Allwmake
@@ -5,15 +5,15 @@ set -x
 # wmake is required for subsequent targets
 ( cd wmake/src && make )
 
+# build ThirdParty sources
 ( cd $WM_THIRD_PARTY_DIR && ./Allwmake )
 
-( cd src && ./Allwmake )
-
-( cd applications && ./Allwmake )
+src/Allwmake
+applications/Allwmake
 
 if [ "$1" = doc ]
 then
-   ( cd doc && ./Allwmake )
+    doc/Allwmake
 fi
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/applications/Allwmake b/applications/Allwmake
index 0c582570683..2a7eeae1245 100755
--- a/applications/Allwmake
+++ b/applications/Allwmake
@@ -2,7 +2,7 @@
 cd ${0%/*} || exit 1    # run from this directory
 set -x
 
-( cd solvers   && wmake all )
-( cd utilities && wmake all )
+wmake all solvers
+wmake all utilities
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/applications/utilities/mesh/conversion/Optional/Allwmake b/applications/utilities/mesh/conversion/Optional/Allwmake
index 2734e415622..ae71b400fa5 100755
--- a/applications/utilities/mesh/conversion/Optional/Allwmake
+++ b/applications/utilities/mesh/conversion/Optional/Allwmake
@@ -7,14 +7,12 @@ set -x
 
 
 # build libccmio and create lnInclude directory
-(
-   cd $WM_THIRD_PARTY_DIR && ./AllwmakeLibccmio
-)
+( cd $WM_THIRD_PARTY_DIR && ./AllwmakeLibccmio )
 
-# if the library built okay, the headers should exist too
+# if the library built properly, the headers should exist too
 if [ -e $FOAM_LIBBIN/libccmio.so ]
 then
-   wmake ccm26ToFoam
+    wmake ccm26ToFoam
 fi
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/applications/utilities/mesh/manipulation/setSet/Allwmake b/applications/utilities/mesh/manipulation/setSet/Allwmake
index e10d037cbc8..1e116a3315f 100755
--- a/applications/utilities/mesh/manipulation/setSet/Allwmake
+++ b/applications/utilities/mesh/manipulation/setSet/Allwmake
@@ -2,8 +2,9 @@
 cd ${0%/*} || exit 1    # run from this directory
 
 READLINE=0
-if [ -f /usr/include/readline/readline.h ]; then
-    echo "Found readline/readline.h include file. Enabling readline support."
+if [ -f /usr/include/readline/readline.h ]
+then
+    echo "Found readline/readline.h  --  enabling readline support."
     READLINE=1
     export READLINELINK="-lreadline -lncurses"
     break
diff --git a/doc/Allwmake b/doc/Allwmake
index e75f1030e2c..e180b24e0f0 100755
--- a/doc/Allwmake
+++ b/doc/Allwmake
@@ -6,6 +6,6 @@ chmod a+rX $WM_PROJECT_DIR
 chmod a+rX $WM_PROJECT_DIR/doc
 chmod -R a+rX Doxygen
 
-( cd Doxygen && ./Allwmake )
+Doxygen/Allwmake
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/Allwmake b/src/Allwmake
index 76cc0b157c7..35b8f55b886 100755
--- a/src/Allwmake
+++ b/src/Allwmake
@@ -4,7 +4,7 @@ set -x
 
 wmakeLnInclude -f OpenFOAM
 wmakeLnInclude -f OSspecific/$WM_OS
-( cd Pstream && ./Allwmake )
+Pstream/Allwmake
 
 wmake libo  OSspecific/$WM_OS
 wmake libso OpenFOAM
@@ -17,7 +17,7 @@ wmake libso surfMesh
 wmake libso meshTools
 wmake libso finiteVolume
 
-( cd decompositionAgglomeration && ./Allwmake )
+decompositionAgglomeration/Allwmake
 
 wmake libso sampling
 
@@ -30,12 +30,12 @@ wmake libso engine
 wmake libso ODE
 wmake libso randomProcesses
 
-( cd thermophysicalModels && ./Allwmake )
-( cd transportModels && ./Allwmake )
-( cd turbulenceModels && ./Allwmake )
-( cd lagrangian && ./Allwmake )
-( cd postProcessing && ./Allwmake )
-( cd conversion && ./Allwmake )
+thermophysicalModels/Allwmake
+transportModels/Allwmake
+turbulenceModels/Allwmake
+lagrangian/Allwmake
+postProcessing/Allwmake
+conversion/Allwmake
 
 wmake libso autoMesh
 wmake libso errorEstimation
diff --git a/src/lagrangian/Allwmake b/src/lagrangian/Allwmake
index a3aa1794909..41b2fd9bf93 100755
--- a/src/lagrangian/Allwmake
+++ b/src/lagrangian/Allwmake
@@ -6,7 +6,7 @@ wmake libso basic
 wmake libso solidParticle
 wmake libso intermediate
 wmake libso dieselSpray
-(cd molecularDynamics && wmake libso potential)
-(cd molecularDynamics && wmake libso molecule)
+
+molecularDynamics/Allwmake
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/lagrangian/molecularDynamics/Allwmake b/src/lagrangian/molecularDynamics/Allwmake
new file mode 100755
index 00000000000..c40ffc2a1bf
--- /dev/null
+++ b/src/lagrangian/molecularDynamics/Allwmake
@@ -0,0 +1,8 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # run from this directory
+set -x
+
+wmake libso potential
+wmake libso molecule
+
+# ----------------------------------------------------------------- end-of-file
diff --git a/src/turbulenceModels/Allwmake b/src/turbulenceModels/Allwmake
index b4633551acf..b542eeeeaed 100755
--- a/src/turbulenceModels/Allwmake
+++ b/src/turbulenceModels/Allwmake
@@ -2,7 +2,7 @@
 cd ${0%/*} || exit 1    # run from this directory
 set -x
 
-( cd RAS && ./Allwmake )
-( cd LES && ./Allwmake )
+RAS/Allwmake
+LES/Allwmake
 
 # ----------------------------------------------------------------- end-of-file
-- 
GitLab