mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: provide log option for top-level builds (issue #333)
This commit is contained in:
@ -46,6 +46,10 @@ Usage: $Script [OPTIONS]
|
|||||||
Executing $Script is equivalent to
|
Executing $Script is equivalent to
|
||||||
|
|
||||||
wmake -all [OPTIONS]
|
wmake -all [OPTIONS]
|
||||||
|
|
||||||
|
With these additional options:
|
||||||
|
-l | -log
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
|
|
||||||
wmake -help
|
wmake -help
|
||||||
@ -57,8 +61,7 @@ USAGE
|
|||||||
# Parse the arguments and options
|
# Parse the arguments and options
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
fromWmake=
|
unset fromWmake optLog optQueue
|
||||||
qOpt=
|
|
||||||
|
|
||||||
for arg in "$@"
|
for arg in "$@"
|
||||||
do
|
do
|
||||||
@ -70,17 +73,20 @@ do
|
|||||||
usage
|
usage
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
# Check if called from wmake to avoid recusion
|
|
||||||
-fromWmake)
|
-fromWmake)
|
||||||
fromWmake="fromWmake"
|
# If called from wmake (to avoid recursion)
|
||||||
|
fromWmake=true
|
||||||
;;
|
;;
|
||||||
-q)
|
-l | -log)
|
||||||
qOpt="-q"
|
optLog=true
|
||||||
# Permanently remove arg
|
continue # Permanently remove arg
|
||||||
continue
|
;;
|
||||||
|
-q | -queue)
|
||||||
|
optQueue="-q"
|
||||||
|
continue # Permanently remove arg
|
||||||
;;
|
;;
|
||||||
# Target type
|
|
||||||
lib | libo | libso | dep | objects)
|
lib | libo | libso | dep | objects)
|
||||||
|
# Target type
|
||||||
targetType=$arg
|
targetType=$arg
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -96,7 +102,13 @@ done
|
|||||||
|
|
||||||
if [ -z "$fromWmake" ]
|
if [ -z "$fromWmake" ]
|
||||||
then
|
then
|
||||||
exec wmake -all $qOpt $*
|
if [ -z "$optLog" ]
|
||||||
|
then
|
||||||
|
exec wmake -all $optQueue $*
|
||||||
|
else
|
||||||
|
echo "logging wmake -all output to 'log.Allwmake'" 1>&2
|
||||||
|
exec wmake -all $optQueue $* 2>&1 | tee log.Allwmake
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -114,7 +126,8 @@ fi
|
|||||||
# Cleanup local variables and functions
|
# Cleanup local variables and functions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
unset Script usage fromWmake
|
unset Script fromWmake optLog optQueue
|
||||||
|
unset -f usage
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user