Commit 136fa173 authored by dcw's avatar dcw

not install instructions now

parent 0ac38050
...@@ -5,54 +5,48 @@ implement them. ...@@ -5,54 +5,48 @@ implement them.
Duncan C. White, Duncan C. White,
19th March 2002 19th March 2002
Building and Packaging on Linux An Example of Datadec in Action
------------------------------- -------------------------------
Either download To give you a feel for what datadec can do, you could write:
and install it (rpm -i) from there, or do a source build:
intlist = nil
1. Download the datadec-1.0.tgz file and save it in your RPM SOURCES directory. | cons( int first, intlist next )
2. Extract the package SPEC file:
illist = nil
tar xzf datadec-1.0.tgz datadec-1.0/PKG/RPM | cons( intlist first, illist next )
3. Enter the directory and build the package:
idtree = leaf( string id, illist l )
cd datadec-1.0/PKG/RPM | node( idtree left, idtree right )
rpm -bb datadec.spec ;
4. Now you can install the datadec-1.0-1.is386.rpm that you just built,
using rpm -i.. What does this mean?
The first rule declares that an intlist can take two basic "shapes" -
it is either empty, nil, or of the form cons(int,intlist).
Building on Solaris or Other Unices nil and cons() are called constructors, and define different
----------------------------------- "shapes" that objects of the type can take.
However, because the second argument of a cons() constructor is itself
1. Extract the .tgz file.. an intlist, this type is said to be recursively defined.
Functional programmers will recognise nil or cons() as the standard
2. Compile it: way of defining a list, so more intuitively, intlist is simply
a list of integers!
cd datadec-1.0
make Reading on, an illist is declared as a list of intlists,
and an idtree is declared as a binary tree where each leaf node
3. Install it (run this as root) into /usr/local/bin and /usr/man/man1: contains a (string, illist) pair.
make install Given this input, datadec can automatically construct an ANSI C
module which implements all the data types, a constructor function for
4. (Optionally on Solaris) package it up and store in somewhere: each constructor, deconstructor functions to help you to take objects
apart again and printing functions to help you with debugging.
cd PKG/Solaris
make Building and Packaging datadec
(edit Makefile, changing where to store the built package)
See the INSTALL file for building and packaging instructions.
make install
5. install the package (as root):
pkgadd -d datadec-1.0-1-sol8-sparc-dcw all
Testing Testing
------- -------
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment