Re: [PATCH 04/13] Kbuild: Rust support
From: Masahiro Yamada
Date: Sat Apr 17 2021 - 15:44:38 EST
On Thu, Apr 15, 2021 at 9:43 AM Miguel Ojeda
> On Thu, Apr 15, 2021 at 1:19 AM Nick Desaulniers
> <ndesaulniers@xxxxxxxxxx> wrote:
> > Rather than check the origin (yikes, are we intentionally avoiding env
> > vars?), can this simply be
> > ifneq ($(CLIPPY),)
> > KBUILD_CLIPPY := $(CLIPPY)
> > endif
> > Then you can specify whatever value you want, support command line or
> > env vars, etc.?
> I was following the other existing cases like `V`. Masahiro can
> probably answer why they are done like this.
You are asking about this code:
ifeq ("$(origin V)", "command line")
KBUILD_VERBOSE = $(V)
You can pass V=1 from the Make command line,
but not from the environment.
KBUILD_VERBOSE is intended as an environment variable,
but you can use it from the Make command line.
- make V=1
- make KBUILD_VERBOSE=1
- KBUILD_VERBOSE=1 make
- V=1 make
The behavior is like that before I became the maintainer.
In my best guess, the reason is,
V=1 is a useful shorthand of KBUILD_VERBOSE=1,
but it is too short. It should not accidentally
pick up an unintended environment variable.