STYLE: adjust log name for 'Allwmake -log' (issue #333)

- now defaults to 'log.$WM_OPTIONS' (eg, log.linux64GccDPInt32Opt)
  for more clarity and fewer potential name clashes when building
  multiple versions.
This commit is contained in:
Mark Olesen
2016-12-15 13:20:21 +01:00
parent e6f8d27553
commit 91b7ede14b

View File

@ -32,18 +32,13 @@
# . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments # . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
Script=${0##*/}
usage() { usage() {
exec 1>&2 exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done while [ "$#" -ge 1 ]; do echo "$1"; shift; done
# Print normal usage options # Print normal usage options
cat<<USAGE cat<<USAGE
Executing ${0##*/} is equivalent to
Usage: $Script [OPTIONS]
Executing $Script is equivalent to
wmake -all [OPTIONS] wmake -all [OPTIONS]
@ -53,7 +48,7 @@ With these additional options:
USAGE USAGE
wmake -help wmake -help
exit 1 exit 0
} }
@ -71,19 +66,18 @@ do
case "$arg" in case "$arg" in
-h | -help) -h | -help)
usage usage
exit 0
;; ;;
-fromWmake) -fromWmake)
# If called from wmake (to avoid recursion) # If called from wmake (to avoid recursion)
fromWmake=true fromWmake=true
;; ;;
-l | -log) -l | -log)
optLog="log.Allwmake" optLog="log.${WM_OPTIONS:-Allwmake}"
continue # Permanently remove arg continue # Permanently remove arg
;; ;;
-log=*) -log=*)
optLog="${arg##*=}" optLog="${arg##*=}"
[ -n "$optLog" ] || optLog="log.Allwmake" [ -n "$optLog" ] || optLog="log.${WM_OPTIONS:-Allwmake}"
continue # Permanently remove arg continue # Permanently remove arg
;; ;;
-q | -queue) -q | -queue)
@ -131,7 +125,7 @@ fi
# Cleanup local variables and functions # Cleanup local variables and functions
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
unset Script fromWmake optLog optQueue unset fromWmake optLog optQueue
unset -f usage unset -f usage