On Tue, Aug 24, 2021 at 3:59 AM Florian Schmaus <[email protected]> wrote:
>
> On 24/08/2021 07.35, William Hubbs wrote:
> > Use the compile and install subcommands of meson instead of calling
> > ninja. This allows for the possibility of a different back end.
> >
> > Signed-off-by: William Hubbs <[email protected]>
> > ---
> >   eclass/meson.eclass | 24 +++++++++++++++++++++---
> >   1 file changed, 21 insertions(+), 3 deletions(-)
> >
> > diff --git a/eclass/meson.eclass b/eclass/meson.eclass
> > index 2a563e367c6..e9c9b155096 100644
> > --- a/eclass/meson.eclass
> > +++ b/eclass/meson.eclass
> > @@ -379,7 +379,21 @@ meson_src_configure() {
> >   meson_src_compile() {
> >       debug-print-function ${FUNCNAME} "$@"
> >
> > -     eninja -C "${BUILD_DIR}" "$@"
> > +     local mesoncompileargs=(
> > +             -C "${BUILD_DIR}"
> > +     )
> > +     if [[ -n ${NINJAOPTS} ]]; then
> > +             mesoncompileargs+=(
> > +                     --jobs "$(makeopts_jobs ${NINJAOPTS})"
> > +                     --load-average "$(makeopts_loadavg ${NINJAOPTS})"
> > +             )
> > +     elif [[ -n ${MAKEOPTS} ]]; then
> > +             mesoncompileargs+=(
> > +                     --jobs "$(makeopts_jobs ${MAKEOPTS})"
> > +                     --load-average "$(makeopts_loadavg ${MAKEOPTS})"
> > +             )
> > +
> > +     meson compile "${mesoncompileargs[@]}" "$@" || die "compile failed"
> >   }
> >
> >   # @FUNCTION: meson_src_test
>
> Missing 'fi'?
>
> I'd probably drop NINJAOPTS and simply have MAKEOPTS the one place where
> users can specify --jobs and --load values.

I agree: drop NINJAOPTS.

Reply via email to