mes: Bugfix for search-path. Fixes running MesCC on Guile.
* module/mescc/mescc.scm (arch-find): Also look in cwd. * mes/module/mes/posix.mes (search-path): Do not look in cwd.
This commit is contained in:
parent
0ef174897f
commit
77e75c3142
|
@ -38,12 +38,11 @@
|
||||||
*unspecified*)
|
*unspecified*)
|
||||||
|
|
||||||
(define (search-path path file-name)
|
(define (search-path path file-name)
|
||||||
(if (access? file-name R_OK) file-name
|
|
||||||
(let loop ((path path))
|
(let loop ((path path))
|
||||||
(and (pair? path)
|
(and (pair? path)
|
||||||
(let ((f (string-append (car path) "/" file-name)))
|
(let ((f (string-append (car path) "/" file-name)))
|
||||||
(if (access? f R_OK) f
|
(if (access? f R_OK) f
|
||||||
(loop (cdr path))))))))
|
(loop (cdr path)))))))
|
||||||
|
|
||||||
(define (execlp file-name args)
|
(define (execlp file-name args)
|
||||||
(let ((executable (if (string-index file-name #\/) file-name
|
(let ((executable (if (string-index file-name #\/) file-name
|
||||||
|
|
|
@ -274,7 +274,8 @@
|
||||||
((equal? machine "32") "x86-mes")
|
((equal? machine "32") "x86-mes")
|
||||||
((equal? machine "64") "x86_64-mes")
|
((equal? machine "64") "x86_64-mes")
|
||||||
(else "x86-mes")))
|
(else "x86-mes")))
|
||||||
(path (cons* srcdir-lib
|
(path (cons* "."
|
||||||
|
srcdir-lib
|
||||||
(prefix-file options "lib")
|
(prefix-file options "lib")
|
||||||
(filter-map (multi-opt 'library-dir) options)))
|
(filter-map (multi-opt 'library-dir) options)))
|
||||||
(arch-file-name (string-append arch "/" file-name))
|
(arch-file-name (string-append arch "/" file-name))
|
||||||
|
|
Loading…
Reference in a new issue