The following commit has been merged in the master branch:
commit 8f6b482018b09879346d63694294e5ce0bed8354
Author: Pierre Chambart <chamb...@crans.org>
Date:   Mon Nov 21 20:13:16 2011 +0100

    build cmxs

diff --git a/debian/patches/0004-build-cmxs.patch 
b/debian/patches/0004-build-cmxs.patch
new file mode 100644
index 0000000..4162f64
--- /dev/null
+++ b/debian/patches/0004-build-cmxs.patch
@@ -0,0 +1,104 @@
+From: Pierre Chambart <chamb...@crans.org>
+Date: Mon, 21 Nov 2011 16:54:02 +0100
+Subject: build cmxs
+
+---
+ Makefile.config   |    2 ++
+ Makefile.filelist |    9 ++++++++-
+ lib/Makefile      |    7 ++++++-
+ syntax/Makefile   |    8 ++++++++
+ 4 files changed, 24 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.config b/Makefile.config
+index b2fa5d3..6b33f7b 100644
+--- a/Makefile.config
++++ b/Makefile.config
+@@ -2,4 +2,6 @@
+ PROJECTNAME := deriving-ocsigen
+ OCAMLFIND := ocamlfind
+ 
++NATDYNLINK :=YES
++
+ TYPECONV := $(shell ${OCAMLFIND} query type-conv 2>/dev/null)
+diff --git a/Makefile.filelist b/Makefile.filelist
+index 48c050b..d9b59a6 100644
+--- a/Makefile.filelist
++++ b/Makefile.filelist
+@@ -22,7 +22,11 @@ NATIMPL := syntax/pa_deriving_common.cmx \
+            syntax/pa_deriving.cmxa \
+            syntax/pa_deriving.a \
+            lib/deriving.cmxa \
+-           lib/deriving.a \
++           lib/deriving.a
++ifeq "${NATDYNLINK}" "YES"
++NATIMPL += syntax/pa_deriving.cmxs \
++         lib/deriving.cmxs
++endif
+ 
+ ifneq (${TYPECONV},)
+ 
+@@ -32,5 +36,8 @@ IMPL += syntax/pa_deriving_tc.cmo \
+ NATIMPL += syntax/pa_deriving_tc.cmx \
+            syntax/pa_deriving_tc.cmxa \
+          syntax/pa_deriving_tc.a
++ifeq "${NATDYNLINK}" "YES"
++NATIMPL += syntax/pa_deriving_tc.cmxs
++endif
+ 
+ endif
+diff --git a/lib/Makefile b/lib/Makefile
+index c531c2a..8dd35ca 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -24,7 +24,10 @@ SOURCES = deriving_Show.ml           \
+ all: byte opt
+ 
+ byte: deriving.cma
+-opt: deriving.cmxa
++opt:: deriving.cmxa
++ifeq "${NATDYNLINK}" "YES"
++opt:: deriving.cmxs
++endif
+ 
+ ##
+ 
+@@ -41,6 +44,8 @@ deriving.cmxa: ${SOURCES:.ml=.cmx}
+       ${OCAMLC} ${OCAMLFLAGS} ${PP} -c $<
+ %.cmx: %.ml
+       ${OCAMLOPT} ${OCAMLFLAGS} ${PP} -c $<
++%.cmxs: %.cmxa
++      $(OCAMLOPT) -shared -linkall -o $@ $<
+ 
+ # Clean up
+ clean:
+diff --git a/syntax/Makefile b/syntax/Makefile
+index abcc746..cf7ba51 100644
+--- a/syntax/Makefile
++++ b/syntax/Makefile
+@@ -49,10 +49,16 @@ all: byte opt
+ 
+ byte:: pa_deriving.cma deriving
+ opt:: pa_deriving.cmxa deriving.opt
++ifeq "${NATDYNLINK}" "YES"
++opt::  pa_deriving.cmxs
++endif
+ 
+ ifneq (${TYPECONV},)
+ byte:: pa_deriving_tc.cma
+ opt:: pa_deriving_tc.cmxa
++ifeq "${NATDYNLINK}" "YES"
++opt::  pa_deriving_tc.cmxs
++endif
+ endif
+ 
+ ##
+@@ -102,6 +108,8 @@ id.ml: id.mlp ../Makefile.config ../VERSION
+       ${OCAMLC} ${LIBS} -c $<
+ %.cmx: %.ml
+       ${OCAMLOPT} ${LIBS} ${FOR_PACK} -c $<
++%.cmxs: %.cmxa
++      $(OCAMLOPT) -shared -linkall -o $@ $<
+ 
+ # Clean up
+ clean:
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index c0a697b..db5da2d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 0001-Install-.mli.patch
 0002-install-syntax-extension-.a.patch
 0003-syntax-package-exists-only-when-dev-is-installed.patch
+0004-build-cmxs.patch

-- 
ocaml-deriving-ocsigen packaging

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to