Skip to content
Snippets Groups Projects
Commit 7d553a18 authored by Henry Weller's avatar Henry Weller
Browse files

wmakeFunctions: Added a faster bash version of 'depToSource'

parent bbc43dd6
Branches
Tags
No related merge requests found
......@@ -102,12 +102,25 @@ findObjectDir()
fi
}
depToSource()
{
sourceFile=$(echo ${depFile%.dep} | \
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}/%% )
}
if [ -n "$BASH_VERSION" ]; then
depToSource()
{
sourceFile=${depFile%.dep}
sourceFile="${sourceFile/platforms\/${WM_OPTIONS}\//}"
sourceFile="${sourceFile/Make\/${WM_OPTIONS}\//}"
sourceFile="${sourceFile/platforms\/${WM_OPTIONS}${WM_MPLIB}\//}"
sourceFile="${sourceFile/Make\/${WM_OPTIONS}${WM_MPLIB}\//}"
}
else
depToSource
{
sourceFile=$(echo ${depFile%.dep} | \
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}/%% )
}
fi
#------------------------------------------------------------------------------
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