Changeset 24680

Show
Ignore:
Timestamp:
03/30/08 11:34:30 (8 months ago)
Author:
bonefish
Message:

* 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.

Location:
haiku/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • haiku/trunk/Jamfile

    r24201 r24680  
    146146} 
    147147 
     148# Perform deferred SubIncludes. 
     149ExecuteDeferredSubIncludes ; 
     150 
    148151# reset subdir 
    149152SubDir HAIKU_TOP ; 
     
    154157include [ FDirName $(HAIKU_BUILD_RULES_DIR) FloppyBootImage ] ; 
    155158include [ FDirName $(HAIKU_BUILD_RULES_DIR) CDBootImage ] ; 
    156  
    157 # Perform deferred SubIncludes. 
    158 ExecuteDeferredSubIncludes ; 
  • haiku/trunk/build/jam/ConfigRules

    r14337 r24680  
    164164# Some config variables that should be set up automatically for subdirs. 
    165165AUTO_SET_UP_CONFIG_VARIABLES += 
    166         CCFLAGS C++FLAGS DEBUG DEFINES HDRS LINKFLAGS OPTIM OPTIMIZE 
     166        CCFLAGS C++FLAGS DEBUG DEFINES HDRS JAMFILE LINKFLAGS OPTIM OPTIMIZE 
    167167        SYSHDRS WARNINGS 
    168168; 
  • haiku/trunk/build/jam/MiscRules

    r21778 r24680  
    9191HAIKU_DEFERRED_SUB_INCLUDES = ; 
    9292 
    93 rule DeferredSubInclude params 
    94 { 
    95         # DeferredSubInclude <subdir tokens> ; 
    96         # 
    97         # Takes the same parameter as SubInclude. The the subdirectory referred to 
    98         # by <subdir tokens> will be included when ExecuteDeferredSubIncludes is 
    99         # invoked, i.e. at the end of the root Jamfile. 
     93rule DeferredSubInclude params : jamfile : scope 
     94{ 
     95        # DeferredSubInclude <subdir tokens> [ : <jamfile name>  [ : <scope> ] ] ; 
     96        # 
     97        # Takes the same directory tokens parameter as SubInclude plus an optional 
     98        # alternative Jamfile name. The the subdirectory referred to by 
     99        # <subdir tokens> will be included when ExecuteDeferredSubIncludes is 
     100        # invoked, i.e. at the end of the root Jamfile. The <jamfile name> parameter 
     101        # specifies the name of the Jamfile to include. By default it is "Jamfile". 
     102        # The <scope> parameter can be "global" (default) or "local", specifying 
     103        # whether the alternative Jamfile name shall also be used for subdirectories. 
    100104 
    101105        HAIKU_DEFERRED_SUB_INCLUDES += "/" $(params) ; 
     106        if $(jamfile) { 
     107                SetConfigVar JAMFILE : $(params) : $(jamfile) : $(scope) ; 
     108        } 
    102109} 
    103110 
  • haiku/trunk/build/jam/UserBuildConfig.ReadMe

    r24586 r24680  
    159159 
    160160 
    161 # Optimizing Jamfile Parsing Times 
     161# Optimizing Jamfile Parsing Times / Third Party Inclusion 
    162162 
    163163# Setting this variable will prevent the root Jamfile to include the Jamfile 
     
    173173        userlandfs ; 
    174174 
     175# Schedule src/3rdparty/myproject/Jamfile.haiku for later inclusion. The "local" 
     176# parameter specifies that the alternative Jamfile name shall not be used for 
     177# any subdirectory of the given directory (i.e. "Jamfile" will be used as 
     178# usual). Omitting this parameter or specifying "global" will cause the given 
     179# name to be used recursively. 
     180DeferredSubInclude HAIKU_TOP src 3rdparty myproject : Jamfile.haiku : local ; 
     181 
    175182 
    176183# Copy the posix test suite onto the image (or on the installation) into