xref: /haiku/build/jam/UserBuildConfig.sample (revision 079c69cbfd7cd3c97baae91332251c8388a8bb02)
1# UserBuildConfig can be used to customize the build according to your needs.
2# If existent it is included by the build system, but it is ignored by svn.
3# This file documents a few examples, what can be done.
4
5# Adjusting Build Variables
6
7# Turn off warnings in directory src/system/kernel. As fourth (scope) parameter
8# "local" is specified, which means, that this setting applies only to the
9# given directory, but not any of its subdirectories.
10SetConfigVar WARNINGS : HAIKU_TOP src system kernel : 0 : local ;
11
12# Add "RUN_WITHOUT_REGISTRAR" to the DEFINES for the directory src/kits and
13# all its subdirectories (scope is "global").
14AppendToConfigVar DEFINES : HAIKU_TOP src kits : RUN_WITHOUT_REGISTRAR
15	: global ;
16
17# Set the debug level for file src/bin/gdb/gdb/haiku-nat.c (note, that
18# the object file must be specified) to 1. It is worth mentioning, that the
19# executable the object file is linked into (gdb), will still be placed in
20# generated/objects/.../release/... Only when setting DEBUG for the executable,
21# too, it will be placed in .../debug_1/...
22DEBUG on <src!bin!gdb!gdb!>haiku-nat.o = 1 ;
23
24
25# Haiku Image Related Modifications
26
27# Create a 100 MB image at /tmp/walter.image.
28HAIKU_IMAGE_NAME	= walter.image ;
29HAIKU_IMAGE_DIR		= /tmp ;
30HAIKU_IMAGE_SIZE	= 100 ;
31
32# Name the VMWare image walter.vmdk (in directory $(HAIKU_IMAGE_DIR)).
33HAIKU_VMWARE_IMAGE_NAME	= walter.vmdk ;
34
35# Install Haiku in directory /Haiku.
36HAIKU_INSTALL_DIR = /Haiku ;
37
38# Affects the haiku-image, haiku-vmware-image, and install-haiku targets. Only
39# targets on which the HAIKU_INCLUDE_IN_IMAGE variable has been set will be
40# updated in the image file/installation directory.
41# The update-image, update-vmware-image, and update-install targets always invoke
42# this rule, so one likely doesn't ever need to do it manually.
43SetUpdateHaikuImageOnly 1 ;
44
45# libbe.so and the kernel will be updated on image updates. Note that this
46# generally doesn't work for pseudo targets (it does where special support
47# has been added, like for "kernel").
48HAIKU_INCLUDE_IN_IMAGE on libbe.so kernel = 1 ;
49
50# Add "crashing_app" to the beos/bin directory of the Haiku image/installation.
51# Note, that this also makes the image depend on the target, i.e. it is
52# automatically updated when the image is built.
53AddFilesToHaikuImage beos bin : crashing_app ;
54
55# Make a symlink to home/config/bin/crash.
56AddSymlinkToHaikuImage home config bin : /beos/bin/crashing_app : crash ;
57
58# Adds the source directories src/kits/storage and src/tests/servers/debug
59# (recursively) to the image (as /boot/home/HaikuSources/src/kits/storage
60# and /boot/home/HaikuSources/src/tests/servers/debug respectively).
61# Note that the second directory will also be copied, if the image will only
62# be updated; the first one won't in that case.
63AddSourceDirectoryToHaikuImage src/kits/storage ;
64AddSourceDirectoryToHaikuImage src/tests/servers/debug : 1 ;
65
66# Specify scripts that shall be run when populating the image/installation
67# directory. The "early" script is run before anything has been copied onto
68# the image/into the installation directory. The "late" script is run after
69# everything has been copied, but before the MIME database is installed.
70HAIKU_IMAGE_EARLY_USER_SCRIPTS	= $(HAIKU_TOP)/../early-image-script.sh ;
71HAIKU_IMAGE_LATE_USER_SCRIPTS	= $(HAIKU_TOP)/../late-image-script.sh ;
72
73
74# Creating Sourceable Shell Scripts
75
76# If you use shell scripts (e.g. for testing) that need to access targets or
77# build system properties, you can tell the build system to generate a
78# variables defining shell script you can source from your shell script.
79
80# General setup for the shell script to generate. Name is test.inc, located
81# in the output directory.
82MakeLocate test.inc : $(HAIKU_OUTPUT_DIR) ;
83Always test.inc ;
84
85# Define variable "outputDir" in the shell script, with the value of
86# HAIKU_OUTPUT_DIR.
87AddVariableToScript test.inc : outputDir : $(HAIKU_OUTPUT_DIR) ;
88
89# Define variables "bfsShell" and "fsShellCommand" referring to the
90# generated bfs_shell and fs_shell_command respectively.
91AddTargetVariableToScript test.inc : bfs_shell : bfsShell ;
92AddTargetVariableToScript test.inc : fs_shell_command : fsShellCommand ;
93
94# If no variable name is given, the name (without grist) of the target is
95# used, i.e. a variable "rc" referring to the rc command built for the host
96# platform is defined in the script.
97AddTargetVariableToScript test.inc : <build>rc ;
98
99
100# Optimizing Jamfile Parsing Times
101
102# Setting this variable will prevent the root Jamfile to include the Jamfile
103# in the src directory. Instead only the directories required for building the
104# build tools are included. Only useful in combination with DeferredSubInclude.
105HAIKU_DONT_INCLUDE_SRC = 1 ;
106
107# Schedule the given subdirectory for inclusion at the end of the root
108# Jamfile (directly using SubInclude here is not possible). Using this
109# feature together with HAIKU_DONT_INCLUDE_SRC allows developers working
110# only on a subproject to reduce Jamfile parsing times considerably.
111DeferredSubInclude HAIKU_TOP src tests add-ons kernel file_systems
112	userlandfs ;
113
114