From: William Lallemand Date: Fri, 30 Oct 2026 09:57:52 +0000 (+0100) Subject: BUILD: Makefile: allow external makefiles to provide build targets X-Git-Tag: v3.5-dev11~87 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=38e65c8121676e933eed177cbd98dc5bf971f733;p=haproxy.git BUILD: Makefile: allow external makefiles to provide build targets Let EXTRA_MAKE fragments set EXTRA_TARGET_BUILD to a nonempty value to provide their own build and cleanup targets instead of building HAProxy. Keep the common option handling and regression-test targets available. Evaluate the selector after global compiler and linker options have been initialized so a fragment can install its alternate build rules there. --- diff --git a/Makefile b/Makefile index c3c3e8927..050f1e2a0 100644 --- a/Makefile +++ b/Makefile @@ -940,6 +940,9 @@ endif # add options at the beginning of the "ld" command line if needed. LDOPTS = $(TARGET_LDFLAGS) $(OPTIONS_LDFLAGS) $(ADDLIB) +# External addons may supply their own build and cleanup targets. +ifeq ($(EXTRA_TARGET_BUILD),) + ifeq ($(TARGET),) all: @echo "Building HAProxy without specifying a TARGET is not supported." @@ -1338,6 +1341,8 @@ update-version: echo "$(SUBVERS)" > SUBVERS echo "$(VERDATE)" > VERDATE +endif # EXTRA_TARGET_BUILD + # just display the build options. The "USE_*" options and their respective # settings are also listed if they're explicitly set on the command line, or if # they are not empty. Implicit "USE_*" are not listed.