* Change the patch added in 3.09.1-2, because it broke ocamlopt -pack on
authorJulien Cristau <julien.cristau@ens-lyon.org>
Thu, 9 Feb 2006 14:17:03 +0000 (14:17 +0000)
committerJulien Cristau <julien.cristau@ens-lyon.org>
Thu, 9 Feb 2006 14:17:03 +0000 (14:17 +0000)
  sparc (we now filter link options to remove the "-Wl," part, and then use
  ld). Thanks to Sylvain Le Gall for noticing, and to Samuel Thibault for
  his help debugging this (Closes: #351853).
* [debian/rules] Make install-* depend on build-*, and tweak the rules to
  not rerun configure in the 'binary' phase.

debian/changelog
debian/patches/00list
debian/patches/call_ld_via_gcc.dpatch [deleted file]
debian/patches/call_ld_with_proper_flags.dpatch [new file with mode: 0644]
debian/rules

index 761da21bf0956015cf3360fc292cc77d6ef4c69b..179ef043b5b26aa2ea4ac25fd6d3a2e24c6b5564 100644 (file)
@@ -1,8 +1,14 @@
 ocaml (3.09.1-3) unstable; urgency=low
 
   * Enable ocaml-mode for emacs-snapshot (Closes: #347917).
-
- -- Julien Cristau <julien.cristau@ens-lyon.org>  Fri, 13 Jan 2006 15:43:06 +0100
+  * Change the patch added in 3.09.1-2, because it broke ocamlopt -pack on
+    sparc (we now filter link options to remove the "-Wl," part, and then use
+    ld). Thanks to Sylvain Le Gall for noticing, and to Samuel Thibault for
+    his help debugging this (Closes: #351853).
+  * [debian/rules] Make install-* depend on build-*, and tweak the rules to
+    not rerun configure in the 'binary' phase.
+
+ -- Julien Cristau <julien.cristau@ens-lyon.org>  Thu,  9 Feb 2006 15:14:43 +0100
 
 ocaml (3.09.1-2) unstable; urgency=low
 
index f2986019b494dcf73cd71f318e8407ff094d935e..f628d34e843d2626b3edeb9c635a4a162a33bee9 100644 (file)
@@ -4,4 +4,4 @@ dumpobj
 man-ocamlmklib
 kbsd-gnu
 alpha_ld_no-relax
-call_ld_via_gcc
+call_ld_with_proper_flags
diff --git a/debian/patches/call_ld_via_gcc.dpatch b/debian/patches/call_ld_via_gcc.dpatch
deleted file mode 100644 (file)
index 7277552..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## call_ld_via_gcc.dpatch by Julien Cristau <julien.cristau@ens-lyon.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Make ocamlopt -output-obj and -pack call ld via gcc instead of 
-## DP: directly, so the options we pass to it can be the same as in the normal 
-## DP: linking case
-
-@DPATCH@
-
---- ocaml-3.09.1.orig/Makefile 2005-09-24 18:20:36.000000000 +0200
-+++ ocaml-3.09.1/Makefile      2006-01-12 10:17:42.000000000 +0100
-@@ -324,8 +324,8 @@
-             -e 's|%%BYTELINK%%|$(BYTECC) $(BYTECCLINKOPTS)|' \
-             -e 's|%%NATIVECC%%|$(NATIVECC) $(NATIVECCCOMPOPTS)|' \
-             -e 's|%%NATIVELINK%%|$(NATIVECC) $(NATIVECCLINKOPTS)|' \
--            -e 's|%%PARTIALLD%%|ld -r $(NATIVECCLINKOPTS)|' \
--            -e 's|%%PACKLD%%|ld -r $(NATIVECCLINKOPTS)|' \
-+            -e 's|%%PARTIALLD%%|gcc -nostdlib -Wl,-r $(NATIVECCLINKOPTS)|' \
-+            -e 's|%%PACKLD%%|gcc -nostdlib -Wl,-r $(NATIVECCLINKOPTS)|' \
-             -e 's|%%BYTECCLIBS%%|$(BYTECCLIBS)|' \
-             -e 's|%%NATIVECCLIBS%%|$(NATIVECCLIBS)|' \
-             -e 's|%%RANLIBCMD%%|$(RANLIBCMD)|' \
diff --git a/debian/patches/call_ld_with_proper_flags.dpatch b/debian/patches/call_ld_with_proper_flags.dpatch
new file mode 100644 (file)
index 0000000..523bba8
--- /dev/null
@@ -0,0 +1,31 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## call_ld_with_proper_flags.dpatch by Julien Cristau <julien.cristau@ens-lyon.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Filter linkflags passed to ld by ocamlopt -pack and -output-obj
+## DP: to remove the "-Wl," parts, which are only used when ocamlopt calls
+## DP: gcc.
+
+@DPATCH@
+
+--- ocaml-3.09.1.orig/Makefile 2005-09-24 18:20:36.000000000 +0200
++++ ocaml-3.09.1/Makefile      2006-01-12 10:17:42.000000000 +0100
+@@ -313,6 +313,7 @@
+ partialclean::
+        rm -f ocaml toplevel/toplevellib.cma
++Wl = -Wl,
+ # The configuration file
+ utils/config.ml: utils/config.mlp config/Makefile
+@@ -324,8 +324,8 @@
+             -e 's|%%BYTELINK%%|$(BYTECC) $(BYTECCLINKOPTS)|' \
+             -e 's|%%NATIVECC%%|$(NATIVECC) $(NATIVECCCOMPOPTS)|' \
+             -e 's|%%NATIVELINK%%|$(NATIVECC) $(NATIVECCLINKOPTS)|' \
+-            -e 's|%%PARTIALLD%%|ld -r $(NATIVECCLINKOPTS)|' \
+-            -e 's|%%PACKLD%%|ld -r $(NATIVECCLINKOPTS)|' \
++            -e 's|%%PARTIALLD%%|ld -r $(subst $(Wl),,$(NATIVECCLINKOPTS))|' \
++            -e 's|%%PACKLD%%|ld -r $(subst $(Wl),,$(NATIVECCLINKOPTS))|' \
+             -e 's|%%BYTECCLIBS%%|$(BYTECCLIBS)|' \
+             -e 's|%%NATIVECCLIBS%%|$(NATIVECCLIBS)|' \
+             -e 's|%%RANLIBCMD%%|$(RANLIBCMD)|' \
index 216b0fa74312988f18abdd262b2f6244f2d78989..63d6e3e99eb52a837f39915afcea42ebba8dfd73 100755 (executable)
@@ -43,6 +43,7 @@ abi-sed:
        for t in `find debian/ -name \*.in | grep -v debian/control.in`; do \
          sed -e 's%#OcamlABI#%$(OCAMLABI)%' -e 's%#OcamlMAJOR#%$(OCAMLMAJOR)%' $$t >$${t%.in}; \
        done
+       touch $@
 
 # Generate ocaml-native-compilers' Architecture field.
 # Should never be called automatically.
@@ -101,14 +102,14 @@ endif
 
 build-indep: build-indep-stamp
 build-indep-stamp: patch-stamp config-stamp
-
        # Add here commands to compile the indep part of the package.
        #$(MAKE) doc
+       touch $@
 
 clean: abi-sed unpatch
        dh_testdir
        dh_testroot
-       rm -f build-arch-stamp build-indep-stamp config-stamp
+       rm -f build-arch-stamp build-indep-stamp config-stamp abi-sed
 
        # Add here commands to clean up after the build process.
        -$(MAKE) clean
@@ -128,7 +129,7 @@ endif
        dh_clean debian/README.labltk camlp4/config/Makefile.cnf camlp4/config/Makefile config/m.h config/s.h config/Makefile emacs/ocamltags driver/ocamlcomp.sh
 
 install: install-indep install-arch
-install-indep:
+install-indep: build-indep
        dh_testdir
        dh_testroot
        dh_clean -k -i
@@ -154,7 +155,7 @@ install-indep:
 
        dh_install -i
 
-install-arch:
+install-arch: build-arch
        dh_testdir
        dh_testroot
        dh_clean -k -a
@@ -261,14 +262,14 @@ binary-common:
        dh_installdeb
 
 # Build architecture independant packages using the common target.
-binary-indep: build-indep install-indep
+binary-indep: install-indep
        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
        dh_gencontrol -i -- -VF:OCamlABI="$(OCAMLABI)"
        dh_md5sums -i
        dh_builddeb -i
 
 # Build architecture dependant packages using the common target.
-binary-arch: build-arch install-arch
+binary-arch: install-arch
        $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
        dh_shlibdeps -s
        if [ ! -e opt-built-stamp ]; then                       \
@@ -292,4 +293,4 @@ binary-arch: build-arch install-arch
        dh_builddeb -s
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch abi-sed build-arch
+.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch build-arch