Skip to content
Snippets Groups Projects
Commit 5726d59f authored by Mark Olesen's avatar Mark Olesen
Browse files

STYLE: improved usage information for wmake

parent 1fe4264f
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -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##*/} ...@@ -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 ...@@ -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 ...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment