mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-14 05:12:38 -08:00
Allow to selectively build in or store as sources the different modules
This commit is contained in:
parent
93d9283b91
commit
8cd3b9d55f
7 changed files with 177 additions and 41 deletions
|
|
@ -156,7 +156,7 @@ install-base:
|
|||
$(INSTALL_PROGRAM) $$i $(DESTDIR)$(libdir); \
|
||||
fi \
|
||||
done
|
||||
if [ "x@SONAME@" != "x" ]; then \
|
||||
if [ "x@SONAME@" != "x" -a -f "@SONAME@" ]; then \
|
||||
( cd $(DESTDIR)$(libdir) && rm -f @SONAME3@ @SONAME2@ @SONAME1@ && \
|
||||
mv @SONAME@ @SONAME3@ && \
|
||||
$(LN_S) @SONAME3@ @SONAME2@ && \
|
||||
|
|
|
|||
7
src/aclocal.m4
vendored
7
src/aclocal.m4
vendored
|
|
@ -52,6 +52,13 @@ AC_DEFUN([ECL_ADD_LISP_MODULE], [
|
|||
ECL_ADD_FEATURE([wants-$1])
|
||||
])
|
||||
|
||||
dnl --------------------------------------------------------------
|
||||
dnl Add lisp module and build it into the compiler.
|
||||
dnl
|
||||
AC_DEFUN([ECL_ADD_BUILTIN_MODULE], [
|
||||
ECL_ADD_FEATURE([builtin-$1])
|
||||
])
|
||||
|
||||
dnl --------------------------------------------------------------
|
||||
dnl Set up a configuration file for the case when we are cross-
|
||||
dnl compiling
|
||||
|
|
|
|||
|
|
@ -71,18 +71,35 @@
|
|||
(defvar *module-symbols* nil)
|
||||
(defvar *module-files* nil)
|
||||
|
||||
(defun build-module (name sources &key additional-files
|
||||
(dir "build:") ((:prefix si::*init-function-prefix*) "EXT"))
|
||||
(proclaim '(optimize (safety 2) (speed 1)))
|
||||
(let* ((objects (compile-if-old dir sources :system-p t :c-file t :data-file t :h-file t))
|
||||
(name (string-downcase name)))
|
||||
(push (#-:wants-dlopen c::build-static-library
|
||||
#+:wants-dlopen c::build-fasl
|
||||
name :lisp-files objects) *module-files*)
|
||||
(when additional-files
|
||||
(setf *module-files* (nconc additional-files *module-files*)))
|
||||
#-:wants-dlopen (push (intern name) *module-symbols*))) ; kludge?
|
||||
(defun build-fake-module (name lisp-files)
|
||||
(let ((output (make-pathname :type "fasb" :defaults name)))
|
||||
(with-open-file (sout output :direction :output :if-exists :supersede
|
||||
:if-does-not-exist :create)
|
||||
(loop for file in lisp-files
|
||||
do (with-open-file (sin file :direction :input)
|
||||
(loop for line = (read-line sin nil nil)
|
||||
while line
|
||||
do (write-line line sout)))))
|
||||
output))
|
||||
|
||||
(defun build-module (name sources &key additional-files
|
||||
(builtin nil) (dir "build:")
|
||||
((:prefix si::*init-function-prefix*) "EXT"))
|
||||
(proclaim '(optimize (safety 2) (speed 1)))
|
||||
(let* ((name (string-downcase name)))
|
||||
(when additional-files
|
||||
(setf *module-files* (append additional-files *module-files*)))
|
||||
(if builtin
|
||||
(let* ((objects (compile-if-old dir sources :system-p t :c-file t
|
||||
:data-file t :h-file t)))
|
||||
(c::build-static-library name :lisp-files objects)
|
||||
(push (intern name) *module-symbols*))
|
||||
#-:wants-dlopen
|
||||
(push (build-fake-module name sources) *module-files*)
|
||||
#+:wants-dlopen
|
||||
(let* ((objects (compile-if-old dir sources :system-p t :c-file t
|
||||
:data-file t :h-file t)))
|
||||
(push (c::build-fasl name :lisp-files objects) *module-files*)))))
|
||||
|
||||
;;;
|
||||
;;; * Go back to build directory to start compiling
|
||||
|
|
|
|||
|
|
@ -605,15 +605,17 @@ cl_boot(int argc, char **argv)
|
|||
#endif
|
||||
aux = cl_list(
|
||||
#ifdef ENABLE_DLOPEN
|
||||
7,CONS(make_constant_base_string("fas"), @'si::load-binary'),
|
||||
9,CONS(make_constant_base_string("fas"), @'si::load-binary'),
|
||||
CONS(make_constant_base_string("fasl"), @'si::load-binary'),
|
||||
#else
|
||||
5,
|
||||
7,
|
||||
#endif
|
||||
CONS(make_constant_base_string("lsp"), @'si::load-source'),
|
||||
CONS(make_constant_base_string("lisp"), @'si::load-source'),
|
||||
CONS(make_constant_base_string("LSP"), @'si::load-source'),
|
||||
CONS(make_constant_base_string("LISP"), @'si::load-source'),
|
||||
CONS(make_constant_base_string("fasb"), @'si::load-source'),
|
||||
CONS(make_constant_base_string("FASB"), @'si::load-source'),
|
||||
CONS(Cnil, @'si::load-source'));
|
||||
ECL_SET(@'si::*load-hooks*', aux);
|
||||
init_error();
|
||||
|
|
|
|||
|
|
@ -134,7 +134,8 @@
|
|||
|
||||
#+WANTS-CMP
|
||||
(build-module "cmp" +cmp-module-files+
|
||||
:dir "build:cmp;" :prefix "CMP" :additional-files '("sysfun.lsp"))
|
||||
:dir "build:cmp;" :prefix "CMP" :additional-files '("sysfun.lsp")
|
||||
:builtin #+:BUILTIN-CMP t #-:BUILTIN-CMP nil)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;
|
||||
|
|
@ -148,7 +149,8 @@
|
|||
(build-module "defsystem"
|
||||
'("ext:defsystem;defsystem.lisp")
|
||||
:dir "build:ext;"
|
||||
:prefix "EXT")
|
||||
:prefix "EXT"
|
||||
:builtin #+:BUILTIN-DEFSYSTEM t #-:BUILTIN-DEFSYSTEM nil)
|
||||
|
||||
;;;
|
||||
;;; * ASDF
|
||||
|
|
@ -158,7 +160,8 @@
|
|||
'("ext:asdf;asdf.lisp"
|
||||
"ext:asdf;asdf-ecl.lisp")
|
||||
:dir "build:ext;"
|
||||
:prefix "EXT")
|
||||
:prefix "EXT"
|
||||
:builtin #+:BUILTIN-ASDF t #-:BUILTIN-ASDF nil)
|
||||
|
||||
;;;
|
||||
;;; * PROFILE
|
||||
|
|
@ -167,7 +170,10 @@
|
|||
(build-module "profile"
|
||||
'("ext:profile;profile.lisp")
|
||||
:dir "build:ext;"
|
||||
:prefix "EXT")
|
||||
:prefix "EXT"
|
||||
:builtin
|
||||
#+(or (NOT :WANTS-DLOPEN) :BUILTIN-PROFILE) t
|
||||
#-(or (NOT :WANTS-DLOPEN) :BUILTIN-PROFILE) nil)
|
||||
|
||||
;;;
|
||||
;;; * Sockets library.
|
||||
|
|
@ -178,13 +184,19 @@
|
|||
'("ext:sockets;package.lisp"
|
||||
"ext:sockets;sockets.lisp")
|
||||
:dir "build:ext;"
|
||||
:prefix "EXT")
|
||||
:prefix "EXT"
|
||||
:builtin
|
||||
#+(or (NOT :WANTS-DLOPEN) :BUILTIN-SOCKETS) t
|
||||
#-(or (NOT :WANTS-DLOPEN) :BUILTIN-SOCKETS) nil)
|
||||
|
||||
#+WANTS-SERVE-EVENT
|
||||
(build-module "serve-event"
|
||||
'("ext:serve-event;serve-event.lisp")
|
||||
:dir "build:ext;"
|
||||
:prefix "EXT")
|
||||
:prefix "EXT"
|
||||
:builtin
|
||||
#+(or (NOT :WANTS-DLOPEN) :BUILTIN-SERVE-EVENT) t
|
||||
#-(or (NOT :WANTS-DLOPEN) :BUILTIN-SERVE-EVENT) nil)
|
||||
|
||||
;;;
|
||||
;;; * Test suite
|
||||
|
|
@ -193,7 +205,8 @@
|
|||
(build-module "rt"
|
||||
'("ext:rt;rt.lisp")
|
||||
:dir "build:ext;"
|
||||
:prefix "EXT")
|
||||
:prefix "EXT"
|
||||
:builtin #+:BUILTIN-RT t #-:BUILTIN-RT nil)
|
||||
|
||||
;;;
|
||||
;;; * External formats
|
||||
|
|
@ -238,7 +251,10 @@
|
|||
(unless (find-package "SB-BSD-SOCKETS")
|
||||
(load "ext:sockets;package.lisp"))
|
||||
(mapcar #'load +clx-src-files+)
|
||||
(build-module "clx" +clx-src-files+ :dir "build:clx;" :prefix "CLX"))
|
||||
(build-module "clx" +clx-src-files+ :dir "build:clx;" :prefix "CLX"
|
||||
:builtin
|
||||
#+(OR (NOT :WANTS-DLOPEN) :BUILTIN-CLX) t
|
||||
#-(OR (NOT :WANTS-DLOPEN) :BUILTIN-CLX) nil))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;
|
||||
|
|
|
|||
87
src/configure
vendored
87
src/configure
vendored
|
|
@ -1479,19 +1479,23 @@ Optional Packages:
|
|||
--with-__thread Enable __thread thread-local variables (supported by
|
||||
NPTL-aware glibc and maybe Windows)
|
||||
--with-cxx build ECL using C++ compiler (default=NO)
|
||||
--with-tcp include socket interface (default=YES)
|
||||
--with-serve-event include serve-event module (default=YES)
|
||||
--with-clx include CLX library (default=NO)
|
||||
--with-clos-streams user defined stream objects (default=YES)
|
||||
--with-tcp include socket interface (yes|builtin|no,
|
||||
default=YES)
|
||||
--with-serve-event include serve-event module (yes|builtin|no,
|
||||
default=YES)
|
||||
--with-clx include CLX library (yes|builtin|no, default=NO)
|
||||
--with-clos-streams user defined stream objects (yes|builtin|no,
|
||||
default=YES)
|
||||
--with-cmuformat use CMUCL's FORMAT routine (default=YES)
|
||||
--with-asdf include ASDF building facility (default=YES if
|
||||
shared library support is on)
|
||||
--with-defsystem include DEFSYSTEM building facility (default=YES if
|
||||
shared library support is on)
|
||||
--with-asdf include ASDF building facility (yes|builtin|no,
|
||||
default=YES)
|
||||
--with-defsystem include DEFSYSTEM building facility (yes|builtin|no,
|
||||
default=YES)
|
||||
--with-cmp build in the compiler (default=YES)
|
||||
--with-rt include MIT-RT testing environment (default=YES)
|
||||
--with-profile include CMUCL's simple profiler (default=YES if
|
||||
Boehm-Weiser garbage collector used)
|
||||
--with-rt include MIT-RT testing environment (yes|builtin|no,
|
||||
default=YES)
|
||||
--with-profile include CMUCL's simple profiler (yes|builtin|no,
|
||||
default=YES if Boehm-Weiser garbage collector used)
|
||||
--with-fpe detect floating point exceptions (default=YES)
|
||||
--with-signed-zero={yes|no}
|
||||
allow for IEEE signed zeros (default=YES).
|
||||
|
|
@ -12257,6 +12261,14 @@ _ACEOF
|
|||
|
||||
fi
|
||||
|
||||
if test "${with_cmp}" = "builtin"; then
|
||||
|
||||
|
||||
LSP_FEATURES="(cons :builtin-cmp ${LSP_FEATURES})"
|
||||
|
||||
|
||||
with_cmp=yes
|
||||
fi
|
||||
if test "${with_cmp}" = "yes"; then
|
||||
|
||||
|
||||
|
|
@ -12266,6 +12278,19 @@ LSP_FEATURES="(cons :wants-cmp ${LSP_FEATURES})"
|
|||
fi
|
||||
|
||||
|
||||
if test "${with_clx}" = "builtin"; then
|
||||
|
||||
|
||||
LSP_FEATURES="(cons :builtin-clx ${LSP_FEATURES})"
|
||||
|
||||
|
||||
|
||||
|
||||
LSP_FEATURES="(cons :builtin-sockets ${LSP_FEATURES})"
|
||||
|
||||
|
||||
with_clx=yes
|
||||
fi
|
||||
if test ${with_clx} = "yes"; then
|
||||
tcp="yes"
|
||||
|
||||
|
|
@ -12293,6 +12318,14 @@ LSP_FEATURES="(cons :wants-sockets ${LSP_FEATURES})"
|
|||
LIBS="${LIBS} ${TCPLIBS}"
|
||||
fi
|
||||
|
||||
if test "${with_serve_event}" = "builtin"; then
|
||||
|
||||
|
||||
LSP_FEATURES="(cons :builtin-serve_event ${LSP_FEATURES})"
|
||||
|
||||
|
||||
with_serve_event=yes
|
||||
fi
|
||||
if test "${with_serve_event}" = "yes"; then
|
||||
case "${host_os}" in
|
||||
mingw*|cygwin*) ;;
|
||||
|
|
@ -12306,6 +12339,14 @@ LSP_FEATURES="(cons :wants-serve-event ${LSP_FEATURES})"
|
|||
esac
|
||||
fi
|
||||
|
||||
if test "${with_asdf}" = "builtin"; then
|
||||
|
||||
|
||||
LSP_FEATURES="(cons :builtin-asdf ${LSP_FEATURES})"
|
||||
|
||||
|
||||
with_asdf=yes
|
||||
fi
|
||||
if test "${with_asdf}" = "yes"; then
|
||||
|
||||
|
||||
|
|
@ -12314,6 +12355,14 @@ LSP_FEATURES="(cons :wants-asdf ${LSP_FEATURES})"
|
|||
|
||||
fi
|
||||
|
||||
if test "${with_defsystem}" = "builtin"; then
|
||||
|
||||
|
||||
LSP_FEATURES="(cons :builtin-defsystem ${LSP_FEATURES})"
|
||||
|
||||
|
||||
with_defsystem=yes
|
||||
fi
|
||||
if test "${with_defsystem}" = "yes"; then
|
||||
|
||||
|
||||
|
|
@ -12322,6 +12371,14 @@ LSP_FEATURES="(cons :wants-defsystem ${LSP_FEATURES})"
|
|||
|
||||
fi
|
||||
|
||||
if test "${with_profile}" = "builtin"; then
|
||||
|
||||
|
||||
LSP_FEATURES="(cons :builtin-profile ${LSP_FEATURES})"
|
||||
|
||||
|
||||
with_profile=yes
|
||||
fi
|
||||
if test "${with_profile}" = "yes"; then
|
||||
if test "${enable_boehm}" != "no"; then
|
||||
|
||||
|
|
@ -12332,6 +12389,14 @@ LSP_FEATURES="(cons :wants-profile ${LSP_FEATURES})"
|
|||
fi
|
||||
fi
|
||||
|
||||
if test "${with_rt}" = "builtin"; then
|
||||
|
||||
|
||||
LSP_FEATURES="(cons :builtin-rt ${LSP_FEATURES})"
|
||||
|
||||
|
||||
with_rt=yes
|
||||
fi
|
||||
if test "${with_rt}" = "yes"; then
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -119,22 +119,22 @@ AC_ARG_WITH(cxx,
|
|||
|
||||
AC_ARG_WITH(tcp,
|
||||
AS_HELP_STRING( [--with-tcp],
|
||||
[include socket interface (default=YES)]),
|
||||
[include socket interface (yes|builtin|no, default=YES)]),
|
||||
[], [with_tcp=yes])
|
||||
|
||||
AC_ARG_WITH(serve_event,
|
||||
AS_HELP_STRING( [--with-serve-event],
|
||||
[include serve-event module (default=YES)]),
|
||||
[include serve-event module (yes|builtin|no, default=YES)]),
|
||||
[], [with_serve_event=${enable_shared}])
|
||||
|
||||
AC_ARG_WITH(clx,
|
||||
AS_HELP_STRING( [--with-clx],
|
||||
[include CLX library (default=NO)]),
|
||||
[include CLX library (yes|builtin|no, default=NO)]),
|
||||
[], [with_clx=no])
|
||||
|
||||
AC_ARG_WITH(clos-streams,
|
||||
AS_HELP_STRING( [--with-clos-streams],
|
||||
[user defined stream objects (default=YES)]),
|
||||
[user defined stream objects (yes|builtin|no, default=YES)]),
|
||||
[], [with_clos_streams=yes])
|
||||
|
||||
AC_ARG_WITH(cmuformat,
|
||||
|
|
@ -145,13 +145,13 @@ AC_ARG_WITH(cmuformat,
|
|||
AC_ARG_WITH(asdf,
|
||||
AS_HELP_STRING( [--with-asdf],
|
||||
[include ASDF building facility]
|
||||
[(default=YES if shared library support is on)]),
|
||||
[(yes|builtin|no, default=YES)]),
|
||||
[], [with_asdf=${enable_shared}])
|
||||
|
||||
AC_ARG_WITH(defsystem,
|
||||
AS_HELP_STRING( [--with-defsystem],
|
||||
[include DEFSYSTEM building facility]
|
||||
[(default=YES if shared library support is on)]),
|
||||
[(yes|builtin|no, default=YES)]),
|
||||
[], [with_defsystem=${enable_shared}])
|
||||
|
||||
AC_ARG_WITH(cmp,
|
||||
|
|
@ -162,13 +162,13 @@ AC_ARG_WITH(cmp,
|
|||
AC_ARG_WITH(rt,
|
||||
AS_HELP_STRING( [--with-rt],
|
||||
[include MIT-RT testing environment]
|
||||
[(default=YES)]),
|
||||
[(yes|builtin|no, default=YES)]),
|
||||
[], [with_rt=${enable_shared}])
|
||||
|
||||
AC_ARG_WITH(profile,
|
||||
AS_HELP_STRING( [--with-profile],
|
||||
[include CMUCL's simple profiler]
|
||||
[(default=YES if Boehm-Weiser garbage collector used)]),
|
||||
[(yes|builtin|no, default=YES if Boehm-Weiser garbage collector used)]),
|
||||
[], [with_profile=yes])
|
||||
|
||||
AC_ARG_WITH(fpe,
|
||||
|
|
@ -587,11 +587,20 @@ if test "${with_clos_streams}" = "yes"; then
|
|||
[Allow STREAM operations to work on arbitrary objects])
|
||||
fi
|
||||
|
||||
if test "${with_cmp}" = "builtin"; then
|
||||
ECL_ADD_BUILTIN_MODULE([cmp])
|
||||
with_cmp=yes
|
||||
fi
|
||||
if test "${with_cmp}" = "yes"; then
|
||||
ECL_ADD_LISP_MODULE([cmp])
|
||||
fi
|
||||
|
||||
AC_SUBST(CLX_INFO)
|
||||
if test "${with_clx}" = "builtin"; then
|
||||
ECL_ADD_BUILTIN_MODULE([clx])
|
||||
ECL_ADD_BUILTIN_MODULE([sockets])
|
||||
with_clx=yes
|
||||
fi
|
||||
if test ${with_clx} = "yes"; then
|
||||
tcp="yes"
|
||||
ECL_ADD_LISP_MODULE([clx])
|
||||
|
|
@ -607,6 +616,10 @@ if test "${with_tcp}" = "yes"; then
|
|||
LIBS="${LIBS} ${TCPLIBS}"
|
||||
fi
|
||||
|
||||
if test "${with_serve_event}" = "builtin"; then
|
||||
ECL_ADD_BUILTIN_MODULE([serve_event])
|
||||
with_serve_event=yes
|
||||
fi
|
||||
if test "${with_serve_event}" = "yes"; then
|
||||
case "${host_os}" in
|
||||
mingw*|cygwin*) ;;
|
||||
|
|
@ -616,20 +629,36 @@ if test "${with_serve_event}" = "yes"; then
|
|||
esac
|
||||
fi
|
||||
|
||||
if test "${with_asdf}" = "builtin"; then
|
||||
ECL_ADD_BUILTIN_MODULE([asdf])
|
||||
with_asdf=yes
|
||||
fi
|
||||
if test "${with_asdf}" = "yes"; then
|
||||
ECL_ADD_LISP_MODULE([asdf])
|
||||
fi
|
||||
|
||||
if test "${with_defsystem}" = "builtin"; then
|
||||
ECL_ADD_BUILTIN_MODULE([defsystem])
|
||||
with_defsystem=yes
|
||||
fi
|
||||
if test "${with_defsystem}" = "yes"; then
|
||||
ECL_ADD_LISP_MODULE([defsystem])
|
||||
fi
|
||||
|
||||
if test "${with_profile}" = "builtin"; then
|
||||
ECL_ADD_BUILTIN_MODULE([profile])
|
||||
with_profile=yes
|
||||
fi
|
||||
if test "${with_profile}" = "yes"; then
|
||||
if test "${enable_boehm}" != "no"; then
|
||||
ECL_ADD_LISP_MODULE([profile])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "${with_rt}" = "builtin"; then
|
||||
ECL_ADD_BUILTIN_MODULE([rt])
|
||||
with_rt=yes
|
||||
fi
|
||||
if test "${with_rt}" = "yes"; then
|
||||
ECL_ADD_LISP_MODULE([rt])
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue