diff options
-rwxr-xr-x | configure.in | 12 | ||||
-rwxr-xr-x | set_soenv.in | 1 | ||||
-rw-r--r-- | tail_build/prj/makefile.mk | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/configure.in b/configure.in index f9d6d374ea28..f245355bd265 100755 --- a/configure.in +++ b/configure.in @@ -9026,6 +9026,18 @@ fi AC_MSG_RESULT([$BUILD_MAX_JOBS]) AC_SUBST(BUILD_MAX_JOBS) +# ===================================================================== +# determine the parallelism for tail_build +# ===================================================================== +AC_MSG_CHECKING([for maximum parallelism for gmake]) +if test $BUILD_MAX_JOBS -gt $BUILD_NCPUS ; then + GMAKE_PARALLELISM="$BUILD_MAX_JOBS" +else + GMAKE_PARALLELISM="$BUILD_NCPUS" +fi +AC_MSG_RESULT([$GMAKE_PARALLELISM]) +AC_SUBST(GMAKE_PARALLELISM) + dnl =================================================================== dnl Setting up the environment. dnl =================================================================== diff --git a/set_soenv.in b/set_soenv.in index cf802b345b5f..e12f64ae470d 100755 --- a/set_soenv.in +++ b/set_soenv.in @@ -1814,6 +1814,7 @@ else ToFile( "SOLARLIB_FOR_BUILD", $SOLARLIB, "e" ); ToFile( "WORKDIR_FOR_BUILD", $WORKDIR, "e" ); } +ToFile( "GMAKE_PARALLELISM", "@GMAKE_PARALLELISM@", "e" ); ToFile( "SIZEOF_SHORT", "@SIZEOF_SHORT@", "e" ); ToFile( "SIZEOF_INT", "@SIZEOF_INT@", "e" ); ToFile( "SIZEOF_LONG", "@SIZEOF_LONG@", "e" ); diff --git a/tail_build/prj/makefile.mk b/tail_build/prj/makefile.mk index e312a7ccab65..63e3f194fa93 100644 --- a/tail_build/prj/makefile.mk +++ b/tail_build/prj/makefile.mk @@ -37,4 +37,4 @@ VERBOSEFLAG := -s .ENDIF all: - cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(GMAKE_PARALLELISM) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog |