mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: robustness, consistency for wmake -show-api, -version
- add to wmakeFunctions to ensure it works even without 'make' being
installed. Exit immediately after -show-api for consistency with
-version.
foamEtcFile:
- drop warnings for some old (pre-v1812) defunct options
and simply flag as unknown options.
- handle -version, --version as equivalent to -show-api
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
# Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -74,15 +74,16 @@ options:
|
||||
-with-api=NUM Specify alternative api value to search with
|
||||
-quiet (-q) Suppress all normal output
|
||||
-silent (-s) Suppress stderr, except -csh-verbose, -sh-verbose output
|
||||
-version | --version Print version (same as -show-api)
|
||||
-help Print the usage
|
||||
|
||||
Locate user/group/other file as per '#includeEtc'
|
||||
|
||||
Do not group single character options.
|
||||
Equivalent options:
|
||||
| -mode=MODE | -mode MODE | -m MODE
|
||||
| -prefix=DIR | -prefix DIR | -p DIR [obsolete 1812]
|
||||
| -version=VER | -version VER | -v VER [obsolete 1812]
|
||||
| -mode=MODE | -mode MODE | -m MODE
|
||||
| -prefix=DIR [obsolete 1812]
|
||||
| -version=VER [obsolete 1812]
|
||||
|
||||
Exit status
|
||||
0 when the file is found. Print resolved path to stdout.
|
||||
@ -149,7 +150,7 @@ do
|
||||
-h | -help*)
|
||||
printHelp
|
||||
;;
|
||||
-show-api) # Show API and exit
|
||||
-show-api | -version | --version) # Show API and exit
|
||||
getApiInfo api
|
||||
exit $?
|
||||
;;
|
||||
@ -202,25 +203,17 @@ do
|
||||
-s | -silent)
|
||||
optSilent=true
|
||||
;;
|
||||
|
||||
-etc=*)
|
||||
# FOAM_CONFIG_ETC for finding files. Empty unsets it (later)
|
||||
export FOAM_CONFIG_ETC="${1#*=}"
|
||||
;;
|
||||
-prefix=* | -version=*)
|
||||
echo "ignored defunct option '${1%%=*}'" 1>&2
|
||||
;;
|
||||
-p | -prefix | -v | -version)
|
||||
# Ignored, but still need to check/discard its argument
|
||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||
echo "ignored defunct option '$1'" 1>&2
|
||||
shift
|
||||
;;
|
||||
|
||||
--)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-prefix=* | -version=*)
|
||||
echo "ignored defunct option '${1%%=*}'" 1>&2
|
||||
;;
|
||||
-*)
|
||||
die "unknown option: '$1'"
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user