Re: [PATCH 6/9] kbuild: refactor scripts/Makefile.modinst

Johannes Berg
2021-05-12T14:23:57Z

Hi,

So I'm not *entirely* sure if this caused it, but I noticed that doing

make -C linux M=/path/to/extmod/ modules_install

stopped working.

This is because here:
>
> -extmod_prefix = $(if $(KBUILD_EXTMOD),$(KBUILD_EXTMOD)/)
> +export extmod_prefix = $(if $(KBUILD_EXTMOD),$(KBUILD_EXTMOD)/)

(as before, of course) another trailing / is added to the M= argument,
and then

> +modules := $(patsubst $(extmod_prefix)%, $(dst)/%, $(modules))

this patsubst turns out to do nothing. So $(modules) contains the
original paths where the modules were compiled, and consequently nothing
happens.

Specifying

make -C linux M=/path/to/extmod modules_install

actually works.

Obviously I can work around it, but it hardly seems intentional?

Thanks,
johannes