mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
more modular build system, for thread-dependent or React-dependent modules
This commit is contained in:
parent
ebe6f63a2c
commit
b1d222c3f1
5 changed files with 24 additions and 9 deletions
1
.merlin
1
.merlin
|
|
@ -8,3 +8,4 @@ PKG oUnit
|
||||||
PKG bench
|
PKG bench
|
||||||
PKG threads
|
PKG threads
|
||||||
PKG threads.posix
|
PKG threads.posix
|
||||||
|
PKG react
|
||||||
|
|
|
||||||
29
Makefile
29
Makefile
|
|
@ -3,21 +3,32 @@ INTERFACE_FILES = $(shell find -name '*.mli')
|
||||||
IMPLEMENTATION_FILES = $(shell find -name '*.ml')
|
IMPLEMENTATION_FILES = $(shell find -name '*.ml')
|
||||||
|
|
||||||
TARGETS_LIB = containers.cmxa containers.cma
|
TARGETS_LIB = containers.cmxa containers.cma
|
||||||
TARGET_THREAD_LIB = thread_containers.cmxa thread_containers.cma
|
TARGETS_DOC = containers.docdir/index.html
|
||||||
TARGET_DOC = containers.docdir/index.html
|
|
||||||
EXAMPLES = examples/mem_size.native examples/collatz.native examples/crawl.native
|
EXAMPLES = examples/mem_size.native examples/collatz.native examples/crawl.native
|
||||||
|
|
||||||
OPTIONS = -use-ocamlfind
|
OPTIONS = -use-ocamlfind
|
||||||
|
|
||||||
all: lib lib_thread doc
|
ENABLE_THREAD ?= yes
|
||||||
|
ENABLE_REACT ?= yes
|
||||||
|
|
||||||
|
ifeq ($(ENABLE_THREAD), yes)
|
||||||
|
OPTIONS += -tag thread
|
||||||
|
TARGETS_LIB += thread_containers.cmxa thread_containers.cma
|
||||||
|
TARGETS_DOC += thread_containers.docdir/index.html
|
||||||
|
endif
|
||||||
|
ifeq ($(ENABLE_REACT), yes)
|
||||||
|
OPTIONS += -package react
|
||||||
|
TARGETS_LIB += react_containers.cmxa react_containers.cma
|
||||||
|
TARGETS_DOC += react_containers.docdir/index.html
|
||||||
|
endif
|
||||||
|
|
||||||
|
all: lib
|
||||||
|
|
||||||
lib:
|
lib:
|
||||||
ocamlbuild $(OPTIONS) $(TARGETS_LIB) $(TARGET_DOC)
|
ocamlbuild $(OPTIONS) $(TARGETS_LIB) $(TARGETS_DOC)
|
||||||
|
|
||||||
lib_thread:
|
|
||||||
ocamlbuild $(OPTIONS) $(TARGETS_LIB) $(TARGET_THREAD_LIB) $(TARGET_DOC)
|
|
||||||
|
|
||||||
doc:
|
doc:
|
||||||
ocamlbuild $(OPTIONS) $(TARGET_DOC)
|
ocamlbuild $(OPTIONS) $(TARGETS_DOC)
|
||||||
|
|
||||||
examples: all
|
examples: all
|
||||||
ocamlbuild $(OPTIONS) -I . $(EXAMPLES)
|
ocamlbuild $(OPTIONS) -I . $(EXAMPLES)
|
||||||
|
|
@ -34,5 +45,5 @@ clean:
|
||||||
tags:
|
tags:
|
||||||
otags *.ml *.mli
|
otags *.ml *.mli
|
||||||
|
|
||||||
.PHONY: all all_thread clean tests tags examples
|
.PHONY: all clean tests tags examples
|
||||||
|
|
||||||
|
|
|
||||||
1
react_containers.mllib
Normal file
1
react_containers.mllib
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Behavior
|
||||||
1
react_containers.odocl
Normal file
1
react_containers.odocl
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Behavior
|
||||||
1
thread_containers.odocl
Normal file
1
thread_containers.odocl
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Future
|
||||||
Loading…
Add table
Reference in a new issue