]> git.ipfire.org Git - thirdparty/haproxy.git/commit
REORG: version: move the remaining BUILD_* stuff from haproxy.c to version.c
authorWilly Tarreau <w@1wt.eu>
Mon, 20 Jan 2025 16:49:55 +0000 (17:49 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 20 Jan 2025 16:53:55 +0000 (17:53 +0100)
commitb066c0affb091ecd70e7e7f12695159479d74c8a
tree3b7cafd983e4e0325fd2863346b064d1037894d3
parent9e61cf67909936036e8c22be5ea340b9d717cd88
REORG: version: move the remaining BUILD_* stuff from haproxy.c to version.c

version.c tries to centralize all variables conveying version information,
but there's still an issue with the BUILD_* variables which are only
passed to haproxy.o and are only updated when that one is rebuilt. This
is not very logical given that we can end up with values there which
contradict info from version.c.

Better move all of these to version.c which is systematically rebuilt.
Most of these variables only end up as string concatenation at the
moment. Some of them are even duplicated. In version.c we now have one
variable (or constant) for each of them and haproxy.c references them
in messages. This is much more logical and easier to maintain in a
consistent state.

The patch looks a bit large but it really only moves the ifdefed string
assignment from one file to another, placing them into variables.
Makefile
include/haproxy/global.h
include/haproxy/version.h
src/cfgcond.c
src/haproxy.c
src/version.c