When you install Gauche, you’ll get several auxiliary programs that help developing Gauche applications.
gauche-config
This program can be used to query various configuation parameters of installed Gauche.
gauche-package
Extension package manager. It can be used to install extension packages and query installed extensions’ parameters. You can also use this to start writing your own extensions.
gauche-install
An alternative install
program. Gauche extensions can use
this instead of system’s install
command, so that they don’t
need to worry about differences among platforms.
gauche-compile-r7rs
This program can be used to create an executable binary from Gauche scripts.
gauche-cesconv
Additionally, if you configure Gauche with --enable-shared-commands
,
the following programs are also installed.
scheme-r7rs
scheme-srfi-0
scheme-srfi-7
Those are the names of Scheme interpreter suggeted by SRFI-22.
They are symlinked to gosh
.
compile-r7rs
This is the name of Scheme compiler recommended by SRFI-138.
It is symlinked to gauche-compile-r7rs
.
Since these are common names in the Scheme world, keep in mind that other Scheme implementations may already have installed programs with the same name.
• Command to query configuration: | ||
• Command to manage extension packages: | ||
• Command to install files: | ||
• Comamnd to compile scripts: |
gauche-config
- Query configuration ¶Without options, prints the command usage. With an option, prints the string associated to the option, which is determined at configuration time.
Here are some examples. Note that output may vary on your platform.
$ gauche-config --arch x86_64-pc-linux-gnu
$ gauche-config -l -lgauche-0.98 -lmbedtls -lcrypt -lrt -lm -lpthread
$ gauche-config -I -I/usr/lib/gauche-0.98/0.9.15/include
The command accepts the following arguments. You can only give at most one.
General parameter:
The current Gauche version.
Parameters to compile applications using Gauche:
Include path options required to compile programs using Gauche (Note: This doesn’t work if Gauche installation directory path contains whitespaces. See –incdirs below.)
Library path options required to link programs using Gauche (Note: This doesn’t work if Gauche installation directory path contains whitespaces. See –archdirs below.)
Link library options required to link programs using Gauche.
The name of the C compiler used to compile this Gauche.
The command to run the C preprocessor.
The directory that contains Gauche-specific autoconf macros.
The command line used to configure the current installation.
The autoconf-style architecture signature (cpu-vendor-kernel-os).
The list of directory names to be looked for include files and libraries, respectively. Each directory name may be quoted if it contains whitespaces, and separated by ’:’ on Unix platforms, or by ’;’ on Windows platforms.
These are ’-I’ and ’-L’ flags for additional local headers/libraries to search, given by ’–with-local’ configure flags. Note that those are also included in ’-I’, ’-L’, ’–incdirs’, and ’–archdirs’.
Parameters to install files:
The directory prefix set by configure.
Directories where system|site|package header files of extensions go.
Directories where system|site|package scheme files go.
Directories where system|site|package DSO files go.
Directories where gauche manpage and info docs are installed.
Parameters to help building extensions:
The extension of the compiled objects (e.g. ’o’ or ’obj’).
The extension of the executable including a period (empty on Unix systems, ’.exe’ on Windows.
The extension for dynamically loadable (dlopen-able) modules (e.g. ’so’).
Additional CFLAGS to create dynamically loadable modules.
Additional LDFLAGS to create dynamically loadable modules.
Additional libraries required to create dynamically loadable modules.
The extension for dynamically linked libraries (as opposed to dlopen()ed) Usually the same as –so-suffix, but OSX wants ’dylib’.
LDFLAGS to create dynamically linked libraries.
Compiler flag(s) to embed RPATH
This is the CFLAGS used to compile Gauche, and to be used to compile extensions as well.
Compiler flag(s) passed to C preprocessor
List of library link flags (’-llib’) required to link Gauche statically. Similar to ’-l’, but this includes the libraries that are used for extension modules, and also the static library itself, that is -lgauche-static-X.X.
The base name of dynamically linked libgauche.
gauche-package
- Manage extension packages ¶This command can be used to build and install Gauche extensions,
query installed ones, and help start building new ones.
It has several subcommands, which can be listed with
gauche-package help
.
gauche-install
- Install files ¶This command can be used to install files. It is upper-compatible
to BSD install
command and can be used as drop-in replacement.
Notably, the first three command invocation format are compatible
with BSD install.
It has several more features that keeps Makefile
concise.
The first and second invocation format copies file(s) to dest
(a file pathname) or dir (an existing directory). You can
specify permissons, owners, etc. Basically it’s a fancier cp
.
The third format creates dir(s) if they don’t exist. Basically
it’s a fancier mkdir -p
.
The fourth format copies file … to dir. It differs from the second format in the sense that relative pathname of file is preserved. That is, if you run the following command:
gauche-install -T /usr/local/mytool foo.scm bar/baz.scm
It creates /usr/local/mytool/foo.scm and
/usr/local/mytool/bar/baz.scm. With the second format, the
subdirectory bar
won’t be created. This format is handy
when you want to install a bunch of subtrees.
The fifth format uninstall files which would be installed with -T
option. Simply change -T
option to -U
option and you’ll
clean the files.
The following command-line arguments are recognized.
If installed file has a suffix .sci, replace it for .scm. This is Gauche specific convention.
Installs files to the dir, creating paths if needed. Partial path of files are preserved. (4th format only)
Reverse the effect of -T
, e.g. removes files from its
destination dir.
Look for file … within dir; useful if VPATH
is used.
Adds #!path
before the file contents.
Useful to install scripts.
Creates directories. (3rd format only).
Change mode of the installed file.
Strip prefix dirs from file … before installation. (4th/5th format only).
Change owner of the installed file(s).
Change group of the installed file(s).
Work verbosely
Just prints what actions are to be done, but won’t execute them.
gauche-compile-r7rs
- Compile scripts ¶For Gauche-specific programs, we have tools/build-standalone
Scheme
script (see Building standalone executables). We recommend
that script, for it is more featureful.
The gauche-compile-r7rs
and compile-r7rs
script is provided
so that you can invoke a ’Scheme compiler’ with a standardized manner.
It may be handy if other tools (e.g. IDE) need to invoke a Scheme
compiler as a subprocess.
This interface is defined in SRFI-138, which also suggests the name
compile-r7rs
. We only install gauche-compile-r7rs
by
default so that we won’t accidentally clobber other implementation’s
program, but if you give --enable-shared-commands
option to
configure
script, a symbolic link compile-r7rs
is created.
Compile a Scheme source file script.scm
and produce an
executable binary. The compile-r7rs
is only installed
if Gauche is configured with --enable-shared-commands
.
Note: SRFI-138 states that if the environment variable
COMPILE_R7RS
is defined, it is assumed to a pathname of another
program and is executed instead of Gauche’s compile-r7rs
.
We think the feature is rather confusing than convenient, so we
don’t support it. If you want to run alternative implementation’s
compiler, there are more explicit means such as running it directly
or change PATH
.
The following command-line arguments are recognized.
Prepend or append path to the path list the referenced libraries are searched. These options can be specified multiple times.
Specifies output executable filename. When omitted, a.out
(on POSIX systems) or a.exe
(on Windows) are used.
Adds feature-id
to the list of feature identifiers.
This is to switch code conditionally in the source with
cond-expand
.
This option can be specified multiple times.
Note that this does not enable certain features. So you
shouldn’t specify system-reserved feature identifiers
(see Using platform-dependent features). This is also different
from -D
option of tools/build-standalone
.