-*- mode: Text -*-

--------------------------------------------------------------------

C-Reduce 

--------------------------------------------------------------------
Prereqs:

On Ubuntu, all non-standard prerequisites can be installed like this:

  sudo apt-get install libfile-which-perl libregexp-common-perl \
    indent astyle delta libexporter-lite-perl

On other systems, install these packages either manually or using the
package manager:

GNU Indent
  http://www.gnu.org/software/indent/

astyle: 
  http://astyle.sourceforge.net/

Berkeley delta:
  http://delta.tigris.org/

Perl modules
  Exporter::Lite
  File::Which
  Regexp::Common

For example, (perhaps as root):

  cpan -i 'Exporter::Lite'
  cpan -i 'File::Which'
  cpan -i 'Regexp::Common'

--------------------------------------------------------------------
Building and installing C-Reduce and the clang_delta plugin

0. If you do not want to build C-Reduce and clang_delta yourself,
check the C-Reduce website to see if a suitable clang_delta binary is
available for you.

  http://embed.cs.utah.edu/creduce/

The C-Reduce authors plan to provide precompiled distributions of
C-Reduce and/or clang_delta as demand warrants and time permits.


1. Download, build, and install the correct version of LLVM/Clang from
their repository:

  http://llvm.org/docs/GettingStarted.html#checkout
  http://clang.llvm.org/get_started.html

This release of C-Reduce is designed to work with *DEVELOPMENT*
versions of LLVM, Clang, and Compiler-RT: revision 158227.
(That is the "tip of the trunk" (ToT) revision as of this writing.)

Grab the correct versions of LLVM, Clang, and Compiler-RT by following
the instructions at <http://clang.llvm.org/get_started.html>, but
specify the revision number:

  ...
  svn co -r158227 http://llvm.org/svn/llvm-project/llvm/trunk llvm
  ...
  svn co -r158227 http://llvm.org/svn/llvm-project/cfe/trunk clang
  ...
  svn co -r158227 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt

Compile the LLVM tree as described at the URL mentioned above.


2. Build the C-Reduce software distribution:

  # cd to where you want to build the package, then:
  configure
  make
  make install

The `configure' script was generated by GNU Autoconf, and therefore
accepts the usual options for naming the installation directories,
choosing the compilers you want to use, and so on.  `configure --help'
summarizes the command-line options.

If LLVM/Clang is not in your search path, you can tell the `configure'
script where to find LLVM/Clang:

  # Use the LLVM/Clang tree rooted at /opt/llvm
  configure --with-llvm=/opt/llvm

Note that assertions are disabled by default.  To enable assertions:

  configure --enable-trans-assert

--------------------------------------------------------------------
