diff options
author | Stelian Ionescu <sionescu@common-lisp.net> | 2009-01-03 23:35:06 +0100 |
---|---|---|
committer | Stelian Ionescu <sionescu@common-lisp.net> | 2009-01-03 23:35:06 +0100 |
commit | ecb24f568a3d9b388ff250579c4e61eaa8f86574 (patch) | |
tree | 18b2e89a01a4c0acb20f1aeed3d718d30191a131 /eclass | |
parent | glo-utils.eclass: add glo_best_flag (diff) | |
download | lisp-ecb24f568a3d9b388ff250579c4e61eaa8f86574.tar.gz lisp-ecb24f568a3d9b388ff250579c4e61eaa8f86574.tar.bz2 lisp-ecb24f568a3d9b388ff250579c4e61eaa8f86574.zip |
common-lisp-2.eclass: add common-lisp-export-impl-args
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/common-lisp-2.eclass | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/eclass/common-lisp-2.eclass b/eclass/common-lisp-2.eclass index 741b2dd5..2d5e7bac 100644 --- a/eclass/common-lisp-2.eclass +++ b/eclass/common-lisp-2.eclass @@ -14,6 +14,14 @@ # # common-lisp-symlink-asdf [<paths>...] # create symlinks in $CLSYSTEMROOT to asdf files +# +# common-lisp-export-impl-args lisp-implementation +# export a few variables containing the switches necessary +# to make the CL implementation perform basic functions: +# * CL_NORC: don't load initfiles +# * CL_LOAD: load a certain file +# * CL_EVAL: eval a certain expression at startup +# inherit eutils @@ -86,3 +94,41 @@ common-lisp-2_src_install() { [[ -f ${i} ]] && dodoc ${i} done } + +common-lisp-export-impl-args() { + if [[ $# != 1 ]]; then + eerror "Usage: ${0} lisp-implementation" + die "${0}: wrong number of arguments: $#" + fi + case ${1} in + clisp) + CL_NORC="-norc" + CL_LOAD="-i" + CL_EVAL="-x" + ;; + clozure|ccl|openmcl) + CL_NORC="--no-init" + CL_LOAD="--load" + CL_EVAL="--eval" + ;; + cmucl) + CL_NORC="-nositeinit -noinit" + CL_LOAD="-load" + CL_EVAL="-eval" + ;; + ecl) + CL_NORC="-norc" + CL_LOAD="-load" + CL_EVAL="-eval" + ;; + sbcl) + CL_NORC="--sysinit /dev/null --userinit /dev/null" + CL_LOAD="--load" + CL_EVAL="--eval" + ;; + *) + die ${1} is not supported by ${0} + ;; + esac + export CL_NOSYSRC CL_NORC CL_LOAD CL_EVAL +} |