--- Makefile.orig 2007-12-17 17:56:16.458954606 -0500 +++ Makefile 2007-12-17 17:54:34.177261751 -0500 @@ -5,11 +5,11 @@ # To enable support for Extlib, also uncomment 'open ExtList' at the top # of file csv.ml. -OCAMLCINCS := -#OCAMLCINCS := -package extlib +#OCAMLCINCS := +OCAMLCINCS := -package extlib OCAMLCFLAGS := -g -OCAMLCLIBS := -#OCAMLCLIBS := -linkpkg +#OCAMLCLIBS := +OCAMLCLIBS := -linkpkg OCAMLOPTINCS := $(OCAMLCINCS) OCAMLOPTFLAGS := @@ -23,6 +23,20 @@ all: csv.cma csv.cmxa example csvtool +## The install and META targets were borrowed from Richard W.M. Jones' RPM patch +install: all META + ocamlfind install -destdir ${DESTDIR}/@OCAML_SITE_PATH@ csv META *.mli $(wildcard *.a) csv.cmi $(wildcard csv.cmx) *.cma $(wildcard *.cmxa) +# install csvtool ${DESTDIR}${BINDIR} + +META: + rm -f $@ + echo 'version="${VERSION}"' >> $@ + echo 'description="CSV library"' >> $@ + echo 'archive(byte)="csv.cma"' >> $@ + echo 'archive(native)="csv.cmxa"' >> $@ + echo 'requires="extlib"' >> $@ + + csv.cma: $(OBJS) ocamlfind ocamlc $(OCAMLCINCS) $(OCAMLCFLAGS) -a -o $@ $^