xref: /haiku/build/jam/UserBuildConfig.sample (revision f515ed5f772c48f00c808baffb345d08e531060e)
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# If the image does already exist it won't be zeroed out. It will nevertheless
39# freshly be initialized with BFS. Useful when installing Haiku on a partition.
40HAIKU_DONT_CLEAR_IMAGE = 1 ;
41
42
43# Affects the haiku-image, haiku-vmware-image, and install-haiku targets. Only
44# targets on which the HAIKU_INCLUDE_IN_IMAGE variable has been set will be
45# updated in the image file/installation directory.
46# The update-image, update-vmware-image, and update-install targets always invoke
47# this rule, so one likely doesn't ever need to do it manually.
48SetUpdateHaikuImageOnly 1 ;
49
50# libbe.so and the kernel will be updated on image updates. Note that this
51# generally doesn't work for pseudo targets (it does where special support
52# has been added, like for "kernel").
53HAIKU_INCLUDE_IN_IMAGE on libbe.so kernel = 1 ;
54
55# Add "crashing_app" to the beos/bin directory of the Haiku image/installation.
56# Note, that this also makes the image depend on the target, i.e. it is
57# automatically updated when the image is built.
58AddFilesToHaikuImage beos bin : crashing_app ;
59
60# Make a symlink to home/config/bin/crash.
61AddSymlinkToHaikuImage home config bin : /beos/bin/crashing_app : crash ;
62
63# Adds the source directories src/kits/storage and src/tests/servers/debug
64# (recursively) to the image (as /boot/home/HaikuSources/src/kits/storage
65# and /boot/home/HaikuSources/src/tests/servers/debug respectively).
66# Note that the second directory will also be copied, if the image will only
67# be updated; the first one won't in that case.
68AddSourceDirectoryToHaikuImage src/kits/storage ;
69AddSourceDirectoryToHaikuImage src/tests/servers/debug : 1 ;
70
71# Unzips the given zip archive onto the image under /boot/develop/tools.
72UnzipArchiveToHaikuImage develop tools
73	: /home/bonefish/develop/haiku/misc/gcc-2.95.3-beos-070218/gcc-2.95.3_binutils-2.17_rel-070218.zip ;
74
75# Adds the optional package WonderBrush to the image. The package is downloaded
76# via wget (i.e. wget must be installed).
77AddOptionalHaikuImagePackages WonderBrush ;
78
79# Adds the optional package Vision to the image. See above.
80AddOptionalHaikuImagePackages Vision ;
81
82# Add all available optional packages.
83HAIKU_ADD_ALL_OPTIONAL_PACKAGES = 1 ;
84
85# Specify scripts that shall be run when populating the image/installation
86# directory. The "early" script is run before anything has been copied onto
87# the image/into the installation directory. The "late" script is run after
88# everything has been copied, but before the MIME database is installed.
89HAIKU_IMAGE_EARLY_USER_SCRIPTS	= $(HAIKU_TOP)/../early-image-script.sh ;
90HAIKU_IMAGE_LATE_USER_SCRIPTS	= $(HAIKU_TOP)/../late-image-script.sh ;
91
92
93# Creating Sourceable Shell Scripts
94
95# If you use shell scripts (e.g. for testing) that need to access targets or
96# build system properties, you can tell the build system to generate a
97# variables defining shell script you can source from your shell script.
98
99# General setup for the shell script to generate. Name is test.inc, located
100# in the output directory.
101MakeLocate test.inc : $(HAIKU_OUTPUT_DIR) ;
102Always test.inc ;
103
104# Define variable "outputDir" in the shell script, with the value of
105# HAIKU_OUTPUT_DIR.
106AddVariableToScript test.inc : outputDir : $(HAIKU_OUTPUT_DIR) ;
107
108# Define variables "bfsShell" and "fsShellCommand" referring to the
109# generated bfs_shell and fs_shell_command respectively.
110AddTargetVariableToScript test.inc : bfs_shell : bfsShell ;
111AddTargetVariableToScript test.inc : fs_shell_command : fsShellCommand ;
112
113# If no variable name is given, the name (without grist) of the target is
114# used, i.e. a variable "rc" referring to the rc command built for the host
115# platform is defined in the script.
116AddTargetVariableToScript test.inc : <build>rc ;
117
118
119# Optimizing Jamfile Parsing Times
120
121# Setting this variable will prevent the root Jamfile to include the Jamfile
122# in the src directory. Instead only the directories required for building the
123# build tools are included. Only useful in combination with DeferredSubInclude.
124HAIKU_DONT_INCLUDE_SRC = 1 ;
125
126# Schedule the given subdirectory for inclusion at the end of the root
127# Jamfile (directly using SubInclude here is not possible). Using this
128# feature together with HAIKU_DONT_INCLUDE_SRC allows developers working
129# only on a subproject to reduce Jamfile parsing times considerably.
130DeferredSubInclude HAIKU_TOP src tests add-ons kernel file_systems
131	userlandfs ;
132
133