mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: support wmake -all=FILE option
- allows specialized versions of ./Allwmake in the local directory
This commit is contained in:
@ -89,7 +89,8 @@ USAGE
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
unset wmakeOpt_frontend wmakeOpt_frontend_arg wmakeOpt_nonRecursive
|
||||
unset wmakeOpt_debug wmakeOpt_log wmakeOpt_openmp wmakeOpt_strict wmakeOpt_queue
|
||||
unset wmakeOpt_debug wmakeOpt_log wmakeOpt_openmp wmakeOpt_strict
|
||||
unset wmakeOpt_all wmakeOpt_queue
|
||||
|
||||
for arg in "$@"
|
||||
do
|
||||
@ -99,7 +100,7 @@ do
|
||||
case "$arg" in
|
||||
('') continue ;; # Empty argument, ignore it
|
||||
|
||||
-h | -help*)
|
||||
-h | -help* | --help*)
|
||||
usage
|
||||
;;
|
||||
|
||||
@ -123,6 +124,17 @@ do
|
||||
# Pass onwards to other Allwmake scripts
|
||||
;;
|
||||
|
||||
-all=*)
|
||||
# Alternative entry point to ./Allwmake
|
||||
wmakeOpt_all="$arg"
|
||||
if [ -z "${wmakeOpt_all##*=}" ]
|
||||
then
|
||||
echo "ignoring -all=... (missing filename)" 1>&2
|
||||
unset wmakeOpt_all
|
||||
fi
|
||||
continue # Argument handled, remove it
|
||||
;;
|
||||
|
||||
-build-root=*)
|
||||
# Alternative location for build intermediates
|
||||
export FOAM_BUILDROOT="${arg#*=}"
|
||||
@ -222,15 +234,18 @@ done
|
||||
|
||||
if [ -z "$wmakeOpt_nonRecursive" ]
|
||||
then
|
||||
# wmake -all=FILE or wmake -all
|
||||
: "${wmakeOpt_all:=-all}"
|
||||
|
||||
if [ -z "$wmakeOpt_log" ]
|
||||
then
|
||||
exec wmake $wmakeOpt_frontend "$wmakeOpt_frontend_arg" -all \
|
||||
exec wmake $wmakeOpt_frontend "$wmakeOpt_frontend_arg" "$wmakeOpt_all" \
|
||||
$wmakeOpt_debug $wmakeOpt_strict $wmakeOpt_queue $wmakeOpt_openmp $*
|
||||
exit $? # Unneeded, but just in case something went wrong
|
||||
else
|
||||
echo "Logging wmake -all output to '$wmakeOpt_log'" 1>&2
|
||||
echo "Logging wmake output to '$wmakeOpt_log'" 1>&2
|
||||
echo 1>&2
|
||||
exec wmake $wmakeOpt_frontend "$wmakeOpt_frontend_arg" -all \
|
||||
exec wmake $wmakeOpt_frontend "$wmakeOpt_frontend_arg" "$wmakeOpt_all" \
|
||||
$wmakeOpt_debug $wmakeOpt_strict $wmakeOpt_queue $wmakeOpt_openmp $* 2>&1 | \
|
||||
/usr/bin/tee $wmakeOpt_log
|
||||
# Need to cleanup after the tee
|
||||
@ -256,7 +271,8 @@ fi
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
unset wmakeOpt_frontend wmakeOpt_frontend_arg wmakeOpt_nonRecursive
|
||||
unset wmakeOpt_debug wmakeOpt_log wmakeOpt_openmp wmakeOpt_strict wmakeOpt_queue
|
||||
unset wmakeOpt_debug wmakeOpt_log wmakeOpt_openmp wmakeOpt_strict
|
||||
unset wmakeOpt_all wmakeOpt_queue
|
||||
unset -f usage
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user