[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] docs: describe the QEMU build system structure
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH] docs: describe the QEMU build system structure / design |
Date: |
Tue, 22 Sep 2015 12:22:09 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 09/22/2015 10:35 AM, Daniel P. Berrange wrote:
> Developers who are new to QEMU, or have a background familiarity
> with GNU autotools can have trouble getting their head around the
s/autotools/autotools,/
> home-grown QEMU build system. This document attempts to explain
> the structure / design of the configure script and the various
> Makefile pieces that live across the source tree.
>
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
> docs/build-system.txt | 493
> ++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 493 insertions(+)
> create mode 100644 docs/build-system.txt
>
> +Stage 1: configure
> +
> +In contrast to autoconf scripts, QEMU's configure is expected to be
> +silent while it is checking for features. It will only display output
> +when an error occurrs, or to show the final feature enablement summary
s/occurrs/occurs/
> +on completion.
> +
> +Adding new checks to the configure script usually comprises the
> +following tasks
> +
> + - Initialize one or more variables with the default feature state.
> +
> + Ideally features should auto-detect whether they are present,
> + so try to avoid hardcoding the initial state to either enabled
> + or disabled, as that forces the user to pass a --{dis,en}able-XXX
> + flag on every invokation of configure
s/invokation/invocation/
> +Stage 2: makefiles
> +==================
> +
> +Although the source code is spread across multiple subdirectories, the
> +build system should be considered largely non-recursive in nature, in
> +contrast to common practices seen with automake. There is some recursive
> +invokation of make, but this is related to the things being built,
> +rather than the source directory structure.
s/invokation/invocation/
Mention that we require GNU make.
> +Module structure
> +----------------
> +
> +There are a number of key outputs of the QEMU build system
> +
> + - Tools - qemu-img, qemu-nbd, qga (guest agent), etc
> + - System emulators - qemu-system-$ARCH
> + - Userspace emulators - qemu-$ARCH
> + - Unit tests
> +
> +The source code is highly modularized, split across many files to
> +facilitate building of all of these components with as little duplicated
> +compilation as possible. There can be considered to be two distinct
> +groups of files, those which are independant of the QEMU emulation
> +target and those which are dependant on the QEMU emulation target.
Throughout this section: s/(in)?dependant/dependent/
> +
> +Statically defined files
> +------------------------
> +The recursive invokation will end up processing the toplevel
s/invokation/invocation/
> +
> +Dynamically created files
> +-------------------------
> +
> +The following files are generated dynamically by configure in order to
> +control the behaviour of the staticaly defined makefiles. This avoids
s/staticaly/statically/
> +
> +It is also used as a dependancy checking mechanism. If make sees that
s/dependancy/dependency/
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature