Skip to content

Commit

Permalink
use the faster Makefile that compiles setup.ml to native code
Browse files Browse the repository at this point in the history
  • Loading branch information
avsm committed Jan 7, 2012
1 parent 2176ca6 commit 82c753f
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
.PHONY: all clean install build
all: build doc
all: build test doc

setup.data:
ocaml setup.ml -configure
NAME=cohttpd

build: setup.data
ocaml setup.ml -build
export OCAMLRUNPARAM=b

doc: setup.data
ocaml setup.ml -doc
setup.bin: setup.ml
ocamlopt.opt -o $@ $< || ocamlopt -o $@ $< || ocamlc -o $@ $<
rm -f setup.cmx setup.cmi setup.o setup.cmo

install:
ocaml setup.ml -install
setup.data: setup.bin
./setup.bin -configure

reinstall:
ocamlfind remove cohttpserver || true
ocaml setup.ml -reinstall
build: setup.data setup.bin
./setup.bin -build

doc: setup.data setup.bin
./setup.bin -doc

install: setup.bin
./setup.bin -install

test: setup.bin build
./setup.bin -test

reinstall: setup.bin
ocamlfind remove $(NAME) || true
./setup.bin -reinstall

clean:
ocamlbuild -clean
rm -f setup.data setup.log
rm -f setup.data setup.log setup.bin

0 comments on commit 82c753f

Please sign in to comment.