Allwmake -update: Further improvements to handle source-tree/dep file inconsistencies after git pull

Patch contributed by Bruno Santos
Resolves bug-report http://bugs.openfoam.org/view.php?id=2091
This commit is contained in:
Henry Weller
2016-06-11 16:28:40 +01:00
parent 3b1971d88c
commit 07e5f2831b
4 changed files with 145 additions and 7 deletions

View File

@ -55,7 +55,8 @@ options:
-j Compile using all local cores/hyperthreads
-jN or -j N Compile using N cores/hyperthreads
-no-scheduler Compile without wmakeScheduler
-update Update lnInclude directories and dep files
-update Update lnInclude directories, dep files, remove deprecated
files and directories
USAGE
# Print options for building code documentation
@ -123,10 +124,17 @@ do
-no-scheduler)
unset WM_SCHEDULER
;;
# Update lnInclude directories and dep files following a pull
# Meant to be used following a pull, this will:
# - remove dep files that depend on deleted files;
# - remove stale dep files;
# - update lnInclude directories;
# - remove empty directories, along with deprecated object directories
# and respective binaries.
-update)
wrmdep -update
wrmdep -old
wmakeLnIncludeAll
wclean empty
# Set WM_UPDATE_DEPENDENCIES, so that wmake will pick up on it
export WM_UPDATE_DEPENDENCIES=yes

View File

@ -3,7 +3,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
# \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
# \\/ M anipulation |
#-------------------------------------------------------------------------------
# License
@ -101,7 +101,9 @@ findObjectDir()
depToSource()
{
sourceFile=$(echo ${depFile%.dep} | \
sed -e s%platforms/${WM_OPTIONS}/%% -e s%Make/${WM_OPTIONS}/%% )
sed -e s%platforms/${WM_OPTIONS}/%% -e s%Make/${WM_OPTIONS}/%% \
-e s%platforms/${WM_OPTIONS}${WM_MPLIB}/%% \
-e s%Make/${WM_OPTIONS}${WM_MPLIB}/%% )
}
#------------------------------------------------------------------------------