diff --git a/mes/module/mes/boot-0.scm b/mes/module/mes/boot-0.scm index f0bd8bac..767a1f28 100644 --- a/mes/module/mes/boot-0.scm +++ b/mes/module/mes/boot-0.scm @@ -136,6 +136,9 @@ (if (null? (cdr rest)) (car rest) (append2 (car rest) (apply append (cdr rest)))))) +(if (not (defined? '%datadir)) + (module-define! (current-module) '%datadir "mes")) + (define %moduledir (string-append %datadir "/module/")) (include (string-append %moduledir "mes/type-0.mes")) diff --git a/module/mescc.scm b/module/mescc.scm index cf4db42c..dae7316c 100644 --- a/module/mescc.scm +++ b/module/mescc.scm @@ -37,10 +37,10 @@ (define-macro (mes-use-module . rest) #t))) (define %host-arch (or (getenv "%arch") %arch)) -(define %prefix (getenv "%prefix")) -(define %includedir (getenv "%includedir")) -(define %libdir (getenv "%libdir")) -(define %version (getenv "%version")) +(define %prefix (or (getenv "%prefix") "mes")) +(define %includedir (or (getenv "%includedir") "include")) +(define %libdir (or (getenv "%libdir") ".")) +(define %version (or (getenv "%version") "0.0")) (define %numbered-arch? (and=> (getenv "%numbered_arch") (lambda (x) (equal? x "true")))) (when (and=> (getenv "V") (lambda (v) (and (= (string-length v) 1) (> (string->number v) 1)))) @@ -183,3 +183,5 @@ General help using GNU software: (compile? (mescc:compile options)) (assemble? (mescc:assemble options)) (else (mescc:link options))))) + +(define main mescc:main)