Set FLATPAK_BUILDER_N_JOBS in build env

This is set to what flatpak itself would otherwise use for make -jN
and can be used in e.g. buildsystem simple modules.
auto
Alexander Larsson 2018-04-26 09:54:21 +02:00 committed by Alexander Larsson
parent 2d80983775
commit 2391d046c3
1 changed files with 4 additions and 0 deletions

View File

@ -1378,6 +1378,7 @@ builder_module_build_helper (BuilderModule *self,
GFile *app_dir = builder_context_get_app_dir (context);
g_autofree char *make_j = NULL;
g_autofree char *make_l = NULL;
g_autofree char *n_jobs = NULL;
const char *make_cmd = NULL;
const char *test_arg = NULL;
@ -1425,6 +1426,9 @@ builder_module_build_helper (BuilderModule *self,
env = builder_options_get_env (self->build_options, context);
config_opts = builder_options_get_config_opts (self->build_options, context, self->config_opts);
n_jobs = g_strdup_printf ("%d", self->no_parallel_make ? 1 : builder_context_get_jobs (context));
env = g_environ_setenv (env, "FLATPAK_BUILDER_N_JOBS", n_jobs, FALSE);
if (!self->buildsystem)
{
if (self->cmake)