INSTALLATION of Constructions V5.8

PREREQUISITES:

To install Constructions V5.8, you must have:
(a) Caml-light V0.5.
(b) the UNIX compatibility library, "contrib/libunix", compiled and
    installed.
(c) In addition, if you wish to build the X-windows interface version,
    you need to have Daniel de Rauglaudre's X windows toolkit compiled.

This file explains how to compile Constructions, assuming that the
X-windows toolkit has been built.  At the bottom of the file,
simplified instructions are given for compiling Constructions in the
absence of the toolkit.

INSTALLATION PROCEDURE:

(0.1) Assume that the pathname of the CAML-Light library directory
      (usually /usr/local/lib/caml-light) is $CAMLLIB.
(0.2) Assume that the pathname of the X-windows library is $LIBRT.
(0.3) Assume that the pathname of the Constructions source
      distribution is $COQTOP.
(0.4) Edit the file file $COQTOP/coql, replacing the line

COQTOP=/home/margaux/coq/CONSTR/V5.8 export COQTOP

with your own definition for $COQTOP.

(1) The X-windows toolkit creates a file, $LIBRT/rt/librt.zo.
    Link this file to "rt.zo", in the same directory.

$ rm $LIBRT/rt/rt.zo
$ ln $LIBRT/rt/librt.zo $LIBRT/rt/rt.zo

(2) Sym-Link the X-windows tooklit directory into the LIB
    Constructions subdirectory.

$ ln -s $LIBRT $COQTOP/LIB/

(3) You can now compile the Constructions system:

$ (cd LIB/libc; make CAMLLIB=$CAMLLIB)
$ (cd LIB/stream-pp; make CAMLLIB=$CAMLLIB)
$ (cd SRC; make CAMLLIB=$CAMLLIB)
$ mkdir RELEASED/`arch`
$ (cd SRC; make ARCH=`arch` install)

This last command will move the executables from the SRC directory to
the proper subdirectory of RELEASED, classed by architecture.  Hence,
you can have versions of Coq for several different architectures.  The
only thing one must do is assure that the C code in the directories
LIB/libc and LIB/librt is recompiled afresh for each architecture -
the caml-light object code is already portable.

(4) Try out "coql":

$ ./coql
....Welcome to Coq V5.8 - Fri Dec 18 20:30:06 MET 1992

Coq < 

A (/bin/sh) shellscript which should do all of this is:
----------------------------------------------------------------------
#!/bin/sh
COQTOP=/home/madiran/formel/murthy/V5.8 export COQTOP
LIBRT=/home/madiran/formel/murthy/zinc-rt/librt export LIBRT
CAMLLIB=/usr/local/lib/caml-light export CAMLLIB
ed coql <<!
/^COQTOP=/s,=.*  *ex,=$COQTOP ex,
w
q
!
rm -f $LIBRT/rt/rt.zo
ln $LIBRT/rt/librt.zo $LIBRT/rt/rt.zo
ln -s $LIBRT $COQTOP/LIB/
(cd LIB/libc; make CAMLLIB=$CAMLLIB)
(cd LIB/stream-pp; make CAMLLIB=$CAMLLIB)
(cd SRC; make CAMLLIB=$CAMLLIB)
mkdir RELEASED/`arch`
(cd SRC ; make install)

----------------------------------------------------------------------
Simplified non-X-interface build.
----------------------------------------------------------------------
#!/bin/sh
COQTOP=/home/madiran/formel/murthy/V5.8 export COQTOP
CAMLLIB=/usr/local/lib/caml-light export CAMLLIB
ed coql <<!
/^COQTOP=/s,=.*  *ex,=$COQTOP ex,
w
q
!
(cd LIB/libc; make CAMLLIB=$CAMLLIB)
(cd LIB/stream-pp; make CAMLLIB=$CAMLLIB)
(cd SRC; make version coq state.coq CAMLLIB=$CAMLLIB)
mkdir RELEASED/`arch`
(cd SRC ; make install)

----------------------------------------------------------------------
   Other utilities for working with Coq
----------------------------------------------------------------------
(1) You can use the makefile entry "make toplevel" ("make x-toplevel"
for an x-windows toplevel) to make a caml-light toplevel suitable for
using with the Constructions .zo files.

(2) The file "include.ml", ("include-x.ml" for the X interface
version) when "include"-ed into the caml-light toplevel, will load up
Constructions.  Thus:

--------------------------------
$ camllight camllight-getwd.out
>       Caml Light version 0.5

#include "include";;
<lots of stuff>
#go();;

Coq <
--------------------------------
$ camllight camllight-x-getwd.out
>       Caml Light version 0.5

#include "include-x";;
<lots of stuff>
#go();;

Coq <
