diff --git a/etc/bashrc b/etc/bashrc index ff61f4f84e..1c63377b8e 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -39,11 +39,12 @@ # - local site-specific directory, uses WM_PROJECT_DIR/site if unset # # Note -# Changes made to this bashrc file may be lost with the next upgrade. +# Changes made to this file will be lost with the next upgrade. # #------------------------------------------------------------------------------ -export WM_PROJECT=OpenFOAM +# [WM_PROJECT_VERSION] - A human-readable version name +# A development version is often named 'com' - as in www.openfoam.com export WM_PROJECT_VERSION=com #------------------------------------------------------------------------------ @@ -67,7 +68,7 @@ export WM_PRECISION_OPTION=DP # = 32 | 64 export WM_LABEL_SIZE=32 -# [WM_COMPILE_OPTION] - Optimised, debug, profiling, other: +# [WM_COMPILE_OPTION] - Optimised(default), debug, profiling, other: # = Opt | Debug | Prof # Other is processor or packaging specific (eg, OptKNL) export WM_COMPILE_OPTION=Opt @@ -82,6 +83,9 @@ export WM_MPLIB=SYSTEMOPENMPI #------------------------------------------------------------------------------ # (advanced / legacy) +# [WM_PROJECT] - This project is "OpenFOAM" - do not change +export WM_PROJECT=OpenFOAM + # [projectDir] - directory containing this OpenFOAM version. # \- When this file is located as $WM_PROJECT_DIR/etc/bashrc, the next lines # should work when sourced by BASH or ZSH shells. If this however fails, diff --git a/etc/cshrc b/etc/cshrc index a4a1c39ed8..9d458a301d 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -39,11 +39,12 @@ # - local site-specific directory, uses WM_PROJECT_DIR/site if unset # # Note -# Changes made to this cshrc file may be lost with the next upgrade. +# Changes made to this file will be lost with the next upgrade. # #------------------------------------------------------------------------------ -setenv WM_PROJECT OpenFOAM +# [WM_PROJECT_VERSION] - A human-readable version name +# A development version is often named 'com' - as in www.openfoam.com setenv WM_PROJECT_VERSION com #------------------------------------------------------------------------------ @@ -67,7 +68,7 @@ setenv WM_PRECISION_OPTION DP # = 32 | 64 setenv WM_LABEL_SIZE 32 -# [WM_COMPILE_OPTION] - Optimised, debug, profiling, other: +# [WM_COMPILE_OPTION] - Optimised(default), debug, profiling, other: # = Opt | Debug | Prof # Other is processor or packaging specific (eg, OptKNL) setenv WM_COMPILE_OPTION Opt @@ -82,6 +83,9 @@ setenv WM_MPLIB SYSTEMOPENMPI #------------------------------------------------------------------------------ # (advanced / legacy) +# [WM_PROJECT] - This project is "OpenFOAM" - do not change +setenv WM_PROJECT OpenFOAM + # [projectDir] - directory containing this OpenFOAM version. # \- When this file is located as $WM_PROJECT_DIR/etc/cshrc, the next lines # should work when sourced by CSH or TCSH shells. If this however fails, diff --git a/wmake/wclean b/wmake/wclean index cc77be3c5a..c7ebcd7bab 100755 --- a/wmake/wclean +++ b/wmake/wclean @@ -46,7 +46,6 @@ usage() { Usage: $Script [OPTION] [dir] $Script [OPTION] target [dir [MakeDir]] - options: -a | -all Same as the 'all' target -s | -silent Ignored - for compatibility with wmake diff --git a/wmake/wmake b/wmake/wmake index 7d4b12b74d..8bc070eb4b 100755 --- a/wmake/wmake +++ b/wmake/wmake @@ -59,15 +59,12 @@ Script="${0##*/}" # Use 'Script' for error messages in wmakeFunctions . "${0%/*}/scripts/wmakeFunctions" # Source wmake functions -unset optHelpFull -usage() { - exec 1>&2 - while [ "$#" -ge 1 ]; do echo "$1"; shift; done +# Print help to stdout so that it can be captured +printHelp() { cat<&2 + echo + echo "Error encountered:" + while [ "$#" -ge 1 ]; do echo " $1"; shift; done + echo + echo "See '${0##*/} -help' for usage" + echo + exit 1 +} + # Default make is the "make" in the path make="make" @@ -149,11 +159,10 @@ while [ "$#" -gt 0 ] do case "$1" in -help-f*) # Full help - optHelpFull=true - usage + printHelp -full ;; -h | -help*) # Short help - usage + printHelp ;; -s | -silent) export WM_QUIET=true @@ -224,7 +233,7 @@ do break ;; -*) - usage "unknown option: '$1'" + die "unknown option: '$1'" ;; *) break