summaryrefslogtreecommitdiffstats
path: root/docs/manual/writing-rules.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/manual/writing-rules.txt')
-rw-r--r--docs/manual/writing-rules.txt37
1 files changed, 25 insertions, 12 deletions
diff --git a/docs/manual/writing-rules.txt b/docs/manual/writing-rules.txt
index 2a61639f0..f6382b56d 100644
--- a/docs/manual/writing-rules.txt
+++ b/docs/manual/writing-rules.txt
@@ -1,16 +1,18 @@
// -*- mode:doc; -*-
-Writing rules
--------------
+Coding style
+------------
-Overall, these writing rules are here to help you add new files in
+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
-keeping the consistency of the whole file, so you can:
-* either follow the potentially deprecated rules used all over this
-file
-* or entirely rework it in order to make it comply with those rules.
+to keep the consistency of the whole file, so you can:
+
+* either follow the potentially deprecated coding style used in this
+file,
+
+* or entirely rework it in order to make it comply with these rules.
[[writing-rules-config-in]]
@@ -39,9 +41,9 @@ config BR2_PACKAGE_LIBFOO
* The help text itself should be indented with one tab and two
spaces.
-The configuration system used in Buildroot, so the content of the
-+Config.in+ files, is regular _Kconfig_. Further details about
-_Kconfig_: refer to
+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[].
[[writing-rules-mk]]
@@ -55,15 +57,26 @@ The +.mk+ file
LIBFOO_VERSION = 1.0
LIBFOO_CONF_OPT += --without-python-support
---------------------
++
+It is also possible to align the +=+ signs:
++
+---------------------
+LIBFOO_VERSION = 1.0
+LIBFOO_SOURCE = foo-$(LIBFOO_VERSION).tar.gz
+LIBFOO_CONF_OPT += --without-python-support
+---------------------
* Indentation: use tab only:
+
---------------------
define LIBFOO_REMOVE_DOC
-$(RM) -fr $(TARGET_DIR)/usr/share/libfoo/doc \
- $(TARGET_DIR)/usr/share/man/man3/libfoo*
+ $(RM) -fr $(TARGET_DIR)/usr/share/libfoo/doc \
+ $(TARGET_DIR)/usr/share/man/man3/libfoo*
endef
---------------------
++
+Note that commands inside a +define+ block should always start with a tab,
+so _make_ recognizes them as commands.
* Optional dependency: