control legacy uname with an environment variable
[unleashed.git] / docs / how-to-build.md
blob8ec24cb50e34c05aae354388aa6cb2fb3244c3e9
1 How to build unleashed
2 ======================
4 Install unleashed
5 -----------------
7 Building unleashed requires unleashed, so first you must install it (doing
8 which is not documented at the time of writing).
10 Get the source
11 --------------
13 Clone this repository from either:
15 * git://repo.or.cz/illumos-gate/unleashed.git
16 * http://repo.or.cz/illumos-gate/unleashed.git
18 For example:
20 ```
21 $ git clone git://repo.or.cz/illumos-gate/unleashed.git
22 $ cd unleashed
23 ```
25 Build
26 -----
28 For a complete build, use 'tools/nightly.sh':
30 ```
31 $ ./tools/nightly.sh tools/env.sh
32 ```
34 On success, this results in installable packages in the packages directory.
36 Incremental build
37 -----------------
39 Rebuilding a component is the easiest after a full nightly build.
41 To build a component that is using the new build system (e.g., cat(1)), change
42 into the source directory and run make. For example:
44 ```
45 $ cd bin/cat
46 $ make
47 # make install
48 ```
50 The component will be built against the running system and installed to /. To
51 install to the proto area, pass DESTDIR=path to 'make install'. Building
52 against libraries and headers in the "proto area" or in object directories is
53 not currently supported.
55 To build a component under the legacy (dmake) build system, ie. things under
56 'usr/src':
58 ```
59 $ ./tools/bldenv.sh <env file>
60 $ cd usr/src/cmd/w
61 $ dmake install
62 ```
64 The component will be built against the "proto area" and installed there.