Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
83 lines (70 sloc) 3.05 KB
# Haiku Jamrules
# Main directories used by the build.
HAM_OUTPUT_DIR ?= [ FDirName $(HAM_TOP) generated ] ;
HAM_BUILD_OUTPUT_DIR = [ FDirName $(HAM_OUTPUT_DIR) build ] ;
HAM_BUILD_DIR = [ FDirName $(HAM_TOP) build ] ;
HAM_BUILD_RULES_DIR = $(HAM_BUILD_DIR) ;
HAM_OBJECT_DIR = [ FDirName $(HAM_OUTPUT_DIR) objects ] ;
HAM_COMMON_PLATFORM_OBJECT_DIR = [ FDirName $(HAM_OBJECT_DIR) common ] ;
HAM_DOWNLOAD_DIR = [ FDirName $(HAM_OUTPUT_DIR) download ] ;
# Cache files for header scanning and jamfile caching
HCACHEFILE = header_cache ;
JCACHEFILE = jamfile_cache ;
LOCATE on $(HCACHEFILE) $(JCACHEFILE) = $(HAM_BUILD_OUTPUT_DIR) ;
# include BuildConfig
# local buildConfig = [ GLOB $(HAM_BUILD_OUTPUT_DIR) : BuildConfig ] ;
# if ! $(buildConfig) {
# ECHO "No `BuildConfig' found in $(HAM_BUILD_OUTPUT_DIR)!" ;
# EXIT "Run ./configure in the source tree's root directory first!" ;
# }
# LOCATE on BuildConfig = $(HAM_BUILD_OUTPUT_DIR) ;
# include BuildConfig ;
# Include EarlyUserBuildConfig.
if ! $(HAM_IGNORE_USER_BUILD_CONFIG) {
local userBuildConfig
= [ GLOB $(HAM_BUILD_RULES_DIR) : EarlyUserBuildConfig ] ;
if $(userBuildConfig) {
include $(userBuildConfig) ;
}
# allow for a separate UserBuildConfig per output directory
local userBuildConfig = [ GLOB $(HAM_OUTPUT_DIR) : EarlyUserBuildConfig ] ;
if $(userBuildConfig) {
include $(userBuildConfig) ;
}
}
# The build setup and rules are neatly organized in several files. Include
# them now. Start with the side-effect-less rules, since they are the most
# likely to be used in the top level context (i.e. not only in rules).
# At the end include BuildSetup that sets up global variables etc. The
# optional user-defined UserBuildConfig is included thereafter.
include [ FDirName $(HAM_BUILD_RULES_DIR) HelperRules ] ;
include [ FDirName $(HAM_BUILD_RULES_DIR) MathRules ] ;
include [ FDirName $(HAM_BUILD_RULES_DIR) BeOSRules ] ;
include [ FDirName $(HAM_BUILD_RULES_DIR) CommandLineArguments ] ;
include [ FDirName $(HAM_BUILD_RULES_DIR) ConfigRules ] ;
include [ FDirName $(HAM_BUILD_RULES_DIR) DocumentationRules ] ;
include [ FDirName $(HAM_BUILD_RULES_DIR) FileRules ] ;
include [ FDirName $(HAM_BUILD_RULES_DIR) HeadersRules ] ;
include [ FDirName $(HAM_BUILD_RULES_DIR) MainBuildRules ] ;
include [ FDirName $(HAM_BUILD_RULES_DIR) MiscRules ] ;
include [ FDirName $(HAM_BUILD_RULES_DIR) OverriddenJamRules ] ;
include [ FDirName $(HAM_BUILD_RULES_DIR) TestsRules ] ;
include [ FDirName $(HAM_BUILD_RULES_DIR) BuildSetup ] ;
# Declare no-op user-overridable build rules.
rule UserBuildConfigRulePostBuildTargets { }
rule UserBuildConfigRulePreImage { }
rule UserBuildConfigRulePostImage { }
# Include UserBuildConfig.
if ! $(HAM_IGNORE_USER_BUILD_CONFIG) {
local userBuildConfig
= [ GLOB $(HAM_BUILD_RULES_DIR) : UserBuildConfig ] ;
if $(userBuildConfig) {
include $(userBuildConfig) ;
}
# allow for a separate UserBuildConfig per output directory
local userBuildConfig = [ GLOB $(HAM_OUTPUT_DIR) : UserBuildConfig ] ;
if $(userBuildConfig) {
include $(userBuildConfig) ;
}
}
PrepareConfigVariables ;
You can’t perform that action at this time.