Commit Graph

65 Commits

Author SHA1 Message Date
Matthew Booth
c477e2fb78 build: Fix inter-directory dependencies
This change adds an explicit dependency on generator.ml for every file it
generates, except java files. Java is left for another time because it's
considerably trickier.

It also adds a build rule for src/libguestfs.la so it can be rebuilt as required
from other directories.

It does this by creating a top level make file, subdir-rules.mk, which can be
included from sub-directories. sub-directories need to define 'generator_built'
to include local files which are built by generator.ml, and they will be updated
automatically.

This fixes parallel make, and will automatically re-create generated files when
make is run from any directory.

It also fixes the problem which efad4f53 was targetting. Specifically,
src/guestfs_protocol.(c|h) had an erroneous dependency on stamp-generator, and
therefore generator.ml, despite not being directly created by it. This caused
them to be recreated every time generator.ml ran rather than only when
src/guestfs_protocol.x was updated, which cascaded into a daemon and therefore
appliance update.

This patch also changes the contents of the distribution tarball by including
files created by rpcgen.
2009-11-19 16:40:22 +00:00
Richard Jones
8869adf1e8 Remove guestfs_wait_ready (turn it into a no-op).
This commit changes guestfs_launch so that it both launches
the appliance and waits until it is ready (ie. the daemon communicates
back to us).

Since we removed the pretence that we could implement a low-level
asynchronous API, the need to call launch() followed by wait_ready()
has looked a bit silly.

Now guestfs_wait_ready() is basically a no-op.  It is left in the
API for backwards compatibility.  Any calls to guestfs_wait_ready()
can be removed from client code.
2009-09-21 12:01:51 +01:00
Jim Meyering
0c463dd0aa build: remove trailing blank lines; enable the syntax-check rule
* cfg.mk (disable_temporarily): Remove sc_prohibit_trailing_blank_lines.
* appliance/Makefile.am: Remove trailing blank line(s).
* appliance/debian/modules/y0_install-guestfsd: Likewise.
* appliance/make.sh.in: Likewise.
* appliance/packagelist.in: Likewise.
* appliance/update.sh.in: Likewise.
* haskell/run-bindtests: Likewise.
* ocaml/run-bindtests: Likewise.
* python/run-python-tests: Likewise.
* recipes/squashfs.example: Likewise.
* ruby/run-ruby-tests: Likewise.
2009-08-04 14:47:09 +02:00
Richard Jones
a865795a7e More misc fixes to non-srcdir builds. 2009-07-16 18:04:01 +01:00
Richard Jones
6c87a747ca Fix for 349814e9d9: Get correct path when building Ruby bindings. 2009-07-07 13:03:36 +01:00
Matthew Booth
349814e9d9 Make it possible to build in a separate directory
This patch allows you to do:
mkdir build
cd build
../configure ...
make

This will output all generated files to the build directory. Given that
autogen automatically runs configure, you can also do:

BUILDDIR=./build ./autogen.sh

which will do the right thing.

Also:

* Fix a dependency bug which means that guestfs_protocol.h
  isn't automatically rebuilt.
* Re-running autogen.sh with no arguments won't blow away your previous
  configure arguments.
2009-07-03 16:16:51 +01:00
Richard W.M. Jones
b3cb0b04eb Remove generated code from git.
Git users now require the OCaml compiler in order to regenerate
the generated code after a checkout.

Generated code will remain in the tarball, so users of the
source tarball will not need the OCaml compiler.
2009-07-02 11:51:16 +01:00
Richard W.M. Jones
5186251f8f Add 'readdir' call.
This adds a readdir call (mostly intended for programs).  The
return value is a list of guestfs_dirent structures.

This adds the new types 'struct guestfs_dirent' and
'struct guestfs_dirent_list', along with all the code to
return these in the different language bindings.

