diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lisp/ChangeLog | 9 | ||||
-rw-r--r-- | src/lisp/Makefile.in | 37 | ||||
-rw-r--r-- | src/lisp/Makefile.pamphlet | 37 |
3 files changed, 71 insertions, 12 deletions
diff --git a/src/lisp/ChangeLog b/src/lisp/ChangeLog index 0e5ccf84..b67e87bd 100644 --- a/src/lisp/ChangeLog +++ b/src/lisp/ChangeLog @@ -1,5 +1,14 @@ 2007-08-17 Gabriel Dos Reis <gdr@cs.tamu.edu> + * Makefile.pamphlet (GCL_LTCC): New variable. + (GCL_LTLD): Likewise. + (COBJEXT): Likewise. + (CORE): Likewise. + ($(OUT)/lisp$(EXEEXT)): Tidy. + * Makefile.in: Regenerate. + +2007-08-17 Gabriel Dos Reis <gdr@cs.tamu.edu> + * Makefile.pamphlet ($(OUT)/lisp$(EXEEXT)): Create $(OUT) directory before installing lisp executable. * Makefile.in: Regenerate. diff --git a/src/lisp/Makefile.in b/src/lisp/Makefile.in index a190b452..9258c9ca 100644 --- a/src/lisp/Makefile.in +++ b/src/lisp/Makefile.in @@ -10,6 +10,24 @@ lisp_DEPENDENCIES = $(build_libdir)/cfuns-c.lo \ $(build_libdir)/sockio-c.lo \ $(build_libdir)/libspad.la + +## Ideally, we would like to use Libtool for producing, and linking with, +## object files from C codes. That means any C source code +## explicitly included in OpenAxiom, or produced internally by a Lisp +## compiler. However, the SYSTEM calls by GCL on Windows is very tricky +## to convince to properly resolve path names to executables. +## Consequently we temporarily give up here, e.g., we don't +## instruct GCL to use Libtool on Windows. +GCL_LTCC = $(if $(findstring mingw, $(target)),"","$(LIBTOOL) --mode=compile ") +GCL_LTLD = $(if $(findstring mingw, $(target)),"","$(LIBTOOL) --mode=link ") +COBJEXT = $(if $(findstring mingw, $(target)),$(OBJEXT),lo) + +## Again, ideally, we would like GCL to link with the compiled Lisp +## code from core.lisp. However, the general interface compiler::link +## that GCL provides for that task is unsupported on Windows platforms. +## So, we instruct GCL so load the source file instead. +CORE = $(if $(findstring mingw, $(target)),core.lisp,core.$(FASLEXT)) + .PHONY: all all-lisp all: all-ax all-lisp @@ -25,16 +43,23 @@ stamp: $(OUT)/lisp$(EXEEXT) ## as they must be present in the final interpreter ## and image. lisp_c_objects = \ - $(build_libdir)/bsdsignal.lo \ - $(build_libdir)/cfuns-c.lo \ - $(build_libdir)/sockio-c.lo + $(build_libdir)/bsdsignal.$(COBJEXT) \ + $(build_libdir)/cfuns-c.$(COBJEXT) \ + $(build_libdir)/sockio-c.$(COBJEXT) $(OUT)/lisp$(EXEEXT): base-lisp$(EXEEXT) ifeq (@axiom_lisp_flavor@,gcl) @axiom_gcl_rsym_hack@ - echo '(let ((compiler::*ld* "$(LINK) -o"))' \ - '(compiler::link (quote ("core.$(FASLEXT)")) "lisp$(EXEEXT)" ' \ - ' (format nil "(progn (let ((*load-path* (cons ~S *load-path*))'\ + echo '(let* ((sys-cc compiler::*cc*) ' \ + ' (sys-ld compiler::*ld*) ' \ + ' (compiler::*cc* (concatenate (quote string) ' \ + ' $(GCL_LTCC) ' \ + ' sys-cc)) ' \ + ' (compiler::*ld* (concatenate (quote string) ' \ + ' $(GCL_LTLD) ' \ + ' sys-ld))) ' \ + '(compiler::link (quote ("$(CORE)")) "lisp$(EXEEXT)" ' \ + ' (format nil "(progn (let ((*load-path* (cons ~S *load-path*))'\ ' (si::*load-types* ~S))' \ ' (compiler::emit-fn t))' \ ' (when (fboundp (quote si::sgc-on))' \ diff --git a/src/lisp/Makefile.pamphlet b/src/lisp/Makefile.pamphlet index 4d4e240d..a849a5f5 100644 --- a/src/lisp/Makefile.pamphlet +++ b/src/lisp/Makefile.pamphlet @@ -31,16 +31,23 @@ some specific C-routines. ## as they must be present in the final interpreter ## and image. lisp_c_objects = \ - $(build_libdir)/bsdsignal.lo \ - $(build_libdir)/cfuns-c.lo \ - $(build_libdir)/sockio-c.lo + $(build_libdir)/bsdsignal.$(COBJEXT) \ + $(build_libdir)/cfuns-c.$(COBJEXT) \ + $(build_libdir)/sockio-c.$(COBJEXT) $(OUT)/lisp$(EXEEXT): base-lisp$(EXEEXT) ifeq (@axiom_lisp_flavor@,gcl) @axiom_gcl_rsym_hack@ - echo '(let ((compiler::*ld* "$(LINK) -o"))' \ - '(compiler::link (quote ("core.$(FASLEXT)")) "lisp$(EXEEXT)" ' \ - ' (format nil "(progn (let ((*load-path* (cons ~S *load-path*))'\ + echo '(let* ((sys-cc compiler::*cc*) ' \ + ' (sys-ld compiler::*ld*) ' \ + ' (compiler::*cc* (concatenate (quote string) ' \ + ' $(GCL_LTCC) ' \ + ' sys-cc)) ' \ + ' (compiler::*ld* (concatenate (quote string) ' \ + ' $(GCL_LTLD) ' \ + ' sys-ld))) ' \ + '(compiler::link (quote ("$(CORE)")) "lisp$(EXEEXT)" ' \ + ' (format nil "(progn (let ((*load-path* (cons ~S *load-path*))'\ ' (si::*load-types* ~S))' \ ' (compiler::emit-fn t))' \ ' (when (fboundp (quote si::sgc-on))' \ @@ -86,6 +93,24 @@ lisp_DEPENDENCIES = $(build_libdir)/cfuns-c.lo \ $(build_libdir)/sockio-c.lo \ $(build_libdir)/libspad.la + +## Ideally, we would like to use Libtool for producing, and linking with, +## object files from C codes. That means any C source code +## explicitly included in OpenAxiom, or produced internally by a Lisp +## compiler. However, the SYSTEM calls by GCL on Windows is very tricky +## to convince to properly resolve path names to executables. +## Consequently we temporarily give up here, e.g., we don't +## instruct GCL to use Libtool on Windows. +GCL_LTCC = $(if $(findstring mingw, $(target)),"","$(LIBTOOL) --mode=compile ") +GCL_LTLD = $(if $(findstring mingw, $(target)),"","$(LIBTOOL) --mode=link ") +COBJEXT = $(if $(findstring mingw, $(target)),$(OBJEXT),lo) + +## Again, ideally, we would like GCL to link with the compiled Lisp +## code from core.lisp. However, the general interface compiler::link +## that GCL provides for that task is unsupported on Windows platforms. +## So, we instruct GCL so load the source file instead. +CORE = $(if $(findstring mingw, $(target)),core.lisp,core.$(FASLEXT)) + .PHONY: all all-lisp all: all-ax all-lisp |