1 | [[tags: egg]] |
---|
2 | |
---|
3 | == compile-file |
---|
4 | |
---|
5 | [[toc:]] |
---|
6 | |
---|
7 | {{compile-file}} provides a way to compile Scheme files |
---|
8 | programmatically. |
---|
9 | |
---|
10 | ==== compile-file |
---|
11 | |
---|
12 | <procedure>(compile-file FILENAME #!key options output-file load)</procedure> |
---|
13 | |
---|
14 | Compiles the Scheme source file {{FILENAME}} into a dynamically loadable |
---|
15 | library by invoking the {{csc}} compiler driver. If the library can be |
---|
16 | successfully created and {{load}} is not given or true, the file is |
---|
17 | loaded into the current Scheme process. {{options}} may be a list of |
---|
18 | strings which are passed as additional command line options to {{csc}}. |
---|
19 | If {{output-file}} is not given, then the compiled file is stored in a |
---|
20 | temporary location and will be deleted when the process exits |
---|
21 | successfully. When compilation and loading succeeds, the name of the |
---|
22 | compiled file is returned, otherwise {{#f}} is returned. |
---|
23 | |
---|
24 | Notes: |
---|
25 | |
---|
26 | * loading the same compiled file multiple times is only supported on |
---|
27 | Linux in the moment and should be considered unreliable. For this |
---|
28 | reason, a new temporary file is created for every invocation of |
---|
29 | {{compile-file}}, unless an explicit output file name is given. |
---|
30 | |
---|
31 | * this procedure is compatible to the {{scheme-compile-file}} command in |
---|
32 | {{emacs}}' {{scheme-mode}}. |
---|
33 | |
---|
34 | ==== compile-file-options |
---|
35 | |
---|
36 | <parameter>compile-file-options</parameter> |
---|
37 | |
---|
38 | A parameter that holds a list of default options that should be given to |
---|
39 | {{csc}} after invocation of the {{compile-file}} procedure. The initial |
---|
40 | default options are {{-O2 -d2}}. |
---|
41 | |
---|
42 | === Author |
---|
43 | |
---|
44 | The CHICKEN Team |
---|
45 | |
---|
46 | === License |
---|
47 | |
---|
48 | Copyright (c) 2017, The CHICKEN Team |
---|
49 | All rights reserved. |
---|
50 | |
---|
51 | Redistribution and use in source and binary forms, with or without |
---|
52 | modification, are permitted provided that the following conditions are |
---|
53 | met: |
---|
54 | |
---|
55 | Redistributions of source code must retain the above copyright |
---|
56 | notice, this list of conditions and the following disclaimer. |
---|
57 | |
---|
58 | Redistributions in binary form must reproduce the above copyright |
---|
59 | notice, this list of conditions and the following disclaimer in the |
---|
60 | documentation and/or other materials provided with the distribution. |
---|
61 | |
---|
62 | Neither the name of the author nor the names of its contributors may |
---|
63 | be used to endorse or promote products derived from this software |
---|
64 | without specific prior written permission. |
---|
65 | |
---|
66 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
---|
67 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
---|
68 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
---|
69 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
---|
70 | HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
---|
71 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
---|
72 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS |
---|
73 | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
---|
74 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |
---|
75 | TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE |
---|
76 | USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH |
---|
77 | DAMAGE. |
---|
78 | |
---|
79 | === Version History |
---|
80 | |
---|
81 | ; 1.0 : Taken from the utils unit and released as an egg for CHICKEN 5. |
---|