From 4f844dabcf1a2198c73ccee047864bbfff0a3998 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@esi-group.com>
Date: Tue, 19 Jun 2018 20:41:57 +0200
Subject: [PATCH] STYLE: use _foamConfig function instead of _foamEtc -config

---
 etc/tools/ThirdPartyFunctions | 6 +++---
 makeADIOS                     | 2 +-
 makeADIOS2                    | 2 +-
 makeCCMIO                     | 2 +-
 makeCGAL                      | 4 ++--
 makeFFTW                      | 2 +-
 makeGcc                       | 2 +-
 makeGperftools                | 2 +-
 makeKAHIP                     | 2 +-
 makeLLVM                      | 2 +-
 makeMETIS                     | 2 +-
 makeMGridGen                  | 2 +-
 makeMPICH                     | 2 +-
 makeMesa                      | 2 +-
 makeOPENMPI                   | 2 +-
 makeParaView                  | 2 +-
 makeVTK                       | 2 +-
 17 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/etc/tools/ThirdPartyFunctions b/etc/tools/ThirdPartyFunctions
index 22f28c3..b3f0c33 100644
--- a/etc/tools/ThirdPartyFunctions
+++ b/etc/tools/ThirdPartyFunctions
@@ -125,7 +125,7 @@ requireWMakeToolchain()
 # Some functions as per OpenFOAM etc/config.sh/functions
 
 unset -f _foamAddLib _foamAddLibAuto _foamAddMan _foamAddPath # Get settings only
-unset -f _foamClean _foamEtc
+unset -f _foamClean _foamConfig
 
 if [ -x "$WM_PROJECT_DIR/bin/foamCleanPath" ]
 then
@@ -140,8 +140,8 @@ else
     _foamClean() { echo "No foamCleanPath" 1>&2; }
 fi
 
-# Source an etc file
-_foamEtc() { eval "$($WM_PROJECT_DIR/bin/foamEtcFile -sh $@)"; }
+# Source an etc/config.sh file
+_foamConfig() { eval "$($WM_PROJECT_DIR/bin/foamEtcFile -sh -config $@)"; }
 
 #------------------------------------------------------------------------------
 
diff --git a/makeADIOS b/makeADIOS
index bd0ca9f..a8dde44 100755
--- a/makeADIOS
+++ b/makeADIOS
@@ -29,7 +29,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
 #------------------------------------------------------------------------------
 
 # ADIOS version from OpenFOAM etc/config.sh file:
-_foamEtc -config ADIOS
+_foamConfig ADIOS
 
 adiosPACKAGE=${adios_version:-adios-none}
 
diff --git a/makeADIOS2 b/makeADIOS2
index 0ef24e4..80e0464 100755
--- a/makeADIOS2
+++ b/makeADIOS2
@@ -27,7 +27,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
 . etc/tools/ThirdPartyFunctions
 #------------------------------------------------------------------------------
 # ADIOS2 version from OpenFOAM etc/config.sh file:
-_foamEtc -config ADIOS2
+_foamConfig ADIOS2
 
 adios2PACKAGE=${adios2_version:-adios-none}
 
diff --git a/makeCCMIO b/makeCCMIO
index 5fbc433..123eabb 100755
--- a/makeCCMIO
+++ b/makeCCMIO
@@ -37,7 +37,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
 #------------------------------------------------------------------------------
 
 # libccmio version from OpenFOAM etc/config.sh file:
-_foamEtc -config ccmio
+_foamConfig ccmio
 
 ccmioPACKAGE=${ccmio_version:-libccmio-2.6.1}
 targetType=lib  # Default is static linkage
diff --git a/makeCGAL b/makeCGAL
index ce54968..c61b5cb 100755
--- a/makeCGAL
+++ b/makeCGAL
@@ -67,8 +67,8 @@ unset BOOST_ARCH_PATH CGAL_ARCH_PATH GMP_ARCH_PATH MPFR_ARCH_PATH   # Purge old
 
 # CGAL, boost and gmp/mpfr versions from OpenFOAM etc/config.sh files.
 # Get compiler first and let CGAL config override GMP and MPFR
-_foamEtc -config compiler
-_foamEtc -config CGAL
+_foamConfig compiler
+_foamConfig CGAL
 
 boostPACKAGE=${boost_version:-boost-system}
 gmpPACKAGE=${gmp_version:-gmp-system}
diff --git a/makeFFTW b/makeFFTW
index dcc7e4e..545dab3 100755
--- a/makeFFTW
+++ b/makeFFTW
@@ -47,7 +47,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
 #------------------------------------------------------------------------------
 
 # FFTW version from OpenFOAM etc/config.sh file:
-_foamEtc -config FFTW
+_foamConfig FFTW
 
 fftwPACKAGE=${fftw_version:-fftw-system}
 
diff --git a/makeGcc b/makeGcc
index b19393f..8f02ec1 100755
--- a/makeGcc
+++ b/makeGcc
@@ -45,7 +45,7 @@ unset GMP_ARCH_PATH MPFR_ARCH_PATH                                  # Purge old
 WM_COMPILER_TYPE=ThirdParty                # Ensure we get the correct settings
 
 # Default GCC, mpfr, gmp and mpc versions from OpenFOAM etc/config.sh file:
