#! /bin/sh /usr/share/dpatch/dpatch-run
## 04_makefile_byte.dpatch by Guillaume Yziquel <guillaume.yziquel@citycable.ch>
##
## DP: Compiling targets for non-native builds.

@DPATCH@
diff -urNad pgocaml-1.3~/Makefile pgocaml-1.3/Makefile
--- pgocaml-1.3~/Makefile	2009-10-09 18:34:12.000000000 +0200
+++ pgocaml-1.3/Makefile	2009-10-09 18:36:26.000000000 +0200
@@ -62,6 +62,7 @@
 XOBJS	:= $(OBJS:.cmo=.cmx)
 
 all: META pGOCaml_config.ml pgocaml.cma pgocaml.cmxa pgocaml.cmxs pa_pgsql.cmo pgocaml_prof$(EXECUTABLE_SUFFIX)
+all_byte: META pGOCaml_config.ml pgocaml.cma pa_pgsql.cmo
 
 test: test_pgocaml_lowlevel$(EXECUTABLE_SUFFIX) test_pgocaml$(EXECUTABLE_SUFFIX)
 
@@ -165,6 +166,12 @@
 	install -c -m 0644 *.cmi *.mli *.cmo *.cma *.cmxa *.a META \
 	  $(DESTDIR)$(OCAMLLIBDIR)/$(PACKAGE)
 
+install_byte:
+	rm -rf $(DESTDIR)$(OCAMLLIBDIR)/$(PACKAGE)
+	install -c -m 0755 -d $(DESTDIR)$(OCAMLLIBDIR)/$(PACKAGE)
+	install -c -m 0644 *.cmi *.mli *.cmo *.cma META \
+	  $(DESTDIR)$(OCAMLLIBDIR)/$(PACKAGE)
+
 #
 # Distribution.
 #
