ENH: add wmake -debug option

- forces c++DBUG='-DFULLDEBUG -g -O0' for the compilation, to allow
  localized debugging during development without file editing and
  while retaining the WM_COMPILE_OPTION (eg, Opt)

  Note that switching between 'wmake' and 'wmake -debug' will not
  cause existing targets to be rebuilt. As before, these are driven by
  the dependencies. An intermediate wclean may thus be required.
This commit is contained in:
Mark Olesen
2019-06-03 10:16:31 +02:00
parent 0f218bd2f5
commit 687fd57476
3 changed files with 33 additions and 17 deletions

View File

@ -53,7 +53,7 @@ USAGE
# Parse the arguments and options
#------------------------------------------------------------------------------
unset fromWmake optLog optQueue
unset fromWmake optDebug optLog optQueue
for arg in "$@"
do
@ -88,8 +88,12 @@ do
fi
continue # Permanently remove arg
;;
-debug)
optDebug="-debug"
continue # Permanently remove arg
;;
-q | -queue)
optQueue="-q"
optQueue="-queue"
continue # Permanently remove arg
;;
lib | libo | libso | dep | objects)
@ -116,7 +120,7 @@ then
else
echo "Logging wmake -all output to '$optLog'" 1>&2
echo 1>&2
exec wmake -all $optQueue $* 2>&1 | /usr/bin/tee $optLog
exec wmake -all $optDebug $optQueue $* 2>&1 | /usr/bin/tee $optLog
# Need to cleanup after the tee
rc=$? # Error code from tee (not wmake), but not entirely important
echo "Done logging to '$optLog'" 1>&2
@ -139,7 +143,7 @@ fi
# Cleanup local variables and functions
#------------------------------------------------------------------------------
unset fromWmake optLog optQueue
unset fromWmake optDebug optLog optQueue
unset -f usage