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 merge requests found
......@@ -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
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment