[kvm-unit-tests PATCH] riscv: Fix sbi-deps expansion for older GNU Make
Nicholas Piggin
npiggin at gmail.com
Mon Sep 8 19:55:36 PDT 2025
On Sat, Sep 06, 2025 at 08:32:16AM +0800, Wu Fei wrote:
> On 9/5/25 11:37 PM, Andrew Jones wrote:
>
> > On Fri, Sep 05, 2025 at 03:43:12PM +0800, wu.fei9 at sanechips.com.cn wrote:
> > > From b8b66e40566bb89de57e45b08fc72446b26a7bfb Mon Sep 17 00:00:00 2001
> > > From: Wu Fei <wu.fei9 at sanechips.com.cn>
> > > Date: Fri, 5 Sep 2025 14:31:48 +0800
> > > Subject: [PATCH] riscv: Fix sbi-deps expansion for older GNU Make
> > >
> > > The prerequisite $$($$*-deps) cannot be expanded to $(TEST_DIR)/sbi-deps
> > > in 4.2.1 Make, rename it to sbi-deps without the prefix path.
> > >
> > > Signed-off-by: Wu Fei <wu.fei9 at sanechips.com.cn>
> > > ---
> > > riscv/Makefile | 10 +++++-----
> > > 1 file changed, 5 insertions(+), 5 deletions(-)
> > Hi Wu Fei,
> >
> > It looks like you ran into and fixed the same thing as some others. Take a
> > look at this patch and thread here [1]. I think Nicholas' solution is more
> > complete since it includes the notdir. However, assuming your solution
> > works, it makes me wonder why it's not necessary?
>
>
> Hi Drew,
>
>
> Yes, it should be the same thing. I didn't subscribe the mailing list yet
> yesterday, when I checked the archives I found Joel had reported it. It
> should be better to reply to that thread directly but I didn't figure out
> how to do that at that time.
>
>
> Regarding notdir, yes, this patch happened to work on Make 4.2.1 but not
> work on 4.3.
Right, I believe the older make is not including the riscv/ directory
name as part of the secondary expansion. Make 4.2 => sbi-deps,
Make 4.3 => riscv/sbi-deps. So if you just change the variable name
to make 4.2 happy then you break 4.3. You need to also strip the
directory name from the expansion to keep 4.3 happy.
Thanks,
Nick
More information about the kvm-riscv
mailing list