-_foamEtc -config compiler
+_foamConfig compiler
 
 gmpPACKAGE=${gmp_version:-gmp-system}
 mpfrPACKAGE=${mpfr_version:-mpfr-system}
diff --git a/makeGperftools b/makeGperftools
index b6a551d..de32b8f 100755
--- a/makeGperftools
+++ b/makeGperftools
@@ -29,7 +29,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
 #------------------------------------------------------------------------------
 
 # Gperftools version from OpenFOAM etc/config.sh file:
-_foamEtc -config gperftools
+_foamConfig gperftools
 
 gperftoolsPACKAGE=${gperftools_version:-gperftools-system}
 
diff --git a/makeKAHIP b/makeKAHIP
index 773fea5..c83c39a 100755
--- a/makeKAHIP
+++ b/makeKAHIP
@@ -61,7 +61,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
 }
 . etc/tools/ThirdPartyFunctions
 #------------------------------------------------------------------------------
-_foamEtc -config kahip
+_foamConfig kahip
 
 kahipPACKAGE=${KAHIP_VERSION:-kahip-system}
 targetType=libso
diff --git a/makeLLVM b/makeLLVM
index 889c917..454c673 100755
--- a/makeLLVM
+++ b/makeLLVM
@@ -50,7 +50,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
 WM_COMPILER_TYPE=ThirdParty                # Ensure we get the correct settings
 
 # LLVM/Clang version from OpenFOAM etc/config.sh file:
-_foamEtc -config compiler
+_foamConfig compiler
 
 llvmPACKAGE=$clang_version
 
diff --git a/makeMETIS b/makeMETIS
index 1fc2e32..2b87e55 100755
--- a/makeMETIS
+++ b/makeMETIS
@@ -61,7 +61,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
 }
 . etc/tools/ThirdPartyFunctions
 #------------------------------------------------------------------------------
-_foamEtc -config metis
+_foamConfig metis
 
 metisPACKAGE=${METIS_VERSION:-metis-system}
 targetType=libso
diff --git a/makeMGridGen b/makeMGridGen
index 30977f8..9fb3a33 100755
--- a/makeMGridGen
+++ b/makeMGridGen
@@ -30,7 +30,7 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
 #------------------------------------------------------------------------------
 
 # mgridgen version from OpenFOAM etc/config.sh file:
-_foamEtc -config mgridgen
+_foamConfig mgridgen
 
 mgridgenPACKAGE=${MGRIDGEN_VERSION:-mgridgen-none}
 
diff --git a/makeMPICH b/makeMPICH
index 756454b..f283d13 100755
--- a/makeMPICH
+++ b/makeMPICH
@@ -58,7 +58,7 @@ _foamAddPath() { true; }
 WM_MPLIB=MPICH                                  # Ensure we get the correct MPI
 
 # mpich version from OpenFOAM etc/config.sh file:
-_foamEtc -config mpi
+_foamConfig mpi
 
 mpiPACKAGE=${FOAM_MPI:-mpich-system}
 
diff --git a/makeMesa b/makeMesa
index 4535ff3..8a96ef0 100755
--- a/makeMesa
+++ b/makeMesa
@@ -37,7 +37,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
 unset vtk_version mesa_version                           # Purge current values
 
 # mesa version from OpenFOAM etc/config.sh file:
-_foamEtc -config vtk
+_foamConfig vtk
 
 mesaPACKAGE=$mesa_version
 
diff --git a/makeOPENMPI b/makeOPENMPI
index b9f578d..7780bf0 100755
--- a/makeOPENMPI
+++ b/makeOPENMPI
@@ -58,7 +58,7 @@ _foamAddPath() { true; }
 WM_MPLIB=OPENMPI                                # Ensure we get the correct MPI
 
 # openmpi version from OpenFOAM etc/config.sh file:
-_foamEtc -config mpi
+_foamConfig mpi
 
 mpiPACKAGE=${FOAM_MPI:-openmpi-system}
 
diff --git a/makeParaView b/makeParaView
index e6f2dd6..9ea7e28 100755
--- a/makeParaView
+++ b/makeParaView
@@ -37,7 +37,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
 unset ParaView_VERSION                                   # Purge current values
 
 # ParaView_VERSION from etc/config.sh file:
-_foamEtc -config paraview
+_foamConfig paraview
 
 # Avoid any potential conflicts (especially if building from git)
 if [ -d "$ParaView_DIR" ]
diff --git a/makeVTK b/makeVTK
index d19a7a5..bb9300d 100755
--- a/makeVTK
+++ b/makeVTK
@@ -40,7 +40,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
 unset vtk_version mesa_version                           # Purge current values
 
 # vtk version from OpenFOAM etc/config.sh file:
-_foamEtc -config vtk
+_foamConfig vtk
 
 VTK_VERSION="$vtk_version"
 
-- 
GitLab