]> git.tdb.fi Git - builder.git/blob - Readme.txt
Make bootstrap.sh more user-friendly when reporting missing libraries
[builder.git] / Readme.txt
1 Builder 0.9 Readme
2
3
4 1. Description
5
6 Builder is a program for building other programs, similar to make, scons and
7 others.  Its main design goals are minimizing duplication of configuration
8 between packages and being as fast as possible.  Features include integrated
9 configuration and dependency resolution for C and C++ sources.
10
11
12 2. Building Builder
13
14 Builder is normally built using itself.  However, if you just downloaded the
15 source and don't yet have a Builder binary, how is that possible?  To resolve
16 this problem, there's a script called bootstrap.sh in the Builder main
17 directory.  Before running it, make sure you have the following libraries
18 available:
19
20 MSP libraries: core datafile fs strings io
21
22 Others: sigc++-2.0
23
24 Since the MSP libraries are also normally built with Builder, the script will
25 need to have their sources available.  By default, it will look at the parent
26 directory of builder.  You can change this by setting the LIBPATH evironment
27 variable for the script.  If everything goes well, the script will build a
28 builder-stage1 binary and then proceed to build a normal version with it.
29
30
31 3. Using Builder to build projects
32
33 In the simplest and most common case, Builder is invoked in the package's root
34 directory without any arguments.  An arbitary working directory may be
35 specified with -C, or an alternative Build file with -f.
36
37 To build a subset of the targets known to the package, the desired targets can
38 be named on the command line.  Note that if -C is used, the targets will be
39 interpreted relative to that directory, not the one where Builder is invoked
40 from.
41
42 To change package configuration, arguments of the form key=value may be given.
43 By default they will only affect the current package, but with the -A switch,
44 all active packages may be configured at once.
45
46 By default, files will be installed in $HOME/local.  If you are not happy with
47 this, the --prefix switch may be used to use another directory.  Note that
48 files may be installed due to dependencies when building multiple packages at
49 once even if you don't specify the install target.
50
51
52 4. Using Builder in your project
53
54 Before going into details about Builder instruction files, it's beneficial to
55 understand the basic concepts used in Builder.  There are three kinds of major
56 entities: packages, components and targets.
57
58 Packages are distributable units of software.
59
60 Components make up the contents of a package.  They define the high-level
61 goals such as libraries and executables.
62
63 Targets are the individual files taking part in the build process.  They are
64 created automatically from components.
65
66 The canonical name for the insturction file is Build.  It is written in a
67 structured declarative language, with syntax somewhat resembling the C
68 language.  The basic unit is a statement, which consists of a keyword,
69 optional arguments and an optional block of sub-statements.  Each statement is
70 terminated with a semicolon.
71
72 Typically, the Build file for a project defines a single package:
73
74   package "mylib"
75   {
76     ...
77   };
78
79 Inside the package can be some informational statements:
80
81   version "0.1";
82   description "My awesome library";
83
84 Packages may also depend on other packages:
85
86   require "otherlib";
87
88 pkg-config is used to locate dependencies, and failing that, some heuristics
89 are applied to find Builder-enabled packages.
90
91 To be useful, a package must define one or more components.  At present, there
92 are five types:
93 - program: Build an executable program
94 - library: Build a library (both shared and static)
95 - module: Build a module for a program
96 - tarball: Pack files up in a tarbal
97 - includes: Install headers for a library
98
99 Each of these statements takes the component name as an argument.  The target
100 name is composed of the component name and a possible platform-specific prefix
101 and suffix.  For example, the statement:
102
103   library "mylib";
104
105 Will create a file called libmylib.so on Linux and libmylib.dll on Windows.
106 For headers component, the name defines a subdirectory of the prefix include
107 directory to install headers in.
108
109 Components must contain one or more source statements telling where sources
110 are found:
111
112   source "mylib.cpp";
113
114 Directories may be specified; each file inside the directory will be added to
115 the source list.  The list is filtered according to the component type and only
116 applicable files are used.
117
118 If you want a component to be installed, you can specify so:
119
120   install true;
121
122 The default is not to install any components.  The installation directory is
123 automatically determined from the component type.
124
125 For a complete example, see Builder's own Build file.
126
127
128 5. Contact information
129
130 The latest releases can be found at http://www.tdb.fi/builder.shtml
131
132 Bug reports, feature requests etc. may be sent to tdb@tdb.fi
133
134 Read-only SVN access is available at http://svn.tdb.fi/builder
135
136
137 6. License
138
139 Builder is copyright © 2006-2009  Mikko Rasa, Mikkosoft Productions
140
141 This program is free software; you can redistribute it and/or modify
142 it under the terms of the GNU General Public License as published by
143 the Free Software Foundation; either version 2 of the License, or
144 (at your option) any later version.
145
146 This program is distributed in the hope that it will be useful,
147 but WITHOUT ANY WARRANTY; without even the implied warranty of
148 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
149 GNU General Public License for more details.
150
151 You should have received a copy of the GNU General Public License along
152 with this program; if not, write to the Free Software Foundation, Inc.,
153 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
154
155 Full license text can be found in License.txt.
156
157
158 7. Version history
159
160 0.9
161 - First released version