]> git.kaiwu.me - haproxy.git/commitdiff
BUILD: add an EXTRA_MAKE option to build addons easily
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 30 Apr 2026 16:27:27 +0000 (18:27 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Mon, 4 May 2026 11:49:26 +0000 (13:49 +0200)
Allow to call an external Makefile called Makefile.inc in order to build
complex addons.

make TARGET=linux-glibc ... EXTRA_MAKE="/path/to/addon1" \
     EXTRA_MAKE+="/path/to/addon2"

Makefile

index faa2b2102b67dc74a8662dca84ad165c73844a12..64a12ba1c2833ed63810537fe2501271a522ccb2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -61,6 +61,7 @@
 #   USE_THREAD_DUMP         : use the more advanced thread state dump system. Automatic.
 #   USE_OT                  : enable the OpenTracing filter
 #   USE_OTEL                : enable the OpenTelemetry filter
+#   EXTRA_MAKE              : space-separated list of external addons using a Makefile.inc
 #   USE_MEMORY_PROFILING    : enable the memory profiler. Linux-glibc only.
 #   USE_LIBATOMIC           : force to link with/without libatomic. Automatic.
 #   USE_PTHREAD_EMULATION   : replace pthread's rwlocks with ours
@@ -874,6 +875,10 @@ ifneq ($(USE_OTEL:0=),)
   include addons/otel/Makefile
 endif
 
+ifneq ($(EXTRA_MAKE),)
+  include $(addsuffix /Makefile.inc,$(EXTRA_MAKE))
+endif
+
 # better keep this one close to the end, as several libs above may need it
 ifneq ($(USE_DL:0=),)
   DL_LDFLAGS = -ldl