Npt documentation.
Reference: ANSI Common Lisp npt
Next: 2. Compilation
Installation is done by compiling the source code with a C compiler. There are three ways to compile the source code: by script, by autoconf, and by hand. Another page shows how to compile manually. If the method on this page doesn’t work, please see that page, 2. Compilation.
First, download the source from github.
$ git clone https://github.com/nptcl/npt.git
$ cd npt
Compilation scripts for FreeBSD and Linux are available.
To compile on FreeBSD, execute the following steps
$ ./freebsd_release.sh
To compile on Linux, install gcc
and gmake
beforehand.
Execute the following steps
$ ./linux_release.sh
In both cases, the executable file npt
is created.
Compilation batch file for Windows are available. It has been tested to work with Visual Studio 2017.
In order to compile, the following commands must be available.
CL.EXE
LINK.EXE
NMAKE.EXE
Execute the following steps
> windows_release.bat
The executable file npt
is created. In some cases it may not work.
If this fails, check 2. Compilation and compile manually.
To compile with autoconf
, run bootstrap.sh
to generate file configure
.
$ ./bootstrap.sh
After the file is generated, run configure
.
$ ./configure
If you want to set the installation location, specify --prefix
.
$ ./configure --prefix=/usr/local
Run make
to compile.
$ make
$ make install
An executable file named npt
is created when make
is executed.
Execute make install
and the executable file npt
is copied to --prefix
.
If you have scripted compilation, copy the executable file npt
to the location of your choice and the installation is complete. For example
$ ./freebsd_release.sh
...
$ cp -i npt /usr/local/bin/.
In the case of configure
, make install
copies npt
to the location specified by --prefix
.
The installation copies only one file, the executable npt
.
If you want to uninstall, just delete the npt
file.
npt
exampleWhen npt
is launched, the prompt changes to *
.
$ npt
*
Enter a Lisp expression and you will get the answer.
* (+ 10 20 30)
60
*
To exit, press Ctrl+D or execute (exit)
.
* (exit)
$
To load a file, specify --load
or --script
as an argument.
$ cat > aaa.lisp
(format t "Hello~%")
^D
$ npt --script aaa.lisp
Hello
$ npt --load aaa.lisp
Hello
* (quit)
$
See --help
for details.
$ npt --help