Skip to content
Snippets Groups Projects
Commit 8fdb9b2f authored by Mark OLESEN's avatar Mark OLESEN
Browse files

COMP: robuster storage of pv/vtk sentinel files with out-of-source builds

parent b1a866c3
Branches
Tags
No related merge requests found
......@@ -5,7 +5,7 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2017-2019 OpenCFD Ltd.
# Copyright (C) 2017-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
......@@ -61,6 +61,22 @@ sameDependency()
fi
}
#
# Save dependency information into sentinel file
#
storeDependency()
{
local depend="$1"
local sentinel="$2"
if [ -n "$sentinel" ]
then
mkdir -p "$(dirname "$sentinel")"
echo "$depend" >| "$sentinel"
fi
return 0
}
# CMake with output suppressed according to WM_QUIET
_cmake()
......@@ -98,7 +114,7 @@ cmakeVersioned()
mkdir -p "$objectsDir" \
&& (cd "$objectsDir" && _cmake "$@" "$sourceDir" && make) \
&& echo "$depend" >| "${sentinel:-/dev/null}"
&& storeDependency "$depend" "$sentinel"
}
......@@ -124,7 +140,7 @@ cmakeVersionedInstall()
mkdir -p "$objectsDir" \
&& (cd "$objectsDir" && _cmake "$@" "$sourceDir" && make install) \
&& echo "$depend" >| "${sentinel:-/dev/null}"
&& storeDependency "$depend" "$sentinel"
}
......@@ -151,7 +167,7 @@ wmakeVersioned()
mkdir -p "$objectsDir" \
&& wmake "$@" \
&& echo "$depend" >| "${sentinel:-/dev/null}"
&& storeDependency "$depend" "$sentinel"
}
......
......@@ -5,7 +5,7 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2018-2019 OpenCFD Ltd.
# Copyright (C) 2018-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
......@@ -97,11 +97,11 @@ wmakeLibPv()
for libName
do
sentinel=$(sameDependency "$depend" $libName) || \
sentinel=$(sameDependency "$depend" "$libName") || \
wclean $libName
wmake $targetType $libName \
&& echo "$depend" > ${sentinel:-/dev/null}
&& storeDependency "$depend" "$sentinel"
done
}
......@@ -148,7 +148,7 @@ get_pvplugin_api()
#
have_pvplugin_support()
{
local header settings warn pv_api installDir binDir includeDir targetDir
local header warn pv_api installDir binDir includeDir targetDir
warn="==> skip paraview-plugin"
# Trivial check
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment