Commit 3e3cd4bc authored by Henry Weller's avatar Henry Weller
Browse files

wmake: Simplified handling of '-j' option to sub-processes

parent 8b4163d7
......@@ -225,6 +225,8 @@ fi
if [ "$WM_NCOMPPROCS" ]
then
parOpt="-j $WM_NCOMPPROCS"
if [ "$WM_NCOMPPROCS" -gt 1 -a ! "$MAKEFLAGS" ]
then
lockDir=$HOME/.$WM_PROJECT/.wmake
......@@ -236,7 +238,7 @@ then
mkdir -p $lockDir
fi
make="$make --no-print-directory -j "$WM_NCOMPPROCS
make="$make --no-print-directory $parOpt"
fi
fi
......@@ -281,21 +283,11 @@ if [ -n "$update" ]
then
wrmdep -update
wrmdep -old
if [ "$all" != "queue" ]
then
if [ -n "$WM_NCOMPPROCS" ]
then
wmakeLnIncludeAll -j$WM_NCOMPPROCS
else
wmakeLnIncludeAll
fi
fi
wmakeLnIncludeAll -update $parOpt
wclean empty
export WM_UPDATE_DEPENDENCIES=yes
fi
unset update
#------------------------------------------------------------------------------
# Recurse the source tree to compile "all" targets
......@@ -343,24 +335,21 @@ fi
# Recurse the source tree to compile "all" targets using wmakeQueue
#------------------------------------------------------------------------------
scheduler="wmakeCollect"
if [ "$all" = "queue" ]
then
[ -n "$update" ] || wmakeLnIncludeAll $parOpt
( \
wmakeLnIncludeAll -j$WM_NCOMPPROCS \
&& WM_COLLECT_DIR=$WM_PROJECT_DIR/platforms/${WM_OPTIONS}/${PWD////_} \
WM_SCHEDULER=$scheduler \
trap '$scheduler -kill' TERM INT; \
$scheduler -clean \
WM_COLLECT_DIR=$WM_PROJECT_DIR/platforms/${WM_OPTIONS}/${PWD////_} \
WM_SCHEDULER=wmakeCollect \
trap '$WM_SCHEDULER -kill' TERM INT; \
$WM_SCHEDULER -clean \
&& wmake -all objects \
&& $scheduler \
&& $WM_SCHEDULER \
) && wmake -all
exit $?
fi
unset scheduler
#------------------------------------------------------------------------------
# Search up the directory tree for the Make sub-directory,
......
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