Minor enhancement for the configure module: Return machine, vendor and os.
This commit is contained in:
parent
655a2e5cc2
commit
065d686d21
|
@ -1,5 +1,23 @@
|
||||||
(define (host) "@scsh_host@")
|
(define (host) "@scsh_host@")
|
||||||
|
|
||||||
|
(define (machine-vendor-os)
|
||||||
|
(let ((match (regexp-search (rx (submatch (+ (~ #\-))) "-"
|
||||||
|
(submatch (+ (~ #\-))) "-"
|
||||||
|
(submatch (+ any)))
|
||||||
|
(host))))
|
||||||
|
(list (match:substring match 1)
|
||||||
|
(match:substring match 2)
|
||||||
|
(match:substring match 3))))
|
||||||
|
|
||||||
|
(define (machine)
|
||||||
|
(car (machine-vendor-os)))
|
||||||
|
|
||||||
|
(define (vendor)
|
||||||
|
(cadr (machine-vendor-os)))
|
||||||
|
|
||||||
|
(define (os)
|
||||||
|
(caddr (machine-vendor-os)))
|
||||||
|
|
||||||
(define (prefix) "@scsh_prefix@")
|
(define (prefix) "@scsh_prefix@")
|
||||||
|
|
||||||
(define (exec-prefix) "@scsh_exec_prefix@")
|
(define (exec-prefix) "@scsh_exec_prefix@")
|
||||||
|
@ -24,8 +42,12 @@
|
||||||
|
|
||||||
(define (ldflags) "@scsh_LDFLAGS@")
|
(define (ldflags) "@scsh_LDFLAGS@")
|
||||||
|
|
||||||
|
(define (compiler-flags)
|
||||||
|
(string-join (list "-I" (include-dir) (defs))))
|
||||||
|
|
||||||
(define (linker-flags)
|
(define (linker-flags)
|
||||||
(string-join (list "-L" (lib-dir) (libs) "-lscsh") " "))
|
(string-join (list "-L" (lib-dir) (libs) "-lscsh") " "))
|
||||||
|
|
||||||
(define (compiler-flags)
|
;;; Local Variables:
|
||||||
(string-join (list "-I" (include-dir) (defs))))
|
;;; mode: Scheme
|
||||||
|
;;; End:
|
||||||
|
|
|
@ -1190,6 +1190,9 @@
|
||||||
|
|
||||||
(define-interface configure-interface
|
(define-interface configure-interface
|
||||||
(export host
|
(export host
|
||||||
|
machine
|
||||||
|
vendor
|
||||||
|
os
|
||||||
prefix
|
prefix
|
||||||
exec-prefix
|
exec-prefix
|
||||||
bin-dir
|
bin-dir
|
||||||
|
|
|
@ -589,5 +589,6 @@
|
||||||
|
|
||||||
(define-structure configure configure-interface
|
(define-structure configure configure-interface
|
||||||
(open scheme
|
(open scheme
|
||||||
|
re-level-0 rx-syntax
|
||||||
(subset srfi-13 (string-join)))
|
(subset srfi-13 (string-join)))
|
||||||
(files configure))
|
(files configure))
|
Loading…
Reference in New Issue