mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Merge pull request #609 from ilammy/snow-usr-local
Always install Snow libraries to /usr/local
This commit is contained in:
commit
fad3413235
3 changed files with 26 additions and 2 deletions
2
Makefile
2
Makefile
|
@ -137,7 +137,7 @@ chibi-scheme-emscripten: VERSION
|
||||||
|
|
||||||
include/chibi/install.h: Makefile
|
include/chibi/install.h: Makefile
|
||||||
echo '#define sexp_so_extension "'$(SO)'"' > $@
|
echo '#define sexp_so_extension "'$(SO)'"' > $@
|
||||||
echo '#define sexp_default_module_path "'$(MODDIR):$(BINMODDIR)'"' >> $@
|
echo '#define sexp_default_module_path "'$(MODDIR):$(BINMODDIR):$(SNOWMODDIR):$(SNOWBINMODDIR)'"' >> $@
|
||||||
echo '#define sexp_platform "'$(PLATFORM)'"' >> $@
|
echo '#define sexp_platform "'$(PLATFORM)'"' >> $@
|
||||||
echo '#define sexp_version "'$(VERSION)'"' >> $@
|
echo '#define sexp_version "'$(VERSION)'"' >> $@
|
||||||
echo '#define sexp_release_name "'`cat RELEASE`'"' >> $@
|
echo '#define sexp_release_name "'`cat RELEASE`'"' >> $@
|
||||||
|
|
|
@ -37,6 +37,12 @@ BINMODDIR ?= $(SOLIBDIR)/chibi
|
||||||
PKGCONFDIR ?= $(SOLIBDIR)/pkgconfig
|
PKGCONFDIR ?= $(SOLIBDIR)/pkgconfig
|
||||||
MANDIR ?= $(PREFIX)/share/man/man1
|
MANDIR ?= $(PREFIX)/share/man/man1
|
||||||
|
|
||||||
|
SNOWPREFIX ?= /usr/local
|
||||||
|
SNOWLIBDIR ?= $(SNOWPREFIX)/lib
|
||||||
|
SNOWSOLIBDIR ?= $(SNOWLIBDIR)
|
||||||
|
SNOWMODDIR ?= $(SNOWPREFIX)/share/snow
|
||||||
|
SNOWBINMODDIR ?= $(SNOWSOLIBDIR)/snow
|
||||||
|
|
||||||
DESTDIR ?=
|
DESTDIR ?=
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
|
@ -1378,6 +1378,24 @@
|
||||||
"share/snow"
|
"share/snow"
|
||||||
impl)))))
|
impl)))))
|
||||||
|
|
||||||
|
(define (get-install-library-dirs impl cfg)
|
||||||
|
(case impl
|
||||||
|
((chibi)
|
||||||
|
(let* ((dirs
|
||||||
|
(reverse
|
||||||
|
(cond-expand
|
||||||
|
(chibi (eval '(current-module-path) (environment '(chibi))))
|
||||||
|
(else (process->sexp
|
||||||
|
'(chibi-scheme -q -p "(current-module-path)"))))))
|
||||||
|
(lib-dir (find (lambda (d) (string-contains d "/lib")) dirs)))
|
||||||
|
(if lib-dir
|
||||||
|
(cons lib-dir (delete lib-dir dirs))
|
||||||
|
dirs)))
|
||||||
|
(else
|
||||||
|
(list (make-path (or (conf-get cfg 'install-prefix) "/usr/local")
|
||||||
|
"lib"
|
||||||
|
impl)))))
|
||||||
|
|
||||||
(define (scheme-script-command impl cfg)
|
(define (scheme-script-command impl cfg)
|
||||||
(or (and (eq? impl 'chibi) (conf-get cfg 'chibi-path))
|
(or (and (eq? impl 'chibi) (conf-get cfg 'chibi-path))
|
||||||
(let* ((prog (cond ((conf-get cfg 'scheme-script))
|
(let* ((prog (cond ((conf-get cfg 'scheme-script))
|
||||||
|
@ -1656,7 +1674,7 @@
|
||||||
(car (get-install-dirs impl cfg)))
|
(car (get-install-dirs impl cfg)))
|
||||||
((conf-get cfg 'install-prefix)
|
((conf-get cfg 'install-prefix)
|
||||||
=> (lambda (prefix) (make-path prefix "lib" impl)))
|
=> (lambda (prefix) (make-path prefix "lib" impl)))
|
||||||
(else (make-path "/usr/local/lib" impl))))
|
(else (car (get-install-library-dirs impl cfg)))))
|
||||||
|
|
||||||
(define (get-install-binary-dir impl cfg)
|
(define (get-install-binary-dir impl cfg)
|
||||||
(cond
|
(cond
|
||||||
|
|
Loading…
Add table
Reference in a new issue