Merge "Change log level: info -> debug" into tizen_2.2
[framework/web/webkit-efl.git] / Tools / qmake / README
1 The qmake build system
2 ======================
3
4 Basic structure
5 ---------------
6
7 The qmake build is split into three different file types:
8
9     * .pro files: These files represent top level targets that can be
10     built individually, or a collection of sub-targets used for
11     organizing the project.
12
13     * .pri files: These files are included from top level targets,
14     and represent 'implementation details' of how the target is built.
15
16     * .prf files: These files take care of generic build rules
17     that applies to all targets, or specific 'features' that can
18     be loaded on demand.
19
20 The first two file types are spread throughout the source tree, while
21 the .prf files are located in 'Tools/qmake/mkspecs/features' and will
22 get loaded by qmake based on setting the QMAKEPATH environment variable.
23
24
25 Root project file
26 -----------------
27
28 The root project file 'WebKit.pro' is handy both for loading WebKit
29 in Qt Creator, and for building QtWebKit. Normally you will build
30 using build-webkit, but you can also run qmake directly on the root
31 project file. Just make sure to set QMAKEPATH first, so that the
32 custom mkspecs are picked up.
33
34 Feature files
35 -------------
36
37 Feature files (.prf files) are used in the following ways:
38
39     1. Every time qmake parses a project file, it will first load
40     a special feature file called 'defaults_pre.prf', then parse
41     the project file, and then load another special feature file
42     called 'defaults_post.prf'. We use these special files to set
43     default options that all project files use, expose a few handy
44     functions, and to post-process the build config based on what
45     the project file did.
46
47     2. Dependencies on other targets (libraries) are declared by
48     using CONFIG+=othertarget. This will add the correct include
49     paths and linker options to use the library.
50
51     3. Optional features can be enabled by passing CONFIG+=foo on
52     the command line when running qmake on the root project file,
53     (or by passing --make-args="CONFIG+=foo" to build-webkit). For
54     example 'CONFIG+=valgrind'.
55
56
57 Derived sources
58 ---------------
59
60 Some targets (JavaScriptCore, WebCore, etc) rely on generated files,
61 (aka. derived sources). These must be generated before the real target
62 is built. This is achieved by splitting the target up into two sub-
63 projects, one for the derived sources and one for the real target,
64 and telling qmake to build them in order using CONFIG += ordered.
65
66
67 The WEBKIT variable
68 -------------------
69
70 The custom qmake variable 'WEBKIT' is used for signaling that a
71 target depends in some way on other subproject of the WebKit
72 project. For now this is limited to the set of intermediate
73 libraries: wtf, javascriptcore, webcore, and webkit2.
74
75 Adding a dependency results in additional include paths being
76 available, and potentially linking to the library. This is
77 decided by the build system based on conditions such as what
78 kind of target is being built and the general build config.