File: OMakefile

package info (click to toggle)
nproc 0.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid, stretch
  • size: 196 kB
  • ctags: 108
  • sloc: ml: 1,656; makefile: 62
file content (47 lines) | stat: -rw-r--r-- 998 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
USE_OCAMLFIND = true
BYTE_ENABLED = true
OCAMLDEP_MODULES_ENABLED = false

OCAMLPACKS = lwt.unix
OCAMLFLAGS = -annot -g

FILES = nproc

MLI = $(addsuffix .mli, $(FILES))

OCamlLibrary(nproc, $(FILES))
OCamlProgram(test_nproc, $(FILES) test_nproc)

.DEFAULT: META nproc.cma nproc.cmxa test_nproc.opt

META: META.in VERSION
	echo "version = \"$$(cat VERSION)\"" > META
	cat META.in >> META

.PHONY: test
test: test_nproc.opt
	./test_nproc.opt

.PHONY: install uninstall
install:
	ocamlfind install nproc META nproc.mli nproc.cmi \
          nproc.cmo nproc.cma \
          nproc.cmx nproc.o nproc.cmxa nproc.a
uninstall:
	ocamlfind remove nproc


.PHONY: doc
doc: doc/index.html
doc/index.html: $(MLI)
	mkdir -p doc
	ocamlfind ocamldoc -d doc -html $(MLI) -package $(OCAMLPACKS)

.PHONY: install-doc
install-doc: doc
	cd ../mylifelabs.github.com && mkdir -p nproc
	cp doc/* ../mylifelabs.github.com/nproc

.PHONY: clean
clean:
        rm -f *.o *.a *.cm* *~ *.annot *.run *.opt test_nproc META doc/*