From 0e82d313d6b0daf800160322c7f9820cd15e26b8 Mon Sep 17 00:00:00 2001 From: Matt Madia Date: Mon, 15 Mar 2010 16:11:47 +0000 Subject: [PATCH] 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 --- Jamfile | 11 ++++++----- build/jam/ImageRules | 6 +++++- build/jam/OptionalPackages | 6 ++++++ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Jamfile b/Jamfile index 2c4b5197cb..78508ee781 100644 --- a/Jamfile +++ b/Jamfile @@ -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) { diff --git a/build/jam/ImageRules b/build/jam/ImageRules index 75a1b9503e..56b5b20886 100644 --- a/build/jam/ImageRules +++ b/build/jam/ImageRules @@ -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) ; } } diff --git a/build/jam/OptionalPackages b/build/jam/OptionalPackages index 92729e50a5..2dafc42a26 100644 --- a/build/jam/OptionalPackages +++ b/build/jam/OptionalPackages @@ -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 {