// vim: set syntax=asciidoc:
Overall, these coding style rules are here to help you to add new files in
Buildroot or refactor existing ones.
If you slightly modify some existing file, the important thing is
to keep the consistency of the whole file, so you can:
* either follow the potentially deprecated coding style used in this
* or entirely rework it in order to make it comply with these rules.
[[writing-rules-config-in]]
+Config.in+ files contain entries for almost anything configurable in
An entry has the following pattern:
config BR2_PACKAGE_LIBFOO
depends on BR2_PACKAGE_LIBBAZ
select BR2_PACKAGE_LIBBAR
This is a comment that explains what libfoo is. The help text
http://foosoftware.org/libfoo/
* The +bool+, +depends on+, +select+ and +help+ lines are indented
* The help text itself should be indented with one tab and two
* The help text should be wrapped to fit 72 columns, where tab counts
for 8, so 62 characters in the text itself.
The +Config.in+ files are the input for the configuration tool
used in Buildroot, which is the regular _Kconfig_. For further
details about the _Kconfig_ language, refer to
http://kernel.org/doc/Documentation/kbuild/kconfig-language.txt[].
* Header: The file starts with a header. It contains the module name,
preferably in lowercase, enclosed between separators made of 80 hashes. A
blank line is mandatory after the header:
################################################################################
################################################################################
* Assignment: use +=+ preceded and followed by one space:
LIBFOO_CONF_OPTS += --without-python-support
Do not align the +=+ signs.
* Indentation: use tab only:
$(RM) -fr $(TARGET_DIR)/usr/share/libfoo/doc \
$(TARGET_DIR)/usr/share/man/man3/libfoo*
Note that commands inside a +define+ block should always start with a tab,
so _make_ recognizes them as commands.
** Prefer multi-line syntax.