From 5b6b5c63248ad9f52fd749507e4959f81b5bb5d8 Mon Sep 17 00:00:00 2001 From: retropikzel Date: Sat, 28 Jun 2025 09:57:33 +0300 Subject: [PATCH] Check that .so and .o files exists before installing them --- lib/chibi/snow/commands.scm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/chibi/snow/commands.scm b/lib/chibi/snow/commands.scm index dbbf5530..21109651 100644 --- a/lib/chibi/snow/commands.scm +++ b/lib/chibi/snow/commands.scm @@ -1919,13 +1919,16 @@ (so-path (string-append (path-strip-extension library-file) ".so")) (dest-so-path (make-path install-dir so-path)) (o-path (string-append (path-strip-extension library-file) ".o")) - (dest-o-path (make-path install-dir o-path))) + (dest-o-path (make-path install-dir o-path)) + (installed-files (default-installer impl cfg library dir))) (install-directory cfg (path-directory dest-so-path)) - (install-file cfg (make-path dir so-path) dest-so-path) - (install-file cfg (make-path dir o-path) dest-o-path) - (cons dest-o-path - (cons dest-so-path - (default-installer impl cfg library dir))))) + (when (file-exists? so-path) + (install-file cfg (make-path dir so-path) dest-so-path) + (set! installed-files (cons so-path installed-files))) + (when (file-exists? o-path) + (install-file cfg (make-path dir o-path) dest-o-path) + (set! installed-files (cons o-path installed-files))) + installed-files)) (define (guile-installer impl cfg library dir) (let* ((source-scm-file (get-library-file cfg library))