ports/textproc/ocaml-csv/files/patch-Makefile
Pav Lucistnik 2843d48c80 This library can read and write CSV files, including all extensions used by
Excel - eg. quotes, newlines, 8 bit characters in fields, "0 etc.

WWW: http://merjis.com/developers/csv

PR:		ports/118801
Submitted by:	Thomas V. Crimi <tcrimi@procida.us>
2007-12-18 14:13:20 +00:00

39 lines
1 KiB
Text

--- 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 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 $@ $^