diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-26 16:05:07 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-26 16:05:07 -0400 |
| commit | c8af445d01d66d96b7f364d5ecbd3fe3423a0939 (patch) | |
| tree | b9c51ead77c9d3ebe286a85f489348d01e47ed36 | |
| parent | 2a1a62564f7c0477f8517ba36fdbba7b2e5b65d7 (diff) | |
Install libs as-you-go instead of after all of them are built (in case
of serial dependencies)
| -rw-r--r-- | src/tomo.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -227,23 +227,18 @@ int main(int argc, char *argv[]) } for (int64_t i = 0; i < libraries.length; i++) { + Path_t *lib = (Path_t*)(libraries.data + i*libraries.stride); // Fork a child process to build the library to prevent cross-contamination // of side effects when building one library from affecting another library. // This *could* be done in parallel, but there may be some dependency issues. pid_t child = fork(); if (child == 0) { - Path_t *lib = (Path_t*)(libraries.data + i*libraries.stride); build_library(*lib); _exit(0); } wait_for_child_success(child); - } - - if (should_install) { - for (int64_t i = 0; i < libraries.length; i++) { - Path_t *lib = (Path_t*)(libraries.data + i*libraries.stride); + if (should_install) install_library(*lib); - } } if (files.length <= 0 && uninstall.length <= 0 && libraries.length <= 0) { |
