From cdc1a34babc1753fac0e5c5fee8dabebd2bc0db9 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Wed, 19 Jun 2024 14:57:35 +0200 Subject: [PATCH] CONFIG: add top-level Allwmake-modules, Allwmake-plugins scripts --- Allwmake | 17 ++++++++++++++++- Allwmake-modules | 37 +++++++++++++++++++++++++++++++++++++ Allwmake-plugins | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100755 Allwmake-modules create mode 100755 Allwmake-plugins diff --git a/Allwmake b/Allwmake index 514b42e3210..48868685235 100755 --- a/Allwmake +++ b/Allwmake @@ -68,19 +68,34 @@ src/Allwmake $targetType $* # OpenFOAM applications applications/Allwmake $targetType $* +#------------------------------------------------------------------------------ +# Additional components -# Additional components/modules case "$FOAM_MODULE_PREFIX" in (false | none) echo ======================================== echo "OpenFOAM modules disabled (prefix=${FOAM_MODULE_PREFIX})" + echo "Can be built separately:" + echo + echo " ./Allwmake-modules -prefix=..." + echo + echo ======================================== echo ;; (*) # Use wmake -all instead of Allwmake to allow for overrides ( cd "$WM_PROJECT_DIR/modules" 2>/dev/null && wmake -all ) + + echo ======================================== + echo "The optional plugins can be built separately:" + echo + echo " ./Allwmake-plugins -prefix=..." + echo + echo ======================================== + echo esac +#------------------------------------------------------------------------------ # Count files in given directory. Ignore "Test-*" binaries. _foamCountDirEntries() { diff --git a/Allwmake-modules b/Allwmake-modules new file mode 100755 index 00000000000..4a9dc1e022c --- /dev/null +++ b/Allwmake-modules @@ -0,0 +1,37 @@ +#!/bin/sh +# Run from OPENFOAM top-level directory only +cd "${0%/*}" || exit +wmake -check-dir "$WM_PROJECT_DIR" 2>/dev/null || { + echo "Error (${0##*/}) : not located in \$WM_PROJECT_DIR" + echo " Check your OpenFOAM environment and installation" + exit 1 +} +if [ -f "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments ] +then . "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments -no-recursion "$@" || \ + echo "Argument parse error" +else + echo "Error (${0##*/}) : WM_PROJECT_DIR appears to be incorrect" + echo " Check your OpenFOAM environment and installation" + exit 1 +fi + +#------------------------------------------------------------------------------ +# Additional components + +case "$FOAM_MODULE_PREFIX" in +(false | none) + echo ======================================== + echo "OpenFOAM modules disabled (prefix=${FOAM_MODULE_PREFIX})" + echo "Can be built separately:" + echo + echo " ./Allwmake-modules -prefix=..." + echo + echo ======================================== + echo + ;; +(*) + # Use wmake -all instead of Allwmake to allow for overrides + ( cd "$WM_PROJECT_DIR/modules" 2>/dev/null && wmake -all ) +esac + +#------------------------------------------------------------------------------ diff --git a/Allwmake-plugins b/Allwmake-plugins new file mode 100755 index 00000000000..c5aa93794cb --- /dev/null +++ b/Allwmake-plugins @@ -0,0 +1,37 @@ +#!/bin/sh +# Run from OPENFOAM top-level directory only +cd "${0%/*}" || exit +wmake -check-dir "$WM_PROJECT_DIR" 2>/dev/null || { + echo "Error (${0##*/}) : not located in \$WM_PROJECT_DIR" + echo " Check your OpenFOAM environment and installation" + exit 1 +} +if [ -f "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments ] +then . "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments -no-recursion "$@" || \ + echo "Argument parse error" +else + echo "Error (${0##*/}) : WM_PROJECT_DIR appears to be incorrect" + echo " Check your OpenFOAM environment and installation" + exit 1 +fi + +#------------------------------------------------------------------------------ +# Additional components + +case "$FOAM_MODULE_PREFIX" in +(false | none) + echo ======================================== + echo "OpenFOAM plugins disabled (prefix=${FOAM_MODULE_PREFIX})" + echo "Can be built separately:" + echo + echo " ./Allwmake-plugins -prefix=..." + echo + echo ======================================== + echo + ;; +(*) + # Use wmake -all instead of Allwmake to allow for overrides + ( cd "$WM_PROJECT_DIR/plugins" 2>/dev/null && wmake -all ) +esac + +#------------------------------------------------------------------------------ -- GitLab