Matthew Booth
2009-Jul-13 13:02 UTC
[Libguestfs] [PATCH 1/2] Revert "Fix checking of generator being run from the right directory."
This reverts commit 35c646965a21d452cf74ef3683612210a653c36d. As well as reverting this change, add a comment explaining that configure must run first. --- src/generator.ml | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/generator.ml b/src/generator.ml index 47db5d9..2446299 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -24,8 +24,10 @@ * this one to describe the interface (see the big table below), and * daemon/<somefile>.c to write the implementation. * - * After editing this file, run it (./src/generator.ml) to regenerate - * all the output files. + * After editing this file, run it (./src/generator.ml) to regenerate all the + * output files. Note that if you are using a separate build directory you must + * run generator.ml from your top level build directory. You must also have run + * configure before generator.ml will run. * * IMPORTANT: This script should NOT print any warnings. If it prints * warnings, you should treat them as errors. @@ -8212,7 +8214,7 @@ let output_to filename let () check_functions (); - if not (Sys.file_exists "HACKING") then ( + if not (Sys.file_exists "config.status") then ( eprintf "\ You are probably running this from the wrong directory. Run it from the top source directory using the command -- 1.6.2.5
Matthew Booth
2009-Jul-13 13:02 UTC
[Libguestfs] [PATCH 2/2] Automatically generate list of built java sources
--- java/Makefile.am | 8 ++++++-- src/generator.ml | 9 +++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/java/Makefile.am b/java/Makefile.am index 068540c..51cd3b5 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -20,8 +20,12 @@ builddir ?= $(top_builddir)/java java_prefix = com/redhat/et/libguestfs +# Pull in automatically generated built sources +include $(builddir)/Makefile.inc + java_sources = \ - $(java_prefix)/*.java + $(java_built_sources) \ + com/redhat/et/libguestfs/LibGuestFSException.java java_tests = \ Bindtests.java \ @@ -35,7 +39,7 @@ EXTRA_DIST = \ run-bindtests \ run-java-tests -CLEANFILES = doc-stamp +CLEANFILES = doc-stamp $(builddir)/com/redhat/et/libguestfs/*.class com_redhat_et_libguestfs_GuestFS.h *.class *.jar api/com/redhat/et/libguestfs/*.html api/* if HAVE_JAVA diff --git a/src/generator.ml b/src/generator.ml index 2446299..8c864f0 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -8340,6 +8340,15 @@ Run it from the top source directory using the command close (); ) java_structs; + let close = output_to "java/Makefile.inc" in + pr "java_built_sources ="; + List.iter ( + fun (typ, jtyp) -> + pr " com/redhat/et/libguestfs/%s.java" jtyp; + ) java_structs; + pr " com/redhat/et/libguestfs/GuestFS.java\n"; + close (); + let close = output_to "java/com_redhat_et_libguestfs_GuestFS.c" in generate_java_c (); close (); -- 1.6.2.5
Richard W.M. Jones
2009-Jul-13 13:09 UTC
[Libguestfs] [PATCH 1/2] Revert "Fix checking of generator being run from the right directory."
On Mon, Jul 13, 2009 at 02:02:04PM +0100, Matthew Booth wrote:> This reverts commit 35c646965a21d452cf74ef3683612210a653c36d. > > As well as reverting this change, add a comment explaining that > configure must run first.Yes, this is fine. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html