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.
This commit is contained in:
Oliver Tappe 2014-03-22 20:23:10 +01:00
parent 6d8c8a9dfd
commit a8c098a3ba
9 changed files with 25 additions and 25 deletions

View File

@ -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

View File

@ -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 ;
}

View File

@ -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

View File

@ -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 ;

View File

@ -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

View File

@ -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 =
<build>update_package_requires
[ on <repository>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) {

View File

@ -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)
}

View File

@ -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 ] ;

View File

@ -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 ;
}