From 108509ec19cd6584e46971118e7c563dfd00fac8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 27 Jul 2016 19:02:49 +0100 Subject: [PATCH] docs: hacking: Add a section describing the build system. --- docs/guestfs-hacking.pod | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/docs/guestfs-hacking.pod b/docs/guestfs-hacking.pod index 1adf2ca7a..6b7ac1cc8 100644 --- a/docs/guestfs-hacking.pod +++ b/docs/guestfs-hacking.pod @@ -18,13 +18,14 @@ run the generator (C<./autogen.sh && make -C generator>) in order to create those files. Libguestfs uses an autotools-based build system, with the main files -being F and F. The F -subdirectory contains the generator, plus files describing the API. -The F subdirectory contains source for the library. The -F and F subdirectories contain the source for the -code that builds the appliance, and the code that runs in the -appliance respectively. Other directories are covered in the section -L below. +being F and F. See L. + +The F subdirectory contains the generator, plus files +describing the API. The F subdirectory contains source for the +library. The F and F subdirectories contain the +source for the code that builds the appliance, and the code that runs +in the appliance respectively. Other directories are covered in the +section L below. Apart from the fact that all API entry points go via some generated code, the library is straightforward. (In fact, even the generated @@ -150,7 +151,7 @@ Logo used on the website. The fish is called Arthur by the way. =item F -M4 macros used by autoconf. +M4 macros used by autoconf. See L. =item F @@ -260,6 +261,27 @@ Language bindings. =back +=head1 THE BUILD SYSTEM + +Libguestfs uses the GNU autotools build system (autoconf, automake, +libtool). + +The F<./configure> script is generated from F and +F. Most of the configure script is split over many +m4 macro files by topic, for example F deals +with the dependencies of the daemon. + +The job of the top level F is mainly to list the +subdirectories (C) in the order they should be compiled. + +F is included in every F (top level and +subdirectories). F is included only in subdirectory +F files. + +There are many make targets. Use this command to list them all: + + make help + =head1 ADDING A NEW API Because large amounts of boilerplate code in libguestfs are generated,