The following commit has been merged in the master branch:
commit bd550fca2a624df42fe687fb173b3b70894603ee
Author: Ralf Treinen <trei...@debian.org>
Date:   Thu Feb 2 15:41:53 2012 +0100

    use $(OCAML_HAVE_OCAMLOPT) to distinguish native from non-native

diff --git a/debian/changelog b/debian/changelog
index fad2052..abb2bbe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+coinst (1.01-3) UNRELEASED; urgency=low
+
+  * debian/rules: use $(OCAML_HAVE_OCAMLOPT) to distinguish native from
+    non-native archs (thanks to Mehdi Dogguy for the hint!)
+
+ -- Ralf Treinen <trei...@debian.org>  Thu, 02 Feb 2012 15:41:15 +0100
+
 coinst (1.01-2) unstable; urgency=low
 
   * Rename patch clean_viewer to make-clean, also clean coinst.byte.
diff --git a/debian/rules b/debian/rules
index a3300c2..5368e16 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,22 +1,20 @@
 #!/usr/bin/make -f
 
-OPTCOMPILER=/usr/bin/ocamlopt
-
 %:
        dh $@ --with ocaml
 
 override_dh_auto_build:
-       if [ -x $(OPTCOMPILER) ]; then \
-                $(MAKE);\
-               cd viewer;\
-               make coinst_viewer;\
-        else\
-               $(MAKE) coinst.byte;\
-               ln coinst.byte coinst;\
-               cd viewer;\
-               make coinst_viewer.byte;\
-               ln coinst_viewer.byte coinst_viewer;\
-        fi
+ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
+       $(MAKE)
+       cd viewer
+       make coinst_viewer
+else
+       $(MAKE) coinst.byte
+       ln coinst.byte coinst
+       cd viewer
+       make coinst_viewer.byte
+       ln coinst_viewer.byte coinst_viewer
+endif
 
 override_dh_auto_clean:
        make clean

-- 
coinst 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