ENH: tuning wmake behaviour (#1647)

- preferentially handle Allwmake.override, which allows packaging
  tools to define alternative make scripts, or selectively disable
  components.

- remove legacy handling of 'Optional' directory.
  Conditionals have since migrated into scripts themselves and/or
  use the wmake/scripts/have_* framework.

BUG: missed passing -debug for Allwmake scripts
This commit is contained in:
Mark Olesen
2020-03-25 10:41:29 +01:00
parent 6849c008a1
commit 816e96e0f2
6 changed files with 135 additions and 90 deletions

View File

@ -36,8 +36,11 @@
# Check environment
[ -d "$WM_PROJECT_DIR" ] || {
exec 1>&2
echo "$Script error: The OpenFOAM environment not set or incorrect."
echo " Check OpenFOAM entries in your dot-files and source them."
echo "$0"
echo "Error encountered:"
echo " The OpenFOAM environment not set or incorrect."
echo " Check your setup."
echo
exit 1
}
@ -54,10 +57,11 @@ Executing ${0##*/} is equivalent to
With these additional options:
-l | -log | -log=name
USAGE
See
wmake -help (or wmake -help-full)
wmake -help
exit 0
USAGE
exit 0 # clean exit
}
@ -86,17 +90,17 @@ do
continue # Permanently remove arg
;;
-l | -log)
optLog="log.${WM_OPTIONS:-Allwmake}"
optLog="log.${WM_OPTIONS:-build}"
continue # Permanently remove arg
;;
-log=*)
optLog="${arg##*=}"
if [ -d "$optLog" ]
then
optLog="${optLog%/}/log.${WM_OPTIONS:-Allwmake}"
optLog="${optLog%/}/log.${WM_OPTIONS:-build}"
elif [ -z "$optLog" ]
then
optLog="log.${WM_OPTIONS:-Allwmake}"
optLog="log.${WM_OPTIONS:-build}"
fi
continue # Permanently remove arg
;;
@ -127,7 +131,7 @@ if [ -z "$fromWmake" ]
then
if [ -z "$optLog" ]
then
exec wmake -all $optQueue $*
exec wmake -all $optDebug $optQueue $*
exit $? # Unneeded, but just in case something went wrong
else
echo "Logging wmake -all output to '$optLog'" 1>&2