mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: improve handling of wmakeLnIncludeAll default search directories
- if called from the top-level project directory ($WM_PROJECT_DIR)
default to using {applications,src} directories. This avoids
erroneous linking of etc/codeTemplates and avoids the lengthy
scanning of the tutorials directory
This commit is contained in:
@ -29,7 +29,7 @@
|
|||||||
# wmakeLnIncludeAll [dir1 .. dirN]
|
# wmakeLnIncludeAll [dir1 .. dirN]
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Find directories with a 'Make/files' that contains a 'LIB =' directive
|
# Find directories with a 'Make/files' containing a 'LIB =' directive
|
||||||
# and execute 'wmakeLnInclude' for each one
|
# and execute 'wmakeLnInclude' for each one
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
@ -46,7 +46,7 @@ options:
|
|||||||
-jN or -j N Compile using N cores/hyperthreads
|
-jN or -j N Compile using N cores/hyperthreads
|
||||||
-h | -help Print the usage
|
-h | -help Print the usage
|
||||||
|
|
||||||
Find directories with a 'Make/files' that contains a 'LIB =' directive
|
Find directories with a 'Make/files' containing a 'LIB =' directive
|
||||||
and execute 'wmakeLnInclude -update' for each one
|
and execute 'wmakeLnInclude -update' for each one
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
@ -93,6 +93,18 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Default search is from CWD, with special handling of the top-level
|
||||||
|
# project directory: {applications,src} directories
|
||||||
|
if [ "$#" -eq 0 ]
|
||||||
|
then
|
||||||
|
if wmakeCheckPwd "$WM_PROJECT_DIR" 2>/dev/null
|
||||||
|
then
|
||||||
|
set -- applications src
|
||||||
|
else
|
||||||
|
set -- .
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$nCores" -gt 0 ]
|
if [ "$nCores" -gt 0 ]
|
||||||
then
|
then
|
||||||
echo "$Script: starting wmakeLnInclude processes on $nCores cores"
|
echo "$Script: starting wmakeLnInclude processes on $nCores cores"
|
||||||
@ -100,10 +112,6 @@ else
|
|||||||
echo "$Script: running wmakeLnInclude"
|
echo "$Script: running wmakeLnInclude"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Defaults to searching from CWD
|
|
||||||
[ "$#" -gt 0 ] || set -- .
|
|
||||||
|
|
||||||
for checkDir
|
for checkDir
|
||||||
do
|
do
|
||||||
if [ -d $checkDir ]
|
if [ -d $checkDir ]
|
||||||
@ -114,7 +122,7 @@ do
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
find $checkDir -depth -type d -name Make -print | while read MakeDir
|
find $checkDir -depth -name Make -type d -print | while read MakeDir
|
||||||
do
|
do
|
||||||
topDir=${MakeDir%/Make} # trim /Make from the end
|
topDir=${MakeDir%/Make} # trim /Make from the end
|
||||||
if [ -d "$topDir" ]
|
if [ -d "$topDir" ]
|
||||||
|
|||||||
Reference in New Issue
Block a user