diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-09-16 10:50:08 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-09-16 13:57:18 -0700 |
commit | 428672a3b16f65c01f0bb78d266b9fc168a94eb3 (patch) | |
tree | 20232978076df31fcca488a7aede48f495f0f5cd /builtin/commit.c | |
parent | d8faf50c36e94bdf47f57e2f1e7ea1b767e0ea00 (diff) |
Makefile: stop listing test library objects twice
Whenever one adds another test library compilation unit one has to wire
it up twice in the Makefile: once to append it to `UNIT_TEST_OBJS`, and
once to append it to the `UNIT_TEST_PROGS` target. Ideally, we'd just
reuse the `UNIT_TEST_OBJS` variable in the target so that we can avoid
the duplication. But it also contains all the objects for our test
programs, each of which contains a `cmd_main()`, and thus we cannot link
them all into the target executable.
Refactor the code such that `UNIT_TEST_OBJS` does not contain the unit
test program objects anymore, which we can instead manually append to
the `OBJECTS` variable. Like this, the former variable now only contains
objects for test libraries and can thus be reused.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions