mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
wmake: General cleanup to improve consistency and maintainability
The Makefiles are now in the makefiles sub-directory The "-f | -force" option in wmakeLnInclude is now "-u | -update" for consistency with the other scripts. The "Usage" entry in the headers is now consistently formatted in all scripts.
This commit is contained in:
@ -2,7 +2,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) 2011-2014 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -22,7 +22,7 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# MakefileApps
|
# wmake/makefiles/apps
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Makefile used by
|
# Makefile used by
|
||||||
@ -22,7 +22,7 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# MakefileFiles
|
# wmake/makefiles/files
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# A Makefile for the 'options' and 'files' files, used by wmake
|
# A Makefile for the 'options' and 'files' files, used by wmake
|
||||||
@ -2,7 +2,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) 2011-2014 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -22,10 +22,10 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# Makefile
|
# wmake/makefiles/general
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# A generic Makefile, used by wmake
|
# Makefile used by wmake to make dependency files and libs and applications
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -25,6 +25,10 @@
|
|||||||
# Script
|
# Script
|
||||||
# wclean
|
# wclean
|
||||||
#
|
#
|
||||||
|
# Usage
|
||||||
|
# wclean [OPTION] [dir]
|
||||||
|
# wclean [OPTION] target [dir [MakeDir]]
|
||||||
|
#
|
||||||
# Description
|
# Description
|
||||||
# Clean up the wmake control directory Make/\$WM_OPTIONS and remove the
|
# Clean up the wmake control directory Make/\$WM_OPTIONS and remove the
|
||||||
# lnInclude directories generated for libraries.
|
# lnInclude directories generated for libraries.
|
||||||
|
|||||||
@ -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 <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# 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<<USAGE
|
|
||||||
Deprecated: replaced by wcleanPlatform -all
|
|
||||||
|
|
||||||
Usage: $Script
|
|
||||||
|
|
||||||
Remove all object and related files
|
|
||||||
|
|
||||||
USAGE
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# Parse arguments and options
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
while [ "$#" -gt 0 ]
|
|
||||||
do
|
|
||||||
case "$1" in
|
|
||||||
-h | -help)
|
|
||||||
usage
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
usage "unknown option/argument: '$*'"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
[ "$PWD" = "$WM_PROJECT_DIR" ] \
|
|
||||||
|| usage "Not in the project top-level directory"
|
|
||||||
|
|
||||||
|
|
||||||
echo "Removing platforms/sub-directories"
|
|
||||||
rm -rf platforms/*
|
|
||||||
|
|
||||||
echo "Cleaning Make sub-directories"
|
|
||||||
find . -depth \( -name Make -o -name "Make.[A-Za-z]*" \) -type d -print | \
|
|
||||||
xargs -I {} find '{}' -mindepth 1 -maxdepth 1 -type d -print | \
|
|
||||||
xargs rm -rf
|
|
||||||
|
|
||||||
echo "Removing lnInclude directories"
|
|
||||||
find . -depth -type d \( -name lnInclude \) -exec rm -rf {} \;
|
|
||||||
|
|
||||||
echo "Removing misc files"
|
|
||||||
find . \( -name exe -o -name log \) -exec rm {} \;
|
|
||||||
|
|
||||||
tutorials/Allclean
|
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# Cleanup local variables and functions
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
unset Script usage
|
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
@ -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) 2011-2014 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -25,10 +25,13 @@
|
|||||||
# Script
|
# Script
|
||||||
# wcleanLnIncludeAll
|
# wcleanLnIncludeAll
|
||||||
#
|
#
|
||||||
|
# Usage
|
||||||
|
# wcleanLnIncludeAll [dir1] .. [dirN]
|
||||||
|
#
|
||||||
# Description
|
# Description
|
||||||
# Delete all the lnInclude directories in the tree.
|
# Delete all the lnInclude directories in the tree.
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
##------------------------------------------------------------------------------
|
||||||
Script=${0##*/}
|
Script=${0##*/}
|
||||||
|
|
||||||
# Default to the CWD
|
# Default to the CWD
|
||||||
|
|||||||
@ -1,103 +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 <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# 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 <machineType> [ .. <machineTypeN> ]
|
|
||||||
#
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
Script=${0##*/}
|
|
||||||
|
|
||||||
usage() {
|
|
||||||
exec 1>&2
|
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
|
||||||
cat<<USAGE
|
|
||||||
Deprecated: replaced by wcleanPlatform
|
|
||||||
|
|
||||||
Usage: $Script machineType [... machineTypeN] [ -current ]
|
|
||||||
|
|
||||||
Searches the directory tree starting at the current directory for the
|
|
||||||
object file directories of the specified machine type(s) and deletes them.
|
|
||||||
If either -current or no machine type is specified then the current type
|
|
||||||
is assumed (from $WM_OPTIONS).
|
|
||||||
|
|
||||||
USAGE
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Print help message
|
|
||||||
if [ "$1" = "-h" -o "$1" = "-help" ]
|
|
||||||
then
|
|
||||||
usage
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get the machines from the arguments
|
|
||||||
machines="$@"
|
|
||||||
|
|
||||||
# If no arguments are provided default to current machine type
|
|
||||||
if [ "$#" -lt 1 ]
|
|
||||||
then
|
|
||||||
machines="-current"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Loop over all the machine types specified and delete the object directories
|
|
||||||
for machType in $machines
|
|
||||||
do
|
|
||||||
if [ "$machType" = "-current" ]
|
|
||||||
then
|
|
||||||
machType="$WM_OPTIONS"
|
|
||||||
echo "Current machine type: $machType"
|
|
||||||
[ -n "$machType" ] || continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Cleaning machine type: $machType"
|
|
||||||
|
|
||||||
find . -depth \( -name Make -o -name "Make.[A-Za-z]*" \) -type d -print | \
|
|
||||||
xargs -I {} find '{}' -mindepth 1 -maxdepth 1 \
|
|
||||||
\( -type d -name "*$machType" -o -name "*$machType$WM_MPLIB" \) \
|
|
||||||
-print | xargs rm -rf
|
|
||||||
|
|
||||||
rm -rf platforms/${machType}*
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# Cleanup local variables and functions
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
unset Script machines
|
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
@ -25,24 +25,26 @@
|
|||||||
# Script
|
# Script
|
||||||
# wcleanPlatform
|
# wcleanPlatform
|
||||||
#
|
#
|
||||||
|
# Usage
|
||||||
|
# wcleanPlatform [ -current | -all ]
|
||||||
|
# wcleanPlatform <platform> [ ... <platformN> ]
|
||||||
|
#
|
||||||
# Description
|
# Description
|
||||||
# Deletes the specified platforms object files directories from the
|
# Deletes the specified platforms object files directories from the
|
||||||
# the project top-level platforms directory $WM_PROJECT_DIR.
|
# the project top-level platforms directory $WM_PROJECT_DIR.
|
||||||
#
|
#
|
||||||
# You need to be in the project top-level directory to run this script.
|
# 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
|
# If either -current or no platform is specified then the current platform
|
||||||
# $WM_OPTIONS is deleted.
|
# $WM_OPTIONS is deleted.
|
||||||
#
|
#
|
||||||
# If the -all option is specified all platforms and lnInclude directories
|
# If the -all option is specified all platforms and lnInclude directories
|
||||||
# are deleted
|
# are deleted
|
||||||
#
|
#
|
||||||
# Usage: wcleanPlatform [ -current | -all ]
|
|
||||||
# wcleanPlatform <platform> [ ... <platformN> ]
|
|
||||||
#
|
|
||||||
# -current: clean the current platform
|
|
||||||
# -all: clean all platforms
|
|
||||||
#
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
Script=${0##*/}
|
Script=${0##*/}
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,9 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# Script
|
# Script
|
||||||
|
# wdep
|
||||||
|
#
|
||||||
|
# Usage
|
||||||
# wdep <file>
|
# wdep <file>
|
||||||
# cat `wdep <file>`
|
# cat `wdep <file>`
|
||||||
#
|
#
|
||||||
|
|||||||
15
wmake/wmake
15
wmake/wmake
@ -230,7 +230,7 @@ then
|
|||||||
then
|
then
|
||||||
# Compile all applications in sub-directories
|
# Compile all applications in sub-directories
|
||||||
$make ${WM_CONTINUE_ON_ERROR:+-k} \
|
$make ${WM_CONTINUE_ON_ERROR:+-k} \
|
||||||
-f $WM_DIR/MakefileApps \
|
-f $WM_DIR/makefiles/apps \
|
||||||
TARGET="$targetType" FOAM_APPS="$FOAM_APPS"
|
TARGET="$targetType" FOAM_APPS="$FOAM_APPS"
|
||||||
fi
|
fi
|
||||||
# If the current directory contains a 'Make' directory continue
|
# If the current directory contains a 'Make' directory continue
|
||||||
@ -335,10 +335,11 @@ fi
|
|||||||
|
|
||||||
# Pre-build the $WM_OPTIONS/options file
|
# Pre-build the $WM_OPTIONS/options file
|
||||||
# which is included when building the $WM_OPTIONS/files file
|
# which is included when building the $WM_OPTIONS/files file
|
||||||
$make -s -f $WM_DIR/MakefileFiles MAKE_DIR=$MakeDir OBJECTS_DIR=$objectsDir\
|
$make -s -f $WM_DIR/makefiles/files MAKE_DIR=$MakeDir \
|
||||||
$objectsDir/options
|
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'
|
# ... but only if 'LIB' is declared in 'Make/files'
|
||||||
if grep -e '^ *LIB *=' "$MakeDir/files" >/dev/null 2>&1
|
if grep -e '^ *LIB *=' "$MakeDir/files" >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
$make -s -f $WM_DIR/Makefile MAKE_DIR=$MakeDir \
|
$make -s -f $WM_DIR/makefiles/general MAKE_DIR=$MakeDir \
|
||||||
OBJECTS_DIR=$objectsDir lnInclude
|
OBJECTS_DIR=$objectsDir lnInclude
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@ -374,8 +375,8 @@ esac
|
|||||||
# Make the dependency files or object files and link
|
# Make the dependency files or object files and link
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
exec $make -f $WM_DIR/Makefile MAKE_DIR=$MakeDir OBJECTS_DIR=$objectsDir \
|
exec $make -f $WM_DIR/makefiles/general MAKE_DIR=$MakeDir \
|
||||||
$targetType
|
OBJECTS_DIR=$objectsDir $targetType
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -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) 2011-2014 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -23,6 +23,9 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# Script
|
# Script
|
||||||
|
# wmakeCheckPwd
|
||||||
|
#
|
||||||
|
# Usage
|
||||||
# wmakeCheckPwd <dir>
|
# wmakeCheckPwd <dir>
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -25,12 +25,13 @@
|
|||||||
# Script
|
# Script
|
||||||
# wmakeFilesAndOptions
|
# wmakeFilesAndOptions
|
||||||
#
|
#
|
||||||
|
# Usage
|
||||||
|
# wmakeFilesAndOptions
|
||||||
|
#
|
||||||
# Description
|
# Description
|
||||||
# Scan current directory for directories and source files
|
# Scan current directory for directories and source files
|
||||||
# and construct Make/files and Make/options
|
# and construct Make/files and Make/options
|
||||||
#
|
#
|
||||||
# Usage : wmakeFilesAndOptions
|
|
||||||
#
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
Script=${0##*/}
|
Script=${0##*/}
|
||||||
|
|
||||||
|
|||||||
@ -25,17 +25,17 @@
|
|||||||
# Script
|
# Script
|
||||||
# wmakeLnInclude
|
# wmakeLnInclude
|
||||||
#
|
#
|
||||||
|
# Usage
|
||||||
|
# wmakeLnInclude [-u | -update] [-s | -silent] <dir>
|
||||||
|
#
|
||||||
# Description
|
# Description
|
||||||
# Link all the source files in the <dir> directory into <dir>/lnInclude
|
# Link all the source files in the <dir> directory into <dir>/lnInclude
|
||||||
#
|
#
|
||||||
# Usage: wmakeLnInclude [-f] <dir>
|
|
||||||
#
|
|
||||||
# The desired source files:
|
# The desired source files:
|
||||||
# *.C *.H *.h *.cpp *.cxx *.hpp *.hxx
|
# *.C *.H *.h *.cpp *.cxx *.hpp *.hxx
|
||||||
#
|
#
|
||||||
# Avoid
|
# Avoid
|
||||||
# *.c (C source)
|
# *.c (C source)
|
||||||
# .#* (cvs recovered files)
|
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
Script=${0##*/}
|
Script=${0##*/}
|
||||||
@ -48,14 +48,14 @@ usage() {
|
|||||||
Usage: $Script [OPTION] dir
|
Usage: $Script [OPTION] dir
|
||||||
|
|
||||||
options:
|
options:
|
||||||
-f | -force force update
|
-u | -update update
|
||||||
-s | -silent use 'silent' mode (do not echo command)
|
-s | -silent use 'silent' mode (do not echo command)
|
||||||
-help print the usage
|
-help print the usage
|
||||||
|
|
||||||
Link all the source files in the <dir> into <dir>/lnInclude
|
Link all the source files in the <dir> into <dir>/lnInclude
|
||||||
|
|
||||||
Note
|
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'.
|
and changes the default linking from 'ln -s' to 'ln -sf'.
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
@ -73,7 +73,7 @@ unset findOpt
|
|||||||
# Default 'ln' option
|
# Default 'ln' option
|
||||||
lnOpt="-s"
|
lnOpt="-s"
|
||||||
|
|
||||||
unset forceUpdate silentOpt
|
unset update silentOpt
|
||||||
|
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
@ -81,8 +81,8 @@ do
|
|||||||
-h | -help) # provide immediate help
|
-h | -help) # provide immediate help
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
-f | -force)
|
-u | -update)
|
||||||
forceUpdate=true
|
update=true
|
||||||
lnOpt="-sf"
|
lnOpt="-sf"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
@ -126,7 +126,7 @@ incDir=$baseDir/lnInclude
|
|||||||
|
|
||||||
if [ -d $incDir ]
|
if [ -d $incDir ]
|
||||||
then
|
then
|
||||||
[ "$forceUpdate" = true ] || {
|
[ "$update" = true ] || {
|
||||||
# echo "$Script error: include directory $incDir already exists" 1>&2
|
# echo "$Script error: include directory $incDir already exists" 1>&2
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
@ -150,7 +150,7 @@ fi
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Remove any broken links first (this helps when file locations have moved)
|
# 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
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -25,9 +25,12 @@
|
|||||||
# Script
|
# Script
|
||||||
# wmakeLnIncludeAll
|
# wmakeLnIncludeAll
|
||||||
#
|
#
|
||||||
|
# Usage
|
||||||
|
# wmakeLnIncludeAll [dir1 .. dirN]
|
||||||
|
#
|
||||||
# Description
|
# Description
|
||||||
# Find directories with a 'Make/files' that contains a 'LIB =' directive
|
# 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##*/}
|
Script=${0##*/}
|
||||||
@ -39,7 +42,7 @@ usage() {
|
|||||||
Usage: $Script [dir1 .. dirN]
|
Usage: $Script [dir1 .. dirN]
|
||||||
|
|
||||||
Find directories with a 'Make/files' that contains a 'LIB =' directive
|
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
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
@ -90,7 +93,7 @@ do
|
|||||||
then
|
then
|
||||||
if grep -e '^ *LIB *=' "$MakeDir/files" >/dev/null 2>&1
|
if grep -e '^ *LIB *=' "$MakeDir/files" >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
wmakeLnInclude -f $topDir
|
wmakeLnInclude -update $topDir
|
||||||
elif [ -d "$topDir/lnInclude" ]
|
elif [ -d "$topDir/lnInclude" ]
|
||||||
then
|
then
|
||||||
echo "removing spurious $topDir/lnInclude"
|
echo "removing spurious $topDir/lnInclude"
|
||||||
|
|||||||
@ -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) 2011-2014 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -25,6 +25,9 @@
|
|||||||
# Script
|
# Script
|
||||||
# wmakePrintBuild
|
# wmakePrintBuild
|
||||||
#
|
#
|
||||||
|
# Usage
|
||||||
|
# wmakePrintBuild [OPTION]
|
||||||
|
#
|
||||||
# Description
|
# Description
|
||||||
# Print the version used when building the project
|
# Print the version used when building the project
|
||||||
#
|
#
|
||||||
|
|||||||
@ -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) 2011-2014 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -25,20 +25,6 @@
|
|||||||
# Script
|
# Script
|
||||||
# wmakeScheduler
|
# 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
|
# Usage
|
||||||
# wmakeScheduler COMMAND
|
# wmakeScheduler COMMAND
|
||||||
# run 'COMMAND' on one of the slots listed in WM_HOSTS
|
# 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
|
# count the total number of slots available in WM_HOSTS
|
||||||
# eg, export WM_NCOMPPROCS=$(wmakeScheduler -count)
|
# 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##*/}
|
Script=${0##*/}
|
||||||
|
|
||||||
|
|||||||
@ -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) 2011-2014 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -25,6 +25,14 @@
|
|||||||
# Script
|
# Script
|
||||||
# wmakeSchedulerUptime
|
# 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
|
# Description
|
||||||
# Scheduler for network distributed compilations using wmake.
|
# Scheduler for network distributed compilations using wmake.
|
||||||
# - WM_HOSTS contains a list of hosts and number of concurrent processes
|
# - WM_HOSTS contains a list of hosts and number of concurrent processes
|
||||||
@ -39,14 +47,6 @@
|
|||||||
# before calling this routine.
|
# before calling this routine.
|
||||||
# FOAM_INST_DIR may possibly have been set (to find installation)
|
# 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##*/}
|
Script=${0##*/}
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# Script
|
# Script wrmdep
|
||||||
|
#
|
||||||
|
# Usage
|
||||||
# wrmdep [-a | -all | all] [file]
|
# wrmdep [-a | -all | all] [file]
|
||||||
# wrmdep [-o | -old] [dir1 .. dirN]
|
# wrmdep [-o | -old] [dir1 .. dirN]
|
||||||
# wrmdep -update
|
# wrmdep -update
|
||||||
|
|||||||
@ -23,6 +23,9 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# Script
|
# Script
|
||||||
|
# wrmo
|
||||||
|
#
|
||||||
|
# Usage
|
||||||
# wrmo [-a | -all | all] [file]
|
# wrmo [-a | -all | all] [file]
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
|
|||||||
Reference in New Issue
Block a user