mescc: Add mes 0.19 compatibility.
* mes/module/mes/boot-0.scm (%datadir): Cater for %datadir not being set.
This commit is contained in:
parent
093a8b0903
commit
27de9aa0e3
|
@ -136,6 +136,9 @@
|
||||||
(if (null? (cdr rest)) (car rest)
|
(if (null? (cdr rest)) (car rest)
|
||||||
(append2 (car rest) (apply append (cdr rest))))))
|
(append2 (car rest) (apply append (cdr rest))))))
|
||||||
|
|
||||||
|
(if (not (defined? '%datadir))
|
||||||
|
(module-define! (current-module) '%datadir "mes"))
|
||||||
|
|
||||||
(define %moduledir (string-append %datadir "/module/"))
|
(define %moduledir (string-append %datadir "/module/"))
|
||||||
|
|
||||||
(include (string-append %moduledir "mes/type-0.mes"))
|
(include (string-append %moduledir "mes/type-0.mes"))
|
||||||
|
|
|
@ -37,10 +37,10 @@
|
||||||
(define-macro (mes-use-module . rest) #t)))
|
(define-macro (mes-use-module . rest) #t)))
|
||||||
|
|
||||||
(define %host-arch (or (getenv "%arch") %arch))
|
(define %host-arch (or (getenv "%arch") %arch))
|
||||||
(define %prefix (getenv "%prefix"))
|
(define %prefix (or (getenv "%prefix") "mes"))
|
||||||
(define %includedir (getenv "%includedir"))
|
(define %includedir (or (getenv "%includedir") "include"))
|
||||||
(define %libdir (getenv "%libdir"))
|
(define %libdir (or (getenv "%libdir") "."))
|
||||||
(define %version (getenv "%version"))
|
(define %version (or (getenv "%version") "0.0"))
|
||||||
(define %numbered-arch? (and=> (getenv "%numbered_arch") (lambda (x) (equal? x "true"))))
|
(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))))
|
(when (and=> (getenv "V") (lambda (v) (and (= (string-length v) 1) (> (string->number v) 1))))
|
||||||
|
@ -183,3 +183,5 @@ General help using GNU software: <http://gnu.org/gethelp/>
|
||||||
(compile? (mescc:compile options))
|
(compile? (mescc:compile options))
|
||||||
(assemble? (mescc:assemble options))
|
(assemble? (mescc:assemble options))
|
||||||
(else (mescc:link options)))))
|
(else (mescc:link options)))))
|
||||||
|
|
||||||
|
(define main mescc:main)
|
||||||
|
|
Loading…
Reference in a new issue