]> git.kaiwu.me - haproxy.git/commit
BUILD: Makefile: extend the capabilities of EXTRA_MAKE
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 29 Oct 2026 22:46:35 +0000 (22:46 +0000)
committerWilliam Lallemand <wlallemand@haproxy.com>
Fri, 30 Oct 2026 10:23:35 +0000 (11:23 +0100)
commit995295edc9d6c2a9bbf39616631b00e9e0b81c3e
treee982668fa03f9becb6632ed0b53332276ba101c1
parentb02f93771f6c1fc48810794c05529cf1f130c2d9
BUILD: Makefile: extend the capabilities of EXTRA_MAKE

Allow external Makefile.mk loaded through EXTRA_MAKE to extend the main
build without adding addon-specific logic to the root Makefile.

Provide the following extension points:

  - EXTRA_USE_OPTS registers additional USE_* switches. Check unknown
    options after loading the fragments so ERR=1 accepts these switches.
  - EXTRA_CFLAGS and EXTRA_LDFLAGS append compiler and linker flags.
  - EXTRA_INCLUDES adds headers to the build dependencies so changes to
    addon headers trigger recompilation.
  - EXTRA_LATE_HOOK evaluates addon logic after the object lists and
    compiler options have been collected, for example to generate
    metadata from the final build options.
  - EXTRA_INSTALL and EXTRA_UNINSTALL add targets to the install and
    uninstall prerequisites.

Reuse the existing EXTRA_OBJS variable for objects supplied by addons.
Keep all as the default goal so rules in an external fragment do not
change what a plain make invocation builds.
Makefile