mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
DOC: update modules/README.md and Cross-Compile-mingw information
COMP: provide modules/Allwmake script - unified entry point with -prefix=... handling (#1721)
This commit is contained in:
43
modules/Allwmake
Executable file
43
modules/Allwmake
Executable file
@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
targetType=libso
|
||||
. "${WM_PROJECT_DIR:?}"/wmake/scripts/AllwmakeParseArguments
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Default build into OpenFOAM project locations unless specified with
|
||||
# -prefix or FOAM_MODULE_PREFIX env varable
|
||||
|
||||
: "${FOAM_MODULE_PREFIX:=${FOAM_LIBBIN%/*}}"
|
||||
export FOAM_MODULE_PREFIX
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Skip some directory names
|
||||
filterDir() {
|
||||
case "$1" in
|
||||
(build | platforms | doc)
|
||||
echo ""
|
||||
;;
|
||||
(*)
|
||||
echo "$1"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
# Build each first-level directory with an Allwmake* file
|
||||
for moduleName in \
|
||||
$(find . -mindepth 2 -maxdepth 2 -name 'Allwmake*' -print | \
|
||||
sed -e 's@^\./@@; s@/.*$@@;' | sort | uniq)
|
||||
do
|
||||
moduleName="$(filterDir "$moduleName")"
|
||||
|
||||
if [ -d "$moduleName" ]
|
||||
then
|
||||
( cd "$moduleName" && wmake -all $targetType )
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user