diff --git a/bin/tools/foamListBinDirs b/bin/tools/foamListBinDirs
index 336bd91cde..da2f4d4a37 100755
--- a/bin/tools/foamListBinDirs
+++ b/bin/tools/foamListBinDirs
@@ -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 .
#
# Script
-# foamListBinDirs
+# foamListBinDirs [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 <&2
-Usage : ${0##*/}
+Usage : ${0##*/} [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 <&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 <&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
diff --git a/bin/tools/foamListSourceFiles b/bin/tools/foamListSourceFiles
index 2deedeac8c..ef6c166e4c 100755
--- a/bin/tools/foamListSourceFiles
+++ b/bin/tools/foamListSourceFiles
@@ -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' \
diff --git a/bin/tools/foamListThirdPartyBinDirs b/bin/tools/foamListThirdPartyBinDirs
index 872049628e..c97fefede7 100755
--- a/bin/tools/foamListThirdPartyBinDirs
+++ b/bin/tools/foamListThirdPartyBinDirs
@@ -23,7 +23,7 @@
# along with OpenFOAM. If not, see .
#
# Script
-# foamListThirdPartyBinDirs
+# foamListThirdPartyBinDirs [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 <&2
-Usage : ${0##*/}
+Usage : ${0##*/} [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
diff --git a/wmake/Makefile b/wmake/Makefile
index 72fd3ed087..168710ce19 100644
--- a/wmake/Makefile
+++ b/wmake/Makefile
@@ -106,7 +106,7 @@ SEXE = a.out
GENERAL_RULES = $(WM_DIR)/rules/General
RULES = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER)
-BIN = $(WM_DIR)/bin/$(WM_ARCH)$(WM_COMPILER)
+WMAKE_BIN = $(WM_DIR)/platforms/$(WM_ARCH)$(WM_COMPILER)
include $(GENERAL_RULES)/general
include $(RULES)/general
diff --git a/wmake/makeWmake b/wmake/makeWmake
index bd2a7cae19..3185c80909 100755
--- a/wmake/makeWmake
+++ b/wmake/makeWmake
@@ -3,7 +3,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
-# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
+# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
@@ -26,13 +26,40 @@
# makeWmake
#
# Description
-# Script to build all the system-specific parts of wmake
+# Build platform-specific parts of wmake
#
#------------------------------------------------------------------------------
+usage() {
+ exec 1>&2
+ while [ "$#" -ge 1 ]; do echo "$1"; shift; done
+ cat</dev/null
+ rm -f $(WMAKE_BIN)/* 2>/dev/null
-$(BIN)/dirToString: dirToString.c
- @mkdir -p $(BIN)
- $(cc) $(cFLAGS) dirToString.c -o $(BIN)/dirToString
+$(WMAKE_BIN)/dirToString: dirToString.c
+ @mkdir -p $(WMAKE_BIN)
+ $(cc) $(cFLAGS) dirToString.c -o $(WMAKE_BIN)/dirToString
-$(BIN)/wmkdep: wmkdep.l
- @mkdir -p $(BIN)
+$(WMAKE_BIN)/wmkdep: wmkdep.l
+ @mkdir -p $(WMAKE_BIN)
flex wmkdep.l
- $(cc) $(cFLAGS) lex.yy.c -o $(BIN)/wmkdep
+ $(cc) $(cFLAGS) lex.yy.c -o $(WMAKE_BIN)/wmkdep
@rm -f lex.yy.c 2>/dev/null
# for bootstrapping - use generated files directly (instead of from .atg file)
-$(BIN)/wmkdepend: wmkdepend.cpp \
+$(WMAKE_BIN)/wmkdepend: wmkdepend.cpp \
wmkdependParser.cpp wmkdependScanner.cpp \
wmkdependParser.h wmkdependScanner.h
- @mkdir -p $(BIN)
+ @mkdir -p $(WMAKE_BIN)
$(CC) $(c++FLAGS) \
wmkdepend.cpp wmkdependParser.cpp wmkdependScanner.cpp \
- -o $(BIN)/wmkdepend
+ -o $(WMAKE_BIN)/wmkdepend
#------------------------------------------------------------------------------
diff --git a/wmake/wmake b/wmake/wmake
index 54ee5696e8..37a17eca79 100755
--- a/wmake/wmake
+++ b/wmake/wmake
@@ -3,7 +3,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
-# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
+# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
# \\/ M anipulation |
#-------------------------------------------------------------------------------
# License
@@ -32,6 +32,7 @@
Script=${0##*/}
usage() {
+ exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<