Work in different env's

This commit is contained in:
Justin Ethier 2015-05-13 13:50:45 -04:00
parent cb941d8031
commit a3594999e0
2 changed files with 8 additions and 1 deletions

View file

@ -65,7 +65,7 @@
(trace:info "imports:")
(trace:info imports)
;; TODO: need to get basedir from env, this is just a placeholder
(set! imported-vars (lib:resolve-imports imports "examples/hello-library")) ;;"."))
(set! imported-vars (lib:resolve-imports imports "."))
(trace:info "resolved imports:")
(trace:info imported-vars)

View file

@ -1807,6 +1807,13 @@
(define (lib:import->obj-file import)
(string-append (symbol->string (car (reverse import))) ".o"))
; !!!!!!!!!!!!!!!!!!!!!!!!
;TODO: all this basedir stuff below is silly. all we need is a way of saying OK, this
; is a system library so use cyc:get-lib-dir to find it. I think basedir just goes away
; at that point
;; Given a program's import set, resolve each import to its .o file, then
;; process each import recursively to get the .o files that each one of those
;; libs requires. will probably need to prune duplicates from completed list.