From a8c098a3ba81542b73c5be4e90ae01a4fc47507b Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Sat, 22 Mar 2014 20:23:10 +0100 Subject: [PATCH] Replace HAIKU_{BOOTSTRAP,MINIMUM}_BUILD with HAIKU_BUILD_TYPE. * Instead of separate variables, HAIKU_BUILD_TYPE is set to one of 'bootstrap', 'minimum' or 'regular'. * Adjust uses of HAIKU_BOOTSTRAP_BUILD accordingly. --- Jamfile | 8 -------- Jamrules | 2 +- build/jam/DefaultBuildProfiles | 18 +++++++++++++----- build/jam/HaikuPackages | 4 ++-- build/jam/ImageRules | 2 +- build/jam/PackageRules | 6 +++--- build/jam/RepositoryRules | 4 ++-- build/jam/images/HaikuImage | 4 ++-- build/jam/packages/HaikuDevel | 2 +- 9 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Jamfile b/Jamfile index 22f21ef835..0d8317d67d 100644 --- a/Jamfile +++ b/Jamfile @@ -11,14 +11,6 @@ for architectureObject in [ MultiArchSubDirSetup ] { } } -if $(HAIKU_BOOTSTRAP_BUILD) { - EnableBuildFeatures bootstrap_image ; -} else if $(HAIKU_MINIMUM_BUILD) { - EnableBuildFeatures minimum_image ; -} else { - EnableBuildFeatures regular_image ; -} - # Include required packages: # primary architecture AddHaikuImagePackages [ FFilterByBuildFeatures diff --git a/Jamrules b/Jamrules index 2c5ed7bc48..9c02e79a75 100644 --- a/Jamrules +++ b/Jamrules @@ -65,7 +65,7 @@ include [ FDirName $(HAIKU_BUILD_RULES_DIR) DefaultBuildProfiles ] ; local repositoriesDirectory = [ FDirName $(HAIKU_BUILD_RULES_DIR) repositories ] ; local repositories = HaikuPorts ; -if $(HAIKU_BOOTSTRAP_BUILD) { +if $(HAIKU_BUILD_TYPE) = bootstrap { repositories = HaikuPortsCross ; } diff --git a/build/jam/DefaultBuildProfiles b/build/jam/DefaultBuildProfiles index d221b79e0d..f9c3679909 100644 --- a/build/jam/DefaultBuildProfiles +++ b/build/jam/DefaultBuildProfiles @@ -1,15 +1,24 @@ -# set HAIKU_BOOTSTRAP_BUILD early, if building a bootstrap Haiku image +# set HAIKU_BUILD_TYPE early switch $(HAIKU_BUILD_PROFILE) { case "bootstrap-*" : { - HAIKU_BOOTSTRAP_BUILD = 1 ; + HAIKU_BUILD_TYPE = bootstrap ; + EnableBuildFeatures bootstrap_image ; + HAIKU_DEFINES += HAIKU_BOOTSTRAP_BUILD ; TARGET_DEFINES += HAIKU_BOOTSTRAP_BUILD ; + } + + case "minimum-*" : { + HAIKU_BUILD_TYPE = minimum ; + EnableBuildFeatures minimum_image ; } - case "minimum-*" : { - HAIKU_MINIMUM_BUILD = 1 ; + case "*" : { + HAIKU_BUILD_TYPE = regular ; + EnableBuildFeatures regular_image ; } } +Echo "Starting build of type $(HAIKU_BUILD_TYPE) ..." ; rule DefineDefaultBuildProfiles @@ -137,7 +146,6 @@ rule DefineDefaultBuildProfiles binutils bison curl_devel - findutils flex freetype_devel gawk diff --git a/build/jam/HaikuPackages b/build/jam/HaikuPackages index 836c2933dd..279efab3e1 100644 --- a/build/jam/HaikuPackages +++ b/build/jam/HaikuPackages @@ -8,7 +8,7 @@ local packages = MakefileEngine ; -if $(HAIKU_BOOTSTRAP_BUILD) { +if $(HAIKU_BUILD_TYPE) = bootstrap { packages += HaikuBootstrap ; } else { packages += Haiku ; @@ -22,7 +22,7 @@ local archDependentPackages = local secondaryArchPackages = HaikuDevelSecondary ; -if $(HAIKU_BOOTSTRAP_BUILD) { +if $(HAIKU_BUILD_TYPE) = bootstrap { secondaryArchPackages += HaikuSecondaryBootstrap ; } else { secondaryArchPackages += HaikuSecondary ; diff --git a/build/jam/ImageRules b/build/jam/ImageRules index 84e562d27f..f316ac3404 100644 --- a/build/jam/ImageRules +++ b/build/jam/ImageRules @@ -874,7 +874,7 @@ rule AddPackagesAndRepositoryVariablesToContainerScript script : container = [ on $(container) return $(HAIKU_CONTAINER_UPDATE_ONLY) ] ; local resolvePackageDependencies ; if ( ! $(updateOnly) || $(HAIKU_UPDATE_ALL_PACKAGES) ) - && ! $(HAIKU_BOOTSTRAP_BUILD) { + && $(HAIKU_BUILD_TYPE) != bootstrap { resolvePackageDependencies = 1 ; } AddVariableToScript $(script) : resolvePackageDependencies diff --git a/build/jam/PackageRules b/build/jam/PackageRules index f61b95b298..efb12e609c 100644 --- a/build/jam/PackageRules +++ b/build/jam/PackageRules @@ -50,7 +50,7 @@ rule PreprocessPackageInfo source : directory : architecture ; local target = $(source:BSG=package-info)-package-info ; - if $(HAIKU_BOOTSTRAP_BUILD) { + if $(HAIKU_BUILD_TYPE) = bootstrap { target = $(target)-bootstrap ; } MakeLocate $(target) : $(directory) ; @@ -59,7 +59,7 @@ rule PreprocessPackageInfo source : directory : architecture : $(secondaryArchitecture) : useCPP ; # Update requires in the package info. - if ! $(HAIKU_BOOTSTRAP_BUILD) { + if $(HAIKU_BUILD_TYPE) != bootstrap { local updateRequiresFiles = update_package_requires [ on HaikuPorts return $(HAIKU_REPOSITORY_CACHE_FILE) ] @@ -99,7 +99,7 @@ rule PreprocessPackageOrRepositoryInfo target : source : architecture local defines = HAIKU_PACKAGING_ARCH=$(architecture) ; local sedReplacements = %HAIKU_PACKAGING_ARCH%,$(architecture) ; - if $(HAIKU_BOOTSTRAP_BUILD) { + if $(HAIKU_BUILD_TYPE) = bootstrap { defines += HAIKU_BOOTSTRAP_BUILD ; } if $(secondaryArchitecture) { diff --git a/build/jam/RepositoryRules b/build/jam/RepositoryRules index d60fe8d84e..7700318278 100644 --- a/build/jam/RepositoryRules +++ b/build/jam/RepositoryRules @@ -551,8 +551,8 @@ rule BuildHaikuPortsSourcePackageDirectory actions BuildHaikuPortsPackageList { - HAIKU_BOOTSTRAP_BUILD= $(JAM:E=jam) $(HAIKU_BOOTSTRAP_SOURCES_PROFILE) \ - build-package-list $(1) $(HAIKU_REPOSITORY_BUILD_ADDITIONAL_PACKAGES) + $(JAM:E=jam) $(HAIKU_BOOTSTRAP_SOURCES_PROFILE) build-package-list $(1) \ + $(HAIKU_REPOSITORY_BUILD_ADDITIONAL_PACKAGES) } diff --git a/build/jam/images/HaikuImage b/build/jam/images/HaikuImage index 11b70a9aea..a37f91105d 100644 --- a/build/jam/images/HaikuImage +++ b/build/jam/images/HaikuImage @@ -3,9 +3,9 @@ # (respectively installing the files in the installation directory). # import the defintions of the image content -if $(HAIKU_BOOTSTRAP_BUILD) { +if $(HAIKU_BUILD_TYPE) = bootstrap { include [ FDirName $(HAIKU_BUILD_RULES_DIR) images definitions bootstrap ] ; -} else if $(HAIKU_MINIMUM_BUILD) { +} else if $(HAIKU_BUILD_TYPE) = minimum { include [ FDirName $(HAIKU_BUILD_RULES_DIR) images definitions minimum ] ; } else { include [ FDirName $(HAIKU_BUILD_RULES_DIR) images definitions regular ] ; diff --git a/build/jam/packages/HaikuDevel b/build/jam/packages/HaikuDevel index 215034a0fc..ea2bd8afb2 100644 --- a/build/jam/packages/HaikuDevel +++ b/build/jam/packages/HaikuDevel @@ -65,7 +65,7 @@ AddHeaderDirectoryToPackage compatibility bsd : bsd ; AddHeaderDirectoryToPackage compatibility gnu : gnu ; # third party libs headers -if ! $(HAIKU_BOOTSTRAP_BUILD) { +if $(HAIKU_BUILD_TYPE) != "bootstrap" { AddHeaderDirectoryToPackage libs tiff : 3rdparty ; }