From dfd6a5c97387d03949a8e8f07f70cbf9b9e643dd Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 4 Oct 2013 00:20:53 +0200 Subject: [PATCH] Make the "build" build profile action more intelligent If additional parameters are specified, only those targets are built, but under the influence of the build profile. E.g. "jam @alpha-raw build haiku.hpkg" builds the package with SSL support, while "jam haiku.hpkg" would build it without (unless explicitly enabled in UserBuildConfig). --- build/jam/MiscRules | 8 +++++++- build/jam/UserBuildConfig.ReadMe | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build/jam/MiscRules b/build/jam/MiscRules index 35885436a4..18109d184c 100644 --- a/build/jam/MiscRules +++ b/build/jam/MiscRules @@ -398,7 +398,13 @@ rule DefineBuildProfile name : type : path { switch $(HAIKU_BUILD_PROFILE_ACTION) { case "build" : { - JAM_TARGETS = $(buildTarget) ; + # If parameters are specified, only build those targets (under the + # influence of the build profile). + if $(HAIKU_BUILD_PROFILE_PARAMETERS) { + JAM_TARGETS = $(HAIKU_BUILD_PROFILE_PARAMETERS) ; + } else { + JAM_TARGETS = $(buildTarget) ; + } } case "update" : { diff --git a/build/jam/UserBuildConfig.ReadMe b/build/jam/UserBuildConfig.ReadMe index f57f0d1824..051150ce1e 100644 --- a/build/jam/UserBuildConfig.ReadMe +++ b/build/jam/UserBuildConfig.ReadMe @@ -242,6 +242,10 @@ switch $(HAIKU_BUILD_PROFILE) { # -> Equivalent to running "jam -q haiku-image" with the settings for the # "disk" profile. "build" is the default action, so it could even be # omitted. +# jam -q @alpha-raw build haiku.hpkg +# -> Build's haiku.hpkg under the influence of the "alpha-raw" profile. This +# is is different to "jam -q haiku.hpkg" in that the build profile may +# enable certain build features that might not be enabled by default. # jam -q @vmware update kernel # -> Equivalent to running "jam -q update-vmware-image kernel" with the # settings for the "vmware" profile.