126 lines
4.3 KiB
Groff
126 lines
4.3 KiB
Groff
.TH compile-scheme 1
|
|
.SH NAME
|
|
compile-scheme \- Compiling Scheme programs to executables
|
|
.SH SYNOPSIS
|
|
.P
|
|
\fBcompile-scheme\fR [\fB-A\fR \fIpath\fR] [\fB-I\fR \fIpath\fR] [\fB-o\fR \fIpath\fR] \fIinput-file.sps\fR
|
|
\#\fBcompile-scheme\fR [\fB-A\fR \fIpath\fR] [\fB-I\fR \fIpath\fR] [\fB-o\fR \fIpath\fR] [\fB-t\fR \fItarget\fR] \fIinput-file.sps\fR
|
|
.P
|
|
\fBcompile-scheme\fR [\fB-A\fR \fIpath\fR] [\fB-I\fR \fIpath\fR] [\fB-o\fR \fIpath\fR] \fIinput-file.scm\fR
|
|
\#\fBcompile-scheme\fR [\fB-A\fR \fIpath\fR] [\fB-I\fR \fIpath\fR] [\fB-o\fR \fIpath\fR] [\fB-t\fR \fItarget\fR] \fIinput-file.scm\fR
|
|
.P
|
|
\fBcompile-scheme\fR \fIlong-option\fR
|
|
.SH DESCRIPTION
|
|
.P
|
|
\fBcompile-scheme\fR is a tool to compile R6RS and R7RS Scheme programs.
|
|
It supports most of SRFI-138 but also adds more features.
|
|
.P
|
|
The program \fIinput-file\fR is compiled into an executable file.
|
|
The resulting executable file is written to file specified by the \fB-o\fR \fIpath\fR (if present) or to the file named same as \fIinput-file\fR but without the .scm or .sps suffix.
|
|
On Windows either .bat or .exe is appended to the output name.
|
|
.SH SUPPORTED IMPLEMENTATIONS
|
|
.P
|
|
Some implementations support both compiling and interpreting, in that
|
|
case only the compiler functionality is used and the implementation is marked
|
|
as compiler.
|
|
.SS "R6RS Compilers"
|
|
loko
|
|
.SS "R6RS Interpreters"
|
|
chezscheme guile ikarus ironscheme mosh racket sagittarius ypsilon
|
|
.SS "R7RS Compilers"
|
|
chicken cyclone loko
|
|
.SS "R7RS Interpreters"
|
|
chibi foment gauche guile kawa larceny meevax mit-scheme mosh racket sagittarius skint stklos tr7 ypsilon
|
|
.SH OPTIONS
|
|
.P
|
|
\fB\-A\fR \fIpath\fR
|
|
Append path to the list of directories that are searched in order to locate imported libraries.
|
|
.P
|
|
\fB\-I\fR \fIpath\fR
|
|
Prepend directory to the list of directories that are searched in order to locate imported libraries.
|
|
.P
|
|
\fB-o\fR \fIoutput-file\fR
|
|
Use the \fIoutput-file\fR file, instead of the default deducted from input-file, for the executable file produced.
|
|
.P
|
|
Multiple instances of the -A, and -I options can be specified.
|
|
\#.P
|
|
\#\fB\-t\fR { \fIunix\fR | \fIwindows\fR | \fIphp\fR }
|
|
\#\fB\-t\fR \fIunix\fR
|
|
\#Set the compilation target.
|
|
\#This is not needed if you are compiling for the target OS you are running.
|
|
\#Cross compilation is only supported in following cases:
|
|
\#.IP
|
|
\#From \fIunix\fR host to \fIwindows\fR target when chosen implementation is interpreter.
|
|
\#.IP
|
|
\#From \fIwindows\fR host to \fIunix\fR target when chosen implementation is interpreter.
|
|
\#.IP
|
|
\#From \fIunix\fR host to \fIphp\fR target when chosen implementation is interpreter.
|
|
\#.IP
|
|
\#From \fIwindows\fR host to \fIphp\fR target when chosen implementation is interpreter.
|
|
.P
|
|
.B \-\-list-r6rs
|
|
List supported R6RS implementations.
|
|
.P
|
|
.B \-\-list-r7rs
|
|
List supported R7RS implementations.
|
|
.P
|
|
.B \-\-list-all
|
|
List all supported implementations.
|
|
\#.P
|
|
\#\fB\-\-list-targets\fR
|
|
\#List all supported compilation targets.
|
|
.P
|
|
\fB\-\-version\fR
|
|
Show the software version.
|
|
.P
|
|
\fB\-\-help\fR
|
|
Shows you command to read this manual page. :)
|
|
.SH ENVIRONMENT
|
|
.P
|
|
\fBCOMPILE_R7RS\fR
|
|
.P
|
|
\fBCOMPILE_SCHEME\fR
|
|
.IP
|
|
|
|
Either of these environment variables \fBmust\fR be set.
|
|
Set either to the \fBname\fR of the implementation as specified in the support list.
|
|
\fBThis differs from SRFI-138\fR as the SRFI excepts a path.
|
|
.SH STANDARDS
|
|
.P
|
|
SRFI 138: Compiling Scheme programs to executables.
|
|
https://srfi.schemers.org/srfi-138/srfi-138.html
|
|
.SH CAVEATS
|
|
.P
|
|
Differences from SRFI-138
|
|
.IP
|
|
No support for -D flag.
|
|
.IP
|
|
Not all implementations support adding to beginning or end of load path so -I and -A might work the same
|
|
.IP
|
|
Only supports one input-file.
|
|
.SH EXAMPLES
|
|
.P
|
|
Compile R6RS file with all dependencies in the same directory.
|
|
.IP
|
|
COMPILE_SCHEME=<SCHEME> compile-scheme main.sps
|
|
.P
|
|
Compile R7RS file with all dependencies in the same directory.
|
|
.IP
|
|
COMPILE_SCHEME=<SCHEME> compile-scheme main.scm
|
|
.P
|
|
Compile R6RS file with dependencies in libs directory.
|
|
.IP
|
|
COMPILE_SCHEME=<SCHEME> compile-scheme -I ./libs main.sps
|
|
.P
|
|
Compile R7RS file with dependencies in libs directory.
|
|
.IP
|
|
COMPILE_SCHEME=<SCHEME> compile-scheme -I ./libs main.scm
|
|
.P
|
|
Compile R6RS file with dependencies in libs directory, to output named foo.
|
|
.IP
|
|
COMPILE_SCHEME=<SCHEME> compile-scheme -I ./libs -o foo main.sps
|
|
.P
|
|
Compile R7RS file with dependencies in libs directory, to output named foo.
|
|
.IP
|
|
COMPILE_SCHEME=<SCHEME> compile-scheme -I ./libs -o foo main.scm
|