1
0
Fork 0
Go to file
retropikzel a5174e96b8 Bump version 2025-12-26 17:32:26 +02:00
doc Update manual 2025-12-16 06:32:52 +02:00
libs Clean up some code 2025-12-26 17:31:47 +02:00
r6rs-testfiles
r7rs-testfiles Most interpreters can now produce php file 2025-11-05 15:45:36 +02:00
.gitignore Small fixes 2025-11-29 12:48:11 +02:00
Dockerfile Adding release builds 2025-12-11 10:47:13 +02:00
Dockerfile.jenkins
Dockerfile.test Debug additions 2025-11-27 09:38:35 +02:00
INSTALL.md Working on windows version 2025-12-24 16:33:39 +02:00
Jenkinsfile Improving builds 2025-12-12 17:55:33 +02:00
LICENSE
Makefile Bump version 2025-12-26 17:32:26 +02:00
README.md Update readme 2025-12-25 11:14:24 +02:00
README_ADDITIONAL.md Update readme 2025-12-25 11:14:24 +02:00
bash_completion.sh Add --debug flag. Fix bash-completion. Small guile fixes 2025-11-26 18:09:19 +02:00
compile-scheme.bat Working on windows version 2025-12-24 11:31:47 +02:00
compile-scheme.scm Working on windows version 2025-12-24 13:34:11 +02:00
configure Backup 2025-12-23 17:30:45 +02:00
install.bat Working on windows version 2025-12-24 13:10:55 +02:00
installer.iss
old-README.md Making a manual page and renaming the program 2025-11-07 12:18:32 +02:00

README.md

Install

Linux

First install Gauche Scheme, on Debian/Ubuntu for example

apt-get install gauche

Then build and install compile-scheme

make
make install

Mac OS

First install Gauche Scheme, with brew for example

brew install gauche

Then build and install compile-scheme

make
make install

Windows

To install on windows first install Gauche Scheme. Then run install.bat as administrator.

Usage

Powershell

$env:COMPILE_SCHEME="gauche" ; compile-scheme -o main main.scm
.\main.bat

Manual

compile-scheme(1)           General Commands Manual          compile-scheme(1)

NAME
       compile-scheme - Compiling Scheme programs to executables

SYNOPSIS
       compile-scheme [-A path] [-I path] [-o path] input-file.sps

       compile-scheme [-A path] [-I path] [-o path] input-file.scm

       compile-scheme long-option

DESCRIPTION
       compile-scheme  is a tool to compile R6RS and R7RS Scheme programs.  It
       supports most of SRFI-138 but also adds more features.

       The program input-file is compiled into an executable  file.   The  re
       sulting executable file is written to file specified by the -o path (if
       present) or to the file named same as input-file but without  the  .scm
       or .sps suffix.  On Windows either .bat or .exe is appended to the out
       put name.

SUPPORTED IMPLEMENTATIONS
       Some implementations support both compiling and interpreting,  in  that
       case  only the compiler functionality is used and the implementation is
       marked as compiler.

   R6RS Compilers
       loko

   R6RS Interpreters
       chezscheme guile ikarus ironscheme mosh racket sagittarius ypsilon

   R7RS Compilers
       chicken cyclone loko

   R7RS Interpreters
       chibi foment gauche guile kawa larceny meevax  mit-scheme  mosh  racket
       sagittarius skint stklos tr7 ypsilon

OPTIONS
       -A path Append path to the list of directories that are searched in or
       der to locate imported libraries.

       -I path Prepend directory to the list of directories that are  searched
       in order to locate imported libraries.

       -o  output-file  Use  the  output-file file, instead of the default de
       ducted from input-file, for the executable file produced.

       Multiple instances of the -A, and -I options can be specified.

       --list-r6rs List supported R6RS implementations.

       --list-r7rs List supported R7RS implementations.

       --list-all List all supported implementations.

       --version Show the software version.  --debug Turn on debug output.

       --help Shows you command to read this manual page. :)

ENVIRONMENT
       COMPILE_R7RS

       COMPILE_SCHEME

              Either of these environment variables must be set.   Set  either
              to  the  name  of the implementation as specified in the support
              list.  This differs from SRFI-138 as the SRFI excepts a path.

       COMPILE_SCHEME_DEBUG

              Another way in addition to --debug to turn on debug output.

STANDARDS
       SRFI    138:    Compiling    Scheme    programs     to     executables.
       https://srfi.schemers.org/srfi-138/srfi-138.html

CAVEATS
       Differences from SRFI-138

              No support for -D flag.

              Not  all  implementations  support adding to beginning or end of
              load path so -I and -A might work the same

              Only supports one input-file.

EXAMPLES
       Compile R6RS file with all dependencies in the same directory.

              COMPILE_SCHEME=SCHEME compile-scheme main.sps

       Compile R7RS file with all dependencies in the same directory.

              COMPILE_SCHEME=SCHEME compile-scheme main.scm

       Compile R6RS file with dependencies in libs directory.

              COMPILE_SCHEME=SCHEME compile-scheme -I ./libs main.sps

       Compile R7RS file with dependencies in libs directory.

              COMPILE_SCHEME=SCHEME compile-scheme -I ./libs main.scm

       Compile R6RS file with dependencies in libs directory, to output  named
       foo.

              COMPILE_SCHEME=SCHEME compile-scheme -I ./libs -o foo main.sps

       Compile  R7RS file with dependencies in libs directory, to output named
       foo.

              COMPILE_SCHEME=SCHEME compile-scheme -I ./libs -o foo main.scm

       Makefile for interpreter

              PREFIX=/usr/local
              SCHEME=chibi

              build:
                   COMPILE_SCHEME=${SCHEME} compile-scheme -I ${PREFIX}/lib/myapp/librarydirectory -o myapp myapp.scm

              install:
                   mkdir -p ${PREFIX}/lib/myapp
                   cp -r librarydirectory ${PREFIX}/lib/myapp/
                   cp  myapp.scm ${PREFIX}/lib/myapp/myapp.scm
                   install myapp ${PREFIX}/bin/myapp

                                                             compile-scheme(1)