[haiku-commits] Re: r35830 - in haiku/trunk: . build/jam

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 12 Mar 2010 19:56:51 +0100

On 2010-03-12 at 19:07:19 [+0100], mattmadia@xxxxxxxxx wrote:
> Author: mmadia
> Date: 2010-03-12 19:07:19 +0100 (Fri, 12 Mar 2010)
> New Revision: 35830
> Changeset: http://dev.haiku-os.org/changeset/35830/haiku
> 
> Modified:
>    haiku/trunk/Jamfile
>    haiku/trunk/build/jam/HaikuImage
> Log:
> Moves the conditional adding of OpenSSL from HaikuImage to the root Jamfile.
> 
> 
> Modified: haiku/trunk/Jamfile
> ===================================================================
> --- haiku/trunk/Jamfile    2010-03-12 18:03:57 UTC (rev 35829)
> +++ haiku/trunk/Jamfile    2010-03-12 18:07:19 UTC (rev 35830)
> @@ -158,8 +158,13 @@
>  }
>  
>  #include packages that are required by all images.
> -AddOptionalHaikuImagePackages MandatoryPackages ;
> +AddOptionalHaikuImagePackages MandatoryPackages ;
>  
> +# If enabled, make sure that OpenSSL is added to the image.
> +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 ] ;

I don't think this will work, since HAIKU_OPENSSL_ENABLED might be set in 
OptionalBuildFeatures (depending on HAIKU_BUILD_FEATURE_SSL). I guess the 
correct order here would be:

* include OptionalBuildFeatures
* Add additional optional packages.
* include OptionalPackageDependencies

Admittedly that's all not particularly nice. A better solution would be to 
adjust AddOptionalHaikuImagePackages and OptionalPackageDependencies to work 
in arbitrary order. For that to work the list of (immediate) dependencies for 
each package would need to be tracked and AddOptionalHaikuImagePackages would 
need to work recursively.

CU, Ingo

Other related posts: