Re: [PATCH v2 1/2] kernel-doc: don't let V=1 change outcome

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2023-06-06 at 20:15 +0900, Masahiro Yamada wrote:
> > 
> >  ifneq ($(KBUILD_EXTRA_WARN),)
> > -  cmd_checkdoc = $(srctree)/scripts/kernel-doc -none $<
> > +  cmd_checkdoc = $(srctree)/scripts/kernel-doc -none \
> > +        $(if $(KDOC_WALL), -Wall) \
> > +        $(if $(KDOC_WRETURN), -Wreturn) \
> > +        $(if $(KDOC_WSHORT_DESC), -Wshort-desc) \
> > +        $(if $(KDOC_WSHORT_DESC), -Wcontents-before-sections) \
> 
> 
> 
> Sorry, I misunderstood your intention.
> (I just thought existing env variables would be moved to Makefile)
> 
> 
> I do not want to proliferate env variables any more.

Oh, ok, sure.

> If you need per-flag control, maybe we can do like this?

Well honestly, I myself just want to pass -Wall, but not necessarily W=2
since that adds more stuff from the C compiler.

> cmd_checkdoc = $(srctree)/scripts/kernel-doc -none \
>               $(KDOCFLAGS)
> 
> 
> Then, users can do
> 
>   $ make KDOCFLAGS=-Wall
>   $ make KDOCFLAGS=-Wreturn

I'd rather call it KDOC_FLAGS if you don't mind to align with
KDOC_WERROR which we have already, but sure, can do.

johannes




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux