This directory contains sources of spigot
extension module,
as an example of Gauche extension.
This extension isn’t built by default. You can build it after installing Gauche. See below.
The sources include:
package.scm
|
package metainformation |
configure
|
configure script |
Makefile.in
|
template makefile |
spigot.h
|
common declaration within the spigot module |
spigot.c
|
main logic |
spigotlib.stub
|
a "stub" file to generate Scheme-C glue |
spigot.scm
|
Scheme part of the module |
test.scm
|
unit test |
This is a typical construction of a simple extension. Note that
you can generate the skeletons of these files automatically,
by gauche-package
script:
% gauche-package generate spigot
It is a good way to start writing a fresh extension; but now we already have the sources, so let’s move on.
To build the extension, you have to generate Makefile
by
running the configure script.
% ./configure
The configure script automatically finds installed Gauche,
and picks the right options to compile and link.
Now, make
builds the extension, make check
runs
the test, and make install
installs the extension
in the Gauche’s standard location.
% make
% make check
% make install