[Pkg-ocaml-maint-commits] [SCM] ocamlp3l packaging branch, master, updated. debian/2.03-1-1-gf6fa907

Sylvain Le Gall gildor at debian.org
Tue Aug 12 16:49:32 UTC 2008


The following commit has been merged in the master branch:
commit 51ea7357e19dda43708153d12b9464b0f578404b
Author: Sylvain Le Gall <gildor at debian.org>
Date:   Sat Aug 9 20:19:31 2008 +0000

    Enable byte only compilation.

diff --git a/debian/patches/00list b/debian/patches/00list
index 0dd7d06..0243815 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -1,2 +1,3 @@
 01-correct-href-to-gz-doc
 02-install-mli
+03-byte-compilation
diff --git a/debian/patches/03-byte-compilation.dpatch b/debian/patches/03-byte-compilation.dpatch
new file mode 100755
index 0000000..7531003
--- /dev/null
+++ b/debian/patches/03-byte-compilation.dpatch
@@ -0,0 +1,94 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03-byte-compilation.dpatch by Sylvain Le Gall <gildor at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Allow only byte compilation on arch where there is no ocamlopt.
+
+ at DPATCH@
+diff -urNad ocamlp3l~/Source/Makefile ocamlp3l/Source/Makefile
+--- ocamlp3l~/Source/Makefile	2008-08-09 20:16:41.000000000 +0000
++++ ocamlp3l/Source/Makefile	2008-08-09 20:17:09.000000000 +0000
+@@ -45,9 +45,14 @@
+ ALLCAMLSOURCES = $(ALLMLISOURCES) $(ALLMLSOURCES)
+ 
+ CAMLBYTOBJS = $(ALLMLSOURCES:.ml=.cmo)
++ifeq ($(OPT),true)
+ CAMLBINOBJS = $(CAMLBYTOBJS:.cmo=.cmx)
+-CAMLIOBJS = $(ALLMLISOURCES:.mli=.cmi)
+ CAMLOOBJS = $(ALLMLSOURCES:.ml=.o)
++else
++CAMLBINOBJS = 
++CAMLOOBJS =
++endif
++CAMLIOBJS = $(ALLMLISOURCES:.mli=.cmi)
+ ALLCAMLOBJS = $(CAMLBYTOBJS) $(CAMLBINOBJS) $(CAMLIOBJS) $(CAMLOOBJS)
+ 
+ server.ml: server_process.ml server_thread.ml
+@@ -65,8 +70,7 @@
+ 	$(MKDIR) $(PACKAGELIBDIR)
+ 	$(CP) $(ALLMLISOURCES) $(PACKAGELIBDIR)
+ 	$(CP) $(CAMLIOBJS) $(PACKAGELIBDIR)
+-	$(CP) $(CAMLBYTOBJS) $(PACKAGELIBDIR)
+-	$(CP) $(CAMLBINOBJS) $(CAMLOOBJS) $(PACKAGELIBDIR)
++	$(CP) $(CAMLBYTOBJS) $(CAMLBINOBJS) $(CAMLOOBJS) $(PACKAGELIBDIR)
+ 
+ uninstall:
+ 	$(RM) $(PACKAGELIBDIR)
+diff -urNad ocamlp3l~/Tools/Makefile ocamlp3l/Tools/Makefile
+--- ocamlp3l~/Tools/Makefile	2008-08-09 20:16:20.000000000 +0000
++++ ocamlp3l/Tools/Makefile	2008-08-09 20:16:42.000000000 +0000
+@@ -27,17 +27,29 @@
+ include $(MAKEFILES_DIR)/makefile.application
+ 
+ BASESOURCE = toolbase
++ifeq ($(OPT),true)
+ BASELIB = $(BASESOURCE:=.cmx)
++else
++BASELIB = $(BASESOURCE:=.cmo)
++endif
+ 
+-TOOLSOURCE = ocamlp3lc.ml ocamlp3lopt.ml ocamlp3ltop.ml
++TOOLSOURCE = ocamlp3lc.ml ocamlp3ltop.ml
++ifeq ($(OPT),true)
++TOOLSOURCE += ocamlp3lopt.ml
++endif
+ TOOLS = $(TOOLSOURCE:.ml=)
+ 
++ifeq ($(OPT),true)
+ SYSLIB = $(WITHUNIX)
++else
++SYSLIB = $(WITHUNIX:.cmxa=.cma)
++endif
+ 
+ .PHONY: all install uninstall clean depend
+ 
+ all: $(TOOLS)
+ 
++ifeq ($(OPT),true)
+ ocamlp3lc: $(BASELIB) ocamlp3lc.cmx
+ 	$(CAMLCBIN) -o $@ $(SYSLIB) $(BASELIB) ocamlp3lc.cmx
+ 
+@@ -46,6 +58,13 @@
+ 
+ ocamlp3ltop: $(BASELIB) ocamlp3ltop.cmx
+ 	$(CAMLCBIN) -o $@ $(SYSLIB) $(BASELIB) ocamlp3ltop.cmx
++else
++ocamlp3lc: $(BASELIB) ocamlp3lc.cmo
++	$(CAMLCBYT) -o $@ $(SYSLIB) $(BASELIB) ocamlp3lc.cmo
++
++ocamlp3ltop: $(BASELIB) ocamlp3ltop.cmo
++	$(CAMLCBYT) -o $@ $(SYSLIB) $(BASELIB) ocamlp3ltop.cmo
++endif
+ 
+ install: $(TOOLS)
+ 	$(CP) $(TOOLS) $(PACKAGEBINDIR)
+diff -urNad ocamlp3l~/makefile.application ocamlp3l/makefile.application
+--- ocamlp3l~/makefile.application	2008-08-09 20:16:20.000000000 +0000
++++ ocamlp3l/makefile.application	2008-08-09 20:16:42.000000000 +0000
+@@ -79,3 +79,6 @@
+ 
+ # Default banner file
+ BANNERFILE = banner
++
++# Do native compilation
++OPT = $(shell command -v ocamlopt > /dev/null 2>&1 && echo true || echo false)

-- 
ocamlp3l packaging



More information about the Pkg-ocaml-maint-commits mailing list