[47159] | 1 |
|
---|
| 2 | kBuild / VBox Build Tricks
|
---|
| 3 | ==========================
|
---|
| 4 |
|
---|
| 5 |
|
---|
| 6 | Introduction
|
---|
| 7 | ------------
|
---|
| 8 |
|
---|
| 9 | This document is written in reStructuredText (rst) which just happens to
|
---|
[69483] | 10 | be used by Python, the primary language for this revamp. For more information
|
---|
[47159] | 11 | on reStructuredText: http://docutils.sourceforge.net/rst.html
|
---|
| 12 |
|
---|
| 13 |
|
---|
| 14 | Changing the output directory
|
---|
| 15 | -----------------------------
|
---|
| 16 |
|
---|
[69483] | 17 | When switch between different VBox build settings it can be nice to have
|
---|
[47159] | 18 | different output directories to avoid having to rebuild the whole source tree
|
---|
| 19 | everything. One typical example is hardening, another is guest additions using
|
---|
| 20 | crossbuild gcc w/ SDK. The latter is is simpler so that's the first example:
|
---|
| 21 |
|
---|
| 22 | .. code:: makefile
|
---|
| 23 |
|
---|
| 24 | ifdef VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE
|
---|
| 25 | PATH_OUT_BASE = $(PATH_ROOT)/add-out
|
---|
| 26 | endif
|
---|
| 27 |
|
---|
| 28 | The following example is the typical developer setup, i.e. disable hardening by
|
---|
| 29 | default but respect command line overrides (kmk VBOX_WITH_HARDENING=1):
|
---|
| 30 |
|
---|
| 31 | .. code:: make
|
---|
| 32 |
|
---|
| 33 | VBOX_WITH_HARDENING :=
|
---|
| 34 | ifeq ($(VBOX_WITH_HARDENING),)
|
---|
| 35 | VBOX_WITHOUT_HARDENING=1
|
---|
| 36 | else
|
---|
| 37 | PATH_OUT_BASE = $(PATH_ROOT)/hard-out
|
---|
| 38 | endif
|
---|
| 39 |
|
---|
| 40 |
|
---|
| 41 | Share tools download directory between trunk and branches
|
---|
| 42 | ---------------------------------------------------------
|
---|
| 43 |
|
---|
| 44 | To avoid filling up your disk with unnecessary tool zip and tar.gz files, set
|
---|
| 45 | the FETCHDIR variable in LocalConfig.kmk to point to a common directory for all
|
---|
| 46 | VBox checkouts.
|
---|
| 47 |
|
---|
| 48 | .. code:: make
|
---|
| 49 |
|
---|
| 50 | FETCHDIR = $(HOME)/Downloads/FetchDir
|
---|
| 51 |
|
---|
| 52 |
|
---|
| 53 | -----
|
---|
| 54 |
|
---|
| 55 | .. [1] no such footnote
|
---|
| 56 |
|
---|
| 57 |
|
---|
| 58 | -----
|
---|
| 59 |
|
---|
| 60 | :Status: $Id: kBuild-tricks.txt 69483 2017-10-28 13:34:47Z vboxsync $
|
---|
| 61 | :Copyright: Copyright (C) 2006-2013 Oracle Corporation.
|
---|
| 62 |
|
---|