mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use 'platforms/' for organizing wmake binaries as well
- replaces previously used 'bin/' STYLE: add -help to makeWmake
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -23,7 +23,7 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Script
|
||||
# foamListBinDirs <directory> <archOptions>
|
||||
# foamListBinDirs <directory> [archOptions]
|
||||
#
|
||||
# Description
|
||||
# Lists directories containing binary files of OpenFOAM
|
||||
@ -33,9 +33,9 @@
|
||||
#------------------------------------------------------------------------------
|
||||
toolsDir="${0%/*}" # this script is already located in the tools/ directory
|
||||
|
||||
[ $# -eq 2 ] || {
|
||||
[ $# -eq 1 -o $# -eq 2 ] || {
|
||||
cat <<USAGE 1>&2
|
||||
Usage : ${0##*/} <packDir> <archOptions>
|
||||
Usage : ${0##*/} <packDir> [archOptions]
|
||||
|
||||
* Lists directories containing binary files for OpenFOAM
|
||||
|
||||
@ -49,8 +49,13 @@ USAGE
|
||||
#------------------------------------------------------------------------------
|
||||
packDir="$1"
|
||||
|
||||
# same as $WM_OPTIONS - eg, 'linux64GccDPOpt'
|
||||
archOptions="$2"
|
||||
# default to same as $WM_OPTIONS - eg, 'linux64GccDPOpt'
|
||||
archOptions="${2:-$WM_OPTIONS}"
|
||||
|
||||
[ -n "$archOptions" ] || {
|
||||
echo "Error: no archOptions specified" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
# base arch (w/o precision, optimization, etc)
|
||||
# same as "$WM_ARCH$WM_COMPILER"
|
||||
@ -65,42 +70,18 @@ arch3264=$(echo "$archOS" | sed -e 's@64@-64@')
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# check for essential directories
|
||||
[ -d $packDir ] || {
|
||||
echo "Error: directory $packDir does not exist" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# check places for libraries - same as $FOAM_LIBBIN
|
||||
# this has moved around a bit in the recent past
|
||||
#
|
||||
[ -d $packDir/lib/$archOptions ] || \
|
||||
[ -d $packDir/platforms/$archOptions/lib ] || {
|
||||
cat <<LIB_CHECK 1>&2
|
||||
Error: no directory for libraries exists:
|
||||
$packDir/lib/$archOptions
|
||||
$packDir/platforms/$archOptions/lib
|
||||
LIB_CHECK
|
||||
exit 1
|
||||
}
|
||||
|
||||
#
|
||||
# check places for executables - same as $FOAM_APPBIN
|
||||
# this has moved around a bit in the recent past
|
||||
#
|
||||
[ -d $packDir/applications/bin/$archOptions ] || \
|
||||
[ -d $packDir/platforms/$archOptions/bin ] || {
|
||||
cat <<BIN_CHECK 1>&2
|
||||
Error: no directory for executables exists:
|
||||
$packDir/platforms/$archOptions/bin
|
||||
$packDir/applications/bin/$archOptions
|
||||
BIN_CHECK
|
||||
exit 1
|
||||
}
|
||||
|
||||
for dir in \
|
||||
$packDir \
|
||||
$packDir/platforms/$archOptions/bin \
|
||||
$packDir/platforms/$archOptions/lib \
|
||||
;
|
||||
do
|
||||
[ -d $dir ] || {
|
||||
echo "Error: directory $dir does not exist" 1>&2
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# list of directories
|
||||
@ -108,13 +89,11 @@ dirList=$(
|
||||
for dir in \
|
||||
$packDir/platforms/$archOptions/bin \
|
||||
$packDir/platforms/$archOptions/lib \
|
||||
$packDir/wmake/bin/$archCompiler \
|
||||
$packDir/wmake/bin/$archOS \
|
||||
$packDir/wmake/platforms/$archCompiler \
|
||||
$packDir/wmake/platforms/$archOS \
|
||||
$packDir/wmake/rules/General \
|
||||
$packDir/wmake/rules/$archCompiler \
|
||||
$packDir/wmake/rules/$archOS \
|
||||
$packDir/applications/bin/$archOptions \
|
||||
$packDir/lib/$archOptions \
|
||||
;
|
||||
do
|
||||
[ -d $dir ] && echo $dir
|
||||
|
||||
@ -46,7 +46,7 @@ USAGE
|
||||
packDir=$(echo "$1" | sed -e 's@//*@/@g' -e 's@/$@@')
|
||||
|
||||
# check for essential directories
|
||||
[ -d $packDir ] || {
|
||||
[ -d "$packDir" ] || {
|
||||
echo "Error: directory $packDir does not exist" 1>&2
|
||||
exit 1
|
||||
}
|
||||
@ -77,12 +77,9 @@ find -H $packDir \
|
||||
-a ! -name "core.[1-9]*" \
|
||||
-a ! -name "libccmio*" \
|
||||
| sed \
|
||||
-e "\@$packDir/lib/@d" \
|
||||
-e '\@/\.git/@d' \
|
||||
-e '\@/\.tags/@d' \
|
||||
-e '\@/README\.org@d' \
|
||||
-e '\@/bin/[^/]*/@{ \@/bin/tools/@!d }' \
|
||||
-e '\@/lib/@d' \
|
||||
-e '\@/platforms/@d' \
|
||||
-e '\@/t/@d' \
|
||||
-e '\@/Make[.A-Za-z]*/[^/]*/@d' \
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Script
|
||||
# foamListThirdPartyBinDirs <directory> <archOptions>
|
||||
# foamListThirdPartyBinDirs <directory> [archOptions]
|
||||
#
|
||||
# Description
|
||||
# Lists directories containing binary files for OpenFOAM ThirdParty
|
||||
@ -33,9 +33,9 @@
|
||||
#------------------------------------------------------------------------------
|
||||
toolsDir="${0%/*}" # this script is already located in the tools/ directory
|
||||
|
||||
[ $# -eq 2 ] || {
|
||||
[ $# -eq 1 -o $# -eq 2 ] || {
|
||||
cat <<USAGE 1>&2
|
||||
Usage : ${0##*/} <packDir> <archOptions>
|
||||
Usage : ${0##*/} <packDir> [archOptions]
|
||||
|
||||
* List directories containing binary files for OpenFOAM ThirdParty
|
||||
|
||||
@ -49,8 +49,13 @@ USAGE
|
||||
#------------------------------------------------------------------------------
|
||||
packDir="$1"
|
||||
|
||||
# same as $WM_OPTIONS - eg, 'linux64GccDPOpt'
|
||||
archOptions="$2"
|
||||
# default to same as $WM_OPTIONS - eg, 'linux64GccDPOpt'
|
||||
archOptions="${2:-$WM_OPTIONS}"
|
||||
|
||||
[ -n "$archOptions" ] || {
|
||||
echo "Error: no archOptions specified" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
# base arch (w/o precision, optimization, etc)
|
||||
# same as "$WM_ARCH$WM_COMPILER"
|
||||
@ -66,7 +71,10 @@ arch3264=$(echo "$archOS" | sed -e 's@64@-64@')
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# check for essential directories
|
||||
for dir in $packDir $packDir/platforms/$archOptions/lib
|
||||
for dir in \
|
||||
$packDir \
|
||||
$packDir/platforms/$archOptions/lib \
|
||||
;
|
||||
do
|
||||
[ -d $dir ] || {
|
||||
echo "Error: directory $dir does not exist" 1>&2
|
||||
|
||||
Reference in New Issue
Block a user