Files
openfoam/src/Allwmake
Mark Olesen 9e3d06853e ENH: add 'subcommand' handling to wmake (#1693)
- initial split of wmake-related commands into "plumbing" and
  "porcelain" akin to how git handles things.

- wmakeBuildInfo (very low-level), now relocated to the wmake/scripts
  and accessible for the user as "wmake -build-info".

  This satisfies a long-standing desire to access build information
  in a fashion similar to the api/patch information.

CONFIG: avoid git information when building with a debian/ directory

- when a 'debian/' directory exists, there is a high probability that
  the '.git/' directory is from debian and not from OpenFOAM (ie,
  useless here). This corresponds to an implicit '-no-git', which has
  no effect when building from pristine sources.

ENH: wmakeCheckPwd becomes scripts/wmake-check-dir

- accessible for the user as "wmake -check-dir" and with 1 or 2
  directory names. A wmakeCheckPwd symlink left for compatibility.
2020-05-12 10:05:24 +02:00

125 lines
3.4 KiB
Bash
Executable File

#!/bin/sh
# Run from OPENFOAM src/ directory only
cd "${0%/*}" || exit
wmake -check-dir "$WM_PROJECT_DIR/src" 2>/dev/null || {
echo "Error (${0##*/}) : not located in \$WM_PROJECT_DIR/src"
echo " Check your OpenFOAM environment and installation"
exit 1
}
if [ -f "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments ]
then . "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments || \
echo "Argument parse error";
else
echo "Error (${0##*/}) : WM_PROJECT_DIR appears to be incorrect"
echo " Check your OpenFOAM environment and installation"
exit 1
fi
#------------------------------------------------------------------------------
wmakeLnInclude -u OpenFOAM
wmakeLnInclude -u OSspecific/"${WM_OSTYPE:-POSIX}"
OSspecific/"${WM_OSTYPE:-POSIX}"/Allwmake $targetType $*
case "$WM_COMPILER" in
Mingw*)
# Pstream/OpenFOAM cyclic dependency
# 1st pass: link as Pstream as single .o object
WM_MPLIB=dummy Pstream/Allwmake libo
FOAM_LINK_DUMMY_PSTREAM=libo wmake $targetType OpenFOAM
# 2nd pass: link Pstream.dll against libOpenFOAM.dll
Pstream/Allwmake $targetType $*
# Force relink libOpenFOAM.dll against libPstream.dll
OpenFOAM/Alltouch 2>/dev/null
;;
*)
Pstream/Allwmake $targetType $*
# Update version info (as required)
OpenFOAM/Alltouch -check 2>/dev/null
;;
esac
wmake $targetType OpenFOAM
wmake $targetType fileFormats
wmake $targetType surfMesh
wmake $targetType meshTools
wmake $targetType finiteArea
wmake $targetType finiteVolume
wmake $targetType genericPatchFields
wmake $targetType mesh/extrudeModel
wmake $targetType dynamicMesh
wmake $targetType parallel/decompose/decompositionMethods
# Make dummy decomposition methods (dummyThirdParty)
parallel/decompose/AllwmakeLnInclude
dummyThirdParty/Allwmake $targetType $*
wmakeLnInclude -u fvOptions
wmake $targetType lagrangian/basic
wmake $targetType lagrangian/distributionModels
parallel/Allwmake $targetType $*
wmake $targetType dynamicFvMesh
wmake $targetType topoChangerFvMesh
wmake $targetType sampling
randomProcesses/Allwmake $targetType $*
wmake $targetType ODE
transportModels/Allwmake $targetType $*
thermophysicalModels/Allwmake $targetType $*
TurbulenceModels/Allwmake $targetType $*
wmake $targetType combustionModels
regionModels/Allwmake $targetType $*
lagrangian/Allwmake $targetType $*
wmake $targetType fvOptions
wmake $targetType fvMotionSolver
# Ensure we have block.H accessible before building overset
wmake $targetType mesh/blockMesh
wmake $targetType overset
# snappyHexMesh uses overset voxelMesh
mesh/Allwmake $targetType $*
renumber/Allwmake $targetType $*
fvAgglomerationMethods/Allwmake $targetType $*
wmake $targetType waveModels
wmake $targetType engine
conversion/Allwmake $targetType $*
phaseSystemModels/Allwmake $targetType $*
functionObjects/Allwmake $targetType $*
wmake $targetType lumpedPointMotion
wmake $targetType sixDoFRigidBodyMotion
wmake $targetType sixDoFRigidBodyState
wmake $targetType rigidBodyDynamics
wmake $targetType rigidBodyMeshMotion
wmake $targetType semiPermeableBaffle
wmake $targetType atmosphericModels
wmake $targetType optimisation/adjointOptimisation/adjoint
# interfaceTracking libs
dynamicFaMesh/Allwmake $targetType $*
# Needs access to Turbulence
wmake $targetType thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties
#------------------------------------------------------------------------------