From 1849e6c9542fc127149d4e855064e8a63c25bc8a Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 10 Aug 2025 14:53:11 -0400 Subject: Bugfixes for installation of libraries (incorrect handling of `use` for C files and headers) --- src/tomo.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/tomo.c b/src/tomo.c index 734abfc3..f60e7427 100644 --- a/src/tomo.c +++ b/src/tomo.c @@ -284,11 +284,11 @@ int main(int argc, char *argv[]) pid_t child = fork(); if (child == 0) { build_library(*lib); + if (should_install) + install_library(*lib); _exit(0); } wait_for_child_success(child); - if (should_install) - install_library(*lib); } if (files.length <= 0 && uninstall.length <= 0 && libraries.length <= 0) { @@ -674,7 +674,10 @@ void build_file_dependency_graph(Path_t path, Table_t *to_compile, Table_t *to_l break; } case USE_HEADER: case USE_C_CODE: { - Path_t dep_path = Path$from_str(use->path); + if (use->path[0] == '<') + break; + + Path_t dep_path = Path$resolved(Path$from_str(use->path), Path$parent(path)); if (is_stale(build_file(path, ".o"), dep_path, false)) { staleness.o = true; Table$set(to_compile, &path, &staleness, Table$info(&Path$info, &Byte$info)); -- cgit v1.2.3