compile-file

  1. compile-file
    1. Usage
      1. compile-file
      2. compile-file-options
    2. Author
    3. License
    4. Version History

This egg provides a way to do on-the-fly compilation of source code and load it into the running process.

Usage

compile-file

[procedure] (compile-file FILENAME #!key options output-file load)

Compiles the Scheme source file FILENAME into a dynamically loadable library by invoking the csc compiler driver. If the library can be successfully created and load is not given or true, the file is loaded into the current Scheme process. options may be a list of strings which are passed as additional command line options to csc. If output-file is not given, then the compiled file is stored in a temporary location and will be deleted when the process exits successfully. When compilation and loading succeeds, the name of the compiled file is returned, otherwise #f is returned.

Notes:

compile-file-options

[parameter] compile-file-options

A parameter that holds a list of default options that should be given to csc after invocation of the compile-file procedure. The initial default options are -scrutinize -O2 -d2.

Author

The CHICKEN Team

License

 Copyright (c) 2018, The CHICKEN Team
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
 conditions are met:
 
   Redistributions of source code must retain the above copyright notice, this list of conditions and the following
     disclaimer.
   Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
     disclaimer in the documentation and/or other materials provided with the distribution.
   Neither the name of the author nor the names of its contributors may be used to endorse or promote
     products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
 AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGE.

Version History

1.0
Taken from the utils unit and released as an egg for CHICKEN 5.