<commit_before>.. _kconfig_extensions:

Kconfig extensions
##################

Zephyr uses the `Kconfiglib <https://github.com/ulfalizer/Kconfiglib>`__
implementation of `Kconfig
<https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt>`__,
which includes some Kconfig extensions:

- Environment variables in ``source`` statements are expanded directly, meaning
  no "bounce" symbols with ``option env="ENV_VAR"`` need to be defined.

  .. note::

     ``option env`` has been removed from the C tools as of Linux 4.18 as well.

  The recommended syntax for referencing environment variables is ``$(FOO)``
  rather than ``$FOO``. This uses the new `Kconfig preprocessor
  <https://raw.githubusercontent.com/torvalds/linux/master/Documentation/kbuild/kconfig-macro-language.txt>`__.
  The ``$FOO`` syntax for expanding environment variables is only supported for
  backwards compatibility.

- The ``source`` statement supports glob patterns and includes each matching
  file. A pattern is required to match at least one file.<commit_msg>doc: kconfig: Update outdated links to Kconfig documentation<commit_after>.. _kconfig_extensions:

Kconfig extensions
##################

Zephyr uses the `Kconfiglib <https://github.com/ulfalizer/Kconfiglib>`__
implementation of `Kconfig
<https://docs.kernel.org/kbuild/kconfig-language.html>`__,
which includes some Kconfig extensions:

- Environment variables in ``source`` statements are expanded directly, meaning
  no "bounce" symbols with ``option env="ENV_VAR"`` need to be defined.

  .. note::

     ``option env`` has been removed from the C tools as of Linux 4.18 as well.

  The recommended syntax for referencing environment variables is ``$(FOO)``
  rather than ``$FOO``. This uses the new `Kconfig preprocessor
  <https://docs.kernel.org/kbuild/kconfig-macro-language.html>`__.
  The ``$FOO`` syntax for expanding environment variables is only supported for
  backwards compatibility.

- The ``source`` statement supports glob patterns and includes each matching
  file. A pattern is required to match at least one file.
{'fraction_non_alphanumeric': 0.11516314779270634, 'fraction_numerical': 0.0028790786948176585, 'mean_word_length': 4.791666666666667, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6063798', 'n_tokens_mistral': 574, 'n_tokens_neox': 554, 'n_words': 218}