llvm / INSTALL.txt

Build and installation instructions
-----------------------------------

Please don't think of these as canonical build instructions yet, as
this work is rather early along.  Let me tell you what's working for
*me*, and hopefully this information will be enough to get you going.


Prerequisites
-------------

Firstly, you'll need to have LLVM.  I recommend installing LLVM
version 2.4 (from llvm.org) which is what it's been tested with.
Do A or B.

A) Install from a binary package.  Follow the LLVM instructions.
The binary package at llvm.org for Windows only contains executable
files and no libraries.  You can find a complete Windows binary package
at ???.

B) Install from source.
Build this and install it somewhere.  Follow the LLVM instructions,
or use this:

  cd llvm
  ./configure --prefix=$SOMEWHERE
  make
  make install

It's a good idea to have $SOMEWHERE/bin is in your path.


Building
--------
It's normal cabal package, but using a configure script as well to
configure LLVM.  Do A or B.

A) If you have cabal-install just do
  cabal install --configure-option --with-llvm-prefix=$SOMEWHERE

B) If you don't have cabal-install:

Configure the package.
  runhaskell Setup configure --configure-option --with-llvm-prefix=$SOMEWHERE

Build.
  runhaskell Setup build

Install.
  runhaskell Setup install


Building examples
-----------------

In the examples directory are a few example programs.  There's a GNU
Make Makefile in there, so running "make" in that directory will build
the examples, as will "make examples" in the top-level directory.
Doing "make run" will build and run the examples.

Note: On MacOS X you get a lot of "atom sorting error" warnings.  They
seem to be harmless.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.