From ecb24f568a3d9b388ff250579c4e61eaa8f86574 Mon Sep 17 00:00:00 2001 From: Stelian Ionescu Date: Sat, 3 Jan 2009 23:35:06 +0100 Subject: common-lisp-2.eclass: add common-lisp-export-impl-args --- eclass/common-lisp-2.eclass | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'eclass') 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 [...] # 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 +} -- cgit v1.2.3-65-gdbad