Also includes additional tests for OCaml and Perl bindings
to test this.
2009-07-02 10:11:55 +01:00
Richard W.M. Jones
0884d8bbae Generated code for mknod, mkfifo, mknod_b, mknod_c, umask. 2009-06-30 13:10:45 +01:00
Richard W.M. Jones
f68b3ac861 Generated code for 'set_memsize'/'get_memsize' calls. 2009-06-30 13:10:44 +01:00
Richard W.M. Jones
da8ddb2745 Generated code for the 'mkswap*' commands. 2009-06-29 20:25:20 +01:00
Richard W.M. Jones
5d6b6a3fbb Generated code for mount-loop command. 2009-06-29 16:05:22 +01:00
Richard W.M. Jones
c6d6f5ae1b Generated code for 'initrd-list'. 2009-06-29 15:19:10 +01:00
Richard W.M. Jones
e492608f2f Generated code for 'du' command. 2009-06-29 12:47:20 +01:00
Richard W.M. Jones
b2ed0f4c55 Generated code for df / df-h. 2009-06-29 12:26:11 +01:00
Richard W.M. Jones
826020fe18 Generated code for head/tail commands. 2009-06-29 11:47:07 +01:00
Richard W.M. Jones
f450ce75b7 Generated code for 'wc_*' commands. 2009-06-29 10:09:13 +01:00
Richard W.M. Jones
0574eab8bc Generated code for 'mkdtemp' command. 2009-06-24 18:25:09 +01:00
Richard W.M. Jones
bcb3fc0c33 Generated code for 'scrub-*' commands. 2009-06-23 15:53:44 +01:00
Richard Jones
227b1eea90 Check parameter types in Ruby bindings (RHBZ#507346). 2009-06-22 15:07:42 +01:00
Richard Jones
ca4a0c7180 Missing \n character in Ruby bindings. 2009-06-22 14:14:45 +01:00
Richard Jones
ad8a256f54 Generated code for 'glob-expand'. 2009-06-22 08:20:42 +01:00
Richard Jones
4211c7a258 Generated code for 'sh' and 'sh-lines' commands. 2009-06-22 07:49:50 +01:00
Richard Jones
27161658c8 New website, change et.redhat.com references to libguestfs.org 2009-06-09 11:20:05 +01:00
Richard Jones
460d139e6a Generated code for ntfs_3g_probe command. 2009-06-08 17:44:18 +01:00
Richard Jones
b6adf09c4d Generated code for the 'sleep' command. 2009-06-04 15:06:27 +01:00
Richard Jones
d1a1ab972b Generated code for 'add_drive_ro' call. 2009-06-02 14:25:25 +01:00
Richard W.M. Jones
a3d4d655ff Distribute bindtests.rb in the tarball. 2009-05-28 20:41:12 +01:00
Richard W.M. Jones
babc0846cc Add tests for bindings parameters, fix several broken bindings. 2009-05-28 20:15:51 +01:00
Richard W.M. Jones
c41fe04a65 Add the test0* functions, used to test language bindings. 2009-05-28 16:23:04 +01:00
Richard W.M. Jones
a1e8cdf2a2 Move the appliance and build scripts into new appliance/ subdirectory. 2009-05-28 13:00:31 +01:00
Richard Jones
3e408f4934 Generated code for e2fsck-f command. 2009-05-21 16:18:16 +01:00
Richard Jones
1fc41b39da Generated code for 'find' command. 2009-05-19 12:05:43 +01:00
Richard Jones
ca49c50e06 Generated code for lvresize, resize2fs. 2009-05-18 20:22:53 +01:00
Richard Jones
85ed8cef99 Add vg-activate{,-all} commands, and resize recipe. 2009-05-18 17:16:24 +01:00
Richard W.M. Jones
5cd39c83e2 Add: pvresize, sfdisk-N, sfdisk-l, sfdisk-kernel-geomtry, sfdisk-disk-geometry commands. Pass --no-reread flag to sfdisk. 2009-05-15 14:52:34 +01:00
Richard W.M. Jones
d901cc9161 Add support for zerofree command. 2009-05-14 23:47:17 +01:00
Richard W.M. Jones
e8ecc08f66 Add 'append', LIBGUESTFS_APPEND to set additional kernel options. 2009-05-13 17:51:14 +01:00
Richard Jones
15e0fd573a Generated code to support last 3 commits. 2009-05-08 15:20:36 +01:00
Richard Jones
0faa5dde7b Generated code to support previous 2 commits. 2009-05-08 14:28:03 +01:00
Richard Jones
9a571d41f5 RARRAY_LEN macro for Ruby < 1.9. Small strictness fix for OCaml < 3.10. 2009-05-06 15:20:15 +01:00
Richard W.M. Jones
f47dafd231 Generated code for 'equal' command. 2009-05-01 12:16:08 +01:00
Richard W.M. Jones
8c3b820c2b Generated code for ping-daemon command. 2009-05-01 11:47:31 +01:00
Richard W.M. Jones
24bee20ce4 Generated code for dmesg command. 2009-05-01 11:27:52 +01:00
Richard W.M. Jones
9222136ac9 Generated code for drop-caches command. 2009-05-01 11:18:53 +01:00
Richard W.M. Jones
ac286b26df Generated code for cp, cp-a and mv commands. 2009-05-01 11:00:46 +01:00
Richard Jones
e118c14b95 Generated code for grub-install command. 2009-04-30 23:10:22 +01:00
Richard Jones
62df226f26 Added 'zero' command to wipe partition tables and superblocks. 2009-04-30 19:28:54 +01:00
Richard Jones
0703248d23 Add generated code for 'fsck' command. 2009-04-30 18:57:07 +01:00
Jim Meyering
41b959fd9b build: don't tell "make clean" to remove my '~' backup files
Hi Rich,

automake's policy on what to remove via "make clean" is reasonable:
if running build rules creates it, then "make clean" can and should remove it.
However, even if build rules happen
to create backup files, please remove only the specific ones
they can create, not all of the ones in a directory.  Just in case
someone relies on those and expect them to hang around...

>From 1e8be391ac17b4ddcf9671e8413d2660844e6993 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Thu, 30 Apr 2009 15:47:52 +0200
Subject: [PATCH] build: don't tell "make clean" to remove my '~' backup files

* Makefile.am (CLEANFILES): Don't remove '~' backup files.
* daemon/Makefile.am: Ditto.
* examples/Makefile.am: Ditto.
* fish/Makefile.am: Ditto.
* images/Makefile.am: Ditto.
* inspector/Makefile.am: Ditto.
* java/Makefile.am: Ditto.
* ocaml/Makefile.am: Ditto.
* ocaml/examples/Makefile.am: Ditto.
* perl/Makefile.am: Ditto.
* python/Makefile.am: Ditto.
* ruby/Makefile.am: Ditto.
* src/Makefile.am: Ditto.
2009-04-30 16:13:06 +01:00