On Wed, Oct 9, 2024 at 7:01 PM Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx> wrote: > > On Wed, Oct 9, 2024 at 11:23 AM Alice Ryhl <aliceryhl@xxxxxxxxxx> wrote: > > > > Miguel, can you link this issue? I don't think I saw it. > > https://github.com/Rust-for-Linux/linux/pull/1087#issuecomment-2218445303 > > (It was in the Lore message I linked yesterday, sorry, I should have > been more explicit) > > > Masahiro, are you able to clarify how to pass TMPOUT to rustc? > > > > __rustc-option = $(call try-run2,\ > > $(1) $(2) $(3) --crate-type=rlib $(srctree)/rust/probe.rs > > --out-dir=$(TMPOUT),$(3),$(4)) > > > > Should I use $(TMPOUT) or $$TMPOUT for this case? Right now, only TMP > > is defined inside try-run. I am assuming that there is a reason for > > having TMP be defined in try-run, rather than just using $(TMP) > > everywhere. Does the same reason apply to TMPOUT? Should I add a > > TMPOUT=$(TMPOUT) inside try-run? > > `TMPOUT` is defined already in that `Makefile`, thus you can directly > expand it. However, `TMP` is defined inside the `shell` function, and > thus `$$TMP` is used so that that script (inside the `shell`) expands > it instead. > > This is why Masahiro was saying that the `TMPOUT=$(TMPOUT)` was > unnecessary, i.e. it would work, but we can just expand it directly. Yes. I like --out-dir=$(TMPOUT) -- Best Regards Masahiro Yamada