]> Kevux Git Server - kevux-tools/commitdiff
Update: Avoid object name conflicts in static builds of unit tests.
authorKevin Day <Kevin@kevux.org>
Mon, 12 Jan 2026 03:21:24 +0000 (21:21 -0600)
committerKevin Day <Kevin@kevux.org>
Mon, 12 Jan 2026 03:21:24 +0000 (21:21 -0600)
The unit tests cannot be built at the moment due to the inability to use dynamic linker wrapping feature to perform mocks.

However, the rest of the linking process still should work.
The `remove.o` gets created at the top level of the static build settings for two different build paths: `main/remove.c` and `remove/remove.c`.
Restructure the build settings to result in using paths that do not conflict.

I suspect that I should add a feature in the Featureless Make build settings that allows for specifying an organizing directory.

data/build/remove/settings-mocks.remove
data/build/remove/settings-objects

index a3ce359ca7f5f468396fa000d6f078ffaea4e7d7..d768b68247b2c4a765f886c17c5bf31669fc690c 100644 (file)
@@ -45,7 +45,7 @@ build_sources_library ../../../../../../../tests/unit/remove/c/mock-remove.c
 
 build_sources_headers remove.h main.h string.h
 
-build_objects_library common.o common/define.o common/enumeration.o common/string.o common/type.o convert.o operate.o preprocess.o print/debug.o print/error.o print/message.o print/simulate.o print/verbose.o print/warning.o remove.o signal.o thread.o
+build_objects_library main/common.o main/common/define.o main/common/enumeration.o main/common/string.o main/common/type.o main/convert.o main/operate.o main/preprocess.o main/print/debug.o main/print/error.o main/print/message.o main/print/simulate.o main/print/verbose.o main/print/warning.o main/remove.o main/signal.o main/thread.o
 
 build_script no
 build_shared yes
index 16f9a91162847684cd7909f2911189457389bc35..85b4578f83c0504bb33c390ab8dd300878f531c0 100644 (file)
@@ -38,9 +38,9 @@ build_indexer ar
 build_indexer_arguments rcs
 build_language c
 
-build_sources_object common.c common/define.c common/enumeration.c common/string.c common/type.c convert.c operate.c preprocess.c print/debug.c print/error.c print/message.c print/simulate.c print/verbose.c print/warning.c remove.c signal.c thread.c
+build_sources_object main/common.c main/common/define.c main/common/enumeration.c main/common/string.c main/common/type.c main/convert.c main/operate.c main/preprocess.c main/print/debug.c main/print/error.c main/print/message.c main/print/simulate.c main/print/verbose.c main/print/warning.c main/remove.c main/signal.c main/thread.c
 
-build_sources_headers common.h common/define.h common/enumeration.h common/string.h common/type.h convert.h operate.h preprocess.h print/debug.h print/error.h print/message.h print/simulate.h print/verbose.h print/warning.h remove.h signal.h thread.h
+build_sources_headers main/common.h main/common/define.h main/common/enumeration.h main/common/string.h main/common/type.h main/convert.h main/operate.h main/preprocess.h main/print/debug.h main/print/error.h main/print/message.h main/print/simulate.h main/print/verbose.h main/print/warning.h main/remove.h main/signal.h main/thread.h
 
 build_sources_documentation man
 
@@ -48,8 +48,8 @@ build_script yes
 build_shared yes
 build_static no
 
-path_headers program/kevux/tools/remove/main
-path_sources sources/c/program/kevux/tools/remove/main
+path_headers program/kevux/tools/remove
+path_sources sources/c/program/kevux/tools/remove
 
 has_path_standard no
 preserve_path_headers yes