]>
Commit | Line | Data |
---|---|---|
1e59de90 TL |
1 | ================= |
2 | Duktape genconfig | |
3 | ================= | |
4 | ||
5 | Overview | |
6 | ======== | |
7 | ||
8 | ``genconfig`` is a helper script for coming up with a ``duk_config.h`` for | |
9 | compiling Duktape for your platform. | |
10 | ||
11 | To support this: | |
12 | ||
13 | * It creates a Duktape 1.2.x compatible ``duk_config.h`` with automatic | |
14 | platform detection and ``DUK_OPT_xxx`` feature options. | |
15 | ||
16 | * It helps to create a ``duk_config.h`` for your platform/compiler | |
17 | combination. You can give a base configuration and then force certain | |
18 | values manually based on a YAML configuration file. | |
19 | ||
20 | * It autogenerates documentation for config options (and Duktape 1.2.x | |
21 | feature options) based on option metadata files written in YAML. | |
22 | ||
23 | Usage | |
24 | ===== | |
25 | ||
26 | To create an autodetect duk_config.h header (compatible with Duktape 1.2.x):: | |
27 | ||
28 | $ python config/genconfig.py --metadata config --output /tmp/duk_config.h \ | |
29 | autodetect-header | |
30 | ||
31 | To create a barebones duk_config.h header for a specific platform (easier to | |
32 | edit manually):: | |
33 | ||
34 | $ python config/genconfig.py --metadata config --output /tmp/duk_config.h \ | |
35 | --platform linux --compiler gcc --architecture x64 \ | |
36 | barebones-header | |
37 | ||
38 | There are further commands to e.g. autogenerate config option documentation; | |
39 | see ``genconfig.py`` for details. |