[gambit-list] current-object-file
Eduardo Cavazos
wayo.cavazos at gmail.com
Sun Mar 22 02:13:53 EDT 2009
Hello,
This is the procedure I'm using to find the current object file for a
given scheme file.
(define (current-object-file scheme-file)
(let ((object-file?
(let ((object-file-prefix
(string-append (path-strip-directory
(path-strip-extension scheme-file))
".o")))
(lambda (file)
(string-prefix? object-file-prefix file)))))
(let ((object-files
(sort-list
(filter object-file?
(directory-files (path-directory scheme-file)))
string>)))
(if (null? object-files)
#f
(first object-files)))))
Comments welcome.
Ed
More information about the Gambit-list
mailing list