~ubuntu-branches/ubuntu/wily/nproc/wily

« back to all changes in this revision

Viewing changes to OMakefile

  • Committer: Package Import Robot
  • Author(s): Stéphane Glondu
  • Date: 2015-02-12 13:48:41 UTC
  • Revision ID: package-import@ubuntu.com-20150212134841-wvb4611olyqqssk8
Tags: upstream-0.5.1
Import upstream version 0.5.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
USE_OCAMLFIND = true
 
2
BYTE_ENABLED = true
 
3
OCAMLDEP_MODULES_ENABLED = false
 
4
 
 
5
OCAMLPACKS = lwt.unix
 
6
OCAMLFLAGS = -annot -g
 
7
 
 
8
FILES = nproc
 
9
 
 
10
MLI = $(addsuffix .mli, $(FILES))
 
11
 
 
12
OCamlLibrary(nproc, $(FILES))
 
13
OCamlProgram(test_nproc, $(FILES) test_nproc)
 
14
 
 
15
.DEFAULT: META nproc.cma nproc.cmxa test_nproc.opt
 
16
 
 
17
META: META.in VERSION
 
18
        echo "version = \"$$(cat VERSION)\"" > META
 
19
        cat META.in >> META
 
20
 
 
21
.PHONY: test
 
22
test: test_nproc.opt
 
23
        ./test_nproc.opt
 
24
 
 
25
.PHONY: install uninstall
 
26
install:
 
27
        ocamlfind install nproc META nproc.mli nproc.cmi \
 
28
          nproc.cmo nproc.cma \
 
29
          nproc.cmx nproc.o nproc.cmxa nproc.a
 
30
uninstall:
 
31
        ocamlfind remove nproc
 
32
 
 
33
 
 
34
.PHONY: doc
 
35
doc: doc/index.html
 
36
doc/index.html: $(MLI)
 
37
        mkdir -p doc
 
38
        ocamlfind ocamldoc -d doc -html $(MLI) -package $(OCAMLPACKS)
 
39
 
 
40
.PHONY: install-doc
 
41
install-doc: doc
 
42
        cd ../mylifelabs.github.com && mkdir -p nproc
 
43
        cp doc/* ../mylifelabs.github.com/nproc
 
44
 
 
45
.PHONY: clean
 
46
clean:
 
47
        rm -f *.o *.a *.cm* *~ *.annot *.run *.opt test_nproc META doc/*