[cduce] Import more upstream patches which might fix build on OCaml 4.02.

Richard W.M. Jones rjones at fedoraproject.org
Sat Aug 9 14:38:42 UTC 2014


commit fab61008318b95e3f27a4dc727c8acfa8588b05e
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Sat Aug 9 15:35:41 2014 +0100

    Import more upstream patches which might fix build on OCaml 4.02.

 ...default-inlining-from-10000-to-100-OCaml-.patch |    2 +-
 ...-on-a-load-directive-at-the-top-of-parser.patch |    2 +-
 0003-Fix-the-compilation-of-ocaml-bindings.patch   |    6 +-
 ...l-version-used-for-the-ocaml-bridge-in-th.patch |    2 +-
 ...sible-compile-the-ocaml-cduce-interface-a.patch |    2 +-
 ...hat-the-g-flag-is-correctly-propagated-to.patch |   56 +++
 ...-compiler-from-statically-allocating-an-p.patch |   30 ++
 ...er-an-assertion-failure-when-loading-the-.patch |   26 +
 ...arallel-build-of-the-project-make-j-works.patch |  504 ++++++++++++++++++++
 0010-Edit-CHANGES-and-VERSION-files.patch          |  153 ++++++
 ...caml-4.02-trunk-changes-in-parser-locatio.patch |   23 +
 cduce.spec                                         |   39 +-
 12 files changed, 826 insertions(+), 19 deletions(-)
---
diff --git a/0001-Change-the-default-inlining-from-10000-to-100-OCaml-.patch b/0001-Change-the-default-inlining-from-10000-to-100-OCaml-.patch
index 594036b..a4f9e93 100644
--- a/0001-Change-the-default-inlining-from-10000-to-100-OCaml-.patch
+++ b/0001-Change-the-default-inlining-from-10000-to-100-OCaml-.patch
@@ -1,7 +1,7 @@
 From c45bc2d7200c13ac5c53c788912f52574fa52e41 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Kim=20Nguy=E1=BB=85n?= <kn at lri.fr>
 Date: Sat, 2 Aug 2014 15:01:53 +0200
