[Icon home]

Building Version 9.5 of Icon from Source

Gregg M. Townsend
Department of Computer Science
The University of Arizona

www.cs.arizona.edu/icon/uguide/build.htm
Last updated November 8, 2009

Introduction

These instructions explain how to build and install the source code of Version 9.5 of Icon under Unix. For instructions on installing a binary release, see Installing Icon Binaries.

These instructions assume that you have unpacked the Icon distribution file into a directory. All commands are issued in that directory.

Configuring

The Icon source package contains configurations for a variety of Unix platforms. Type make Configure to see the list of known configurations. A status report for any system can be viewed by entering

make Status name=name
Choose the configuration name that matches your system's operating system, and be sure to note any special considerations given in its status report.

(If your system is not among those listed, you will need to port the code. This is usually a fairly simple matter that involves copying an existing configuration and editing it to match the target system. See Porting Icon.)

Most Unix systems include the X11 window system; type

make X-Configure name=name
to configure Icon with graphics. If your computer does not have the X window system, type
make Configure name=name
to configure Icon without graphics.

Installation using any of the supplied configurations should be routine, but some of those were contributed for systems we cannot test, and it is possible that some minor tweaking may be required. If so, or if you develop a new configuration, we'd like to hear about it by e-mail to icon-project@cs.arizona.edu.

Building

After Configuring, type make to build the Icon system. This single step builds:

There may be a few warnings on some platforms, but there should be no fatal errors. If there are problems, fix them in the config/platform directory and repeat the configuration step.

Testing

To verify a successful build, type make Test. This command compiles and executes a series of Icon programs, comparing their outputs with a set of standard results. A normal run concludes with the phrase "All tests passed."

A successful graphics build can be confirmed by executing bin/colrbook, the color book utility, with no arguments. It should display a spectrum of colors along the left and a set of recessed panes to the right. Click anywhere on the spectrum to fill colors in the panes. Click QUIT (in the upper left corner) to exit.

Installing

Icon can be run directly from the location in which it was built. To do this, simply add the bin directory to your shell's search path. See the man pages for icon and icont for instructions on building and running Icon programs.

If you wish to install the binaries elsewhere, choose a location for a directory dedicated to Icon — for example, /opt/icon or /usr/local/icon. If you are replacing an existing directory, delete the old one first. Enter

make Install dest=directory
to create directory and install Icon in its bin, lib, doc, and man subdirectories. All files are created using the default permissions (umask) of the current user.

You can make symbolic links from other locations to programs in the Icon bin directory. For example, you can link /usr/local/bin/icon to /opt/icon/bin/icon. If you do this, link all of icon, icont, iconx, and (if present) vib.

If you'd like to bundle up a gzipped tar file of the binaries created by the build process, enter make Package. Such a package can be used to install binaries on other systems of the same architecture.

Cleaning Up

Type make Clean to remove intermediate files created during the build process. This command preserves the contents of the bin and lib directories, so the built system remains functional.

To restore everything to its original state, type make Pure. This removes all the configuration information and newly built files.