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: # Include required packages:
# primary architecture # primary architecture
AddHaikuImagePackages [ FFilterByBuildFeatures AddHaikuImagePackages [ FFilterByBuildFeatures

View File

@ -65,7 +65,7 @@ include [ FDirName $(HAIKU_BUILD_RULES_DIR) DefaultBuildProfiles ] ;
local repositoriesDirectory local repositoriesDirectory
= [ FDirName $(HAIKU_BUILD_RULES_DIR) repositories ] ; = [ FDirName $(HAIKU_BUILD_RULES_DIR) repositories ] ;
local repositories = HaikuPorts ; local repositories = HaikuPorts ;
if $(HAIKU_BOOTSTRAP_BUILD) { if $(HAIKU_BUILD_TYPE) = bootstrap {
repositories = HaikuPortsCross ; 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) { switch $(HAIKU_BUILD_PROFILE) {
case "bootstrap-*" : { case "bootstrap-*" : {
HAIKU_BOOTSTRAP_BUILD = 1 ; HAIKU_BUILD_TYPE = bootstrap ;
EnableBuildFeatures bootstrap_image ;
HAIKU_DEFINES += HAIKU_BOOTSTRAP_BUILD ; HAIKU_DEFINES += HAIKU_BOOTSTRAP_BUILD ;
TARGET_DEFINES += HAIKU_BOOTSTRAP_BUILD ; TARGET_DEFINES += HAIKU_BOOTSTRAP_BUILD ;
} }
case "minimum-*" : { case "minimum-*" : {
HAIKU_MINIMUM_BUILD = 1 ; HAIKU_BUILD_TYPE = minimum ;
EnableBuildFeatures minimum_image ;
}
case "*" : {
HAIKU_BUILD_TYPE = regular ;
EnableBuildFeatures regular_image ;
} }
} }
Echo "Starting build of type $(HAIKU_BUILD_TYPE) ..." ;
rule DefineDefaultBuildProfiles rule DefineDefaultBuildProfiles
@ -137,7 +146,6 @@ rule DefineDefaultBuildProfiles
binutils binutils
bison bison
curl_devel curl_devel
findutils
flex flex
freetype_devel freetype_devel
gawk gawk

View File

@ -8,7 +8,7 @@ local packages =
MakefileEngine MakefileEngine
; ;
if $(HAIKU_BOOTSTRAP_BUILD) { if $(HAIKU_BUILD_TYPE) = bootstrap {
packages += HaikuBootstrap ; packages += HaikuBootstrap ;
} else { } else {
packages += Haiku ; packages += Haiku ;
@ -22,7 +22,7 @@ local archDependentPackages =
local secondaryArchPackages = local secondaryArchPackages =
HaikuDevelSecondary HaikuDevelSecondary
; ;
if $(HAIKU_BOOTSTRAP_BUILD) { if $(HAIKU_BUILD_TYPE) = bootstrap {
secondaryArchPackages += HaikuSecondaryBootstrap ; secondaryArchPackages += HaikuSecondaryBootstrap ;
} else { } else {
secondaryArchPackages += HaikuSecondary ; secondaryArchPackages += HaikuSecondary ;

View File

@ -874,7 +874,7 @@ rule AddPackagesAndRepositoryVariablesToContainerScript script : container
= [ on $(container) return $(HAIKU_CONTAINER_UPDATE_ONLY) ] ; = [ on $(container) return $(HAIKU_CONTAINER_UPDATE_ONLY) ] ;
local resolvePackageDependencies ; local resolvePackageDependencies ;
if ( ! $(updateOnly) || $(HAIKU_UPDATE_ALL_PACKAGES) ) if ( ! $(updateOnly) || $(HAIKU_UPDATE_ALL_PACKAGES) )
&& ! $(HAIKU_BOOTSTRAP_BUILD) { && $(HAIKU_BUILD_TYPE) != bootstrap {
resolvePackageDependencies = 1 ; resolvePackageDependencies = 1 ;
} }
AddVariableToScript $(script) : resolvePackageDependencies AddVariableToScript $(script) : resolvePackageDependencies

View File

@ -50,7 +50,7 @@ rule PreprocessPackageInfo source : directory : architecture
; ;
local target = $(source:BSG=package-info)-package-info ; local target = $(source:BSG=package-info)-package-info ;
if $(HAIKU_BOOTSTRAP_BUILD) { if $(HAIKU_BUILD_TYPE) = bootstrap {
target = $(target)-bootstrap ; target = $(target)-bootstrap ;
} }
MakeLocate $(target) : $(directory) ; MakeLocate $(target) : $(directory) ;
@ -59,7 +59,7 @@ rule PreprocessPackageInfo source : directory : architecture
: $(secondaryArchitecture) : useCPP ; : $(secondaryArchitecture) : useCPP ;
# Update requires in the package info. # Update requires in the package info.
if ! $(HAIKU_BOOTSTRAP_BUILD) { if $(HAIKU_BUILD_TYPE) != bootstrap {
local updateRequiresFiles = local updateRequiresFiles =
<build>update_package_requires <build>update_package_requires
[ on <repository>HaikuPorts return $(HAIKU_REPOSITORY_CACHE_FILE) ] [ on <repository>HaikuPorts return $(HAIKU_REPOSITORY_CACHE_FILE) ]
@ -99,7 +99,7 @@ rule PreprocessPackageOrRepositoryInfo target : source : architecture
local defines = HAIKU_PACKAGING_ARCH=$(architecture) ; local defines = HAIKU_PACKAGING_ARCH=$(architecture) ;
local sedReplacements = %HAIKU_PACKAGING_ARCH%,$(architecture) ; local sedReplacements = %HAIKU_PACKAGING_ARCH%,$(architecture) ;
if $(HAIKU_BOOTSTRAP_BUILD) { if $(HAIKU_BUILD_TYPE) = bootstrap {
defines += HAIKU_BOOTSTRAP_BUILD ; defines += HAIKU_BOOTSTRAP_BUILD ;
} }
if $(secondaryArchitecture) { if $(secondaryArchitecture) {

View File

@ -551,8 +551,8 @@ rule BuildHaikuPortsSourcePackageDirectory
actions BuildHaikuPortsPackageList actions BuildHaikuPortsPackageList
{ {
HAIKU_BOOTSTRAP_BUILD= $(JAM:E=jam) $(HAIKU_BOOTSTRAP_SOURCES_PROFILE) \ $(JAM:E=jam) $(HAIKU_BOOTSTRAP_SOURCES_PROFILE) build-package-list $(1) \
build-package-list $(1) $(HAIKU_REPOSITORY_BUILD_ADDITIONAL_PACKAGES) $(HAIKU_REPOSITORY_BUILD_ADDITIONAL_PACKAGES)
} }

View File

@ -3,9 +3,9 @@
# (respectively installing the files in the installation directory). # (respectively installing the files in the installation directory).
# import the defintions of the image content # 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 ] ; 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 ] ; include [ FDirName $(HAIKU_BUILD_RULES_DIR) images definitions minimum ] ;
} else { } else {
include [ FDirName $(HAIKU_BUILD_RULES_DIR) images definitions regular ] ; include [ FDirName $(HAIKU_BUILD_RULES_DIR) images definitions regular ] ;

View File

@ -65,7 +65,7 @@ AddHeaderDirectoryToPackage compatibility bsd : bsd ;
AddHeaderDirectoryToPackage compatibility gnu : gnu ; AddHeaderDirectoryToPackage compatibility gnu : gnu ;
# third party libs headers # third party libs headers
if ! $(HAIKU_BOOTSTRAP_BUILD) { if $(HAIKU_BUILD_TYPE) != "bootstrap" {
AddHeaderDirectoryToPackage libs tiff : 3rdparty ; AddHeaderDirectoryToPackage libs tiff : 3rdparty ;
} }