xref: /haiku/build/jam/UserBuildConfig.sample (revision 4f00613311d0bd6b70fa82ce19931c41f071ea4e)
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# Install Haiku in directory /Haiku.
33HAIKU_INSTALL_DIR = /Haiku ;
34
35# Add "crashing_app" to the beos/bin directory of the Haiku image/installation.
36# Note, that this also makes the image depend on the target, i.e. it is
37# automatically updated when the image is built.
38AddFilesToHaikuImage beos bin : crashing_app ;
39
40# Make a symlink to home/config/bin/crash.
41AddSymlinkToHaikuImage home config bin : /beos/bin/crashing_app : crash ;
42
43# Specify scripts that shall be run when populating the image/installation
44# directory. The "early" script is run before anything has been copied onto
45# the image/into the installation directory. The "late" script is run after
46# everything has been copied, but before the MIME database is installed.
47HAIKU_IMAGE_EARLY_USER_SCRIPTS	= $(HAIKU_TOP)/../early-image-script.sh ;
48HAIKU_IMAGE_LATE_USER_SCRIPTS	= $(HAIKU_TOP)/../late-image-script.sh ;
49
50
51# Creating Sourceable Shell Scripts
52
53# If you use shell scripts (e.g. for testing) that need to access targets or
54# build system properties, you can tell the build system to generate a
55# variables defining shell script you can source from your shell script.
56
57# General setup for the shell script to generate. Name is test.inc, located
58# in the output directory.
59MakeLocate test.inc : $(HAIKU_OUTPUT_DIR) ;
60Always test.inc ;
61
62# Define variable "outputDir" in the shell script, with the value of
63# HAIKU_OUTPUT_DIR.
64AddVariableToScript test.inc : outputDir : $(HAIKU_OUTPUT_DIR) ;
65
66# Define variables "bfsShell" and "fsShellCommand" referring to the
67# generated bfs_shell and fs_shell_command respectively.
68AddTargetVariableToScript test.inc : bfs_shell : bfsShell ;
69AddTargetVariableToScript test.inc : fs_shell_command : fsShellCommand ;
70
71# If no variable name is given, the name (without grist) of the target is
72# used, i.e. a variable "rc" referring to the rc command built for the host
73# platform is defined in the script.
74AddTargetVariableToScript test.inc : <build>rc ;
75