From: Patrick Steinhardt Date: Mon, 08 Sep 2025 06:40:56 GMT Subject: Re: [PATCH RFC v2 2/7] Makefile: introduce infrastructure to build internal Rust library Message-ID: In-Reply-To: On Fri, Sep 05, 2025 at 08:21:54PM +0000, brian m. carlson wrote: > On 2025-09-05 at 11:50:58, Patrick Steinhardt wrote: > > diff --git a/Makefile b/Makefile > > index 555b7f4dc3..e7b3c8e57b 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -1411,6 +1428,19 @@ BASIC_LDFLAGS = > > ARFLAGS = rcs > > PTHREAD_CFLAGS = > > > > +# Rust flags > > +CARGO_ARGS = > > +ifndef V > > +CARGO_ARGS += --quiet > > +endif > > +ifndef DEBUG > > +CARGO_ARGS += --release > > +endif > > + > > +ifdef WITH_RUST > > +BASIC_CFLAGS += -DWITH_RUST > > +endif > > …but unfortunately, all of this code is above the `-include config.mak` > line, so if I set `WITH_RUST=1` in `config.mak`, it doesn't work: no > `target` directory is created and `git version --build-options` says > Rust isn't enabled. (It does work if I specify `WITH_RUST=1` on the > command line, though.) > > Might it be a better idea to place this with the conditional code > farther down so it's properly honoured when configured in `config.mak` > and friends? Oops, good catch! Patrick