From b2223913d01ddc802256bc8c21042e081f470b29 Mon Sep 17 00:00:00 2001 From: Henry Weller <http://cfd.direct> Date: Wed, 15 Jun 2016 14:22:33 +0100 Subject: [PATCH] wmake/scripts/wmakeFunctions: Add support for $WM_PROJECT_DIR being a link --- wmake/scripts/wmakeFunctions | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/wmake/scripts/wmakeFunctions b/wmake/scripts/wmakeFunctions index f0d8ad143d5..63cbb9f16de 100755 --- a/wmake/scripts/wmakeFunctions +++ b/wmake/scripts/wmakeFunctions @@ -23,7 +23,7 @@ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # # Script -# wdepFunctions +# wmakeFunctions # # Description # Functions to check wmake environment and find .dep and .o files @@ -61,9 +61,11 @@ expandPath() findTarget() { + expandPath $WM_PROJECT_DIR + wmpdir=$exPath expandPath $1 - if [ "$exPath" = "$WM_PROJECT_DIR" \ + if [ "$exPath" = "$wmpdir" \ -o "$exPath" = "$HOME" \ -o "$exPath" = "/" \ ] @@ -79,12 +81,14 @@ findTarget() findObjectDir() { + expandPath $WM_PROJECT_DIR + wmpdir=$exPath expandPath $1 - if echo $exPath | grep "$WM_PROJECT_DIR" > /dev/null + if echo $exPath | grep "$wmpdir" > /dev/null then platformPath=$WM_PROJECT_DIR/platforms/${WM_OPTIONS} - objectsDir=$platformPath$(echo $exPath | sed s%$WM_PROJECT_DIR%% ) + objectsDir=$platformPath$(echo $exPath | sed s%$wmpdir%% ) else path=$exPath dir=. -- GitLab