-Subject: [PATCH 1/5] Change the default inlining from 10000 to 100 (OCaml
+Subject: [PATCH 01/11] Change the default inlining from 10000 to 100 (OCaml
  4.02.0 generates too large binaries with -inline 10000).
 
 ---
diff --git a/0002-Do-not-rely-on-a-load-directive-at-the-top-of-parser.patch b/0002-Do-not-rely-on-a-load-directive-at-the-top-of-parser.patch
index 718795c..53c848c 100644
--- a/0002-Do-not-rely-on-a-load-directive-at-the-top-of-parser.patch
+++ b/0002-Do-not-rely-on-a-load-directive-at-the-top-of-parser.patch
@@ -1,7 +1,7 @@
 From cd2d3363bad49884e384f7a01753c19de7af89a8 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Kim=20Nguy=E1=BB=85n?= <kn at lri.fr>
 Date: Sat, 2 Aug 2014 15:13:24 +0200
-Subject: [PATCH 2/5] Do not rely on a #load directive at the top of
+Subject: [PATCH 02/11] Do not rely on a #load directive at the top of
  parser/parser.ml to load a camlp4 extension.
 
 ---
diff --git a/0003-Fix-the-compilation-of-ocaml-bindings.patch b/0003-Fix-the-compilation-of-ocaml-bindings.patch
index b398654..019cd7b 100644
--- a/0003-Fix-the-compilation-of-ocaml-bindings.patch
+++ b/0003-Fix-the-compilation-of-ocaml-bindings.patch
@@ -1,9 +1,9 @@
 From 6ab40218b625f6b337f553af1be8e7ae3cb4b397 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Kim=20Nguy=E1=BB=85n?= <kn at lri.fr>
 Date: Sat, 2 Aug 2014 17:39:12 +0200
-Subject: [PATCH 3/5] Fix the compilation of ocaml bindings: - add clflags.mli
- to the list of files imported from the ocaml source tree - remove another use
- of #load for syntax extension loading.
+Subject: [PATCH 03/11] Fix the compilation of ocaml bindings: - add
+ clflags.mli to the list of files imported from the ocaml source tree - remove
+ another use of #load for syntax extension loading.
 
 ---
  Makefile.distrib     | 2 ++
diff --git a/0004-Detect-OCaml-version-used-for-the-ocaml-bridge-in-th.patch b/0004-Detect-OCaml-version-used-for-the-ocaml-bridge-in-th.patch
index 6c1a0ab..631dc2d 100644
--- a/0004-Detect-OCaml-version-used-for-the-ocaml-bridge-in-th.patch
+++ b/0004-Detect-OCaml-version-used-for-the-ocaml-bridge-in-th.patch
@@ -1,7 +1,7 @@
 From 07fef81c576b3c94d13acd1880538b8140767a19 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Kim=20Nguy=E1=BB=85n?= <kn at lri.fr>
 Date: Sat, 2 Aug 2014 23:02:56 +0200
-Subject: [PATCH 4/5] Detect OCaml version used for the ocaml bridge in the
+Subject: [PATCH 04/11] Detect OCaml version used for the ocaml bridge in the
  configure script.
 
 ---
diff --git a/0005-Make-it-possible-compile-the-ocaml-cduce-interface-a.patch b/0005-Make-it-possible-compile-the-ocaml-cduce-interface-a.patch
index 17f32a2..81139b5 100644
--- a/0005-Make-it-possible-compile-the-ocaml-cduce-interface-a.patch
+++ b/0005-Make-it-possible-compile-the-ocaml-cduce-interface-a.patch
@@ -1,7 +1,7 @@
 From 059c0c26e0643e0bab7d590e94f4665566918655 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Kim=20Nguy=E1=BB=85n?= <kn at lri.fr>
 Date: Sun, 3 Aug 2014 01:05:05 +0200
-Subject: [PATCH 5/5] Make it possible compile the ocaml/cduce interface
+Subject: [PATCH 05/11] Make it possible compile the ocaml/cduce interface
  against OCaml 3.1[12]/4.0[01]/4.02.
 
 ---
diff --git a/0006-Make-sure-that-the-g-flag-is-correctly-propagated-to.patch b/0006-Make-sure-that-the-g-flag-is-correctly-propagated-to.patch
new file mode 100644
index 0000000..622212b
--- /dev/null
+++ b/0006-Make-sure-that-the-g-flag-is-correctly-propagated-to.patch
@@ -0,0 +1,56 @@
+From 7e432724a32db8fa71e4d0ba17c56f2d7375b475 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Kim=20Nguy=E1=BB=85n?= <kn at lri.fr>
+Date: Thu, 7 Aug 2014 14:09:20 +0200
+Subject: [PATCH 06/11] Make sure that the -g flag is correctly propagated to
+ the auxiliary Makefile when compiling the ocaml/cduce interface
+
+---
+ Makefile.distrib         | 4 ++--
+ ocamliface/4.02/Makefile | 9 +++++----
+ 2 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile.distrib b/Makefile.distrib
+index 6378aac..cb0097d 100644
+--- a/Makefile.distrib
++++ b/Makefile.distrib
+@@ -374,11 +374,11 @@ install_doc: doc
+ 
+ $(OCAMLIFACE)/caml_cduce.cmo:
+ 	@cd $(OCAMLIFACE); \
+-	$(MAKE) caml_cduce.cmo
++	$(MAKE) CAMLC="$(CAMLC_P)" CAMLOPT="$(CAMLOPT_P)" caml_cduce.cmo
+ 
+ $(OCAMLIFACE)/caml_cduce.cmx:
+ 	@cd $(OCAMLIFACE); \
+-	$(MAKE) caml_cduce.cmx
++	$(MAKE) CAMLC="$(CAMLC_P)" CAMLOPT="$(CAMLOPT_P)" caml_cduce.cmx
+ 
+ $(OCAMLIFACE)/mlstub.cmo: SYNTAX += q_MLast.cmo
+ $(OCAMLIFACE)/mlstub.cmx: SYNTAX += q_MLast.cmo
+diff --git a/ocamliface/4.02/Makefile b/ocamliface/4.02/Makefile
+index c16c975..0433888 100644
+--- a/ocamliface/4.02/Makefile
++++ b/ocamliface/4.02/Makefile
+@@ -29,14 +29,15 @@ ocaml_files:
+ caml_cduce.cmo: ocaml_files
+ 	@echo "Build $@"
+ 	(cd ocaml_files; \
+-	ocamlc $(FORPACKOPT1) -c $(COMPILE_FILES);\
+-	ocamlc $(FORPACKOPT2) -pack -o $@ $(OBJECTS); \
++	$(CAMLC) $(FORPACKOPT1) -c $(COMPILE_FILES);\
++	$(CAMLC) $(FORPACKOPT2) -pack -o $@ $(OBJECTS); \
+ 	cp caml_cduce.cmo caml_cduce.cmi ..)
+ 
+ caml_cduce.cmx: ocaml_files
+ 	@echo "Build $@"
+-	(cd ocaml_files; ocamlopt $(FORPACKOPT1) -c $(COMPILE_FILES);\
+-	ocamlopt $(FORPACKOPT2) -pack -o $@ $(XOBJECTS); \
++	(cd ocaml_files; \
++	$(CAMLOPT) $(FORPACKOPT1) -c $(COMPILE_FILES);\
++	$(CAMLOPT) $(FORPACKOPT2) -pack -o $@ $(XOBJECTS); \
+ 	cp caml_cduce.cmx caml_cduce.o caml_cduce.cmi ..)
+ 
+ clean:
+-- 
+1.9.3
+
diff --git a/0007-Prevent-the-compiler-from-statically-allocating-an-p.patch b/0007-Prevent-the-compiler-from-statically-allocating-an-p.patch
new file mode 100644
index 0000000..878957f
--- /dev/null
+++ b/0007-Prevent-the-compiler-from-statically-allocating-an-p.patch
@@ -0,0 +1,30 @@
+From a3e0c4fff05c9a3a15fbbc2dbfadd9610ea257dc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Kim=20Nguy=E1=BB=85n?= <kn at lri.fr>
+Date: Thu, 7 Aug 2014 14:10:27 +0200
+Subject: [PATCH 07/11] Prevent the compiler from statically allocating an
+ persistent variant (that is mutated by the OCaml runtime)
+
+---
+ runtime/value.ml | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/runtime/value.ml b/runtime/value.ml
+index 368b095..cac0600 100644
+--- a/runtime/value.ml
++++ b/runtime/value.ml
+@@ -169,7 +169,11 @@ let rec flatten = function
+   | q -> q
+ 
+ let eval_lazy_concat v =
+-  let accu = Obj.magic (Pair (nil,Absent)) in
++  let accu =
++  (* prevent the ocamlopt from statically allocating the
++     value Pair(nil, Absent) *)
++  Obj.(magic (dup (repr (Pair (nil, Absent)))))
++  in
+   let rec aux accu = function
+     | Concat (x,y) -> aux (append_cdr accu x) y
+     | v -> set_cdr accu v
+-- 
+1.9.3
+
diff --git a/0008-Don-t-trigger-an-assertion-failure-when-loading-the-.patch b/0008-Don-t-trigger-an-assertion-failure-when-loading-the-.patch
new file mode 100644
index 0000000..d203f49
--- /dev/null
+++ b/0008-Don-t-trigger-an-assertion-failure-when-loading-the-.patch
@@ -0,0 +1,26 @@
+From 00f233d927d3e5a588ce97bf331693c1d273f00d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Kim=20Nguy=E1=BB=85n?= <kn at lri.fr>
+Date: Thu, 7 Aug 2014 14:11:09 +0200
+Subject: [PATCH 08/11] Don't trigger an assertion failure when loading the
+ shim location module.
+
+---
+ ocamliface/4.02/location.ml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ocamliface/4.02/location.ml b/ocamliface/4.02/location.ml
+index ab0c210..21c8061 100644
+--- a/ocamliface/4.02/location.ml
++++ b/ocamliface/4.02/location.ml
+@@ -40,7 +40,7 @@ let show_filename = dummy
+ let absname = ref true
+ let report_exception = dummy
+ let report_error = dummy
+-let register_error_of_exn = dummy
++let register_error_of_exn _ = ()
+ let error_of_exn = dummy
+ let error_of_printer_file = dummy
+ let error_of_printer = dummy
+-- 
+1.9.3
+
diff --git a/0009-Re-enable-parallel-build-of-the-project-make-j-works.patch b/0009-Re-enable-parallel-build-of-the-project-make-j-works.patch
new file mode 100644
index 0000000..6126405
--- /dev/null
+++ b/0009-Re-enable-parallel-build-of-the-project-make-j-works.patch
@@ -0,0 +1,504 @@
+From c46610d6325d78895cc641b428d793f2b2789de4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Kim=20Nguy=E1=BB=85n?= <kn at lri.fr>
+Date: Sat, 9 Aug 2014 14:53:55 +0200
+Subject: [PATCH 09/11] (Re)-enable parallel build of the project (make -j
+ works as exptected)
+
+---
+ Makefile.distrib           | 55 +++++++++++++++++++++++++++++-----------------
+ depend                     | 54 ++++++++++++++++++++++++++-------------------
+ ocamliface/3.x/Makefile    | 38 ++++++++++++++++++--------------
+ ocamliface/3.x/config.ml   |  4 ----
+ ocamliface/3.x/config.mlp  |  4 ++++
+ ocamliface/4.01/Makefile   | 38 ++++++++++++++++++--------------
+ ocamliface/4.01/config.ml  |  4 ----
+ ocamliface/4.01/config.mlp |  4 ++++
+ ocamliface/4.02/Makefile   | 32 +++++++++++++++------------
+ ocamliface/4.02/config.ml  |  4 ----
+ ocamliface/4.02/config.mlp |  4 ++++
+ 11 files changed, 138 insertions(+), 103 deletions(-)
+ delete mode 100644 ocamliface/3.x/config.ml
+ create mode 100644 ocamliface/3.x/config.mlp
+ delete mode 100644 ocamliface/4.01/config.ml
+ create mode 100644 ocamliface/4.01/config.mlp
+ delete mode 100644 ocamliface/4.02/config.ml
+ create mode 100644 ocamliface/4.02/config.mlp
+
+diff --git a/Makefile.distrib b/Makefile.distrib
+index cb0097d..b04867a 100644
+--- a/Makefile.distrib
++++ b/Makefile.distrib
+@@ -3,7 +3,11 @@ default: cduce
+ include Makefile.conf
+ include VERSION
+ 
+-OCAMLIFACE=ocamliface/$(ML_INTERFACE_VERSION)
++ifneq ($(ML_INTERFACE), false)
++	OCAMLIFACE=ocamliface/$(ML_INTERFACE_VERSION)
++else
++	OCAMLIFACE=
++endif
+ 
+ ALL_TARGET=cduce cduce_lib.cma
+ INSTALL_BINARIES=cduce$(EXE)
+@@ -15,7 +19,7 @@ endif
+ OUNIT_TESTS=eval cdnum cdsdl misc
+ 
+ ifeq ($(NATIVE),true)
+-all: cduce_lib.cmxa
++ALL_TARGET += cduce_lib.cmxa
+ endif
+ 
+ PACKAGES = dynlink camlp4 ulex pcre num netstring
+@@ -139,8 +143,10 @@ help:
+ # Source directories
+ 
+ DIRS_DEPEND = misc parser schema typing types compile runtime driver query win32
++CLEAN_DIRS := $(DIRS_DEPEND) tools tests
+ DIRS := $(DIRS_DEPEND) $(OCAMLIFACE)
+-CLEAN_DIRS = $(DIRS) tools tests
++
++
+ 
+ # Objects to build
+ 
+@@ -189,6 +195,7 @@ ifneq ($(CURL), false)
+   OBJECTS += parser/cduce_curl.cmo
+   PACKAGES += curl
+ endif
++
+ ifneq ($(NETCLIENT), false)
+   OBJECTS += parser/cduce_netclient.cmo
+   PACKAGES += netclient
+@@ -230,6 +237,7 @@ ML_INTERFACE_BASE_SRC = $(ML_INTERFACE_BASE_OBJS:.cmo=.ml) $(ML_INTERFACE_BASE_O
+ ML_INTERFACE_OBJS = \
+    $(ML_INTERFACE_BASE_OBJS:%=$(OCAMLIFACE)/%)
+ 
++
+ OBJECTS_NO_MLIFACE := $(OBJECTS)
+ 
+ ifneq ($(ML_INTERFACE), false)
+@@ -287,16 +295,19 @@ compute_depend: $(DEPEND_OCAMLDEP)
+ 	ocamlfind ocamldep -package "$(PACKAGES)" \
+ 		$(INCLUDES_DEPEND) $(SYNTAX_PARSER) -ppopt pa_extend.cmo -ppopt q_MLast.cmo $(DEPEND) > depend
+ 	for i in $(ALL_ML_IFACE); do \
++	touch ocamliface/$$i/caml_cduce.ml; \
+ 	ocamlfind ocamldep -package "$(PACKAGES)" \
+ 	     $(INCLUDES_DEPEND) -I ocamliface/$$i $(SYNTAX_PARSER) -ppopt pa_extend.cmo -ppopt q_MLast.cmo \
+ 	     $(ML_INTERFACE_BASE_SRC:%=ocamliface/$$i/%) >> depend;\
++        rm -f ocamliface/$$i/caml_cduce.ml; \
+         done
+ 
+ clean:
+ 	for i in $(CLEAN_DIRS); do \
+ 	(cd $$i; rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa *~); \
+ 	done
+-	(cd $(OCAMLIFACE); $(MAKE) clean)
++	rm -f misc/q_symbol.cmo.stamp
++	test -n "$(OCAMLIFACE)" && (cd $(OCAMLIFACE); $(MAKE) clean) || true
+ 	rm -f `find . -name "*~"`
+ 	rm -f *.cmi *.cmo *.cma *.cmx *.a *.cmxa *.o *~ META
+ 	rm -f cduce$(EXE) ocamlprof.dump
+@@ -316,32 +327,36 @@ clean:
+ distclean: clean
+ 	rm -f Makefile.conf
+ 
+-$(OCAMLIFACE)/mltypes.$(EXTENSION): $(OCAMLIFACE)/caml_cduce.$(EXTENSION)
+-
+-$(ALL_OBJECTS:.cmo=.$(EXTENSION)): misc/q_symbol.cmo
+-$(ALL_INTERFACES): misc/q_symbol.cmo
+-
+ .SUFFIXES: .ml .mli .cmo .cmi .cmx
+ 
+-misc/q_symbol.cmo: misc/q_symbol.ml
++$(OCAMLIFACE)/mltypes.$(EXTENSION): $(OCAMLIFACE)/caml_cduce.$(EXTENSION)
++
++$(ALL_INTERFACES): misc/q_symbol.cmo.stamp
++$(ALL_OBJECTS:.cmo=.cmi): misc/q_symbol.cmo.stamp
++$(ALL_OBJECTS:.cmo=.cmx) caml_cduce.cmx: misc/q_symbol.cmo.stamp
++$(ALL_OBJECTS) caml_cduce.cmo: misc/q_symbol.cmo.stamp
++$(OCAMLIFACE)/mlstub.$(EXTENSION): SYNTAX += q_MLast.cmo
++
++misc/q_symbol.cmo.stamp: misc/q_symbol.ml
+ 	@echo "Build $@"
+-	$(HIDE)$(CAMLC) -c -pp camlp4orf $<
++	$(HIDE) $(CAMLC) -c -pp camlp4orf $<
++	$(HIDE) sync
++	$(HIDE)	touch misc/q_symbol.cmo.stamp
+ 
+-parser/parser.cmo: PACKAGES += camlp4.extend
+-parser/parser.cmx: PACKAGES += camlp4.extend
+ 
++parser/parser.$(EXTENSION): PACKAGES += camlp4.extend
+ 
+ .ml.cmo:
+ 	@echo "Build $@"
+-	$(HIDE)$(CAMLC) -c $(INCLUDES) $(SYNTAX_PARSER) $<
++	$(HIDE)$(CAMLC) -c $(SYNTAX_PARSER) $(INCLUDES) $<
+ 
+ .ml.cmx:
+ 	@echo "Build $@"
+-	$(HIDE)$(CAMLOPT) $(FORPACKOPT) -c $(SYNTAX_PARSER) $(INCLUDES) $<
++	$(HIDE) $(CAMLOPT) $(FORPACKOPT) -c $(SYNTAX_PARSER) $(INCLUDES) $<
+ 
+ .mli.cmi:
+ 	@echo "Build $@"
+-	$(HIDE)$(CAMLC) -c $(SYNTAX_PARSER) $(INCLUDES) $<
++	$(HIDE) $(CAMLC) -c $(SYNTAX_PARSER) $(INCLUDES) $<
+ 
+ include depend
+ 
+@@ -373,12 +388,12 @@ install_doc: doc
+ 
+ 
+ $(OCAMLIFACE)/caml_cduce.cmo:
++	@echo "Build $@"
+ 	@cd $(OCAMLIFACE); \
+-	$(MAKE) CAMLC="$(CAMLC_P)" CAMLOPT="$(CAMLOPT_P)" caml_cduce.cmo
++	$(MAKE) -s MODE=byte CAMLC="$(OCAMLFIND) $(CAMLC_P)" caml_cduce.cmo
+ 
+ $(OCAMLIFACE)/caml_cduce.cmx:
++	@echo "Build $@"
+ 	@cd $(OCAMLIFACE); \
+-	$(MAKE) CAMLC="$(CAMLC_P)" CAMLOPT="$(CAMLOPT_P)" caml_cduce.cmx
++	$(MAKE) -s MODE=opt  CAMLOPT="$(OCAMLFIND) $(CAMLOPT_P)" caml_cduce.cmx
+ 
+-$(OCAMLIFACE)/mlstub.cmo: SYNTAX += q_MLast.cmo
+-$(OCAMLIFACE)/mlstub.cmx: SYNTAX += q_MLast.cmo
+diff --git a/depend b/depend
+index 83f8bd8..90f0313 100644
+--- a/depend
++++ b/depend
+@@ -403,10 +403,12 @@ runtime/cduce_expat.cmi :
+ runtime/cduce_pxp.cmi :
+ schema/schema_types.cmi : runtime/value.cmi misc/ns.cmi misc/encodings.cmi \
+     types/atoms.cmi
+-ocamliface/3.x/mltypes.cmo : types/ident.cmo ocamliface/3.x/config.cmo \
+-    parser/cduce_loc.cmi ocamliface/3.x/mltypes.cmi
+-ocamliface/3.x/mltypes.cmx : types/ident.cmx ocamliface/3.x/config.cmx \
+-    parser/cduce_loc.cmx ocamliface/3.x/mltypes.cmi
++ocamliface/3.x/caml_cduce.cmo :
++ocamliface/3.x/caml_cduce.cmx :
++ocamliface/3.x/mltypes.cmo : types/ident.cmo parser/cduce_loc.cmi \
++    ocamliface/3.x/caml_cduce.cmo ocamliface/3.x/mltypes.cmi
++ocamliface/3.x/mltypes.cmx : types/ident.cmx parser/cduce_loc.cmx \
++    ocamliface/3.x/caml_cduce.cmx ocamliface/3.x/mltypes.cmi
+ ocamliface/3.x/mlstub.cmo : types/types.cmi typing/typer.cmi \
+     types/sequence.cmi misc/ns.cmi ocamliface/3.x/mltypes.cmi \
+     driver/librarian.cmi types/externals.cmi compile/compile.cmi \
+@@ -417,41 +419,47 @@ ocamliface/3.x/mlstub.cmx : types/types.cmx typing/typer.cmx \
+     driver/librarian.cmx types/externals.cmx compile/compile.cmx \
+     parser/cduce_loc.cmx driver/cduce_config.cmx types/builtin_defs.cmx \
+     types/atoms.cmx parser/ast.cmx ocamliface/3.x/mlstub.cmi
+-ocamliface/3.x/mltypes.cmi : types/types.cmi
++ocamliface/3.x/mltypes.cmi : types/types.cmi ocamliface/3.x/caml_cduce.cmo
+ ocamliface/3.x/mlstub.cmi : parser/ast.cmo
+-ocamliface/4.01/mltypes.cmo : types/ident.cmo ocamliface/4.01/config.cmo \
+-    parser/cduce_loc.cmi ocamliface/4.01/mltypes.cmi
+-ocamliface/4.01/mltypes.cmx : types/ident.cmx ocamliface/4.01/config.cmx \
+-    parser/cduce_loc.cmx ocamliface/4.01/mltypes.cmi
++ocamliface/4.01/caml_cduce.cmo :
++ocamliface/4.01/caml_cduce.cmx :
++ocamliface/4.01/mltypes.cmo : types/ident.cmo parser/cduce_loc.cmi \
++    ocamliface/4.01/caml_cduce.cmo ocamliface/4.01/mltypes.cmi
++ocamliface/4.01/mltypes.cmx : types/ident.cmx parser/cduce_loc.cmx \
++    ocamliface/4.01/caml_cduce.cmx ocamliface/4.01/mltypes.cmi
+ ocamliface/4.01/mlstub.cmo : types/types.cmi typing/typer.cmi \
+     types/sequence.cmi misc/ns.cmi ocamliface/4.01/mltypes.cmi \
+     driver/librarian.cmi types/ident.cmo types/externals.cmi \
+     compile/compile.cmi parser/cduce_loc.cmi driver/cduce_config.cmi \
+-    types/builtin_defs.cmi types/atoms.cmi parser/ast.cmo \
+-    ocamliface/4.01/mlstub.cmi
++    ocamliface/4.01/caml_cduce.cmo types/builtin_defs.cmi types/atoms.cmi \
++    parser/ast.cmo ocamliface/4.01/mlstub.cmi
+ ocamliface/4.01/mlstub.cmx : types/types.cmx typing/typer.cmx \
+     types/sequence.cmx misc/ns.cmx ocamliface/4.01/mltypes.cmx \
+     driver/librarian.cmx types/ident.cmx types/externals.cmx \
+     compile/compile.cmx parser/cduce_loc.cmx driver/cduce_config.cmx \
+-    types/builtin_defs.cmx types/atoms.cmx parser/ast.cmx \
+-    ocamliface/4.01/mlstub.cmi
+-ocamliface/4.01/mltypes.cmi : types/types.cmi types/ident.cmo
++    ocamliface/4.01/caml_cduce.cmx types/builtin_defs.cmx types/atoms.cmx \
++    parser/ast.cmx ocamliface/4.01/mlstub.cmi
++ocamliface/4.01/mltypes.cmi : types/types.cmi types/ident.cmo \
++    ocamliface/4.01/caml_cduce.cmo
+ ocamliface/4.01/mlstub.cmi : parser/ast.cmo
+-ocamliface/4.02/mltypes.cmo : types/ident.cmo ocamliface/4.02/config.cmo \
+-    parser/cduce_loc.cmi ocamliface/4.02/mltypes.cmi
+-ocamliface/4.02/mltypes.cmx : types/ident.cmx ocamliface/4.02/config.cmx \
+-    parser/cduce_loc.cmx ocamliface/4.02/mltypes.cmi
++ocamliface/4.02/caml_cduce.cmo :
++ocamliface/4.02/caml_cduce.cmx :
++ocamliface/4.02/mltypes.cmo : types/ident.cmo parser/cduce_loc.cmi \
++    ocamliface/4.02/caml_cduce.cmo ocamliface/4.02/mltypes.cmi
++ocamliface/4.02/mltypes.cmx : types/ident.cmx parser/cduce_loc.cmx \
++    ocamliface/4.02/caml_cduce.cmx ocamliface/4.02/mltypes.cmi
+ ocamliface/4.02/mlstub.cmo : types/types.cmi typing/typer.cmi \
+     types/sequence.cmi misc/ns.cmi ocamliface/4.02/mltypes.cmi \
+     driver/librarian.cmi types/ident.cmo types/externals.cmi \
+     compile/compile.cmi parser/cduce_loc.cmi driver/cduce_config.cmi \
+-    types/builtin_defs.cmi types/atoms.cmi parser/ast.cmo \
+-    ocamliface/4.02/mlstub.cmi
++    ocamliface/4.02/caml_cduce.cmo types/builtin_defs.cmi types/atoms.cmi \
++    parser/ast.cmo ocamliface/4.02/mlstub.cmi
+ ocamliface/4.02/mlstub.cmx : types/types.cmx typing/typer.cmx \
+     types/sequence.cmx misc/ns.cmx ocamliface/4.02/mltypes.cmx \
+     driver/librarian.cmx types/ident.cmx types/externals.cmx \
+     compile/compile.cmx parser/cduce_loc.cmx driver/cduce_config.cmx \
+-    types/builtin_defs.cmx types/atoms.cmx parser/ast.cmx \
+-    ocamliface/4.02/mlstub.cmi
+-ocamliface/4.02/mltypes.cmi : types/types.cmi types/ident.cmo
++    ocamliface/4.02/caml_cduce.cmx types/builtin_defs.cmx types/atoms.cmx \
++    parser/ast.cmx ocamliface/4.02/mlstub.cmi
++ocamliface/4.02/mltypes.cmi : types/types.cmi types/ident.cmo \
++    ocamliface/4.02/caml_cduce.cmo
+ ocamliface/4.02/mlstub.cmi : parser/ast.cmo
+diff --git a/ocamliface/3.x/Makefile b/ocamliface/3.x/Makefile
+index 7f0a11e..8c8305f 100644
+--- a/ocamliface/3.x/Makefile
++++ b/ocamliface/3.x/Makefile
+@@ -3,6 +3,8 @@
+ # of an OCaml source tree.
+ include ../../Makefile.conf
+ 
++OCAMLFILES=ocaml_files.$(MODE)
++
+ all: caml_cduce.cmo caml_cduce.cmx
+ 
+ STDLIB=$(shell ocamlc -where)
+@@ -16,29 +18,31 @@ else
+   FORPACKOPT2=
+ endif
+ 
+-ocaml_files:
+-	mkdir ocaml_files
+-	$(HIDE)cp $(patsubst %,$(OCAML_SRC)/%, $(COPY_FILES)) ocaml_files/
+-	cp location.ml ocaml_files/location.ml
+-	cp ocaml_files/asttypes.mli ocaml_files/asttypes.ml
+-	sed s=STDLIB=$(STDLIB)= config.ml > ocaml_files/config.ml
+-	grep cmi_magic $(OCAML_SRC)/utils/config.mlp >> ocaml_files/config.ml
+ 
+-caml_cduce.cmo: ocaml_files
++$(OCAMLFILES):
++	test -d $(OCAMLFILES) || mkdir $(OCAMLFILES)
++	$(HIDE)cp $(patsubst %,$(OCAML_SRC)/%, $(COPY_FILES)) $(OCAMLFILES)/
++	cp location.ml $(OCAMLFILES)/location.ml
++	cp $(OCAMLFILES)/asttypes.mli $(OCAMLFILES)/asttypes.ml
++	sed s=STDLIB=$(STDLIB)= config.mlp > $(OCAMLFILES)/config.ml
++	grep cmi_magic $(OCAML_SRC)/utils/config.mlp >> $(OCAMLFILES)/config.ml
++
++caml_cduce.cmo: ocaml_files.byte
+ 	@echo "Build $@"
+-	(cd ocaml_files; \
+-	ocamlc $(FORPACKOPT1) -c $(COMPILE_FILES);\
+-	ocamlc $(FORPACKOPT2) -pack -o $@ $(OBJECTS); \
+-	cp caml_cduce.cmo caml_cduce.cmi ..)
++	(cd ocaml_files.byte; \
++	 ocamlc $(FORPACKOPT1) -c $(COMPILE_FILES); \
++	 ocamlc $(FORPACKOPT2) -pack -o $@ $(OBJECTS); \
++	 cp caml_cduce.cmo caml_cduce.cmi ..)
+ 
+-caml_cduce.cmx: ocaml_files
++caml_cduce.cmx: ocaml_files.opt
+ 	@echo "Build $@"
+-	(cd ocaml_files; ocamlopt $(FORPACKOPT1) -c $(COMPILE_FILES);\
+-	ocamlopt $(FORPACKOPT2) -pack -o $@ $(XOBJECTS); \
+-	cp caml_cduce.cmx caml_cduce.o caml_cduce.cmi ..)
++	(cd ocaml_files.opt; \
++	 ocamlopt $(FORPACKOPT1) -c $(COMPILE_FILES); \
++	 ocamlopt $(FORPACKOPT2) -pack -o $@ $(XOBJECTS); \
++	 cp caml_cduce.cmx caml_cduce.o caml_cduce.cmi ..)
+ 
+ clean:
+-	rm -Rf ocaml_files *~ *.cm*
++	rm -Rf ocaml_files.* *~ *.cm* *.o
+ 
+ COPY_FILES=\
+   typing/annot.mli \
+diff --git a/ocamliface/3.x/config.ml b/ocamliface/3.x/config.ml
+deleted file mode 100644
+index 54ca779..0000000
+--- a/ocamliface/3.x/config.ml
++++ /dev/null
+@@ -1,4 +0,0 @@
+-let standard_library = "STDLIB"
+-let load_path = ref ([] : string list)
+-let bytecomp_c_compiler = ""
+-let bytecomp_c_linker = ""
+diff --git a/ocamliface/3.x/config.mlp b/ocamliface/3.x/config.mlp
+new file mode 100644
+index 0000000..54ca779
+--- /dev/null
++++ b/ocamliface/3.x/config.mlp
+@@ -0,0 +1,4 @@
++let standard_library = "STDLIB"
++let load_path = ref ([] : string list)
++let bytecomp_c_compiler = ""
++let bytecomp_c_linker = ""
+diff --git a/ocamliface/4.01/Makefile b/ocamliface/4.01/Makefile
+index 6167691..04feecc 100644
+--- a/ocamliface/4.01/Makefile
++++ b/ocamliface/4.01/Makefile
+@@ -3,6 +3,8 @@
+ # of an OCaml source tree.
+ include ../../Makefile.conf
+ 
++OCAMLFILES=ocaml_files.$(MODE)
++
+ all: caml_cduce.cmo caml_cduce.cmx
+ 
+ STDLIB=$(shell ocamlc -where)
+@@ -16,29 +18,31 @@ else
+   FORPACKOPT2=
+ endif
+ 
+-ocaml_files:
+-	mkdir ocaml_files
+-	$(HIDE)cp $(patsubst %,$(OCAML_SRC)/%, $(COPY_FILES)) ocaml_files/
+-	cp location.ml ocaml_files/location.ml
+-	cp ocaml_files/asttypes.mli ocaml_files/asttypes.ml
+-	sed s=STDLIB=$(STDLIB)= config.ml > ocaml_files/config.ml
+-	grep cmi_magic $(OCAML_SRC)/utils/config.mlp | head -1 >> ocaml_files/config.ml
+ 
+-caml_cduce.cmo: ocaml_files
++$(OCAMLFILES):
++	test -d $(OCAMLFILES) || mkdir $(OCAMLFILES)
++	$(HIDE)cp $(patsubst %,$(OCAML_SRC)/%, $(COPY_FILES)) $(OCAMLFILES)/
++	cp location.ml $(OCAMLFILES)/location.ml
++	cp $(OCAMLFILES)/asttypes.mli $(OCAMLFILES)/asttypes.ml
++	sed s=STDLIB=$(STDLIB)= config.mlp > $(OCAMLFILES)/config.ml
++	grep cmi_magic $(OCAML_SRC)/utils/config.mlp | head -1 >> $(OCAMLFILES)/config.ml
++
++caml_cduce.cmo: ocaml_files.byte
+ 	@echo "Build $@"
+-	(cd ocaml_files; \
+-	ocamlc $(FORPACKOPT1) -c $(COMPILE_FILES);\
+-	ocamlc $(FORPACKOPT2) -pack -o $@ $(OBJECTS); \
+-	cp caml_cduce.cmo caml_cduce.cmi ..)
++	(cd ocaml_files.byte; \
++	 ocamlc $(FORPACKOPT1) -c $(COMPILE_FILES); \
++	 ocamlc $(FORPACKOPT2) -pack -o $@ $(OBJECTS); \
++	 cp caml_cduce.cmo caml_cduce.cmi ..)
+ 
+-caml_cduce.cmx: ocaml_files
++caml_cduce.cmx: ocaml_files.opt
+ 	@echo "Build $@"
+-	(cd ocaml_files; ocamlopt $(FORPACKOPT1) -c $(COMPILE_FILES);\
+-	ocamlopt $(FORPACKOPT2) -pack -o $@ $(XOBJECTS); \
+-	cp caml_cduce.cmx caml_cduce.o caml_cduce.cmi ..)
++	(cd ocaml_files.opt; \
++	 ocamlopt $(FORPACKOPT1) -c $(COMPILE_FILES); \
++	 ocamlopt $(FORPACKOPT2) -pack -o $@ $(XOBJECTS); \
++	 cp caml_cduce.cmx caml_cduce.o caml_cduce.cmi ..)
+ 
+ clean:
+-	rm -Rf ocaml_files *~ *.cm*
++	rm -Rf ocaml_files.* *~ *.cm* *.o
+ 
+ COPY_FILES=\
+   typing/annot.mli \
+diff --git a/ocamliface/4.01/config.ml b/ocamliface/4.01/config.ml
+deleted file mode 100644
+index 54ca779..0000000
+--- a/ocamliface/4.01/config.ml
++++ /dev/null
+@@ -1,4 +0,0 @@
+-let standard_library = "STDLIB"
+-let load_path = ref ([] : string list)
+-let bytecomp_c_compiler = ""
+-let bytecomp_c_linker = ""
+diff --git a/ocamliface/4.01/config.mlp b/ocamliface/4.01/config.mlp
+new file mode 100644
+index 0000000..54ca779
+--- /dev/null
++++ b/ocamliface/4.01/config.mlp
+@@ -0,0 +1,4 @@
++let standard_library = "STDLIB"
++let load_path = ref ([] : string list)
++let bytecomp_c_compiler = ""
++let bytecomp_c_linker = ""
+diff --git a/ocamliface/4.02/Makefile b/ocamliface/4.02/Makefile
+index 0433888..f847f3c 100644
+--- a/ocamliface/4.02/Makefile
++++ b/ocamliface/4.02/Makefile
+@@ -3,6 +3,8 @@
+ # of an OCaml source tree.
+ include ../../Makefile.conf
+ 
++OCAMLFILES=ocaml_files.$(MODE)
++
+ all: caml_cduce.cmo caml_cduce.cmx
+ 
+ STDLIB=$(shell ocamlc -where)
+@@ -16,32 +18,34 @@ else
+   FORPACKOPT2=
+ endif
+ 
+-ocaml_files:
+-	mkdir ocaml_files
+-	$(HIDE)cp $(patsubst %,$(OCAML_SRC)/%, $(COPY_FILES)) ocaml_files/
+-	cp location.ml ocaml_files/location.ml
+-	cp parsetree.ml ocaml_files/parsetree.ml
+-	cp ast_mapper.ml ocaml_files/ast_mapper.ml
+-	cp ocaml_files/asttypes.mli ocaml_files/asttypes.ml
+-	sed s=STDLIB=$(STDLIB)= config.ml > ocaml_files/config.ml
+-	grep cmi_magic $(OCAML_SRC)/utils/config.mlp | head -1 >> ocaml_files/config.ml
+ 
+-caml_cduce.cmo: ocaml_files
++$(OCAMLFILES):
++	test -d $(OCAMLFILES) || mkdir $(OCAMLFILES)
++	$(HIDE)cp $(patsubst %,$(OCAML_SRC)/%, $(COPY_FILES)) $(OCAMLFILES)/
++	cp location.ml $(OCAMLFILES)/location.ml
++	cp parsetree.ml $(OCAMLFILES)/parsetree.ml
++	cp ast_mapper.ml $(OCAMLFILES)/ast_mapper.ml
++	cp $(OCAMLFILES)/asttypes.mli $(OCAMLFILES)/asttypes.ml
++	sed s=STDLIB=$(STDLIB)= config.mlp > $(OCAMLFILES)/config.ml
++	grep cmi_magic $(OCAML_SRC)/utils/config.mlp | head -1 >> $(OCAMLFILES)/config.ml
++
++
++caml_cduce.cmo: ocaml_files.byte
+ 	@echo "Build $@"
+-	(cd ocaml_files; \
++	(cd ocaml_files.byte; \
+ 	$(CAMLC) $(FORPACKOPT1) -c $(COMPILE_FILES);\
+ 	$(CAMLC) $(FORPACKOPT2) -pack -o $@ $(OBJECTS); \
+ 	cp caml_cduce.cmo caml_cduce.cmi ..)
+ 
+-caml_cduce.cmx: ocaml_files
++caml_cduce.cmx: ocaml_files.opt
+ 	@echo "Build $@"
+-	(cd ocaml_files; \
++	(cd ocaml_files.opt; \
+ 	$(CAMLOPT) $(FORPACKOPT1) -c $(COMPILE_FILES);\
+ 	$(CAMLOPT) $(FORPACKOPT2) -pack -o $@ $(XOBJECTS); \
+ 	cp caml_cduce.cmx caml_cduce.o caml_cduce.cmi ..)
+ 
+ clean:
+-	rm -Rf ocaml_files *~ *.cm*
++	rm -Rf ocaml_files.* *~ *.cm* *.o
+ 
+ COPY_FILES=\
+   typing/annot.mli \
+diff --git a/ocamliface/4.02/config.ml b/ocamliface/4.02/config.ml
+deleted file mode 100644
+index 54ca779..0000000
+--- a/ocamliface/4.02/config.ml
++++ /dev/null
+@@ -1,4 +0,0 @@
+-let standard_library = "STDLIB"
+-let load_path = ref ([] : string list)
+-let bytecomp_c_compiler = ""
+-let bytecomp_c_linker = ""
+diff --git a/ocamliface/4.02/config.mlp b/ocamliface/4.02/config.mlp
+new file mode 100644
+index 0000000..54ca779
+--- /dev/null
++++ b/ocamliface/4.02/config.mlp
+@@ -0,0 +1,4 @@
++let standard_library = "STDLIB"
++let load_path = ref ([] : string list)
++let bytecomp_c_compiler = ""
++let bytecomp_c_linker = ""
+-- 
+1.9.3
+
diff --git a/0010-Edit-CHANGES-and-VERSION-files.patch b/0010-Edit-CHANGES-and-VERSION-files.patch
new file mode 100644
index 0000000..c453993
--- /dev/null
+++ b/0010-Edit-CHANGES-and-VERSION-files.patch
@@ -0,0 +1,153 @@
+From 840104af0efd7499d01fb884036edc65fa789cf8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Kim=20Nguy=E1=BB=85n?= <kn at lri.fr>
+Date: Sat, 9 Aug 2014 15:07:44 +0200
+Subject: [PATCH 10/11] Edit CHANGES and VERSION files.
+
+---
+ CHANGES | 46 +++++++++++++++++++++++++++++++---------------
+ VERSION |  2 +-
+ 2 files changed, 32 insertions(+), 16 deletions(-)
+
+diff --git a/CHANGES b/CHANGES
+index c5fbce4..e51a5bb 100644
+--- a/CHANGES
++++ b/CHANGES
+@@ -1,6 +1,22 @@
++0.6.1
++   * Fix the source so that it can be compiled with Ocaml 4.02 and the external version of camlp4
++   * Upgrade Ocaml interface to support ocaml 4.02
++   * Modularise the Ocaml interface. This version of CDuce now supports the following combinations:
++     ocaml compiler | ocaml sources (for the CDuce-Ocaml interface)
++     3.11.x 3.12.x  | 3.11.x 3.12.x
++     4.00/4.01      | 3.11.x 3.12.x 4.00 4.01
++     4.02           | 4.02
++
++     It is however recommended to use the same version of for the Ocaml compiler and the Ocaml sources
++   * Parallelize the Makefile (make -j works as exptected)
++
++0.6.0
++   * Upgrade the Ocaml interface to support ocaml 4.00 and 4.01 (contributed by Julien Lopez)
++   Warning: the Ocaml interface now requires ocaml >= 4.00 and < 4.02 (4.02 is not supported)
++
+ 0.5.5
+    * Added load_xml_subst and print_xml_subst for namespaces substitution.
+-   (necessary for Web Services with OcCDuce and CDuce_WS). 
++   (necessary for Web Services with OcCDuce and CDuce_WS).
+ 
+ 0.5.4
+    * Added Services for Ocsigen.
+@@ -39,10 +55,10 @@
+ 
+ 0.4.2
+ 
+-- Language: 
++- Language:
+    * Added int_of_char
+ 
+-- Bug fix: 
++- Bug fix:
+    * "match 1 with (x := `nil) -> x" raised an assert failure
+ 
+ 
+@@ -59,14 +75,14 @@
+      on each branch
+    * New "dump_xml" and "dump_xml_utf8", equivalent to the composition
+      of print and print_xml, but more efficient
+-     
++
+ 
+ - Implementation:
+    * New subtyping algorithm
+    * Small improvement to the pattern matching compiler
+    * Improve type-checking time for map
+    * Improve type-checking of record expressions
+-   * Don't display warnings for unused branches in ghost (generated) pattern 
++   * Don't display warnings for unused branches in ghost (generated) pattern
+      matching
+ 
+ - Bug fix:
+@@ -177,16 +193,16 @@
+       - ".." to denote open record types/patterns:
+           open record:  { l1=t1 l2=t2 .. }
+           closed record: { l1=t1 l2=t2 }
+-      - the ";" between fields is optional even for records 
++      - the ";" between fields is optional even for records
+         (used to be optional only for attributes)
+    * Keywords are now allowed as type names
+    * Concatenation @ allowed in types
+    * Record concatenation + allowed in types
+-   * Changed "string://" URL-pseudo schema to "string:" 
++   * Changed "string://" URL-pseudo schema to "string:"
+    * Better resolution of external entities for PXP and expat
+ 
+ - Tools:
+-   * A new tool cduce_mktop produces customized CDuce toplevels with embedded 
++   * A new tool cduce_mktop produces customized CDuce toplevels with embedded
+      OCaml externals.
+    * Removed the validate tool.
+    * Don't build dtd2cduce by default (it requires PXP). An online
+@@ -210,7 +226,7 @@
+ 0.2.2
+ 
+ - Language:
+-  * Runtime type-check: (e :? t) raises an exception when e doesn't 
++  * Runtime type-check: (e :? t) raises an exception when e doesn't
+     have type t; the exception is an explanation of why this is not the case.
+     (The actual message may change in the future.)
+   * Better return type for load_xml, defined as:
+@@ -247,7 +263,7 @@
+     Now, [ ... x::Any* ] is as efficient as [ ... ; x ]. Can also be written
+     [ ... /x _* ]. The [ ... ; ... ] syntax is no longer necessary
+     and might be deprecated.
+-    
++
+ - Bug fixes, including:
+   * Bug fixes in configure/Makefile for Cygwin.
+   * Bug fix for the compilation of complex patterns with records.
+@@ -274,7 +290,7 @@
+   * Support for URLs in load_xml, load_html, load_file, and schemas:
+     e.g. you can write `` load_html "http://www.cduce.org/" ''
+     (need either the ocurl package or the netclient package).
+-  * More advanced (and documented) support for XML Schemas. 
++  * More advanced (and documented) support for XML Schemas.
+   * Preliminary integration of CQL query language that is:
+     select e from p1 in e1, ... ,pn in en where e'.
+   * Allow structured constants in default value patterns (p := c).
+@@ -287,7 +303,7 @@
+   * argv is now an operator of type [] -> [ String* ].
+   * The --dump, --load, --save options are deprecated.
+   * Changes to the command line. "--pxp" is replaced with "--no expat".
+- 
++
+ - Implementation:
+   * Code upgraded to Ocaml 3.07.
+   * Major cleaning in progress.
+@@ -309,7 +325,7 @@
+   * Various bug fixes  (expat might now work)
+   * Sequencing operator   e1;e2  (equivalent to: let [] = e1 in e2)
+   * Encoded references
+-  
++
+ 
+ 0.1.0
+   * Support for XML Namespaces
+@@ -327,7 +343,7 @@
+   * Second alpha release
+   * Bug fixes and syntax changes (e.g. making "fun" optional in "let fun")
+   * Experimenting with expat support (see expat/README)
+- 
+ 
+-0.0.9  
++
++0.0.9
+   * First public release (alpha release)
+diff --git a/VERSION b/VERSION
+index de3b1c2..7deeff6 100644
+--- a/VERSION
++++ b/VERSION
+@@ -1 +1 @@
+-VERSION=0.6.0
++VERSION=0.6.1-rc1
+-- 
+1.9.3
+
diff --git a/0011-Sync-with-ocaml-4.02-trunk-changes-in-parser-locatio.patch b/0011-Sync-with-ocaml-4.02-trunk-changes-in-parser-locatio.patch
new file mode 100644
index 0000000..b346c65
--- /dev/null
+++ b/0011-Sync-with-ocaml-4.02-trunk-changes-in-parser-locatio.patch
@@ -0,0 +1,23 @@
+From 1f3a58efd1daf7222fbd3bde3fbd890c70d02b31 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Kim=20Nguy=E1=BB=85n?= <kn at lri.fr>
+Date: Sat, 9 Aug 2014 15:57:23 +0200
+Subject: [PATCH 11/11] Sync with ocaml 4.02 trunk (changes in
+ parser/location.mli)
+
+---
+ ocamliface/4.02/location.ml | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/ocamliface/4.02/location.ml b/ocamliface/4.02/location.ml
+index 21c8061..70c8d41 100644
+--- a/ocamliface/4.02/location.ml
++++ b/ocamliface/4.02/location.ml
+@@ -46,4 +46,5 @@ let error_of_printer_file = dummy
+ let error_of_printer = dummy
+ let error ?(loc=none) ?(sub=[]) ?(if_highlight="") = dummy
+ let errorf = error
++let raise_errorf = error
+ let absolute_path = dummy
+-- 
+1.9.3
+
diff --git a/cduce.spec b/cduce.spec
index 51c898c..45a660d 100644
--- a/cduce.spec
+++ b/cduce.spec
@@ -12,7 +12,7 @@
 
 Name:           cduce
 Version:        0.6.0
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Modern XML-oriented functional language
 License:        BSD
 
@@ -26,12 +26,18 @@ Source2:         http://debian.glondu.net/debian/ocaml-3.12.0/pool/ocamlduce/oca
 %endif
 
 # Build fixes for OCaml 4.02.
-# All upstream on the 'stable-for-ocaml-4.02' branch.
-Patch1:         0001-Change-the-default-inlining-from-10000-to-100-OCaml-.patch
-Patch2:         0002-Do-not-rely-on-a-load-directive-at-the-top-of-parser.patch
-Patch3:         0003-Fix-the-compilation-of-ocaml-bindings.patch
-Patch4:         0004-Detect-OCaml-version-used-for-the-ocaml-bridge-in-th.patch
-Patch5:         0005-Make-it-possible-compile-the-ocaml-cduce-interface-a.patch
+# All upstream on the '0.6.1-rc1' branch.
+Patch0001:      0001-Change-the-default-inlining-from-10000-to-100-OCaml-.patch
+Patch0002:      0002-Do-not-rely-on-a-load-directive-at-the-top-of-parser.patch
+Patch0003:      0003-Fix-the-compilation-of-ocaml-bindings.patch
+Patch0004:      0004-Detect-OCaml-version-used-for-the-ocaml-bridge-in-th.patch
+Patch0005:      0005-Make-it-possible-compile-the-ocaml-cduce-interface-a.patch
+Patch0006:      0006-Make-sure-that-the-g-flag-is-correctly-propagated-to.patch
+Patch0007:      0007-Prevent-the-compiler-from-statically-allocating-an-p.patch
+Patch0008:      0008-Don-t-trigger-an-assertion-failure-when-loading-the-.patch
+Patch0009:      0009-Re-enable-parallel-build-of-the-project-make-j-works.patch
+Patch0010:      0010-Edit-CHANGES-and-VERSION-files.patch
+Patch0011:      0011-Sync-with-ocaml-4.02-trunk-changes-in-parser-locatio.patch
 
 ExcludeArch:    ppc64 s390 s390x sparc64
 
@@ -91,11 +97,17 @@ incorporates CDuce extensions for working with XML documents.
 %setup -q -n %{name}-%{version} -T -D -a 2
 %endif
 
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
+%patch0001 -p1
+%patch0002 -p1
+%patch0003 -p1
+%patch0004 -p1
+%patch0005 -p1
+%patch0006 -p1
+%patch0007 -p1
+%patch0008 -p1
+%patch0009 -p1
+%patch0010 -p1
+%patch0011 -p1
 
 ./configure --prefix=%{_prefix} \
   --bindir=%{_bindir} \
@@ -177,6 +189,9 @@ popd
 
 
 %changelog
+* Sat Aug 09 2014 Richard W.M. Jones <rjones at redhat.com> - 0.6.0-5
+- Import more upstream patches which might fix build on OCaml 4.02.
+
 * Sun Aug 03 2014 Richard W.M. Jones <rjones at redhat.com> - 0.6.0-4
 - Import upstream patches which might fix build on OCaml 4.02.
 


More information about the scm-commits mailing list