Permalink
Browse files

Makefile: build ocaml+twt automatically

  • Loading branch information...
1 parent 11c6c2a commit 93c8ce94297d793e366766d3f8af82b1f47000dc @mlin committed Aug 24, 2012
Showing with 13 additions and 27 deletions.
  1. +10 −5 Makefile
  2. +3 −22 README
View
@@ -1,17 +1,21 @@
all: PhyloCSF
-.PHONY: PhyloCSF CamlPaml cde-package CDE clean
+.PHONY: PhyloCSF CamlPaml twt cde-package CDE clean
ARCH := $(shell uname).$(shell uname -m)
PHYLOCSF_BASE := $(shell pwd)
export PHYLOCSF_BASE
PhyloCSF: CamlPaml
- cd src; $(MAKE) clean; $(MAKE) $(MFLAGS)
+ cd src; $(MAKE) clean; PATH=$(PATH):$(CURDIR)/twt $(MAKE) $(MFLAGS)
cp src/_build/PhyloCSF.native PhyloCSF.$(ARCH)
-CamlPaml:
- cd lib/CamlPaml; $(MAKE) $(MFLAGS) reinstall
+CamlPaml: twt
+ cd lib/CamlPaml; PATH=$(PATH):$(CURDIR)/twt $(MAKE) $(MFLAGS) reinstall
+
+twt:
+ git submodule update --init
+ cd twt && $(MAKE)
cde-package: PhyloCSF CDE
rm -rf cde-package cde-package.$(ARCH)
@@ -30,4 +34,5 @@ clean:
cd src; $(MAKE) clean
rm -f PhyloCSF.*
rm -rf cde-package*
- cd CDE && $(MAKE) clean || true
+ cd twt && $(MAKE) clean || true
+ cd CDE && $(MAKE) clean || true
View
25 README
@@ -37,14 +37,14 @@ ocaml-findlib libocamlgsl-ocaml-dev libbatteries-ocaml-dev make
* Objective Caml 3.11+, with native code compiler
* OCaml findlib
* OCaml Batteries Included 1.20+
-* ocamlgsl 0.60+
+* ocamlgsl 0.60
* These can be set up using GODI: http://godi.camlcity.org/
[2] Configure OCaml findlib
If you installed findlib (OCaml's package manager) using the Ubuntu
-packages, or any other method that led to system-wide installation, you
+packages, or another method that led to system-wide installation, you
must set some environment variables to make it use a directory to which
you have write access. (Alternatively, you can complete the subsequent
steps as root, e.g. using sudo)
@@ -60,26 +60,7 @@ To verify your configuration, run
"Packages will be installed in" should be a directory you can write to,
and that same directory should appear in "Search path".
-[3] Install ocaml+twt
-
-The code is written in a dialect of OCaml for which you must install a
-preprocessor from: http://people.csail.mit.edu/mikelin/ocaml+twt/
-Download the tarball, extract it, and run
-
- make install INSTALLDIR=$HOME/directory/in/your/PATH
- -or-
- sudo make install
-
-If you obtained this PhyloCSF source distribution by cloning the git
-repository, ocaml+twt is available as a submodule. You can run
-
- git submodule init
- git submodule update
- cd twt
-
-and then one of the above 'make install' commands.
-
-[4] Compile PhyloCSF
+[3] Compile PhyloCSF
Now just run 'make' in this directory. This will build and install the
CamlPaml library, then compile the PhyloCSF executable and copy it to

0 comments on commit 93c8ce9

Please sign in to comment.