STYLE: improved usage information for wmake
This commit is contained in:
parent
1fe4264f3f
commit
5726d59f63
33
wmake/wmake
33
wmake/wmake
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -35,27 +35,31 @@ Script=${0##*/}
|
||||
usage() {
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
usage: $Script [dir]
|
||||
$Script target [dir [MakeDir]]
|
||||
|
||||
Usage: $Script [OPTION] [dir]
|
||||
$Script [OPTION] target [dir [MakeDir]]
|
||||
|
||||
options:
|
||||
-help print the usage
|
||||
|
||||
A general, easy-to-use make system for multi-platform development
|
||||
|
||||
The 'target' is a Makefile target:
|
||||
e.g., Make/linux64GccDPOpt/fvMesh.o
|
||||
|
||||
or a special target:
|
||||
all all subdirectories
|
||||
or a special target:
|
||||
all all subdirectories (NB: any Allwmake files will be used if they exist)
|
||||
exe build statically linked executable
|
||||
lib build statically linked archive lib (.a)
|
||||
libso build dynamically linked lib (.so)
|
||||
libo build statically linked lib (.o)
|
||||
libso build dynamically linked lib (.so)
|
||||
jar build Java jar
|
||||
|
||||
USAGE
|
||||
exit 1
|
||||
}
|
||||
|
||||
# provide immediate help, even if none of the environment is set
|
||||
# provide immediate help, even if environment is not set
|
||||
if [ "$1" = "-h" -o "$1" = "-help" ]
|
||||
then
|
||||
usage
|
||||
@ -130,16 +134,11 @@ then
|
||||
makeOption=$1
|
||||
fi
|
||||
|
||||
if [ $# -ge 2 ]
|
||||
then
|
||||
dir=$2
|
||||
fi
|
||||
# specified directory name:
|
||||
[ $# -ge 2 ] && dir=$2
|
||||
|
||||
# alternative name for the Make sub-directory
|
||||
if [ $# -ge 3 ]
|
||||
then
|
||||
MakeDir=$3
|
||||
fi
|
||||
# specified alternative name for the Make sub-directory:
|
||||
[ $# -ge 3 ] && MakeDir=$3
|
||||
|
||||
if [ "$dir" ]
|
||||
then
|
||||
@ -221,7 +220,7 @@ OBJECTS_DIR=$MakeDir/$WM_OPTIONS
|
||||
touch $OBJECTS_DIR/dontIncludeDeps
|
||||
|
||||
case "$makeOption" in
|
||||
lib | libso | libo )
|
||||
lib | libo | libso )
|
||||
$make -s -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/dontIncludeDeps lnInclude/uptodate
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user