summaryrefslogtreecommitdiff
path: root/README.txt
blob: dc8b9c7cd734fb11cffee6991c3464a93ae09531 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Configure-dumper tool is intended to determine configure options and their values.

Configure-dumper consists of three scripts.

1. patch_configure.pl <source dir>
It finds all ‘configure’ files in a source tree and inserts inside found files code that saves the
dump of all used variables during configure run. It should be run before top-level configure.
2. dump_configure.pl <src_dir> <build_dir> [--project name] [--project-version version]
                     [--out_db out.db] [--autoconf-path dir]
It determines possible configure options by parsing output of ‘configure --help’ on each level of
a source tree. Then it tries to get values of found options by parsing dump files and matching
an option name with appropriate variable in a dump file. If option name or its default value
cannot be found by simple matching, dump_configure.pl uses the exception rules manually written
in modules/*Rules.pm files. Finally, it saves the results in sqlite3 data base. It should be run
after ‘make’.
The utility can detect the name of project automatically for GCC, binutils and glibc. For applying
custom rules need setup the project-version parameter, otherwise will be use a default value (for
gcc is 6.2.1).
3. dump_differ.pl <db1> [db2] [out_dir] [--print-sections] [--use-alignment]
                  [--section=section{1,..N}]
It extracts values of a configure options from a data base and prepares plain text files that can be
easily compared with ‘vim’ or ‘vimdiff’ tools.
out_dir - where to store out text files to be compared
--print-sections - just print all sections of input data bases
--use-alignment - inserts empty lines in cases where the same sections from db1 and db2 have differ
  number of options/sections. In this case the result is shown in ‘vim’ instead of ‘vimdiff’.
  It’s required additional plugin for ‘vim’, see below.
--section=section{1,..N} - specify exact section to be checked. Can be applied multiple times.

Usage.

Steps for the options dumping:
1. Make build directory:
    # mkdir build ; cd build
2. Modify configure scripts
    # patch_configure.pl ../
3. Launch configure script with necessary parameters
    # ../configure --prefix=/opt/
4. Make
    # make
5. Save data in data base
    # dump_configure.pl ../ ./ --project gcc --project-version 6.2.1 --out_db gcc_build_01.db