mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-08 13:37:33 +02:00
Added lib:read-includes
This commit is contained in:
parent
93393a4f1c
commit
b28238f8dd
1 changed files with 12 additions and 0 deletions
|
@ -46,6 +46,7 @@
|
||||||
lib:import->path
|
lib:import->path
|
||||||
lib:check-system-path
|
lib:check-system-path
|
||||||
lib:read-imports
|
lib:read-imports
|
||||||
|
lib:read-includes
|
||||||
lib:import->export-list
|
lib:import->export-list
|
||||||
lib:import-set/exports->imports
|
lib:import-set/exports->imports
|
||||||
;lib:resolve-imports
|
;lib:resolve-imports
|
||||||
|
@ -368,6 +369,17 @@
|
||||||
(close-input-port fp)
|
(close-input-port fp)
|
||||||
imports))
|
imports))
|
||||||
|
|
||||||
|
;; Given a single import from an import-set, open the corresponding
|
||||||
|
;; library file and retrieve the library's includes
|
||||||
|
(define (lib:read-includes import append-dirs prepend-dirs)
|
||||||
|
(let* ((lib-name (lib:import->library-name import))
|
||||||
|
(dir (lib:import->filename lib-name ".sld" append-dirs prepend-dirs))
|
||||||
|
(fp (open-input-file dir))
|
||||||
|
(lib (read-all fp))
|
||||||
|
(includes (lib:includes (car lib))))
|
||||||
|
(close-input-port fp)
|
||||||
|
includes))
|
||||||
|
|
||||||
;; Read export list for a given import
|
;; Read export list for a given import
|
||||||
(define (lib:import->export-list import append-dirs prepend-dirs)
|
(define (lib:import->export-list import append-dirs prepend-dirs)
|
||||||
(let* ((lib-name (lib:import->library-name import))
|
(let* ((lib-name (lib:import->library-name import))
|
||||||
|
|
Loading…
Add table
Reference in a new issue