Revision: 434
Author: ygrekheretix
Date: Mon Nov 25 09:27:03 2013 UTC
Log: another attempt at mitigating linking conflicts (see issue 23)
http://code.google.com/p/ocaml-extlib/source/detail?r=434
Deleted:
/trunk/extlib/min
Modified:
/trunk/extlib/Makefile
/trunk/extlib/README.txt
=======================================
--- /trunk/extlib/Makefile Sun Nov 24 18:26:57 2013 UTC
+++ /trunk/extlib/Makefile Mon Nov 25 09:27:03 2013 UTC
@@ -3,11 +3,13 @@
VERSION = 1.6.0
# the list is topologically sorted
-MODULES = \
+MODULES := \
enum bitSet dynArray extArray extHashtbl extList extString global IO
option \
pMap std uChar uTF8 base64 unzip refList optParse dllist extLib
-MODULES_MIN = $(filter-out base64 unzip uChar uTF8, $(MODULES))
+ifdef minimal
+MODULES := $(filter-out unzip uChar uTF8, $(MODULES))
+endif
OCAMLC = ocamlc -g
OCAMLOPT = ocamlopt -g
@@ -17,32 +19,23 @@
CMO = $(MODULES:=.cmo)
CMX = $(MODULES:=.cmx)
-MLI_MIN = $(filter-out extLib.mli, $(MODULES_MIN:=.mli))
-CMI_MIN = $(MODULES_MIN:=.cmi)
-CMO_MIN = $(MODULES_MIN:=.cmo)
-CMX_MIN = $(MODULES_MIN:=.cmx)
-
.SUFFIXES:
.PHONY: build all opt cmxs doc install uninstall clean release
build: all opt cmxs
-all: extLib.cma extLib_min.cma
-opt: extLib.cmxa extLib_min.cmxa
-cmxs: extLib.cmxs extLib_min.cmxs
+all: extLib.cma
+opt: extLib.cmxa
+cmxs: extLib.cmxs
doc:
$(OCAMLC) -c $(MLI)
ocamldoc -sort -html -d doc/ $(MLI) extLib.ml
extLib.cma: $(CMO)
- $(OCAMLC) -a -o $@ $^
-extLib_min.cma: $(CMO_MIN)
$(OCAMLC) -a -o $@ $^
extLib.cmxa: $(CMX)
$(OCAMLOPT) -a -o $@ $^
-extLib_min.cmxa: $(CMX_MIN)
- $(OCAMLOPT) -a -o $@ $^
%.cmxs: %.cmxa
$(OCAMLOPT) -shared -linkall $< -o $@
%.cmo: %.mli %.ml
@@ -58,11 +51,9 @@
install:
ocamlfind install -patch-version $(VERSION) extlib META extLib.cma $(MLI)
$(CMI) -optional extLib.cmxa $(CMX) extLib.cmxs extLib.a extLib.lib
- ocamlfind install -patch-version $(VERSION) extlib_min min/META
extLib_min.cma $(MLI_MIN) $(CMI_MIN) -optional extLib_min.cmxa $(CMX_MIN)
extLib_min.cmxs extLib_min.a extLib_min.lib
uninstall:
ocamlfind remove extlib
- ocamlfind remove extlib_min
clean:
rm -f *.cmo *.cmx *.o *.obj *.cmi *.cma *.cmxa *.cmxs *.a *.lib
doc/*.html extHashtbl.ml
=======================================
--- /trunk/extlib/README.txt Sun Nov 24 18:26:57 2013 UTC
+++ /trunk/extlib/README.txt Mon Nov 25 09:27:03 2013 UTC
@@ -32,22 +32,22 @@
Unzip or untar in any directory and run
- make build install
+ make minimal=1 build install
This will build and install bytecode and native libraries.
On bytecode-only architecture run
- make all install
+ make minimal=1 all install
-Since release 1.6.0 extlib will install two packages : extlib and
extlib_min,
-the latter one excludes several modules (potentially) conflicting with
other
-well established OCaml libraries.
+`minimal=1` will exclude from build several modules (potentially)
conflicting
+with other well established OCaml libraries. If your code is using such
modules,
+omit this parameter, and consider dropping this dependency in future.
Alternatively, run
ocaml
install.ml
-and follow the instructions (this will install only extlib package).
+and follow the instructions.
Usage :
-------