summaryrefslogtreecommitdiff
path: root/textproc/ocaml-csv/files/patch-Makefile
blob: 72502f216806ed5e1555b662d26de7dec97745dd (plain) (blame)
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
--- 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 $@ $^