]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: makefile: make ERR apply to build options as well
authorWilly Tarreau <w@1wt.eu>
Wed, 20 Nov 2024 13:44:28 +0000 (14:44 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 20 Nov 2024 13:58:35 +0000 (14:58 +0100)
commit1171a23aec0fdfe73cac02356ec6184241b7e7c3
tree6378b0c5f90632875a73eccaaa588a7b9bfde5c5
parentb861dc93717c1ab1c0ed440d63f54f58d681da30
BUILD: makefile: make ERR apply to build options as well

Once in a while we find some makefiles ignoring some outdated arguments
and just emit a warning. What's annoying is that if users (say, distro
packagers), have purposely added ERR=1 to their build scripts to make
sure to fail on any warning, these ones will be ignored and the build
can continue with invalid or missing options.

William rightfully suggested that ERR=1 should also catch make's warnings
so this patch implements this, by creating a new "complain" variable that
points either to "error" or "warning" depending on $(ERR), and that is
used to send the messages using $(call $(complain),...). This does the
job right at little effort (tested from GNU make 3.82 to 4.3).

Note that for this purpose the ERR declaration was upped in the makefile
so that it appears before the new errors.mk file is included.
Makefile
include/make/errors.mk [new file with mode: 0644]
include/make/options.mk