On Sun, Apr 7, 2024 at 4:29 PM Prasad Pandit <ppandit@xxxxxxxxxx> wrote: > > From: Prasad Pandit <pjp@xxxxxxxxxxxxxxxxx> > > Add details to the 'config' and 'source' entry description, > to make it unambiguous. It'd come handy as reference for > Kconfig language or patch reviews for Kconfig source files. > > Signed-off-by: Prasad Pandit <pjp@xxxxxxxxxxxxxxxxx> > --- > Documentation/kbuild/kconfig-language.rst | 18 +++++++++++++----- > 1 file changed, 13 insertions(+), 5 deletions(-) > > v1: > - Fix typo path -> patch > - https://lore.kernel.org/linux-kbuild/20240404064037.3440433-1-ppandit@xxxxxxxxxx/T/#u > > diff --git a/Documentation/kbuild/kconfig-language.rst b/Documentation/kbuild/kconfig-language.rst > index 0135905c0aa3..0783850d5a00 100644 > --- a/Documentation/kbuild/kconfig-language.rst > +++ b/Documentation/kbuild/kconfig-language.rst > @@ -39,11 +39,14 @@ them. A single configuration option is defined like this:: > kernel. ... > > Every line starts with a key word and can be followed by multiple > -arguments. "config" starts a new config entry. The following lines > -define attributes for this config option. Attributes can be the type of > -the config option, input prompt, dependencies, help text and default > -values. A config option can be defined multiple times with the same > -name, but every definition can have only a single input prompt and the > +arguments. "config" starts a new config entry. The following lines, > +indented by a leading tab (\t) character, define attributes for this > +config option. Attributes can be the type of the config option, > +input prompt, dependencies, default values and help text. Help text > +is further indented by two more spaces. Wrong. You added - indented by a leading tab (\t) character, - Help text is further indented by two more spaces. These are recommended coding styles for readability, not grammatical requirements. You can write Kconfig code without indentation, without blank lines in-between. config FOO bool "foo" depends on BAR config BAR bool "bar" config BAZ bool "baz" It is unreadable, but it works fine. Only the place where the indentation plays an act is the end of help. It is already documented. The end of the help text is determined by the indentation level, this means it ends at the first line which has a smaller indentation than the first line of the help text. The kernel coding style is documented in a different file. See Documentation/process/coding-style.rst 10) Kconfig configuration files ------------------------------- > + > +A config option can be defined multiple times with the same name, > +but every definition can have only a single input prompt and the > type must not conflict. > > Menu attributes > @@ -451,6 +454,11 @@ source:: > "source" <prompt> > > This reads the specified configuration file. This file is always parsed. > +The specified file path is from the top source directory ($SRCTREE). No. Kconfig searches for the sourced file in the current working directory. If not found, it searches from $SRCTREE next. > +It allows one to source a file from any subdirectory under the source > +tree. Such path is always unique under the source directory. > +A configuration file must terminate with a new line (\n) character > +at the end. > > mainmenu:: > > -- > 2.44.0 > -- Best Regards Masahiro Yamada