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 set 42# this variable, so one likely doesn't ever need to set it manually. 43HAIKU_IMAGE_UPDATE_ONLY = 1 ; 44 45# libbe.so and the kernel will be updated on image updates. Note that this 46# doesn't work for pseudo targets like "kernel". 47HAIKU_INCLUDE_IN_IMAGE on libbe.so kernel_x86 = 1 ; 48 49# Add "crashing_app" to the beos/bin directory of the Haiku image/installation. 50# Note, that this also makes the image depend on the target, i.e. it is 51# automatically updated when the image is built. 52AddFilesToHaikuImage beos bin : crashing_app ; 53 54# Make a symlink to home/config/bin/crash. 55AddSymlinkToHaikuImage home config bin : /beos/bin/crashing_app : crash ; 56 57# Adds the source directories src/kits/storage and src/tests/servers/debug 58# (recursively) to the image (as /boot/home/HaikuSources/src/kits/storage 59# and /boot/home/HaikuSources/src/tests/servers/debug respectively). 60# Note that the second directory will also be copied, if the image will only 61# be updated; the first one won't in that case. 62AddSourceDirectoryToHaikuImage src/kits/storage ; 63AddSourceDirectoryToHaikuImage src/tests/servers/debug : 1 ; 64 65# Specify scripts that shall be run when populating the image/installation 66# directory. The "early" script is run before anything has been copied onto 67# the image/into the installation directory. The "late" script is run after 68# everything has been copied, but before the MIME database is installed. 69HAIKU_IMAGE_EARLY_USER_SCRIPTS = $(HAIKU_TOP)/../early-image-script.sh ; 70HAIKU_IMAGE_LATE_USER_SCRIPTS = $(HAIKU_TOP)/../late-image-script.sh ; 71 72 73# Creating Sourceable Shell Scripts 74 75# If you use shell scripts (e.g. for testing) that need to access targets or 76# build system properties, you can tell the build system to generate a 77# variables defining shell script you can source from your shell script. 78 79# General setup for the shell script to generate. Name is test.inc, located 80# in the output directory. 81MakeLocate test.inc : $(HAIKU_OUTPUT_DIR) ; 82Always test.inc ; 83 84# Define variable "outputDir" in the shell script, with the value of 85# HAIKU_OUTPUT_DIR. 86AddVariableToScript test.inc : outputDir : $(HAIKU_OUTPUT_DIR) ; 87 88# Define variables "bfsShell" and "fsShellCommand" referring to the 89# generated bfs_shell and fs_shell_command respectively. 90AddTargetVariableToScript test.inc : bfs_shell : bfsShell ; 91AddTargetVariableToScript test.inc : fs_shell_command : fsShellCommand ; 92 93# If no variable name is given, the name (without grist) of the target is 94# used, i.e. a variable "rc" referring to the rc command built for the host 95# platform is defined in the script. 96AddTargetVariableToScript test.inc : <build>rc ; 97 98 99# Optimizing Jamfile Parsing Times 100 101# Setting this variable will prevent the root Jamfile to include the Jamfile 102# in the src directory. Instead only the directories required for building the 103# build tools are included. Only useful in combination with DeferredSubInclude. 104HAIKU_DONT_INCLUDE_SRC = 1 ; 105 106# Schedule the given subdirectory for inclusion at the end of the root 107# Jamfile (directly using SubInclude here is not possible). Using this 108# feature together with HAIKU_DONT_INCLUDE_SRC allows developers working 109# only on a subproject to reduce Jamfile parsing times considerably. 110DeferredSubInclude HAIKU_TOP src tests add-ons kernel file_systems 111 userlandfs ; 112 113