summaryrefslogtreecommitdiffstats
path: root/src/ocaml-xml-light-1-fixes.patch
blob: f4ec62c17d42ba56b21742ad37fe88c43322ec73 (plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
This file is part of MXE. See LICENSE.md for licensing information.

Contains ad hoc patches for cross building.

From 8f7239bcdd0f1c3879d548ddfb34c8befa70c9fb Mon Sep 17 00:00:00 2001
From: MXE
Date: Fri, 11 May 2012 00:50:32 +0200
Subject: [PATCH 1/2] allows use of ocaml tools for cross-compilation


diff --git a/Makefile b/Makefile
index c978890..5c15ace 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,11 @@
 # Makefile generated by OCamake 
 # http://tech.motion-twin.com
 .SUFFIXES : .ml .mli .cmo .cmx .cmi .mll .mly
+OCAMLC=@target@-ocamlc
+OCAMLOPT=@target@-ocamlopt
 
-INSTALLDIR=`ocamlc -where`
+
+INSTALLDIR=@installdir@
 CFLAGS=
 LFLAGS= -a
 LIBS=
@@ -19,16 +22,16 @@ doc:
 	ocamldoc -sort -html -d doc xml.mli dtd.mli xmlParser.mli
 
 test.exe: xml-light.cma
-	ocamlc xml-light.cma test.ml -o test.exe
-	
+	$(OCAMLC) xml-light.cma test.ml -o test.exe
+
 test_opt.exe: xml-light.cmxa
-	ocamlopt xml-light.cmxa test.ml -o test_opt.exe
+	$(OCAMLOPT) xml-light.cmxa test.ml -o test_opt.exe
 
 xml-light.cma: xml_parser.cmo xml_lexer.cmo dtd.cmo xmlParser.cmo xml.cmo 
-	ocamlc -o xml-light.cma $(LFLAGS) $(LIBS) xml_parser.cmo xml_lexer.cmo dtd.cmo xmlParser.cmo xml.cmo
+	$(OCAMLC) -o xml-light.cma $(LFLAGS) $(LIBS) xml_parser.cmo xml_lexer.cmo dtd.cmo xmlParser.cmo xml.cmo
 
 xml-light.cmxa: xml_parser.cmx xml_lexer.cmx dtd.cmx xmlParser.cmx xml.cmx 
-	ocamlopt -o xml-light.cmxa $(LFLAGS) $(LIBS) xml_parser.cmx xml_lexer.cmx dtd.cmx xmlParser.cmx xml.cmx
+	$(OCAMLOPT) -o xml-light.cmxa $(LFLAGS) $(LIBS) xml_parser.cmx xml_lexer.cmx dtd.cmx xmlParser.cmx xml.cmx
 
 dtd.cmo: xml.cmi xml_lexer.cmi dtd.cmi
 
@@ -68,13 +71,13 @@ wclean:
 
 # SUFFIXES
 .ml.cmo:
-	ocamlc $(CFLAGS) -c $<
+	$(OCAMLC) $(CFLAGS) -c $<
 
 .ml.cmx:
-	ocamlopt $(CFLAGS) -c $<
+	$(OCAMLOPT) $(CFLAGS) -c $<
 
 .mli.cmi:
-	ocamlc $(CFLAGS) $<
+	$(OCAMLC) $(CFLAGS) $<
 
 .mll.ml:
 	ocamllex $<
-- 
1.7.9.5


From 4ec44e9cba7be6abfe9c121b753f8d6bd5b3ee8b Mon Sep 17 00:00:00 2001
From: MXE
Date: Sun, 30 Sep 2012 21:38:52 +0200
Subject: [PATCH 2/2] use prefixed ocamldoc


diff --git a/Makefile b/Makefile
index 5c15ace..0e60588 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@
 .SUFFIXES : .ml .mli .cmo .cmx .cmi .mll .mly
 OCAMLC=@target@-ocamlc
 OCAMLOPT=@target@-ocamlopt
+OCAMLDOC=@target@-ocamldoc
 
 
 INSTALLDIR=@installdir@
@@ -19,7 +20,7 @@ install: all opt
 
 doc:
 	mkdir doc
-	ocamldoc -sort -html -d doc xml.mli dtd.mli xmlParser.mli
+	$(OCAMLDOC) -sort -html -d doc xml.mli dtd.mli xmlParser.mli
 
 test.exe: xml-light.cma
 	$(OCAMLC) xml-light.cma test.ml -o test.exe
-- 
1.7.9.5