mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-04 19:56:36 +02:00
Merge pull request #1026 from Retropikzel/generic
Add generic implementation into snow-chibi
This commit is contained in:
commit
8e2e1bb80e
5 changed files with 20 additions and 25 deletions
8
Makefile
8
Makefile
|
@ -415,12 +415,7 @@ install-base: all
|
|||
$(INSTALL) -m0644 doc/chibi-doc.1 $(DESTDIR)$(MANDIR)/
|
||||
-if type $(LDCONFIG) >/dev/null 2>/dev/null; then $(LDCONFIG) >/dev/null 2>/dev/null; fi
|
||||
|
||||
install-bash-completion:
|
||||
if [ -d "/etc/bash_completion.d" ]; then \
|
||||
cp tools/snow-chibi-completion.bash /etc/bash_completion.d/snow-chibi; \
|
||||
fi
|
||||
|
||||
install: install-base install-bash-completion
|
||||
install: install-base
|
||||
ifneq "$(IMAGE_FILES)" ""
|
||||
echo "Generating images"
|
||||
-[ -z "$(DESTDIR)" ] && LD_LIBRARY_PATH="$(SOLIBDIR):$(LD_LIBRARY_PATH)" DYLD_LIBRARY_PATH="$(SOLIBDIR):$(DYLD_LIBRARY_PATH)" CHIBI_MODULE_PATH="$(MODDIR):$(BINMODDIR)" $(BINDIR)/chibi-scheme$(EXE) -mchibi.repl -d $(MODDIR)/chibi.img
|
||||
|
@ -502,7 +497,6 @@ uninstall:
|
|||
-$(RMDIR) $(DESTDIR)$(MODDIR) $(DESTDIR)$(BINMODDIR)
|
||||
-$(RM) $(DESTDIR)$(MANDIR)/chibi-scheme.1 $(DESTDIR)$(MANDIR)/chibi-ffi.1 $(DESTDIR)$(MANDIR)/chibi-doc.1
|
||||
-$(RM) $(DESTDIR)$(PKGCONFDIR)/chibi-scheme.pc
|
||||
-$(RM) /etc/bash_completion.d/snow-chibi
|
||||
|
||||
dist: distclean
|
||||
$(RM) chibi-scheme-$(CHIBI_VERSION).tgz
|
||||
|
|
|
@ -1635,15 +1635,16 @@ conventions, you can thus simply run \scheme{snow-chibi package
|
|||
\subsubsection{Other Implementations}
|
||||
|
||||
Although the command is called \scheme{snow-chibi}, it supports
|
||||
several other R7RS implementations. The \scheme{implementations}
|
||||
command tells you which you currently have installed. The following
|
||||
are currently supported:
|
||||
several other R7RS implementations and generic installation of libraries.
|
||||
The \scheme{implementations} command tells you which you currently have
|
||||
installed. The following are currently supported:
|
||||
|
||||
\itemlist[
|
||||
\item{chibi - version >= 0.7.3}
|
||||
\item{chicken - version >= 4.9.0 with the \scheme{r7rs} egg}
|
||||
\item{cyclone - version >= 0.5.3}
|
||||
\item{foment - version >= 0.4}
|
||||
\item{generic; By default libraries are installed into /usr/local/lib/snow or %LOCALAPPDATA%/lib/snow on windows}
|
||||
\item{gauche - version >= 0.9.4}
|
||||
\item{kawa - version >= 2.0; you need to add the install dir to the search path, e.g. \scheme{-Dkawa.import.path=/usr/local/share/kawa}}
|
||||
\item{larceny - version 0.98; you need to add "lib/Snow" to the paths in startup.sch}
|
||||
|
|
|
@ -24,9 +24,10 @@
|
|||
(else
|
||||
(warn msg)
|
||||
#f))))))
|
||||
(and confirm?
|
||||
(yes-or-no? cfg "Implementation " (car spec) " does not "
|
||||
" seem to be available, install anyway?"))))
|
||||
(or (equal? (car spec) 'generic)
|
||||
(and confirm?
|
||||
(yes-or-no? cfg "Implementation " (car spec) " does not "
|
||||
" seem to be available, install anyway?")))))
|
||||
|
||||
(define (conf-selected-implementations cfg)
|
||||
(let ((requested (conf-get-list cfg 'implementations '(chibi))))
|
||||
|
@ -1373,6 +1374,11 @@
|
|||
(string-trim (process->string '(icyc -p "(Cyc-installation-dir 'sld)"))
|
||||
char-whitespace?)))))
|
||||
(list (or dir "/usr/local/share/cyclone/"))))
|
||||
((generic)
|
||||
(list (make-path (or (conf-get cfg 'install-prefix)
|
||||
(cond-expand (windows (get-environment-variable "LOCALAPPDATA"))
|
||||
(else "/usr/local"))
|
||||
"/lib/snow"))))
|
||||
((gauche)
|
||||
(list
|
||||
(let ((dir (string-trim
|
||||
|
@ -1696,6 +1702,7 @@
|
|||
(cond
|
||||
((eq? impl 'chicken) (get-install-library-dir impl cfg))
|
||||
((eq? impl 'cyclone) (get-install-library-dir impl cfg))
|
||||
((eq? impl 'generic) (get-install-library-dir impl cfg))
|
||||
((eq? impl 'guile) (get-guile-site-dir))
|
||||
((eq? impl 'stklos) (get-install-library-dir impl cfg))
|
||||
((conf-get cfg 'install-source-dir))
|
||||
|
@ -1707,6 +1714,7 @@
|
|||
(cond
|
||||
((eq? impl 'chicken) (get-install-library-dir impl cfg))
|
||||
((eq? impl 'cyclone) (get-install-library-dir impl cfg))
|
||||
((eq? impl 'generic) (get-install-library-dir impl cfg))
|
||||
((eq? impl 'stklos) (get-install-library-dir impl cfg))
|
||||
((conf-get cfg 'install-data-dir))
|
||||
((conf-get cfg 'install-prefix)
|
||||
|
@ -1723,6 +1731,8 @@
|
|||
(get-chicken-binary-version cfg))))
|
||||
(else
|
||||
(car (get-install-dirs impl cfg)))))
|
||||
((eq? impl 'generic)
|
||||
(car (get-install-dirs impl cfg)))
|
||||
((eq? impl 'cyclone)
|
||||
(car (get-install-dirs impl cfg)))
|
||||
((eq? impl 'guile)
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
,(delay
|
||||
(process->sexp
|
||||
'(foment -e "(write (features))"))))
|
||||
(generic "generic" #f #f
|
||||
,(delay (write-string "generic\n")))
|
||||
(gauche "gosh" (gosh -E "print (gauche-version)") "0.9.4"
|
||||
,(delay
|
||||
(process->sexp
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
#/usr/bin/env bash
|
||||
|
||||
_snow_chibi_completions() {
|
||||
if [ "${#COMP_WORDS[@]}" -gt "2" ]
|
||||
then
|
||||
COMPREPLY=($(compgen -f -- "${COMP_WORDS[COMP_CWORD]}"))
|
||||
else
|
||||
COMPREPLY=($(compgen -W "search show install upgrade remove status package gen-key reg-key sign verify upload index update implementations help" "${COMP_WORDS[COMP_CWORD]}"))
|
||||
fi
|
||||
}
|
||||
|
||||
complete -o bashdefault -F _snow_chibi_completions snow-chibi
|
Loading…
Add table
Reference in a new issue