2013-02-13 13:59:02 +01:00
|
|
|
// -*- mode:doc; -*-
|
|
|
|
// vim: set syntax=asciidoc:
|
2012-11-11 04:14:49 +01:00
|
|
|
|
|
|
|
[[make-tips]]
|
manual: use one-line titles instead of two-line titles (trivial)
Asciidoc supports two syntaxes for section titles: two-line titles (title
plus underline consisting of a particular symbol), and one-line titles
(title prefixed with a specific number of = signs).
The two-line title underlines are:
Level 0 (top level): ======================
Level 1: ----------------------
Level 2: ~~~~~~~~~~~~~~~~~~~~~~
Level 3: ^^^^^^^^^^^^^^^^^^^^^^
Level 4 (bottom level): ++++++++++++++++++++++
and the one-line title prefixes:
= Document Title (level 0) =
== Section title (level 1) ==
=== Section title (level 2) ===
==== Section title (level 3) ====
===== Section title (level 4) =====
The buildroot manual is currenly using the two-line titles, but this has
multiple disadvantages:
- asciidoc also uses some of the underline symbols for other purposes (like
preformatted code, example blocks, ...), which makes it difficult to do
mass replacements, such as a planned follow-up patch that needs to move
all sections one level down.
- it is difficult to remember which level a given underline symbol (=-~^+)
corresponds to, while counting = signs is easy.
This patch changes all two-level titles to one-level titles in the manual.
The bulk of the change was done with the following Python script, except for
the level 1 titles (-----) as these underlines are also used for literal
code blocks.
This patch only changes the titles, no other changes. In
adding-packages-directory.txt, I did add missing newlines between some
titles and their content.
----------------------------------------------------------------------------
#!/usr/bin/env python
import sys
import mmap
import re
for input in sys.argv[1:]:
f = open(input, 'r+')
f.flush()
s = mmap.mmap(f.fileno(), 0)
# Level 0 (top level): ====================== =
# Level 1: ---------------------- ==
# Level 2: ~~~~~~~~~~~~~~~~~~~~~~ ===
# Level 3: ^^^^^^^^^^^^^^^^^^^^^^ ====
# Level 4 (bottom level): ++++++++++++++++++++++ =====
def replace_title(s, symbol, replacement):
pattern = re.compile(r'(.+\n)\%s{2,}\n' % symbol, re.MULTILINE)
return pattern.sub(r'%s \1' % replacement, s)
new = s
new = replace_title(new, '=', '=')
new = replace_title(new, '+', '=====')
new = replace_title(new, '^', '====')
new = replace_title(new, '~', '===')
#new = replace_title(new, '-', '==')
s.seek(0)
s.write(new)
s.resize(s.tell())
s.close()
f.close()
----------------------------------------------------------------------------
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-05-02 07:47:30 +02:00
|
|
|
== 'make' tips
|
2012-11-11 04:14:49 +01:00
|
|
|
|
2012-11-27 12:59:16 +01:00
|
|
|
This is a collection of tips that help you make the most of Buildroot.
|
2012-11-11 04:14:49 +01:00
|
|
|
|
2012-11-27 12:59:16 +01:00
|
|
|
.Configuration searches:
|
|
|
|
|
|
|
|
The +make *config+ commands offer a search tool. Read the help message in
|
2012-11-16 05:54:19 +01:00
|
|
|
the different frontend menus to know how to use it:
|
2012-11-11 04:14:49 +01:00
|
|
|
|
2012-11-27 12:59:16 +01:00
|
|
|
* in _menuconfig_, the search tool is called by pressing +/+;
|
|
|
|
* in _xconfig_, the search tool is called by pressing +Ctrl+ + +f+.
|
2012-11-11 04:14:49 +01:00
|
|
|
|
2012-11-16 05:54:19 +01:00
|
|
|
The result of the search shows the help message of the matching items.
|
2012-11-11 04:14:49 +01:00
|
|
|
|
2012-11-27 12:59:16 +01:00
|
|
|
.Display all commands executed by make:
|
2012-11-11 04:14:49 +01:00
|
|
|
|
|
|
|
--------------------
|
2012-11-27 12:59:16 +01:00
|
|
|
$ make V=1 <target>
|
2012-11-11 04:14:49 +01:00
|
|
|
--------------------
|
|
|
|
|
2012-11-27 12:59:16 +01:00
|
|
|
.Display all available targets:
|
2012-11-11 04:14:49 +01:00
|
|
|
|
|
|
|
--------------------
|
|
|
|
$ make help
|
|
|
|
--------------------
|
|
|
|
|
2013-08-09 12:16:48 +02:00
|
|
|
Not all targets are always available,
|
2012-11-27 12:59:16 +01:00
|
|
|
some settings in the +.config+ file may hide some targets:
|
|
|
|
|
2014-03-28 22:24:44 +01:00
|
|
|
* +busybox-menuconfig+ and +busybox-savedefconfig+ only work when
|
2014-02-23 16:04:37 +01:00
|
|
|
+busybox+ is enabled;
|
2012-11-27 12:59:16 +01:00
|
|
|
* +linux-menuconfig+ and +linux-savedefconfig+ only work when
|
|
|
|
+linux+ is enabled;
|
2014-02-23 16:04:37 +01:00
|
|
|
* +uclibc-menuconfig+ is only available when the uClibc C library is
|
|
|
|
selected in the internal toolchain backend;
|
2012-11-27 12:59:16 +01:00
|
|
|
* +barebox-menuconfig+ and +barebox-savedefconfig+ only work when the
|
|
|
|
+barebox+ bootloader is enabled.
|
|
|
|
|
|
|
|
.Cleaning:
|
2012-11-11 04:14:49 +01:00
|
|
|
|
2012-11-27 12:59:16 +01:00
|
|
|
Explicit cleaning is required when any of the architecture or toolchain
|
|
|
|
configuration options are changed.
|
2012-11-11 04:14:49 +01:00
|
|
|
|
2012-11-27 12:59:16 +01:00
|
|
|
To delete all build products (including build directories, host, staging
|
2012-11-11 04:14:49 +01:00
|
|
|
and target trees, the images and the toolchain):
|
|
|
|
|
|
|
|
--------------------
|
|
|
|
$ make clean
|
|
|
|
--------------------
|
|
|
|
|
2013-08-09 12:16:47 +02:00
|
|
|
.Generating the manual:
|
|
|
|
|
|
|
|
The present manual sources are located in the 'docs/manual' directory.
|
|
|
|
To generate the manual:
|
|
|
|
|
|
|
|
---------------------------------
|
|
|
|
$ make manual-clean
|
|
|
|
$ make manual
|
|
|
|
---------------------------------
|
|
|
|
|
|
|
|
The manual outputs will be generated in 'output/docs/manual'.
|
|
|
|
|
|
|
|
.Notes
|
2013-10-18 22:31:25 +02:00
|
|
|
- A few tools are required to build the documentation (see:
|
2013-08-09 12:16:47 +02:00
|
|
|
xref:requirement-optional[]).
|
|
|
|
|
2013-08-09 12:16:48 +02:00
|
|
|
.Reseting Buildroot for a new target:
|
|
|
|
|
2012-11-27 12:59:16 +01:00
|
|
|
To delete all build products as well as the configuration:
|
2012-11-11 04:14:49 +01:00
|
|
|
|
|
|
|
--------------------
|
|
|
|
$ make distclean
|
|
|
|
--------------------
|
|
|
|
|
2013-08-09 12:16:48 +02:00
|
|
|
.Notes
|
|
|
|
If +ccache+ is enabled, running +make clean+ or +distclean+ does
|
2012-11-16 05:54:19 +01:00
|
|
|
not empty the compiler cache used by Buildroot. To delete it, refer
|
2012-11-11 04:14:49 +01:00
|
|
|
to xref:ccache[].
|