]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: makefile: build the features list dynamically
authorWilly Tarreau <w@1wt.eu>
Wed, 21 Dec 2022 10:57:43 +0000 (11:57 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 23 Dec 2022 15:53:35 +0000 (16:53 +0100)
The BUILD_FEATURES string was created too early to inherit implicit
additions. This could make the features list report that some features
were disabled while they had later been enabled. Better make it a macro
that is interpreted where needed based on the current state of each
option.

Makefile

index c6fec6af8d7ff048b632b32adad0169b0b8d20b3..1d3fe26a9154947011acf04d5e5b661ce47bae6f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -514,7 +514,11 @@ ignore_implicit = $(if $(subst environment,,$(origin $(1))),         \
 # is used to report a list of all flags which were used to build this version.
 # Do not assign anything to it.
 BUILD_OPTIONS  := $(foreach opt,$(use_opts),$(call ignore_implicit,$(opt)))
-BUILD_FEATURES := $(foreach opt,$(patsubst USE_%,%,$(use_opts)),$(if $(USE_$(opt)),+$(opt),-$(opt)))
+
+# Make a list of all known features with +/- prepended depending on their
+# activation status. Must be a macro so that dynamically enabled ones are
+# evaluated with their current status.
+BUILD_FEATURES  = $(foreach opt,$(patsubst USE_%,%,$(use_opts)),$(if $(USE_$(opt)),+$(opt),-$(opt)))
 
 # All USE_* options have their equivalent macro defined in the code (some might
 # possibly be unused though)