Go to the
first,
previous,
next,
last section,
table of contents.
A new module is created by copying an existing module and editing the files appropriately. A good module to use for this purpose is xetc, looking at xcore/doc/mymodule.h for ideas on how to create new xlisp primitives. Also XlispInternals has at the end a discussion of how to add new primitives.
In the following, let xmodule be the name of the module which is also the name of the subdirectory under slisp. I.e. for xetc, xmodule = xetc.
The following subdirectories and files must be present in every module. All files are given relative to slisp/xmodule.
-
c - C source code plus header files.
-
c/Makefile
Overall makefile for the module. Must contain the targets clean and xlisplibmore. xlisplibmore is a placeholder for additional commands that should be performed when xlisplib is reached, which is defined in Makefile.x at the top level. An example is the command in xgt to make the distribution makefile. XLISPLIBOBJS is a list of o files that are to be included in the module.
-
c/xmodule.h
The master include file for the module, a subset of mymodule.h, may be empty but must exist. The name must be xmodule.h (ie xetc.h).
-
check - Location of regression tests to make sure a module is installed correctly.
-
check/Makefile
Must exist and contain the targets test and clean.
-
info - location of info documentation files used to build the reference manual for an application.
-
info/xmodule.texi
Documentation in texi format. May be empty but must exist.
-
info/xmodule.menu
Info menu item for reference manual. May be empty but must exist.
-
lsp
Lisp files for the module. May be empty but must exist.
Other subdirectories may be present but do not need to be.
Go to the
first,
previous,
next,
last section,
table of contents.