* Added JAMFILE to the config variables.

* Added additional parameters to DeferredSubInclude. It's now possible
  to specify an alternative Jamfile name.
* Added DeferredSubInclude example to UserBuildConfig.ReadMe showing the
  new feature.
* Moved ExecuteDeferredSubIncludes in the root Jamfile before the
  inclusion of HaikuImage, NetBootArchive etc., so that targets defined
  in the subdirectories are already known there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24680 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-03-30 15:34:30 +00:00
parent 7522f3082d
commit be8a6e43ff
4 changed files with 24 additions and 10 deletions

View File

@ -145,6 +145,9 @@ if $(HAIKU_INCLUDE_3RDPARTY) {
SubInclude HAIKU_TOP 3rdparty ;
}
# Perform deferred SubIncludes.
ExecuteDeferredSubIncludes ;
# reset subdir
SubDir HAIKU_TOP ;
@ -153,6 +156,3 @@ include [ FDirName $(HAIKU_BUILD_RULES_DIR) HaikuImage ] ;
include [ FDirName $(HAIKU_BUILD_RULES_DIR) NetBootArchive ] ;
include [ FDirName $(HAIKU_BUILD_RULES_DIR) FloppyBootImage ] ;
include [ FDirName $(HAIKU_BUILD_RULES_DIR) CDBootImage ] ;
# Perform deferred SubIncludes.
ExecuteDeferredSubIncludes ;

View File

@ -163,6 +163,6 @@ rule PrepareConfigVariables
# Some config variables that should be set up automatically for subdirs.
AUTO_SET_UP_CONFIG_VARIABLES +=
CCFLAGS C++FLAGS DEBUG DEFINES HDRS LINKFLAGS OPTIM OPTIMIZE
CCFLAGS C++FLAGS DEBUG DEFINES HDRS JAMFILE LINKFLAGS OPTIM OPTIMIZE
SYSHDRS WARNINGS
;

View File

@ -90,15 +90,22 @@ rule MakeLocateDebug
# The variable used to collect the deferred SubIncludes.
HAIKU_DEFERRED_SUB_INCLUDES = ;
rule DeferredSubInclude params
rule DeferredSubInclude params : jamfile : scope
{
# DeferredSubInclude <subdir tokens> ;
# DeferredSubInclude <subdir tokens> [ : <jamfile name> [ : <scope> ] ] ;
#
# Takes the same parameter as SubInclude. The the subdirectory referred to
# by <subdir tokens> will be included when ExecuteDeferredSubIncludes is
# invoked, i.e. at the end of the root Jamfile.
# 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.
HAIKU_DEFERRED_SUB_INCLUDES += "/" $(params) ;
if $(jamfile) {
SetConfigVar JAMFILE : $(params) : $(jamfile) : $(scope) ;
}
}
rule ExecuteDeferredSubIncludes

View File

@ -158,7 +158,7 @@ AddTargetVariableToScript test.inc : fs_shell_command : fsShellCommand ;
AddTargetVariableToScript test.inc : <build>rc ;
# Optimizing Jamfile Parsing Times
# Optimizing Jamfile Parsing Times / Third Party Inclusion
# Setting this variable will prevent the root Jamfile to include the Jamfile
# in the src directory. Instead only the directories required for building the
@ -172,6 +172,13 @@ HAIKU_DONT_INCLUDE_SRC = 1 ;
DeferredSubInclude HAIKU_TOP src tests add-ons kernel file_systems
userlandfs ;
# Schedule src/3rdparty/myproject/Jamfile.haiku for later inclusion. The "local"
# parameter specifies that the alternative Jamfile name shall not be used for
# any subdirectory of the given directory (i.e. "Jamfile" will be used as
# usual). Omitting this parameter or specifying "global" will cause the given
# name to be used recursively.
DeferredSubInclude HAIKU_TOP src 3rdparty myproject : Jamfile.haiku : local ;
# Copy the posix test suite onto the image (or on the installation) into
# "home/posixtestsuite" directory, including the run script.