From cfdf93a74765f99daf15e8afdafe559717846843 Mon Sep 17 00:00:00 2001 From: Dominik Christ Date: Mon, 23 Sep 2013 16:08:50 +0100 Subject: [PATCH] Added Allclean and Allwmake.firstInstall --- Allclean | 3 +++ Allwmake.firstInstall | 52 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100755 Allclean create mode 100755 Allwmake.firstInstall diff --git a/Allclean b/Allclean new file mode 100755 index 000000000..b8f41953c --- /dev/null +++ b/Allclean @@ -0,0 +1,3 @@ +#!/bin/bash +rmdepall +wcleanLnIncludeAll diff --git a/Allwmake.firstInstall b/Allwmake.firstInstall new file mode 100755 index 000000000..846e6a114 --- /dev/null +++ b/Allwmake.firstInstall @@ -0,0 +1,52 @@ +#!/bin/bash +cd ${0%/*} || exit 1 # run from this directory + +if [ "$PWD" != "$WM_PROJECT_DIR" ] +then + echo "Error: Current directory is not \$WM_PROJECT_DIR" + echo " The environment variable are not consistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +fi + +if [ -z "$PARAVIEW_SYSTEM" ] && [ -z "$QT_BIN_DIR" ] +then + echo + echo "\$QT_BIN_DIR not set. To compile Paraview from sources" + echo "the command \$QT_BIN_DIR/qmake needs to be valid." + echo + echo "Examples: " + echo " Ubuntu: \"export QT_BIN_DIR=/usr/bin\"" + echo " Fedora: \"export QT_BIN_DIR=????\"" + echo " openSuse: \"export QT_BIN_DIR=????\"" + echo + read -r -p "Proceed without compiling ParaView [Y/n] " response + if [[ $response =~ ^([nN][oO]|[nN])$ ]] + then + exit 0 + fi +fi + +# wmake is required for subsequent targets +( cd wmake/src && make ) + +# build ThirdParty sources +( cd $WM_THIRD_PARTY_DIR && ./AllMake.pre ) + +# We make sure the ThirdParty packages environment variables are up-to-date +# before compiling the rest of OpenFOAM +. $WM_PROJECT_DIR/etc/settings.sh + +# build OpenFOAM libraries and applications +src/Allwmake +applications/Allwmake + +if [ "$1" = doc ] +then + doc/Allwmake +fi + +# build ThirdParty sources that depend on main installation +( cd $WM_THIRD_PARTY_DIR && ./AllMake.post ) + +# ----------------------------------------------------------------- end-of-file