readline: Pass -ltinfo
[openadk.git] / docs / writing-rules.txt
blob60f496eaf01c05540584c955d15c6146089b2e69
1 // -*- mode:doc; -*-
2 // vim: set syntax=asciidoc:
4 Coding style
5 ------------
7 Overall, these coding style rules are here to help you to add new files in
8 OpenADK or refactor existing ones.
10 [[writing-rules-config-in]]
12 +Config.in+
13 ~~~~~~~~~~~
15 +Config.in+ files contain entries for almost anything configurable in
16 OpenADK. Mostly all Config.in files for packages are autogenerated and
17 should not be manually edited. The following rules apply for the top level
18 Config.in, for the files in target/config and target/linux/config.
20 An entry has the following pattern:
22 ---------------------
23 config ADK_TARGET_FOO
24         bool "foo"
25         select BR2_PACKAGE_LIBBAR
26         depends on ADK_PACKAGE_LIBBAZ
27         default n
28         help
29           This is a comment that explains what foo is.
31           http://foo.org/foo/
32 ---------------------
34 * The +bool+, +depends on+, +default+, +select+ and +help+ lines are indented
35   with one tab.
37 * The help text itself should be indented with one tab and two
38   spaces.
40 The +Config.in+ files are the input for the configuration tool
41 used in OpenADK, which is an enhanced version of _Kconfig_. For further
42 details about the _Kconfig_ language, refer to
43 http://kernel.org/doc/Documentation/kbuild/kconfig-language.txt[].
45 [[writing-rules-mk]]
47 +Makefile+
48 ~~~~~~~~~~
50 * Header: The file starts with a license header.
52 ---------------------
53 # This file is part of the OpenADK project. OpenADK is copyrighted
54 # material, please see the LICENCE file in the top-level directory.
55 ---------------------
57 * Assignment: use +:=+ or ++=+ followed by two tabs:
59 ---------------------
60 PKG_VERSION:=           1.0
61 PKG_BUILDDEP+=          libfoo
62 ---------------------
65 * Indentation: use tab only:
67 ---------------------
68 libfoo-install:
69         $(CP) $(WRKINST)/usr/lib/libfoo*.so* \
70                 $(IDIR_LIBFOO)/usr/lib
71 ---------------------
74 * Optional dependency:
76 ** Prefer multi-line syntax.
77 ---------------------
78 ifeq ($(ADK_PACKAGE_LIBFOO_WITH_PYTHON),y)
79 CONFIGURE_ARGS+=        --with-python-support
80 else
81 CONFIGURE_ARGS+=        --without-python-support
82 endif
83 ---------------------
85 Documentation
86 ~~~~~~~~~~~~~
88 The documentation uses the
89 http://www.methods.co.nz/asciidoc/[asciidoc] format.
91 For further details about the http://www.methods.co.nz/asciidoc/[asciidoc]
92 syntax, refer to http://www.methods.co.nz/asciidoc/userguide.html[].