]> mj.ucw.cz Git - eval.git/blob - doc/ucw/configure
Made ConfigTree.fix take list os well, added test
[eval.git] / doc / ucw / configure
1 How to Configure Sherlock
2 *************************
3
4 1. What can be configured
5 ~~~~~~~~~~~~~~~~~~~~~~~~~
6 There are three different levels of configuring/customizing Sherlock:
7
8   - runtime configuration in cf/sherlock and cf/local (see doc/config)
9
10   - compile-time configuration: config switches set before compiling, selecting
11     optional features (see sherlock/default.cfg)
12
13   - customization: a set of C declarations and functions, which define word
14     types, attributes and the ways to match them. In most cases, you should
15     use the "free" customization designed for searching in web pages and similar
16     documents. If you want just a simple search engine for indexing databases,
17     the "customs/bare" customization can be better. If you want to extend Sherlock
18     beyond that, you will probably need to write your own customization -- just
19     follow the structure of the "free" customization and the comments there.
20
21
22 2. How to configure
23 ~~~~~~~~~~~~~~~~~~~
24 To set up compilation for a given customization, possibly overriding its default
25 compile-time options, just run
26
27         ./configure <customization> [<option> | -<option> | <option>=<value> ...]
28
29 The default values of feature options are taken from sherlock/default.cfg and modified
30 by <customization>/config. Compiler flags and options dependent on compiler, OS and
31 CPU type are set in lib/autoconf.cfg. Everything can be overriden by options specified
32 on the configure's command line, which have the highest priority.
33
34 If you want to see the resulting set of options, take a look at obj/config.mk.
35
36 Options specifying compiler/linker/debugger options can be also overriden during
37 compilation by `make <option>=<value>'. While it's also possible to specify the other
38 options in this way, it probably won't have the desired effect, because configure
39 also generates C include files containing the options.
40
41
42 3. Where to build
43 ~~~~~~~~~~~~~~~~~
44 If you run configure in the source directory, it prepares for compilation inside
45 the source tree. In this case, an `obj' subdirectory is created to hold all generated
46 files (object files, binaries, generated source files etc.) and all final files
47 are linked to the `run' subdirectory. No other parts of the source tree are written into.
48
49 Alternatively, you can compile in a separate object tree (which is useful when you
50 want to build several different configurations from a single source tree). In order
51 to do that, switch to the destination directory and issue `<source-dir>/configure ...'.
52 This way, configure will create the `obj' and `run' directories locally and set up
53 a Makefile which refers to the original source tree.