WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] tools: ocaml: remove non-posix-ism from s

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tools: ocaml: remove non-posix-ism from sed script.
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Thu, 16 Jun 2011 11:11:42 +0100
Delivery-date: Thu, 16 Jun 2011 03:15:12 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1306255922 -3600
# Node ID b4e5983c62a2ca977fa980cacee49721c37e17a2
# Parent  c0d31d436dea134ea399653686df24dc12910aa1
tools: ocaml: remove non-posix-ism from sed script.

Christoph Egger reported than on NetBSD the build fails with

        Parsing tools/ocaml/libs/xl/../../../../tools/libxl/libxl.idl
        sed: 1: "1i(*\
          * AUTO-GENERATED ...": command i expects \ followed by test
        gmake[7]: Leaving directory `tools/ocaml/libs/xl'

The following was tested by Christoph on NetBSD and also with GNU-sed
with and without the --posix flag.

In addition when sed fails will still create the output file, which confuses
subsequent make invocations. Generate to a temporary file and move into place
only on success.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Christoph Egger <Christoph.Egger@xxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r c0d31d436dea -r b4e5983c62a2 tools/ocaml/libs/xl/Makefile
--- a/tools/ocaml/libs/xl/Makefile      Tue May 24 10:14:10 2011 +0100
+++ b/tools/ocaml/libs/xl/Makefile      Tue May 24 17:52:02 2011 +0100
@@ -17,29 +17,33 @@
 
 OCAML_LIBRARY = xl
 
-GENERATED_FILES += xl.ml xl.mli
+GENERATED_FILES += xl.ml xl.ml.tmp xl.mli xl.mli.tmp
 GENERATED_FILES += _libxl_types.ml.in _libxl_types.mli.in
 GENERATED_FILES += _libxl_types.inc
 
 all: $(INTF) $(LIBS)
 
 xl.ml: xl.ml.in _libxl_types.ml.in
-       $(Q)sed -e '1i(*\
+       $(Q)sed -e '1i\
+(*\
  * AUTO-GENERATED FILE DO NOT EDIT\
  * Generated from xl.ml.in and _libxl_types.ml.in\
  *)\
 ' \
            -e '/^(\* @@LIBXL_TYPES@@ \*)$$/r_libxl_types.ml.in' \
-         < xl.ml.in > xl.ml
+         < xl.ml.in > xl.ml.tmp
+       $(Q)mv xl.ml.tmp xl.ml
 
 xl.mli: xl.mli.in _libxl_types.mli.in
-       $(Q)sed -e '1i(*\
+       $(Q)sed -e '1i\
+(*\
  * AUTO-GENERATED FILE DO NOT EDIT\
  * Generated from xl.mli.in and _libxl_types.mli.in\
  *)\
 ' \
            -e '/^(\* @@LIBXL_TYPES@@ \*)$$/r_libxl_types.mli.in' \
-         < xl.mli.in > xl.mli
+         < xl.mli.in > xl.mli.tmp
+       $(Q)mv xl.mli.tmp xl.mli
 
 _libxl_types.ml.in _libxl_types.mli.in _libxl_types.inc: genwrap.py 
$(XEN_ROOT)/tools/libxl/libxl.idl \
                 $(XEN_ROOT)/tools/libxl/libxltypes.py

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] tools: ocaml: remove non-posix-ism from sed script., Xen patchbot-unstable <=