Search Results
6/28/2025, 4:44:25 PM
>>105730668
>Is it possible to use something like Guile or Babashka to replace makefiles on hobby Cpp projects? Any of you have tried?
I haven't tried but comparing which file was last modified is just
(define (newer? source object)
(let* ((a (open-fdes source O_RDONLY))
(b (open-fdes object O_RDONLY))
(c (> (stat:mtime (stat a)) (stat:mtime (stat b)))))
(close-fdes a)
(close-fdes b)
c))
So if (newer? "main.cpp" "main.o") is #t the build rule for that file is run
>Is it possible to use something like Guile or Babashka to replace makefiles on hobby Cpp projects? Any of you have tried?
I haven't tried but comparing which file was last modified is just
(define (newer? source object)
(let* ((a (open-fdes source O_RDONLY))
(b (open-fdes object O_RDONLY))
(c (> (stat:mtime (stat a)) (stat:mtime (stat b)))))
(close-fdes a)
(close-fdes b)
c))
So if (newer? "main.cpp" "main.o") is #t the build rule for that file is run
Page 1