mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-15 16:57:35 +02:00
Look up library directory, do not assume cwd
This commit is contained in:
parent
b51cd6e0f0
commit
0ff0e2b4c7
1 changed files with 10 additions and 6 deletions
16
cyclone.scm
16
cyclone.scm
|
@ -5,21 +5,25 @@
|
||||||
;; This module contains a front-end for the compiler itself.
|
;; This module contains a front-end for the compiler itself.
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
;; TODO: will need to read these from env somehow.
|
||||||
|
;; for now they are just hard-coded, but that won't work for an install
|
||||||
|
(define (cyc:get-lib-dir) "/home/justin/Documents/cyclone/")
|
||||||
|
|
||||||
(cond-expand
|
(cond-expand
|
||||||
(chicken
|
(chicken
|
||||||
(require-extension extras) ;; pretty-print
|
(require-extension extras) ;; pretty-print
|
||||||
(require-extension chicken-syntax) ;; when
|
(require-extension chicken-syntax) ;; when
|
||||||
(load "parser.so")
|
(load (string-append (cyc:get-lib-dir) "parser.so"))
|
||||||
(load "trans.so")
|
(load (string-append (cyc:get-lib-dir) "trans.so"))
|
||||||
(load "cgen.so"))
|
(load (string-append (cyc:get-lib-dir) "cgen.so")))
|
||||||
; (husk
|
; (husk
|
||||||
; (import (husk pretty-print))
|
; (import (husk pretty-print))
|
||||||
; ;; TODO: load files
|
; ;; TODO: load files
|
||||||
; )
|
; )
|
||||||
(else
|
(else
|
||||||
(load "parser.scm")
|
(load (string-append (cyc:get-lib-dir) "parser.scm"))
|
||||||
(load "trans.scm")
|
(load (string-append (cyc:get-lib-dir) "trans.scm"))
|
||||||
(load "cgen.scm")))
|
(load (string-append (cyc:get-lib-dir) "cgen.scm"))))
|
||||||
|
|
||||||
;; Code emission.
|
;; Code emission.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue