diff --git a/wmake/MakefileApps b/wmake/makefiles/apps
similarity index 94%
rename from wmake/MakefileApps
rename to wmake/makefiles/apps
index 20955e788..b8abcd2e9 100644
--- a/wmake/MakefileApps
+++ b/wmake/makefiles/apps
@@ -2,7 +2,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
-# \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
+# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
@@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see .
#
# File
-# MakefileApps
+# wmake/makefiles/apps
#
# Description
# Makefile used by
diff --git a/wmake/MakefileFiles b/wmake/makefiles/files
similarity index 99%
rename from wmake/MakefileFiles
rename to wmake/makefiles/files
index 8c5535354..91bff6265 100644
--- a/wmake/MakefileFiles
+++ b/wmake/makefiles/files
@@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see .
#
# File
-# MakefileFiles
+# wmake/makefiles/files
#
# Description
# A Makefile for the 'options' and 'files' files, used by wmake
diff --git a/wmake/Makefile b/wmake/makefiles/general
similarity index 97%
rename from wmake/Makefile
rename to wmake/makefiles/general
index 38f3f1a71..2fc320de1 100644
--- a/wmake/Makefile
+++ b/wmake/makefiles/general
@@ -2,7 +2,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
-# \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
+# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
@@ -22,10 +22,10 @@
# along with OpenFOAM. If not, see .
#
# File
-# Makefile
+# wmake/makefiles/general
#
# Description
-# A generic Makefile, used by wmake
+# Makefile used by wmake to make dependency files and libs and applications
#
#------------------------------------------------------------------------------
diff --git a/wmake/wclean b/wmake/wclean
index 373b76c70..c4f3808ba 100755
--- a/wmake/wclean
+++ b/wmake/wclean
@@ -25,6 +25,10 @@
# Script
# wclean
#
+# Usage
+# wclean [OPTION] [dir]
+# wclean [OPTION] target [dir [MakeDir]]
+#
# Description
# Clean up the wmake control directory Make/\$WM_OPTIONS and remove the
# lnInclude directories generated for libraries.
diff --git a/wmake/wcleanAll b/wmake/wcleanAll
deleted file mode 100755
index 0a425b7e9..000000000
--- a/wmake/wcleanAll
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/bin/sh
-#------------------------------------------------------------------------------
-# ========= |
-# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
-# \\ / O peration |
-# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
-# \\/ M anipulation |
-#-------------------------------------------------------------------------------
-# License
-# This file is part of OpenFOAM.
-#
-# OpenFOAM is free software: you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with OpenFOAM. If not, see .
-#
-# Script
-# wcleanAll
-#
-# Description
-# Deprecated: replaced by wcleanPlatform -all
-#
-# Search all the directories below the current for the object file
-# directories of all machines and delete them.
-#
-#------------------------------------------------------------------------------
-Script=${0##*/}
-
-usage() {
- exec 1>&2
- while [ "$#" -ge 1 ]; do echo "$1"; shift; done
- cat<.
-#
-# Script
-# wcleanMachine
-#
-# Description
-#
-# Deprecated: replaced by wcleanPlatform
-#
-# Searches the directory tree starting at the current directory for the
-# object file directories of the specified machine type(s) and deletes them.
-# If a machine type is not provided the current machine type is assumed.
-#
-# Usage: wcleanMachine [ -current ]
-# wcleanMachine [ .. ]
-#
-#------------------------------------------------------------------------------
-Script=${0##*/}
-
-usage() {
- exec 1>&2
- while [ "$#" -ge 1 ]; do echo "$1"; shift; done
- cat< [ ... ]
+#
# Description
# Deletes the specified platforms object files directories from the
# the project top-level platforms directory $WM_PROJECT_DIR.
#
# You need to be in the project top-level directory to run this script.
#
+# Options
+# -current: clean the current platform
+# -all: clean all platforms
+#
# If either -current or no platform is specified then the current platform
# $WM_OPTIONS is deleted.
#
# If the -all option is specified all platforms and lnInclude directories
# are deleted
#
-# Usage: wcleanPlatform [ -current | -all ]
-# wcleanPlatform [ ... ]
-#
-# -current: clean the current platform
-# -all: clean all platforms
-#
#------------------------------------------------------------------------------
Script=${0##*/}
diff --git a/wmake/wdep b/wmake/wdep
index a89f81138..916ef72cb 100755
--- a/wmake/wdep
+++ b/wmake/wdep
@@ -23,6 +23,9 @@
# along with OpenFOAM. If not, see .
#
# Script
+# wdep
+#
+# Usage
# wdep
# cat `wdep `
#
diff --git a/wmake/wmake b/wmake/wmake
index 2a3c9ed9c..623a15fcd 100755
--- a/wmake/wmake
+++ b/wmake/wmake
@@ -230,7 +230,7 @@ then
then
# Compile all applications in sub-directories
$make ${WM_CONTINUE_ON_ERROR:+-k} \
- -f $WM_DIR/MakefileApps \
+ -f $WM_DIR/makefiles/apps \
TARGET="$targetType" FOAM_APPS="$FOAM_APPS"
fi
# If the current directory contains a 'Make' directory continue
@@ -335,10 +335,11 @@ fi
# Pre-build the $WM_OPTIONS/options file
# which is included when building the $WM_OPTIONS/files file
- $make -s -f $WM_DIR/MakefileFiles MAKE_DIR=$MakeDir OBJECTS_DIR=$objectsDir\
- $objectsDir/options
+ $make -s -f $WM_DIR/makefiles/files MAKE_DIR=$MakeDir \
+ OBJECTS_DIR=$objectsDir $objectsDir/options
- $make -s -f $WM_DIR/MakefileFiles MAKE_DIR=$MakeDir OBJECTS_DIR=$objectsDir
+ $make -s -f $WM_DIR/makefiles/files MAKE_DIR=$MakeDir \
+ OBJECTS_DIR=$objectsDir
)
@@ -363,7 +364,7 @@ case "$targetType" in
# ... but only if 'LIB' is declared in 'Make/files'
if grep -e '^ *LIB *=' "$MakeDir/files" >/dev/null 2>&1
then
- $make -s -f $WM_DIR/Makefile MAKE_DIR=$MakeDir \
+ $make -s -f $WM_DIR/makefiles/general MAKE_DIR=$MakeDir \
OBJECTS_DIR=$objectsDir lnInclude
fi
;;
@@ -374,8 +375,8 @@ esac
# Make the dependency files or object files and link
#------------------------------------------------------------------------------
-exec $make -f $WM_DIR/Makefile MAKE_DIR=$MakeDir OBJECTS_DIR=$objectsDir \
- $targetType
+exec $make -f $WM_DIR/makefiles/general MAKE_DIR=$MakeDir \
+ OBJECTS_DIR=$objectsDir $targetType
#------------------------------------------------------------------------------
diff --git a/wmake/wmakeCheckPwd b/wmake/wmakeCheckPwd
index 75aedba30..f10b6d233 100755
--- a/wmake/wmakeCheckPwd
+++ b/wmake/wmakeCheckPwd
@@ -3,7 +3,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
-# \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
+# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
# \\/ M anipulation |
#-------------------------------------------------------------------------------
# License
@@ -23,6 +23,9 @@
# along with OpenFOAM. If not, see .
#
# Script
+# wmakeCheckPwd
+#
+# Usage
# wmakeCheckPwd
#
# Description
diff --git a/wmake/wmakeFilesAndOptions b/wmake/wmakeFilesAndOptions
index 022d3ed24..560f2c1ad 100755
--- a/wmake/wmakeFilesAndOptions
+++ b/wmake/wmakeFilesAndOptions
@@ -3,7 +3,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
-# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
+# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
# \\/ M anipulation |
#-------------------------------------------------------------------------------
# License
@@ -25,12 +25,13 @@
# Script
# wmakeFilesAndOptions
#
+# Usage
+# wmakeFilesAndOptions
+#
# Description
# Scan current directory for directories and source files
# and construct Make/files and Make/options
#
-# Usage : wmakeFilesAndOptions
-#
#------------------------------------------------------------------------------
Script=${0##*/}
diff --git a/wmake/wmakeLnInclude b/wmake/wmakeLnInclude
index 74f0147cb..05d2b9f51 100755
--- a/wmake/wmakeLnInclude
+++ b/wmake/wmakeLnInclude
@@ -25,17 +25,17 @@
# Script
# wmakeLnInclude
#
+# Usage
+# wmakeLnInclude [-u | -update] [-s | -silent]
+#
# Description
# Link all the source files in the directory into /lnInclude
#
-# Usage: wmakeLnInclude [-f]
-#
# The desired source files:
# *.C *.H *.h *.cpp *.cxx *.hpp *.hxx
#
# Avoid
# *.c (C source)
-# .#* (cvs recovered files)
#
#------------------------------------------------------------------------------
Script=${0##*/}
@@ -48,14 +48,14 @@ usage() {
Usage: $Script [OPTION] dir
options:
- -f | -force force update
+ -u | -update update
-s | -silent use 'silent' mode (do not echo command)
-help print the usage
Link all the source files in the into /lnInclude
Note
- The '-f' option forces an update when the lnInclude directory already exists
+ The '-u' option forces an update when the lnInclude directory already exists
and changes the default linking from 'ln -s' to 'ln -sf'.
USAGE
@@ -73,7 +73,7 @@ unset findOpt
# Default 'ln' option
lnOpt="-s"
-unset forceUpdate silentOpt
+unset update silentOpt
while [ "$#" -gt 0 ]
do
@@ -81,8 +81,8 @@ do
-h | -help) # provide immediate help
usage
;;
- -f | -force)
- forceUpdate=true
+ -u | -update)
+ update=true
lnOpt="-sf"
shift
;;
@@ -126,7 +126,7 @@ incDir=$baseDir/lnInclude
if [ -d $incDir ]
then
- [ "$forceUpdate" = true ] || {
+ [ "$update" = true ] || {
# echo "$Script error: include directory $incDir already exists" 1>&2
exit 0
}
@@ -150,7 +150,7 @@ fi
#------------------------------------------------------------------------------
# Remove any broken links first (this helps when file locations have moved)
#------------------------------------------------------------------------------
-find -L . -type l | xargs rm
+find -L . -type l | xargs rm -f
#------------------------------------------------------------------------------
diff --git a/wmake/wmakeLnIncludeAll b/wmake/wmakeLnIncludeAll
index fb85a6107..2aa833c8d 100755
--- a/wmake/wmakeLnIncludeAll
+++ b/wmake/wmakeLnIncludeAll
@@ -25,9 +25,12 @@
# Script
# wmakeLnIncludeAll
#
+# Usage
+# wmakeLnIncludeAll [dir1 .. dirN]
+#
# Description
# Find directories with a 'Make/files' that contains a 'LIB =' directive
-# and execute 'wmakeLnInclude -f' for each one
+# and execute 'wmakeLnInclude -update' for each one
#
#------------------------------------------------------------------------------
Script=${0##*/}
@@ -39,7 +42,7 @@ usage() {
Usage: $Script [dir1 .. dirN]
Find directories with a 'Make/files' that contains a 'LIB =' directive
- and execute 'wmakeLnInclude -f' for each one
+ and execute 'wmakeLnInclude -update' for each one
USAGE
exit 1
@@ -90,7 +93,7 @@ do
then
if grep -e '^ *LIB *=' "$MakeDir/files" >/dev/null 2>&1
then
- wmakeLnInclude -f $topDir
+ wmakeLnInclude -update $topDir
elif [ -d "$topDir/lnInclude" ]
then
echo "removing spurious $topDir/lnInclude"
diff --git a/wmake/wmakePrintBuild b/wmake/wmakePrintBuild
index cc554513d..c23e63d33 100755
--- a/wmake/wmakePrintBuild
+++ b/wmake/wmakePrintBuild
@@ -3,7 +3,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
-# \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
+# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
# \\/ M anipulation |
#-------------------------------------------------------------------------------
# License
@@ -25,6 +25,9 @@
# Script
# wmakePrintBuild
#
+# Usage
+# wmakePrintBuild [OPTION]
+#
# Description
# Print the version used when building the project
#
diff --git a/wmake/wmakeScheduler b/wmake/wmakeScheduler
index 7b3d51e91..11a22009c 100755
--- a/wmake/wmakeScheduler
+++ b/wmake/wmakeScheduler
@@ -3,7 +3,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
-# \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
+# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
# \\/ M anipulation |
#-------------------------------------------------------------------------------
# License
@@ -25,20 +25,6 @@
# Script
# wmakeScheduler
#
-# Description
-# Scheduler for network distributed compilations using wmake.
-# - WM_HOSTS contains a list of hosts and number of concurrent processes
-# eg,
-# export WM_HOSTS="hostA:1 hostB:2 hostC:1"
-# - WM_COLOURS contains a list of colours to cycle through
-# export WM_COLOURS="black blue green cyan red magenta yellow"
-#
-# Sources the relevant cshrc/bashrc if not set.
-#
-# WM_PROJECT_DIR, WM_PROJECT and WM_PROJECT_VERSION will have been set
-# before calling this routine.
-# FOAM_INST_DIR may possibly have been set (to find installation)
-#
# Usage
# wmakeScheduler COMMAND
# run 'COMMAND' on one of the slots listed in WM_HOSTS
@@ -47,6 +33,20 @@
# count the total number of slots available in WM_HOSTS
# eg, export WM_NCOMPPROCS=$(wmakeScheduler -count)
#
+# Description
+# Scheduler for network distributed compilations using wmake.
+# - WM_HOSTS contains a list of hosts and number of concurrent processes
+# eg,
+# export WM_HOSTS="hostA:1 hostB:2 hostC:1"
+# - WM_COLOURS contains a list of colours to cycle through
+# export WM_COLOURS="black blue green cyan red magenta yellow"
+#
+# Sources the relevant cshrc/bashrc if not set.
+#
+# WM_PROJECT_DIR, WM_PROJECT and WM_PROJECT_VERSION will have been set
+# before calling this routine.
+# FOAM_INST_DIR may possibly have been set (to find installation)
+#
#-------------------------------------------------------------------------------
Script=${0##*/}
diff --git a/wmake/wmakeSchedulerUptime b/wmake/wmakeSchedulerUptime
index eb52f4061..1ef11f97b 100755
--- a/wmake/wmakeSchedulerUptime
+++ b/wmake/wmakeSchedulerUptime
@@ -3,7 +3,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
-# \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
+# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
# \\/ M anipulation |
#-------------------------------------------------------------------------------
# License
@@ -25,6 +25,14 @@
# Script
# wmakeSchedulerUptime
#
+# Usage
+# wmakeSchedulerUptime COMMAND
+# run 'COMMAND' on one of the slots listed in WM_HOSTS
+#
+# wmakeScheduler -count
+# count the total number of slots available in WM_HOSTS
+# eg, export WM_NCOMPPROCS=$(wmakeScheduler -count)
+#
# Description
# Scheduler for network distributed compilations using wmake.
# - WM_HOSTS contains a list of hosts and number of concurrent processes
@@ -39,14 +47,6 @@
# before calling this routine.
# FOAM_INST_DIR may possibly have been set (to find installation)
#
-# Usage
-# wmakeSchedulerUptime COMMAND
-# run 'COMMAND' on one of the slots listed in WM_HOSTS
-#
-# wmakeScheduler -count
-# count the total number of slots available in WM_HOSTS
-# eg, export WM_NCOMPPROCS=$(wmakeScheduler -count)
-#
#-------------------------------------------------------------------------------
Script=${0##*/}
diff --git a/wmake/wrmdep b/wmake/wrmdep
index 785327968..b390205d8 100755
--- a/wmake/wrmdep
+++ b/wmake/wrmdep
@@ -22,7 +22,9 @@
# You should have received a copy of the GNU General Public License
# along with OpenFOAM. If not, see .
#
-# Script
+# Script wrmdep
+#
+# Usage
# wrmdep [-a | -all | all] [file]
# wrmdep [-o | -old] [dir1 .. dirN]
# wrmdep -update
diff --git a/wmake/wrmo b/wmake/wrmo
index 1fb5cc408..b7cab9bf9 100755
--- a/wmake/wrmo
+++ b/wmake/wrmo
@@ -23,6 +23,9 @@
# along with OpenFOAM. If not, see .
#
# Script
+# wrmo
+#
+# Usage
# wrmo [-a | -all | all] [file]
#
# Description