Allows AddOptionalHaikuImagePackages and OptionalPackageDependencies to work in

arbitrary order. Follow-up to r35830.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35867 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Matt Madia 2010-03-15 16:11:47 +00:00
parent a9daf3d911
commit 0e82d313d6
3 changed files with 17 additions and 6 deletions

11
Jamfile
View File

@ -151,13 +151,16 @@ Depends LocaleKit :
LocaleKitTests
;
# Pepare the optional build features before parsing the Jamfile tree.
include [ FDirName $(HAIKU_BUILD_RULES_DIR) OptionalBuildFeatures ] ;
# Add optional packages given via HAIKU_ADD_OPTIONAL_PACKAGES.
if $(HAIKU_ADD_OPTIONAL_PACKAGES) {
AddOptionalHaikuImagePackages
[ FSplitString $(HAIKU_ADD_OPTIONAL_PACKAGES) : / ] ;
}
#include packages that are required by all images.
# Include packages that are required by all images.
AddOptionalHaikuImagePackages MandatoryPackages ;
# If enabled, make sure that OpenSSL is added to the image.
@ -165,10 +168,8 @@ if $(HAIKU_OPENSSL_ENABLED) {
AddOptionalHaikuImagePackages OpenSSL ;
}
# Evaluate optional package dependencies and prepare the optional build
# features before parsing the Jamfile tree.
include [ FDirName $(HAIKU_BUILD_RULES_DIR) OptionalPackageDependencies ] ;
include [ FDirName $(HAIKU_BUILD_RULES_DIR) OptionalBuildFeatures ] ;
# Evaluate optional package dependencies
include [ FDirName $(HAIKU_BUILD_RULES_DIR) OptionalPackageDependencies ] ;
# Optionally we allow not to include the "src" subdirectory.
if $(HAIKU_DONT_INCLUDE_SRC) {

View File

@ -761,6 +761,9 @@ rule AddOptionalHaikuImagePackages packages
HAIKU_OPTIONAL_PACKAGE_ADDED on $(package) = 1 ;
HAIKU_ADDED_OPTIONAL_PACKAGES += $(package) ;
}
local dependencies = [ on $(package)
return $(HAIKU_OPTIONAL_PACKAGE_DEPENDENCIES) ] ;
AddOptionalHaikuImagePackages $(dependencies) ;
}
}
@ -780,7 +783,8 @@ rule IsOptionalHaikuImagePackageAdded package
rule OptionalPackageDependencies package : dependencies
{
if [ IsOptionalHaikuImagePackageAdded $(package) ] {
HAIKU_OPTIONAL_PACKAGE_DEPENDENCIES on $(package) = $(dependencies) ;
if [ on $(package) return $(HAIKU_OPTIONAL_PACKAGE_ADDED) ] {
AddOptionalHaikuImagePackages $(dependencies) ;
}
}

View File

@ -671,6 +671,12 @@ if [ IsOptionalHaikuImagePackageAdded Links ] {
}
# MandatoryPackages
if [ IsOptionalHaikuImagePackageAdded MandatoryPackages ] {
# Psuedo package for grouping packages, which are added to all images.
}
# Mercurial
if [ IsOptionalHaikuImagePackageAdded Mercurial ] {
if $(TARGET_ARCH) != x86 {