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:
parent
d4c7d8c6e5
commit
4d29c32e9b
@ -29,7 +29,7 @@
|
||||
# wmakeLnIncludeAll [dir1 .. dirN]
|
||||
#
|
||||
# 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
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
@ -46,7 +46,7 @@ options:
|
||||
-jN or -j N Compile using N cores/hyperthreads
|
||||
-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
|
||||
|
||||
USAGE
|
||||
@ -93,6 +93,18 @@ do
|
||||
shift
|
||||
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 ]
|
||||
then
|
||||
echo "$Script: starting wmakeLnInclude processes on $nCores cores"
|
||||
@ -100,10 +112,6 @@ else
|
||||
echo "$Script: running wmakeLnInclude"
|
||||
fi
|
||||
|
||||
|
||||
# Defaults to searching from CWD
|
||||
[ "$#" -gt 0 ] || set -- .
|
||||
|
||||
for checkDir
|
||||
do
|
||||
if [ -d $checkDir ]
|
||||
@ -114,7 +122,7 @@ do
|
||||
continue
|
||||
fi
|
||||
|
||||
find $checkDir -depth -type d -name Make -print | while read MakeDir
|
||||
find $checkDir -depth -name Make -type d -print | while read MakeDir
|
||||
do
|
||||
topDir=${MakeDir%/Make} # trim /Make from the end
|
||||
if [ -d "$topDir" ]
|
||||
|
Loading…
Reference in New Issue
Block a user