Hi, Compiling the ocaml fails: 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'' Christoph -- ---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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 05/11/11 12:16, Ian Campbell wrote:> On Wed, 2011-05-11 at 10:48 +0100, Christoph Egger wrote: >> Hi, >> >> Compiling the ocaml fails: >> >> 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'' > > I guess the sed script in tools/ocaml/libs/xl/Makefile has some > non-posix-ism in it. > > Using gnu sed with --posix the following works for me (I dropped the > --posix). Does it help ?Yes, it does. Thanks. Christoph> > diff -r 72bba600f23b tools/ocaml/libs/xl/Makefile > --- a/tools/ocaml/libs/xl/Makefile Fri May 06 13:51:13 2011 +0100 > +++ b/tools/ocaml/libs/xl/Makefile Wed May 11 11:15:50 2011 +0100 > @@ -24,7 +24,7 @@ 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\ > *)\ > @@ -33,7 +33,7 @@ xl.ml: xl.ml.in _libxl_types.ml.in > < xl.ml.in> 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\ > *)\ > > >-- ---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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, 2011-05-11 at 10:48 +0100, Christoph Egger wrote:> Hi, > > Compiling the ocaml fails: > > 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''I guess the sed script in tools/ocaml/libs/xl/Makefile has some non-posix-ism in it. Using gnu sed with --posix the following works for me (I dropped the --posix). Does it help ? diff -r 72bba600f23b tools/ocaml/libs/xl/Makefile --- a/tools/ocaml/libs/xl/Makefile Fri May 06 13:51:13 2011 +0100 +++ b/tools/ocaml/libs/xl/Makefile Wed May 11 11:15:50 2011 +0100 @@ -24,7 +24,7 @@ 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\ *)\ @@ -33,7 +33,7 @@ xl.ml: xl.ml.in _libxl_types.ml.in < xl.ml.in > 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\ *)\ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, 2011-05-11 at 11:14 +0100, Christoph Egger wrote:> On 05/11/11 12:16, Ian Campbell wrote: > > On Wed, 2011-05-11 at 10:48 +0100, Christoph Egger wrote: > >> Hi, > >> > >> Compiling the ocaml fails: > >> > >> 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'' > > > > I guess the sed script in tools/ocaml/libs/xl/Makefile has some > > non-posix-ism in it. > > > > Using gnu sed with --posix the following works for me (I dropped the > > --posix). Does it help ? > > Yes, it does. Thanks.Thanks, changeloged and signed-off-by-ed version below. Ian. 8<---------------- # HG changeset patch # User Ian Campbell <ian.campbell@citrix.com> # Date 1305110703 -3600 # Node ID 58ace7f6b4b2ca6ebe484779f331fa60bd75c83b # Parent e0e7fec9df32ac865a93f63d2ab21b98653efe14 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. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> diff -r e0e7fec9df32 -r 58ace7f6b4b2 tools/ocaml/libs/xl/Makefile --- a/tools/ocaml/libs/xl/Makefile Wed May 11 11:34:16 2011 +0100 +++ b/tools/ocaml/libs/xl/Makefile Wed May 11 11:45:03 2011 +0100 @@ -24,7 +24,7 @@ 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\ *)\ @@ -33,7 +33,7 @@ xl.ml: xl.ml.in _libxl_types.ml.in < xl.ml.in > 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\ *)\ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 05/11/11 12:45, Ian Campbell wrote:> On Wed, 2011-05-11 at 11:14 +0100, Christoph Egger wrote: >> On 05/11/11 12:16, Ian Campbell wrote: >>> On Wed, 2011-05-11 at 10:48 +0100, Christoph Egger wrote: >>>> Hi, >>>> >>>> Compiling the ocaml fails: >>>> >>>> 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'' >>> >>> I guess the sed script in tools/ocaml/libs/xl/Makefile has some >>> non-posix-ism in it. >>> >>> Using gnu sed with --posix the following works for me (I dropped the >>> --posix). Does it help ? >> >> Yes, it does. Thanks. > > Thanks, changeloged and signed-off-by-ed version below.Please commit. Christoph> > Ian. > > 8<---------------- > > # HG changeset patch > # User Ian Campbell<ian.campbell@citrix.com> > # Date 1305110703 -3600 > # Node ID 58ace7f6b4b2ca6ebe484779f331fa60bd75c83b > # Parent e0e7fec9df32ac865a93f63d2ab21b98653efe14 > 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. > > Signed-off-by: Ian Campbell<ian.campbell@citrix.com> > > diff -r e0e7fec9df32 -r 58ace7f6b4b2 tools/ocaml/libs/xl/Makefile > --- a/tools/ocaml/libs/xl/Makefile Wed May 11 11:34:16 2011 +0100 > +++ b/tools/ocaml/libs/xl/Makefile Wed May 11 11:45:03 2011 +0100 > @@ -24,7 +24,7 @@ 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\ > *)\ > @@ -33,7 +33,7 @@ xl.ml: xl.ml.in _libxl_types.ml.in > < xl.ml.in> 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\ > *)\ > > >-- ---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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 05/11/11 12:45, Ian Campbell wrote:> On Wed, 2011-05-11 at 11:14 +0100, Christoph Egger wrote: >> On 05/11/11 12:16, Ian Campbell wrote: >>> On Wed, 2011-05-11 at 10:48 +0100, Christoph Egger wrote: >>>> Hi, >>>> >>>> Compiling the ocaml fails: >>>> >>>> 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'' >>> >>> I guess the sed script in tools/ocaml/libs/xl/Makefile has some >>> non-posix-ism in it. >>> >>> Using gnu sed with --posix the following works for me (I dropped the >>> --posix). Does it help ? >> >> Yes, it does. Thanks. > > Thanks, changeloged and signed-off-by-ed version below. > > Ian. > > 8<---------------- > > # HG changeset patch > # User Ian Campbell<ian.campbell@citrix.com> > # Date 1305110703 -3600 > # Node ID 58ace7f6b4b2ca6ebe484779f331fa60bd75c83b > # Parent e0e7fec9df32ac865a93f63d2ab21b98653efe14 > 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. > > Signed-off-by: Ian Campbell<ian.campbell@citrix.com>Acked-by: Christoph Egger <Christoph.Egger@amd.com>> > diff -r e0e7fec9df32 -r 58ace7f6b4b2 tools/ocaml/libs/xl/Makefile > --- a/tools/ocaml/libs/xl/Makefile Wed May 11 11:34:16 2011 +0100 > +++ b/tools/ocaml/libs/xl/Makefile Wed May 11 11:45:03 2011 +0100 > @@ -24,7 +24,7 @@ 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\ > *)\ > @@ -33,7 +33,7 @@ xl.ml: xl.ml.in _libxl_types.ml.in > < xl.ml.in> 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\ > *)\ > > >-- ---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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 05/11/11 12:16, Ian Campbell wrote:> On Wed, 2011-05-11 at 10:48 +0100, Christoph Egger wrote: >> Hi, >> >> Compiling the ocaml fails: >> >> 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'' > > I guess the sed script in tools/ocaml/libs/xl/Makefile has some > non-posix-ism in it. > > Using gnu sed with --posix the following works for me (I dropped the > --posix). Does it help ?I have to widthdraw my previous ack. The sed script didn''t run because of empty xm.ml and xm.mli files. After running gmake dist-clean and recompile I get this error: Parsing tools/ocaml/libs/xl/../../../../tools/libxl/libxl.idl sed: 1: "1i\(*\ * AUTO-GENERATED ...": extra characters after \ at the end of i command gmake[7]: Leaving directory `tools/ocaml/libs/xl''> > diff -r 72bba600f23b tools/ocaml/libs/xl/Makefile > --- a/tools/ocaml/libs/xl/Makefile Fri May 06 13:51:13 2011 +0100 > +++ b/tools/ocaml/libs/xl/Makefile Wed May 11 11:15:50 2011 +0100 > @@ -24,7 +24,7 @@ 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\ > *)\ > @@ -33,7 +33,7 @@ xl.ml: xl.ml.in _libxl_types.ml.in > < xl.ml.in> 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\ > *)\ > > >-- ---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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Thu, 2011-05-12 at 11:53 +0100, Christoph Egger wrote:> On 05/11/11 12:16, Ian Campbell wrote: > > On Wed, 2011-05-11 at 10:48 +0100, Christoph Egger wrote: > >> Hi, > >> > >> Compiling the ocaml fails: > >> > >> 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'' > > > > I guess the sed script in tools/ocaml/libs/xl/Makefile has some > > non-posix-ism in it. > > > > Using gnu sed with --posix the following works for me (I dropped the > > --posix). Does it help ? > > I have to widthdraw my previous ack. The sed script didn''t run because > of empty xm.ml and xm.mli files. > > After running gmake dist-clean and recompile I get this error: > > Parsing tools/ocaml/libs/xl/../../../../tools/libxl/libxl.idl > sed: 1: "1i\(*\ > * AUTO-GENERATED ...": extra characters after \ at the end of i command > gmake[7]: Leaving directory `tools/ocaml/libs/xl''Can you play a bit with your version of sed and see what makes it happy? Perhaps \n (suitable quoted) orjust a raw linefeed will work? If not maybe just stick the whole autogenerated tag on a single line, or use multiple i commands, or .... I guess it wouldn''t be the end of the world to do: echo "(* AUTO GEN... mummble etc *)" > xl.ml sed -e ''/^(\* @@LIBXL_TYPES@@ \*)$$/r_libxl_types.ml.in'' <bla >>xl.ml Ian.> > > > > > diff -r 72bba600f23b tools/ocaml/libs/xl/Makefile > > --- a/tools/ocaml/libs/xl/Makefile Fri May 06 13:51:13 2011 +0100 > > +++ b/tools/ocaml/libs/xl/Makefile Wed May 11 11:15:50 2011 +0100 > > @@ -24,7 +24,7 @@ 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\ > > *)\ > > @@ -33,7 +33,7 @@ xl.ml: xl.ml.in _libxl_types.ml.in > > < xl.ml.in> 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\ > > *)\ > > > > > > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 05/12/11 12:57, Ian Campbell wrote:> On Thu, 2011-05-12 at 11:53 +0100, Christoph Egger wrote: >> On 05/11/11 12:16, Ian Campbell wrote: >>> On Wed, 2011-05-11 at 10:48 +0100, Christoph Egger wrote: >>>> Hi, >>>> >>>> Compiling the ocaml fails: >>>> >>>> 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'' >>> >>> I guess the sed script in tools/ocaml/libs/xl/Makefile has some >>> non-posix-ism in it. >>> >>> Using gnu sed with --posix the following works for me (I dropped the >>> --posix). Does it help ? >> >> I have to widthdraw my previous ack. The sed script didn''t run because >> of empty xm.ml and xm.mli files. >> >> After running gmake dist-clean and recompile I get this error: >> >> Parsing tools/ocaml/libs/xl/../../../../tools/libxl/libxl.idl >> sed: 1: "1i\(*\ >> * AUTO-GENERATED ...": extra characters after \ at the end of i command >> gmake[7]: Leaving directory `tools/ocaml/libs/xl'' > > Can you play a bit with your version of sed and see what makes it happy? > > Perhaps \n (suitable quoted) orjust a raw linefeed will work? If not > maybe just stick the whole autogenerated tag on a single line, or use > multiple i commands, or .... > > I guess it wouldn''t be the end of the world to do: > echo "(* AUTO GEN... mummble etc *)"> xl.ml > sed -e ''/^(\* @@LIBXL_TYPES@@ \*)$$/r_libxl_types.ml.in''<bla>>xl.ml >With attached xen_tools_ocaml.diff a xl.ml file is generated w/o having sed complaining. xl.mli is not generated at all. I attached xl.ml. Can you check if this is the expected result, please? Christoph -- ---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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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. 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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Is there a problem with committing this patch? Christoph On 05/12/11 14:53, Christoph Egger wrote:> 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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, 2011-05-18 at 09:32 +0100, Christoph Egger wrote:> Is there a problem with committing this patch?Ian J has been away. I expect he''s still catching up on his mail backlog. Ian.> > Christoph > > > On 05/12/11 14:53, Christoph Egger wrote: > > 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 > >> > >> > >> > > > > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 05/18/11 10:49, Ian Campbell wrote:> On Wed, 2011-05-18 at 09:32 +0100, Christoph Egger wrote: >> Is there a problem with committing this patch? > > Ian J has been away. I expect he''s still catching up on his mail > backlog.Please commit it when Ian Jackson is overloaded. The build is broken for a pretty long time now. Christoph> Ian. > >> >> Christoph >> >> >> On 05/12/11 14:53, Christoph Egger wrote: >>> 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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Christoph Egger writes ("Re: [Xen-devel] tools: ocaml build error"):> On 05/18/11 10:49, Ian Campbell wrote: > > On Wed, 2011-05-18 at 09:32 +0100, Christoph Egger wrote: > >> Is there a problem with committing this patch? > > > > Ian J has been away. I expect he''s still catching up on his mail > > backlog. > > Please commit it when Ian Jackson is overloaded. The build is broken > for a pretty long time now.This is in my queue and I will apply it today. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-May-24 16:52 UTC
Re: [Xen-devel] tools: ocaml build error [and 1 more messages]
Ian Campbell writes ("Re: [Xen-devel] tools: ocaml build error"):> tools: ocaml: remove non-posix-ism from sed script.Christoph Egger writes ("Re: [Xen-devel] tools: ocaml build error"):> Acked-by: Christoph Egger <Christoph.Egger@amd.com>Thanks, I have committed the patch. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel