mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-15 16:57:35 +02:00
Pass args to cyc-installation-dir
This commit is contained in:
parent
ac524f3d9a
commit
99f0a0dc1d
3 changed files with 12 additions and 8 deletions
3
Makefile
3
Makefile
|
@ -201,3 +201,6 @@ uninstall:
|
|||
$(RMDIR) $(DESTDIR)$(DATADIR)/scheme
|
||||
$(RMDIR) $(DESTDIR)$(DATADIR)
|
||||
|
||||
testing:
|
||||
make PREFIX="." libcyclone.a && make && make test && make self && make self2 && make bootstrap
|
||||
|
||||
|
|
|
@ -59,9 +59,6 @@
|
|||
|
||||
;; TODO: include-ci, cond-expand
|
||||
|
||||
(define (Cyc-installation-sld-dir) "")
|
||||
;(define (Cyc-installation-sld-dir) "/share/cyclone")
|
||||
|
||||
;; Resolve library filename given an import.
|
||||
;; Assumes ".sld" file extension if one is not specified.
|
||||
(define (lib:import->filename import . ext)
|
||||
|
@ -81,7 +78,7 @@
|
|||
(filename
|
||||
(substring filename* 1 (string-length filename*))))
|
||||
(if (tagged-list? 'scheme import)
|
||||
(string-append (Cyc-installation-dir) (Cyc-installation-sld-dir) "/" filename) ;; Built-in library
|
||||
(string-append (Cyc-installation-dir 'sld) "/" filename) ;; Built-in library
|
||||
filename)))
|
||||
|
||||
;; Get path to directory that contains the library
|
||||
|
@ -95,7 +92,7 @@
|
|||
(string-append (symbol->string i) "/"))
|
||||
import-path))))
|
||||
(if (tagged-list? 'scheme import)
|
||||
(string-append (Cyc-installation-dir) (Cyc-installation-sld-dir) "/" path) ;; Built-in library
|
||||
(string-append (Cyc-installation-dir 'sld) "/" path) ;; Built-in library
|
||||
path)))
|
||||
|
||||
;; Given a program's import set, resolve each import to its .o file, then
|
||||
|
|
10
runtime.c
10
runtime.c
|
@ -942,7 +942,10 @@ string_type Cyc_substring(object str, object start, object end) {
|
|||
* Return directory where cyclone is installed.
|
||||
* This is configured via the makefile during a build.
|
||||
*/
|
||||
string_type Cyc_installation_dir() {
|
||||
string_type Cyc_installation_dir(object type) {
|
||||
// TODO: need to handle 'inc 'lib 'sld and return appropriate dir.
|
||||
// EG: if 'sld, return (CYC_INSTALL_DIR "/" CYC_SLD_DIR)
|
||||
// need to use directives from makefile
|
||||
make_string(str, CYC_INSTALL_DIR);
|
||||
return str;
|
||||
}
|
||||
|
@ -1469,8 +1472,9 @@ void _cyc_string_91ref(object cont, object args) {
|
|||
{ object c = Cyc_string_ref(car(args), cadr(args));
|
||||
return_funcall1(cont, c); }}
|
||||
void _Cyc_91installation_91dir(object cont, object args) {
|
||||
string_type dir = Cyc_installation_dir();
|
||||
return_funcall1(cont, &dir);}
|
||||
Cyc_check_num_args("Cyc-installation-dir", 1, args);
|
||||
{ string_type dir = Cyc_installation_dir(car(args));
|
||||
return_funcall1(cont, &dir);}}
|
||||
void _command_91line_91arguments(object cont, object args) {
|
||||
object cmdline = Cyc_command_line_arguments(cont);
|
||||
return_funcall1(cont, cmdline); }
|
||||
|
|
Loading…
Add table
Reference in a new issue