2019-10-19 09:42:36

by Sasha Levin

[permalink] [raw]
Subject: [PATCH AUTOSEL 4.19 077/100] kbuild: fix build error of 'make nsdeps' in clean tree

From: Masahiro Yamada <[email protected]>

[ Upstream commit d85103ac78a6d8573b21348b36f4cca2e1839a31 ]

Running 'make nsdeps' in a clean source tree fails as follows:

$ make -s clean; make -s defconfig; make nsdeps
[ snip ]
awk: fatal: cannot open file `init/modules.order' for reading (No such file or directory)
make: *** [Makefile;1307: modules.order] Error 2
make: *** Deleting file 'modules.order'
make: *** Waiting for unfinished jobs....

The cause of the error is 'make nsdeps' does not build modules at all.
Set KBUILD_MODULES to fix it.

Reviewed-by: Matthias Maennich <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Jessica Yu <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 4d29c7370b464..80f169534c4a7 100644
--- a/Makefile
+++ b/Makefile
@@ -566,7 +566,7 @@ endif
# in addition to whatever we do anyway.
# Just "make" or "make all" shall build modules as well

-ifneq ($(filter all _all modules,$(MAKECMDGOALS)),)
+ifneq ($(filter all _all modules nsdeps,$(MAKECMDGOALS)),)
KBUILD_MODULES := 1
endif

--
2.20.1


2019-10-19 09:52:10

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [PATCH AUTOSEL 4.19 077/100] kbuild: fix build error of 'make nsdeps' in clean tree

Hi Sasha,

On Sat, Oct 19, 2019 at 7:18 AM Sasha Levin <[email protected]> wrote:
>
> From: Masahiro Yamada <[email protected]>
>
> [ Upstream commit d85103ac78a6d8573b21348b36f4cca2e1839a31 ]
>
> Running 'make nsdeps' in a clean source tree fails as follows:
>
> $ make -s clean; make -s defconfig; make nsdeps
> [ snip ]
> awk: fatal: cannot open file `init/modules.order' for reading (No such file or directory)
> make: *** [Makefile;1307: modules.order] Error 2
> make: *** Deleting file 'modules.order'
> make: *** Waiting for unfinished jobs....
>
> The cause of the error is 'make nsdeps' does not build modules at all.
> Set KBUILD_MODULES to fix it.
>
> Reviewed-by: Matthias Maennich <[email protected]>
> Signed-off-by: Masahiro Yamada <[email protected]>
> Signed-off-by: Jessica Yu <[email protected]>
> Signed-off-by: Sasha Levin <[email protected]>
> ---


nsdeps was introduced in v5.4

Please do not backport this commit.

Thanks.


> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 4d29c7370b464..80f169534c4a7 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -566,7 +566,7 @@ endif
> # in addition to whatever we do anyway.
> # Just "make" or "make all" shall build modules as well
>
> -ifneq ($(filter all _all modules,$(MAKECMDGOALS)),)
> +ifneq ($(filter all _all modules nsdeps,$(MAKECMDGOALS)),)
> KBUILD_MODULES := 1
> endif
>
> --
> 2.20.1
>


--
Best Regards
Masahiro Yamada