diff --git a/Allwmake b/Allwmake index 12d1ac68913dc4b01967e0ba6f2d96e29b3c98ea..0f69c87181b11004af7fabdbcedaf759fef8c531 100755 --- a/Allwmake +++ b/Allwmake @@ -1,22 +1,21 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Parse arguments for library compilation -. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments - -wmakeCheckPwd "$WM_PROJECT_DIR" || { - echo "Allwmake error: Current directory is not \$WM_PROJECT_DIR" - echo " The environment variables are inconsistent with the installation." - echo " Check the OpenFOAM entries in your dot-files and source them." +# Run from OPENFOAM top-level directory only +cd ${0%/*} && wmakeCheckPwd "$WM_PROJECT_DIR" 2>/dev/null || { + echo "Error (${0##*/}) : not located in \$WM_PROJECT_DIR" + echo " Check your OpenFOAM environment and installation" exit 1 } - [ -n "$FOAM_EXT_LIBBIN" ] || { - echo "Allwmake error: FOAM_EXT_LIBBIN not set" - echo " Check the OpenFOAM entries in your dot-files and source them." + echo "Error (${0##*/}) : FOAM_EXT_LIBBIN not set" + echo " Check your OpenFOAM environment and installation" exit 1 } +# Parse arguments for library compilation +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments + +#------------------------------------------------------------------------------ + # Compile wmake support applications (cd wmake/src && make) diff --git a/applications/Allwmake b/applications/Allwmake index d851254b23a2f237fc5d08e17369e5b2bd25365c..e78e590f9c7d5ce6eea45020350210dd0599ea1c 100755 --- a/applications/Allwmake +++ b/applications/Allwmake @@ -1,22 +1,21 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Parse arguments for library compilation -. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments - -wmakeCheckPwd "$WM_PROJECT_DIR/applications" || { - echo "Allwmake error: Current directory is not \$WM_PROJECT_DIR/applications" - echo " The environment variables are inconsistent with the installation." - echo " Check the OpenFOAM entries in your dot-files and source them." +# Run from OPENFOAM applications/ directory only +cd ${0%/*} && wmakeCheckPwd "$WM_PROJECT_DIR/applications" 2>/dev/null || { + echo "Error (${0##*/}) : not located in \$WM_PROJECT_DIR/applications" + echo " Check your OpenFOAM environment and installation" exit 1 } - [ -n "$FOAM_EXT_LIBBIN" ] || { - echo "Allwmake error: FOAM_EXT_LIBBIN not set" - echo " Check the OpenFOAM entries in your dot-files and source them." + echo "Error (${0##*/}) : FOAM_EXT_LIBBIN not set" + echo " Check your OpenFOAM environment and installation" exit 1 } +# Parse arguments for library compilation +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments + +#------------------------------------------------------------------------------ + wmake -all $targetType solvers wmake -all $targetType utilities diff --git a/doc/Doxygen/Allwmake b/doc/Doxygen/Allwmake index 8ca2ed256d326b4115cdb17b208039a72bfc71de..a2c98fdf149fe77944a019f57ed309461dff390e 100755 --- a/doc/Doxygen/Allwmake +++ b/doc/Doxygen/Allwmake @@ -1,10 +1,9 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory - [ -d "$WM_PROJECT_DIR" ] || { - echo " Error: WM_PROJECT_DIR directory does not exist" - echo " Check the OpenFOAM entries in your dot-files and source them." - echo " WM_PROJECT_DIR=$WM_PROJECT_DIR" + echo "Error (${0##*/}) : no \$WM_PROJECT_DIR found" + echo " Check your OpenFOAM environment and installation" + echo " WM_PROJECT_DIR=$WM_PROJECT_DIR" exit 1 } diff --git a/src/Allwmake b/src/Allwmake index 000688c332ae9fd8902e44c5e8a486d0eaa70a5c..9d13d973f8ae4571a4d28f727863c05dd95eb863 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -1,22 +1,21 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Parse arguments for library compilation -. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments - -wmakeCheckPwd "$WM_PROJECT_DIR/src" || { - echo "Allwmake error: Current directory is not \$WM_PROJECT_DIR/src" - echo " The environment variables are inconsistent with the installation." - echo " Check the OpenFOAM entries in your dot-files and source them." +# Run from OPENFOAM src/ directory only +cd ${0%/*} && wmakeCheckPwd "$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 } - [ -n "$FOAM_EXT_LIBBIN" ] || { - echo "Allwmake error: FOAM_EXT_LIBBIN not set" - echo " Check the OpenFOAM entries in your dot-files and source them." + echo "Error (${0##*/}) : FOAM_EXT_LIBBIN not set" + echo " Check your OpenFOAM environment and installation" exit 1 } +# Parse arguments for library compilation +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments + +#------------------------------------------------------------------------------ + # Update OpenFOAM version strings if required wmakePrintBuild -check || wrmo OpenFOAM/global/global.o 2>/dev/null