All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Egger <Christoph.Egger@amd.com>
To: Ian Campbell <Ian.Campbell@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: tools: ocaml build error
Date: Thu, 12 May 2011 14:53:51 +0200	[thread overview]
Message-ID: <4DCBD85F.4050407@amd.com> (raw)
In-Reply-To: <1305201541.26692.487.camel@zakaz.uk.xensource.com>

On 05/12/11 13:59, Ian Campbell wrote:
> On Thu, 2011-05-12 at 12:28 +0100, Christoph Egger wrote:
>> With attached xen_tools_ocaml.diff  a xl.ml file is generated w/o
>> having sed complaining.
>
> Thanks.
>
>> xl.mli is not generated at all.
>
> I think that's a different issue to do with creating the file when the
> sed actually failed. Fixed by creating a temporary and moving it into
> place...
>
>> I attached xl.ml. Can you check if this is the expected result, please?
>
> Looks correct to me.

Acked-by: Christoph Egger <Christoph.Egger@amd.com>

>
> 8<---------------------------
>
> # HG changeset patch
> # User Ian Campbell<ian.campbell@citrix.com>
> # Date 1305201511 -3600
> # Node ID 50728eaf50735b58d83484845312fe5467f6420c
> # Parent  1e7ebf81f49d43b1a972ff31a284b80ac68f6f1b
> 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@citrix.com>
>
> diff -r 1e7ebf81f49d -r 50728eaf5073 tools/ocaml/libs/xl/Makefile
> --- a/tools/ocaml/libs/xl/Makefile	Thu May 12 11:39:55 2011 +0100
> +++ b/tools/ocaml/libs/xl/Makefile	Thu May 12 12:58:31 2011 +0100
> @@ -17,29 +17,33 @@ xl_C_OBJS = xl_stubs
>
>   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
>
>
>


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

  reply	other threads:[~2011-05-12 12:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-11  9:48 tools: ocaml build error Christoph Egger
2011-05-11 10:16 ` Ian Campbell
2011-05-11 10:14   ` Christoph Egger
2011-05-11 10:45     ` Ian Campbell
2011-05-11 11:26       ` Christoph Egger
2011-05-11 11:45       ` Christoph Egger
2011-05-12 10:53   ` Christoph Egger
2011-05-12 10:57     ` Ian Campbell
2011-05-12 11:28       ` Christoph Egger
2011-05-12 11:59         ` Ian Campbell
2011-05-12 12:53           ` Christoph Egger [this message]
2011-05-18  8:32             ` Christoph Egger
2011-05-18  8:49               ` Ian Campbell
2011-05-24 10:08                 ` Christoph Egger
2011-05-24 10:46                   ` Ian Jackson
2011-05-24 16:52             ` tools: ocaml build error [and 1 more messages] Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DCBD85F.4050407@amd.com \
    --to=christoph.egger@amd.com \
    --cc=Ian.Campbell@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.