mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-17 23:02:31 -08:00
Allow customizing ECL using extra files and a different init form.
This commit is contained in:
parent
c26bd2381c
commit
5208c8aadf
3 changed files with 73 additions and 5 deletions
|
|
@ -89,12 +89,21 @@
|
|||
)))
|
||||
#+CLOS
|
||||
(let* ((c::*compile-to-linking-call* nil))
|
||||
(mapc #'proclaim +ecl-optimization-settings+)
|
||||
(mapc #'proclaim +ecl-optimization-settings+)
|
||||
(setq lsp-objects (append lsp-objects
|
||||
(compile-if-old "build:clos;" +clos-module-files+
|
||||
:system-p t :c-file t :data-file t :h-file t
|
||||
:system-p t :c-file t :data-file t
|
||||
:h-file t
|
||||
;;:shared-data-file "build:ecl.sdat"
|
||||
))))
|
||||
(let ((extra-lisp-files '(@ECL_EXTRA_LISP_FILES@)))
|
||||
(when extra-lisp-files
|
||||
(setq lsp-objects (append lsp-objects
|
||||
(compile-if-old "build:ext;" extra-lisp-files
|
||||
:system-p t :c-file t :data-file t
|
||||
:h-file t
|
||||
;;:shared-data-file "build:ecl.sdat"
|
||||
)))))
|
||||
(c::build-static-library "lsp" :lisp-files lsp-objects
|
||||
;;:shared-data-file "build:ecl.sdat"
|
||||
))
|
||||
|
|
@ -342,6 +351,7 @@
|
|||
#+:msvc "ecl2"
|
||||
#+(and (or cross stage1) (not msvc)) "bin/ecl"
|
||||
#-(or cross stage1 msvc) "ecl2"
|
||||
:epilogue-code '@ECL_INIT_FORM@
|
||||
:lisp-files *module-symbols*
|
||||
:ld-flags '(#-msvc "-L./" #+windows "ecl.res"))
|
||||
|
||||
|
|
|
|||
41
src/configure
vendored
41
src/configure
vendored
|
|
@ -637,6 +637,8 @@ ac_includes_default="\
|
|||
#endif"
|
||||
|
||||
ac_subst_vars='LTLIBOBJS
|
||||
ECL_INIT_FORM
|
||||
ECL_EXTRA_LISP_FILES
|
||||
CHAR_CODE_LIMIT
|
||||
ECL_CHARACTER
|
||||
CLX_INFO
|
||||
|
|
@ -814,6 +816,8 @@ enable_precisegc
|
|||
with_debug_cflags
|
||||
with_profile_cflags
|
||||
with_newcmp
|
||||
with_extra_files
|
||||
with_init_form
|
||||
with_x
|
||||
'
|
||||
ac_precious_vars='build_alias
|
||||
|
|
@ -826,9 +830,6 @@ LIBS
|
|||
CPPFLAGS
|
||||
CXX
|
||||
CXXFLAGS
|
||||
LDFLAGS
|
||||
LIBS
|
||||
CPPFLAGS
|
||||
CCC
|
||||
CPP
|
||||
XMKMF'
|
||||
|
|
@ -1540,6 +1541,9 @@ Optional Packages:
|
|||
--with-profile-cflags add profiling flags to the compiler invocation
|
||||
(yes,no,actual flags,default=NO)
|
||||
--with-newcmp new compiler (yes|no, default=NO)
|
||||
--with-extra-files list of additional source files (default="")
|
||||
--with-init-form lisp forms to execute at startup
|
||||
(default="(si::top-level t)")
|
||||
--with-x use the X Window System
|
||||
|
||||
Some influential environment variables:
|
||||
|
|
@ -2428,6 +2432,24 @@ else
|
|||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-extra-files was given.
|
||||
if test "${with_extra_files+set}" = set; then
|
||||
withval=$with_extra_files; with_extra_files="${withval}"
|
||||
else
|
||||
with_extra_files=""
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-init-form was given.
|
||||
if test "${with_init_form+set}" = set; then
|
||||
withval=$with_init_form; with_init_form="${withval}"
|
||||
else
|
||||
with_init_form=""
|
||||
fi
|
||||
|
||||
|
||||
ecldir="${libdir}/ecl-${PACKAGE_VERSION}"
|
||||
|
||||
test -z "${docdir}" && docdir="${datadir}/doc/ecl-${PACKAGE_VERSION}"
|
||||
|
|
@ -15407,6 +15429,19 @@ fi
|
|||
|
||||
|
||||
|
||||
|
||||
ECL_EXTRA_LISP_FILES=""
|
||||
for i in $with_extra_files; do
|
||||
ECL_EXTRA_LISP_FILES="${ECL_EXTRA_LISP_FILES} \"$i\""
|
||||
done
|
||||
|
||||
echo ${with_init_form} = init form
|
||||
if test "x${with_init_form}" = "x"; then
|
||||
ECL_INIT_FORM='(SI::TOP-LEVEL T)'
|
||||
else
|
||||
ECL_INIT_FORM="${with_init_form}"
|
||||
fi
|
||||
|
||||
if test "${enable_hpack}" = "yes"; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
|
|
|
|||
|
|
@ -278,6 +278,16 @@ AC_ARG_WITH(newcmp,
|
|||
[new compiler (yes|no, default=NO)]),
|
||||
[], [with_newcmp=no])
|
||||
|
||||
AC_ARG_WITH(extra-files,
|
||||
AS_HELP_STRING( [--with-extra-files],
|
||||
[list of additional source files (default="")]),
|
||||
[with_extra_files="${withval}"], [with_extra_files=""])
|
||||
|
||||
AC_ARG_WITH(init-form,
|
||||
AS_HELP_STRING( [--with-init-form],
|
||||
[lisp forms to execute at startup (default="(si::top-level t)")]),
|
||||
[with_init_form="${withval}"], [with_init_form=""])
|
||||
|
||||
dnl -----------------------------------------------------------------------
|
||||
dnl Installation directories
|
||||
ecldir="${libdir}/ecl-${PACKAGE_VERSION}"
|
||||
|
|
@ -840,6 +850,19 @@ fi
|
|||
AC_SUBST(ECL_CHARACTER)
|
||||
AC_SUBST(CHAR_CODE_LIMIT)
|
||||
|
||||
AC_SUBST(ECL_EXTRA_LISP_FILES)
|
||||
ECL_EXTRA_LISP_FILES=""
|
||||
for i in $with_extra_files; do
|
||||
ECL_EXTRA_LISP_FILES="${ECL_EXTRA_LISP_FILES} \"$i\""
|
||||
done
|
||||
AC_SUBST(ECL_INIT_FORM)
|
||||
echo ${with_init_form} = init form
|
||||
if test "x${with_init_form}" = "x"; then
|
||||
ECL_INIT_FORM='(SI::TOP-LEVEL T)'
|
||||
else
|
||||
ECL_INIT_FORM="${with_init_form}"
|
||||
fi
|
||||
|
||||
if test "${enable_hpack}" = "yes"; then
|
||||
AC_DEFINE(ECL_RELATIVE_PACKAGE_NAMES, [1], [Hierarchical package names])
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue