[r6rs-discuss] reflecting on compilation

From: Aubrey Jaffer <agj>
Date: Wed, 20 Jun 2007 17:10:25 -0400 (EDT)

 | Date: Tue, 19 Jun 2007 15:59:31 -0700
 | From: Thomas Lord <lord at emf.net>
 |
 | What with all this crazy talk about portable solutions for
 | separately compilable library modules, how's about we
 | close the reflective loop on that a bit?
 |
 | In particular, though it would require a delicate touch
 | to handle parameter setting and file-system issues well,
 | how about a portable interface for compiling a source
 | form and storing the resulting binary?

SCM supports two generic ways of compiling: compiling to a dynamically
linkable object file; and compiling into a complete SCM executable.

2.1 Compiling And Linking
=========================

`(require 'compile)'

 -- Function: compile-file name1.scm name2.scm ...
     Compiles the HOBBIT translation of NAME1.scm, NAME2.scm, ... to a
     dynamically linkable object file NAME1<object-suffix>, where
     <object-suffix> is the object file suffix for your computer (for
     instance, `.so').

     If a file named `NAME1.opt' exists, then its options are passed to
     the `build' invocation which compiles the `c' files.

 -- Function: compile->executable exename name1.scm name2.scm ...
     Compiles and links the HOBBIT translation of NAME1.scm, NAME2.scm,
     ... to a SCM executable named EXENAME.

     If a file named `EXENAME.opt' exists, then its options are passed
     to the `build' invocation which compiles the `c' files.
Received on Wed Jun 20 2007 - 17:10:25 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC