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