Commit 4d29c32e authored by Mark Olesen's avatar Mark Olesen
Browse files

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
parent d4c7d8c6
......@@ -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" ]
......
Supports Markdown
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