2005-10-29 20:27:43 +04:00
|
|
|
rule SetupObjectsDir
|
|
|
|
{
|
2009-04-08 13:51:01 +04:00
|
|
|
# SetupObjectsDir
|
|
|
|
#
|
|
|
|
# Internal rule used to set up the *{LOCATE,SEARCH}*_{TARGET,SOURCE}
|
|
|
|
# variables for the current directory.
|
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
local relPath = [ FDirName $(SUBDIR_TOKENS[2-]) ] ;
|
2007-08-01 02:37:21 +04:00
|
|
|
if $(relPath) = . {
|
|
|
|
relPath = ;
|
|
|
|
}
|
2013-08-01 10:51:16 +04:00
|
|
|
|
|
|
|
COMMON_PLATFORM_LOCATE_TARGET
|
|
|
|
= [ FDirName $(HAIKU_COMMON_PLATFORM_OBJECT_DIR) $(relPath) ] ;
|
|
|
|
HOST_COMMON_ARCH_LOCATE_TARGET
|
|
|
|
= [ FDirName $(HOST_COMMON_ARCH_OBJECT_DIR) $(relPath) ] ;
|
|
|
|
TARGET_COMMON_ARCH_LOCATE_TARGET
|
|
|
|
= [ FDirName $(TARGET_COMMON_ARCH_OBJECT_DIR) $(relPath) ] ;
|
2005-10-29 20:27:43 +04:00
|
|
|
|
|
|
|
local var ;
|
2013-08-01 10:51:16 +04:00
|
|
|
for var in COMMON_DEBUG DEBUG_$(HAIKU_DEBUG_LEVELS) {
|
2005-10-29 20:27:43 +04:00
|
|
|
HOST_$(var)_LOCATE_TARGET
|
|
|
|
= [ FDirName $(HOST_$(var)_OBJECT_DIR) $(relPath) ] ;
|
|
|
|
TARGET_$(var)_LOCATE_TARGET
|
2013-08-01 10:51:16 +04:00
|
|
|
= [ FDirName $(TARGET_$(var)_OBJECT_DIR_$(TARGET_PACKAGING_ARCH))
|
|
|
|
$(relPath) ] ;
|
2005-10-29 20:27:43 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
LOCATE_TARGET = $(COMMON_PLATFORM_LOCATE_TARGET) ;
|
|
|
|
LOCATE_SOURCE = $(LOCATE_TARGET) ;
|
|
|
|
SEARCH_SOURCE = $(SUBDIR) $(LOCATE_SOURCE)
|
|
|
|
$(HOST_COMMON_DEBUG_LOCATE_TARGET) # Also add the standard output
|
|
|
|
$(TARGET_COMMON_DEBUG_LOCATE_TARGET) # dirs for generated sources.
|
|
|
|
;
|
|
|
|
}
|
|
|
|
|
2009-04-08 13:51:01 +04:00
|
|
|
rule SetupFeatureObjectsDir feature
|
|
|
|
{
|
|
|
|
# SetupFeatureObjectsDir <feature>
|
|
|
|
#
|
|
|
|
# Updates the *{LOCATE,SEARCH}*_{TARGET,SOURCE} variables for the current
|
|
|
|
# directory appending a <feature> to each of them. Note that it resets
|
|
|
|
# the LOCATE_TARGET, LOCATE_SOURCE, SEARCH_SOURCE (!) variables. I.e. it
|
|
|
|
# should be invoked before customizing these variables further (e.g. like
|
|
|
|
# adding additional source directories to SEARCH_SOURCE).
|
|
|
|
|
|
|
|
COMMON_PLATFORM_LOCATE_TARGET
|
|
|
|
= [ FDirName $(COMMON_PLATFORM_LOCATE_TARGET) $(feature) ] ;
|
|
|
|
|
|
|
|
local var ;
|
|
|
|
for var in COMMON_ARCH COMMON_DEBUG DEBUG_$(HAIKU_DEBUG_LEVELS) {
|
|
|
|
HOST_$(var)_LOCATE_TARGET
|
|
|
|
= [ FDirName $(HOST_$(var)_LOCATE_TARGET) $(feature) ] ;
|
|
|
|
TARGET_$(var)_LOCATE_TARGET
|
|
|
|
= [ FDirName $(TARGET_$(var)_LOCATE_TARGET) $(feature) ] ;
|
|
|
|
}
|
|
|
|
|
|
|
|
LOCATE_TARGET = [ FDirName $(LOCATE_TARGET) $(feature) ] ;
|
|
|
|
LOCATE_SOURCE = $(LOCATE_TARGET) ;
|
|
|
|
SEARCH_SOURCE = $(SUBDIR) $(LOCATE_SOURCE)
|
|
|
|
$(HOST_COMMON_DEBUG_LOCATE_TARGET) # Also add the standard output
|
|
|
|
$(TARGET_COMMON_DEBUG_LOCATE_TARGET) # dirs for generated sources.
|
|
|
|
;
|
|
|
|
}
|
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule SubIncludeGPL
|
|
|
|
{
|
|
|
|
# SubInclude rule that can be used to conditionally include GPL licensed
|
|
|
|
# add-ons
|
2009-12-20 16:55:45 +03:00
|
|
|
if $(HAIKU_INCLUDE_GPL_ADDONS) = 1 {
|
2005-10-29 20:27:43 +04:00
|
|
|
SubInclude $(1) ;
|
2008-07-15 21:54:58 +04:00
|
|
|
}
|
2005-10-29 20:27:43 +04:00
|
|
|
}
|
2007-04-06 06:39:37 +04:00
|
|
|
|
|
|
|
|
|
|
|
# pragma mark - MakeLocate variants
|
|
|
|
|
|
|
|
|
2013-08-01 10:51:16 +04:00
|
|
|
rule MakeLocateCommonPlatform files : subdir
|
2005-10-29 20:27:43 +04:00
|
|
|
{
|
2011-01-08 20:26:08 +03:00
|
|
|
# The file is shared between all target platforms.
|
2013-08-01 10:51:16 +04:00
|
|
|
MakeLocate $(files)
|
|
|
|
: [ FDirName $(COMMON_PLATFORM_LOCATE_TARGET) $(subdir) ] ;
|
2005-10-29 20:27:43 +04:00
|
|
|
}
|
|
|
|
|
2013-08-01 10:51:16 +04:00
|
|
|
rule MakeLocatePlatform files : subdir
|
2005-10-29 20:27:43 +04:00
|
|
|
{
|
2011-01-08 20:26:08 +03:00
|
|
|
# The file is specific for the target platform, but
|
|
|
|
# architecture independent. Usually the right rule for generated
|
|
|
|
# sources, though sometimes sources can be architecture specific.
|
2005-10-29 20:27:43 +04:00
|
|
|
local file ;
|
|
|
|
for file in $(files) {
|
2013-08-01 10:51:16 +04:00
|
|
|
local directory ;
|
2005-10-29 20:27:43 +04:00
|
|
|
if [ on $(file) return $(PLATFORM) ] = host {
|
2013-08-01 10:51:16 +04:00
|
|
|
directory = $(HOST_COMMON_ARCH_LOCATE_TARGET) ;
|
2005-10-29 20:27:43 +04:00
|
|
|
} else {
|
2013-08-01 10:51:16 +04:00
|
|
|
directory = $(TARGET_COMMON_ARCH_LOCATE_TARGET) ;
|
2005-10-29 20:27:43 +04:00
|
|
|
}
|
2013-08-01 10:51:16 +04:00
|
|
|
MakeLocate $(file) : [ FDirName $(directory) $(subdir) ] ;
|
2005-10-29 20:27:43 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-01 10:51:16 +04:00
|
|
|
rule MakeLocateArch files : subdir
|
2005-10-29 20:27:43 +04:00
|
|
|
{
|
2011-01-08 20:26:08 +03:00
|
|
|
# The file is platform+architecture specific, but is debug
|
|
|
|
# level independent. This is usually the right rule for generated
|
|
|
|
# architecture specific data or source files.
|
2005-10-29 20:27:43 +04:00
|
|
|
local file ;
|
|
|
|
for file in $(files) {
|
2013-08-01 10:51:16 +04:00
|
|
|
local directory ;
|
2005-10-29 20:27:43 +04:00
|
|
|
if [ on $(file) return $(PLATFORM) ] = host {
|
2013-08-01 10:51:16 +04:00
|
|
|
directory = $(HOST_COMMON_DEBUG_LOCATE_TARGET) ;
|
2005-10-29 20:27:43 +04:00
|
|
|
} else {
|
2013-08-01 10:51:16 +04:00
|
|
|
directory = $(TARGET_COMMON_DEBUG_LOCATE_TARGET) ;
|
2005-10-29 20:27:43 +04:00
|
|
|
}
|
2013-08-01 10:51:16 +04:00
|
|
|
MakeLocate $(file) : [ FDirName $(directory) $(subdir) ] ;
|
2005-10-29 20:27:43 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-01 10:51:16 +04:00
|
|
|
rule MakeLocateDebug files : subdir
|
2005-10-29 20:27:43 +04:00
|
|
|
{
|
2011-01-08 20:26:08 +03:00
|
|
|
# The file is platform+architecture+debug level specific.
|
|
|
|
# That's what should be used for compiled code.
|
2005-10-29 20:27:43 +04:00
|
|
|
local file ;
|
|
|
|
for file in $(files) {
|
2013-08-01 10:51:16 +04:00
|
|
|
local directory ;
|
2005-10-29 20:27:43 +04:00
|
|
|
on $(file) {
|
|
|
|
if $(PLATFORM) = host {
|
2013-08-01 10:51:16 +04:00
|
|
|
directory = $(HOST_DEBUG_$(DEBUG)_LOCATE_TARGET) ;
|
2005-10-29 20:27:43 +04:00
|
|
|
} else {
|
2013-08-01 10:51:16 +04:00
|
|
|
directory = $(TARGET_DEBUG_$(DEBUG)_LOCATE_TARGET) ;
|
2005-10-29 20:27:43 +04:00
|
|
|
}
|
|
|
|
}
|
2013-08-01 10:51:16 +04:00
|
|
|
MakeLocate $(file) : [ FDirName $(directory) $(subdir) ] ;
|
2005-10-29 20:27:43 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-04-06 06:39:37 +04:00
|
|
|
|
|
|
|
# pragma mark - Deferred SubIncludes
|
|
|
|
|
|
|
|
|
|
|
|
# The variable used to collect the deferred SubIncludes.
|
|
|
|
HAIKU_DEFERRED_SUB_INCLUDES = ;
|
|
|
|
|
2008-03-30 19:34:30 +04:00
|
|
|
rule DeferredSubInclude params : jamfile : scope
|
2007-03-07 19:01:19 +03:00
|
|
|
{
|
2008-03-30 19:34:30 +04:00
|
|
|
# DeferredSubInclude <subdir tokens> [ : <jamfile name> [ : <scope> ] ] ;
|
2007-03-07 19:01:19 +03:00
|
|
|
#
|
2008-03-30 19:34:30 +04:00
|
|
|
# Takes the same directory tokens parameter as SubInclude plus an optional
|
|
|
|
# alternative Jamfile name. The the subdirectory referred to by
|
|
|
|
# <subdir tokens> will be included when ExecuteDeferredSubIncludes is
|
|
|
|
# invoked, i.e. at the end of the root Jamfile. The <jamfile name> parameter
|
|
|
|
# specifies the name of the Jamfile to include. By default it is "Jamfile".
|
|
|
|
# The <scope> parameter can be "global" (default) or "local", specifying
|
|
|
|
# whether the alternative Jamfile name shall also be used for subdirectories.
|
2007-03-07 19:01:19 +03:00
|
|
|
|
|
|
|
HAIKU_DEFERRED_SUB_INCLUDES += "/" $(params) ;
|
2008-03-30 19:34:30 +04:00
|
|
|
if $(jamfile) {
|
|
|
|
SetConfigVar JAMFILE : $(params) : $(jamfile) : $(scope) ;
|
|
|
|
}
|
2007-03-07 19:01:19 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
rule ExecuteDeferredSubIncludes
|
|
|
|
{
|
|
|
|
# ExecuteDeferredSubIncludes ;
|
|
|
|
#
|
|
|
|
# Performs the deferred SubIncludes scheduled by DeferredSubInclude.
|
|
|
|
|
|
|
|
local tokensList = $(HAIKU_DEFERRED_SUB_INCLUDES) ;
|
|
|
|
while $(tokensList) {
|
|
|
|
# chop off leading "/"
|
|
|
|
tokensList = $(tokensList[2-]) ;
|
|
|
|
|
|
|
|
# get the tokens for the next include
|
|
|
|
local tokens ;
|
|
|
|
while $(tokensList) && $(tokensList[1]) != "/" {
|
|
|
|
tokens += $(tokensList[1]) ;
|
|
|
|
tokensList = $(tokensList[2-]) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
# perform the include
|
|
|
|
if $(tokens) {
|
|
|
|
SubInclude $(tokens) ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
rule HaikuSubInclude tokens
|
|
|
|
{
|
|
|
|
# HaikuSubInclude <tokens> ;
|
|
|
|
#
|
|
|
|
# Current subdir relative SubInclude.
|
|
|
|
# <tokens> - subdir tokens specifying the subdirectory to be include
|
|
|
|
# (relative to the current subdir)
|
|
|
|
|
|
|
|
if $(tokens) {
|
|
|
|
SubInclude HAIKU_TOP $(SUBDIR_TOKENS) $(tokens) ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-04-06 06:39:37 +04:00
|
|
|
|
|
|
|
# pragma mark - Unique IDs/targets
|
|
|
|
|
|
|
|
|
|
|
|
# private to NextID; incremented with each NextID invocation
|
|
|
|
HAIKU_NEXT_ID = 0 ;
|
|
|
|
|
|
|
|
rule NextID
|
|
|
|
{
|
|
|
|
# NextID ;
|
|
|
|
|
|
|
|
local result = $(HAIKU_NEXT_ID:J=) ;
|
|
|
|
HAIKU_NEXT_ID = [ AddNumAbs $(HAIKU_NEXT_ID) : 1 ] ;
|
|
|
|
return $(result) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
rule NewUniqueTarget basename
|
|
|
|
{
|
|
|
|
# NewUniqueTarget [ basename ] ;
|
|
|
|
|
|
|
|
local id = [ NextID ] ;
|
|
|
|
return $(basename[1]:E=_target:G=unique!target)_$(id) ;
|
|
|
|
}
|
2007-04-06 07:14:58 +04:00
|
|
|
|
|
|
|
|
|
|
|
# pragma mark - RunCommandLine
|
|
|
|
|
|
|
|
|
|
|
|
rule RunCommandLine commandLine
|
|
|
|
{
|
|
|
|
# RunCommandLine <commandLine>
|
|
|
|
#
|
|
|
|
# Creates a pseudo target that, when made by jam, causes the supplied shell
|
|
|
|
# command line to be executed. Elements of <commandLine> with the prefix ":"
|
|
|
|
# are replaced by the rule. After stripping the prefix such a string specifies
|
|
|
|
# a build system target and the finally executed command line will contain
|
|
|
|
# a path to the target instead.
|
|
|
|
# The pseudo target will depend on all targets thus identified. Each
|
|
|
|
# invocation of this rule creates a different pseudo target, which is
|
|
|
|
# returned to the caller.
|
|
|
|
|
|
|
|
# collect the targets in the command line and replace them by $targetX*
|
|
|
|
# variables
|
|
|
|
local substitutedCommandLine ;
|
|
|
|
local targets ;
|
|
|
|
|
|
|
|
local targetVarName = target ;
|
|
|
|
local i ;
|
|
|
|
for i in $(commandLine) {
|
|
|
|
# targets are marked by the ":" prefix
|
2007-04-08 06:21:10 +04:00
|
|
|
local target = [ Match ^:(.*) : $(i) ] ;
|
2007-04-06 07:14:58 +04:00
|
|
|
if $(target) {
|
|
|
|
targets += $(target) ;
|
|
|
|
targetVarName = $(targetVarName)X ;
|
|
|
|
i = "$"$(targetVarName) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
substitutedCommandLine += $(i) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
# define the "run" target
|
|
|
|
local run = [ NewUniqueTarget run ] ;
|
|
|
|
COMMAND_LINE on $(run) = $(substitutedCommandLine) ;
|
|
|
|
NotFile $(run) ;
|
|
|
|
Always $(run) ;
|
|
|
|
Depends $(run) : $(targets) ;
|
|
|
|
RunCommandLine1 $(run) : $(targets) ;
|
|
|
|
|
|
|
|
return $(run) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
actions RunCommandLine1 {
|
|
|
|
target=target;
|
|
|
|
for t in $(2) ; do
|
2007-04-30 20:55:27 +04:00
|
|
|
target=${target}X
|
2007-04-06 07:14:58 +04:00
|
|
|
eval "${target}=${t}"
|
|
|
|
done
|
|
|
|
$(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR)
|
2008-09-28 17:45:36 +04:00
|
|
|
"$(COMMAND_LINE)"
|
2007-04-06 07:14:58 +04:00
|
|
|
}
|
|
|
|
|
2008-04-03 00:29:43 +04:00
|
|
|
|
|
|
|
#pragma mark - DefineBuildProfile
|
|
|
|
|
|
|
|
|
|
|
|
rule DefineBuildProfile name : type : path {
|
|
|
|
# DefineBuildProfile <name> : <type> [ : <path> ]
|
|
|
|
#
|
|
|
|
# Makes a build profile known. Build profiles can be used to define
|
|
|
|
# different sets of settings for Haiku images/installations. For each
|
|
|
|
# profile the default actions "build", "update", and "mount" (the latter
|
|
|
|
# only for disks or image types) will be available (i.e. can be specified
|
|
|
|
# as second parameter on the jam command line). They will build an image
|
|
|
|
# or installation, update only given targets, respectively just mount the
|
|
|
|
# image or disk using the bfs_shell.
|
|
|
|
#
|
|
|
|
# <name> - The name of the build profile.
|
|
|
|
# <type> - The type of the build profile. Must be one of "image" (plain
|
2010-05-04 01:51:58 +04:00
|
|
|
# disk image), "anyboot-image" (custom disk image that can be
|
|
|
|
# written to CD or disk device), "cd-image" (ISO CD image),
|
|
|
|
# "vmware-image" (VMware disk image), "disk" (actual partition
|
|
|
|
# or hard disk device), "install" (installation in a directory),
|
|
|
|
# or "custom" (user-defined).
|
2008-04-03 00:29:43 +04:00
|
|
|
# <path> - The path associated with the profile. Depending on the profile
|
|
|
|
# type, this is the path to the disk image/VMware image, hard
|
|
|
|
# disk/partition device, or the installation directory. If the
|
|
|
|
# parameter is omitted, the value of the HAIKU[_VMWARE]_IMAGE_NAME,
|
|
|
|
# HAIKU_IMAGE_DIR, respectively HAIKU_INSTALL_DIR or their default
|
|
|
|
# values will be used instead.
|
|
|
|
|
2009-02-24 01:33:09 +03:00
|
|
|
if [ on $(name) return $(HAIKU_BUILD_PROFILE_SPECIFIED) ] {
|
|
|
|
Exit "ERROR: Build profile \"$(name)\" defined twice!" ;
|
|
|
|
}
|
|
|
|
HAIKU_BUILD_PROFILE_SPECIFIED on $(name) = 1 ;
|
|
|
|
|
2008-04-03 00:29:43 +04:00
|
|
|
if ! $(HAIKU_BUILD_PROFILE) || $(HAIKU_BUILD_PROFILE) != $(name) {
|
|
|
|
return ;
|
|
|
|
}
|
|
|
|
|
|
|
|
HAIKU_BUILD_PROFILE_DEFINED = 1 ;
|
|
|
|
|
|
|
|
# split path into directory path and name
|
|
|
|
local targetDir = $(path:D) ;
|
|
|
|
local targetName = $(path:BS) ;
|
|
|
|
|
|
|
|
# Jam's path splitting produces an empty string, if a component doesn't
|
|
|
|
# exist. That's a little unhandy for checks.
|
|
|
|
if $(targetDir) = "" {
|
|
|
|
targetDir = ;
|
|
|
|
}
|
|
|
|
if $(targetName) = "" {
|
|
|
|
targetName = ;
|
|
|
|
}
|
|
|
|
|
|
|
|
targetDir ?= $(HAIKU_IMAGE_DIR) ;
|
|
|
|
targetDir ?= $(HAIKU_DEFAULT_IMAGE_DIR) ;
|
|
|
|
|
|
|
|
# "disk" is "image" with HAIKU_DONT_CLEAR_IMAGE
|
|
|
|
if $(type) = "disk" {
|
|
|
|
type = "image" ;
|
|
|
|
HAIKU_DONT_CLEAR_IMAGE = 1 ;
|
|
|
|
}
|
|
|
|
|
|
|
|
local buildTarget ;
|
|
|
|
local startOffset ;
|
|
|
|
|
|
|
|
switch $(type) {
|
2010-03-16 02:51:45 +03:00
|
|
|
case "anyboot-image" : {
|
|
|
|
targetName ?= $(HAIKU_ANYBOOT_NAME) ;
|
|
|
|
targetName ?= $(HAIKU_DEFAULT_ANYBOOT_NAME) ;
|
|
|
|
HAIKU_ANYBOOT_DIR = $(targetDir) ;
|
|
|
|
HAIKU_ANYBOOT_NAME = $(targetName) ;
|
|
|
|
buildTarget = haiku-anyboot-image ;
|
|
|
|
}
|
|
|
|
|
2009-05-24 02:19:30 +04:00
|
|
|
case "cd-image" : {
|
|
|
|
targetName ?= $(HAIKU_CD_NAME) ;
|
|
|
|
targetName ?= $(HAIKU_DEFAULT_CD_NAME) ;
|
|
|
|
HAIKU_CD_DIR = $(targetDir) ;
|
|
|
|
HAIKU_CD_NAME = $(targetName) ;
|
|
|
|
buildTarget = haiku-cd ;
|
|
|
|
}
|
|
|
|
|
2008-04-03 00:29:43 +04:00
|
|
|
case "image" : {
|
|
|
|
targetName ?= $(HAIKU_IMAGE_NAME) ;
|
|
|
|
targetName ?= $(HAIKU_DEFAULT_IMAGE_NAME) ;
|
|
|
|
HAIKU_IMAGE_DIR = $(targetDir) ;
|
|
|
|
HAIKU_IMAGE_NAME = $(targetName) ;
|
|
|
|
buildTarget = haiku-image ;
|
|
|
|
}
|
|
|
|
|
|
|
|
case "vmware-image" : {
|
|
|
|
targetName ?= $(HAIKU_VMWARE_IMAGE_NAME) ;
|
|
|
|
targetName ?= $(HAIKU_DEFAULT_VMWARE_IMAGE_NAME) ;
|
|
|
|
HAIKU_IMAGE_DIR = $(targetDir) ;
|
|
|
|
HAIKU_VMWARE_IMAGE_NAME = $(targetName) ;
|
|
|
|
buildTarget = haiku-vmware-image ;
|
|
|
|
startOffset = --start-offset 65536 ;
|
|
|
|
}
|
|
|
|
|
|
|
|
case "install" : {
|
|
|
|
path ?= $(HAIKU_INSTALL_DIR) ;
|
|
|
|
path ?= $(HAIKU_DEFAULT_INSTALL_DIR) ;
|
|
|
|
HAIKU_INSTALL_DIR = $(path) ;
|
|
|
|
buildTarget = install-haiku ;
|
|
|
|
}
|
|
|
|
|
|
|
|
case "custom" : {
|
|
|
|
# user-defined -- don't do anything
|
|
|
|
return 1 ;
|
|
|
|
}
|
|
|
|
|
|
|
|
case * : {
|
|
|
|
Exit "Unsupported build profile type: " $(type) ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
switch $(HAIKU_BUILD_PROFILE_ACTION) {
|
|
|
|
case "build" : {
|
2013-10-04 02:20:53 +04:00
|
|
|
# If parameters are specified, only build those targets (under the
|
|
|
|
# influence of the build profile).
|
|
|
|
if $(HAIKU_BUILD_PROFILE_PARAMETERS) {
|
|
|
|
JAM_TARGETS = $(HAIKU_BUILD_PROFILE_PARAMETERS) ;
|
|
|
|
} else {
|
|
|
|
JAM_TARGETS = $(buildTarget) ;
|
|
|
|
}
|
2008-04-03 00:29:43 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
case "update" : {
|
|
|
|
JAM_TARGETS = $(buildTarget) ;
|
|
|
|
SetUpdateHaikuImageOnly 1 ;
|
2011-07-03 10:44:19 +04:00
|
|
|
HAIKU_PACKAGES_UPDATE_ONLY = 1 ;
|
2008-04-03 00:29:43 +04:00
|
|
|
HAIKU_INCLUDE_IN_IMAGE on $(HAIKU_BUILD_PROFILE_PARAMETERS) = 1 ;
|
2011-07-03 10:44:19 +04:00
|
|
|
HAIKU_INCLUDE_IN_PACKAGES on $(HAIKU_BUILD_PROFILE_PARAMETERS) = 1 ;
|
2008-04-03 00:29:43 +04:00
|
|
|
}
|
|
|
|
|
2008-07-15 21:54:58 +04:00
|
|
|
case "update-all" : {
|
|
|
|
JAM_TARGETS = $(buildTarget) ;
|
|
|
|
SetUpdateHaikuImageOnly 1 ;
|
|
|
|
HAIKU_INCLUDE_IN_IMAGE = 1 ;
|
2013-10-06 00:10:01 +04:00
|
|
|
HAIKU_UPDATE_ALL_PACKAGES = 1 ;
|
2008-07-15 21:54:58 +04:00
|
|
|
}
|
|
|
|
|
2013-04-21 03:44:21 +04:00
|
|
|
case "update-packages" : {
|
|
|
|
JAM_TARGETS = $(buildTarget) ;
|
|
|
|
SetUpdateHaikuImageOnly 1 ;
|
|
|
|
HAIKU_UPDATE_ALL_PACKAGES = 1 ;
|
|
|
|
}
|
|
|
|
|
2013-08-07 01:02:10 +04:00
|
|
|
case "build-package-list" : {
|
|
|
|
HAIKU_IMAGE_LIST_PACKAGES_TARGET
|
2013-08-17 11:20:35 +04:00
|
|
|
= $(HAIKU_BUILD_PROFILE_PARAMETERS[1]) ;
|
|
|
|
HAIKU_IMAGE_ADDITIONAL_PACKAGES
|
|
|
|
= $(HAIKU_BUILD_PROFILE_PARAMETERS[2-]) ;
|
2013-08-07 01:02:10 +04:00
|
|
|
JAM_TARGETS = $(HAIKU_IMAGE_LIST_PACKAGES_TARGET) ;
|
|
|
|
}
|
|
|
|
|
2008-04-03 00:29:43 +04:00
|
|
|
case "mount" : {
|
2009-05-24 02:19:30 +04:00
|
|
|
if $(type) in "install" "cd-image" {
|
2008-04-03 00:29:43 +04:00
|
|
|
Exit "Build action \"mount\" not supported for profile type"
|
2009-05-24 02:19:30 +04:00
|
|
|
"\"$(type)\"." ;
|
2008-04-03 00:29:43 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
local commandLine = :<build>bfs_shell $(startOffset)
|
|
|
|
\"$(targetName:D=$(targetDir))\" ;
|
|
|
|
JAM_TARGETS = [ RunCommandLine $(commandLine) ] ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1 ;
|
|
|
|
}
|