qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: alevy@redhat.com, vilanova@ac.upc.edu, afaerber@suse.de
Subject: [Qemu-devel] [PATCH 00/27] More source reorganization and build system TLC
Date: Fri, 21 Dec 2012 17:05:21 +0100	[thread overview]
Message-ID: <1356105948-13216-1-git-send-email-pbonzini@redhat.com> (raw)

Here is a light version of the source reorganization I proposed last
September.  While working on it I noticed that a useful part to start
from was the utility routines, because this helps identifying missing
unit tests and modularity problems.  Also, this file are relatively
rarely changed.  Hence, moving them will not complicate backports to
stable branches, and will make the "action" more visible to anyone
casually observing the tree.

Hence, this is where this series starts from.  After this series, the top
directory has about 80 *.c and *.h files, down from over 250 in 1.3.0,
which is already a fine improvement.

Patch 1 makes qemu-config.c more modular: there is no need for tools
to host the description of QEMU's command-line options.

Patch 2 finishes the transition to libqemustub.a, removing qemu-tool.c
and qemu-user.c.

Patches 3 to 13 are a longish digression in libcacard, improving
support for libtool in the build system and simplifying the integration
between libcacard's build rules and the rest of the Makefiles.  Also,
vscclient is now linked to the dynamic library so that missing symbols
(like the one fixed in patch 7) are caught early.  (QEMU still duplicates
the code; I'd fear for my physical integrity if I forced people to write
"libtool --mode=execute gdb" instead of just "gdb").

Patches 14 to 22 create a new static library libqemuutil.a, whose
component files all come from subdirectories of the top tree directory:
qobject, util, qapi.  Using a static library helps putting the number
of *-obj-y variables on a diet, and limits the duplication in the
Makefile rules.

Patches 23 and 24 further limit the number and nesting of *-obj-y
variables.

Finally, patches 25 to 27 affect tracing, which is also moved to
libqemuutil.a.  Patch 25 is Lluis's already posted patch to introduce
trace/Makefile.objs.

Alon Levy (1):
  libcacard: fix missing symbol in libcacard.so

Lluís Vilanova (1):
  build: Use separate makefile for "trace/"

Paolo Bonzini (25):
  qemu-option: move standard option definitions out of qemu-config.c
  stubs: fully replace qemu-tool.c and qemu-user.c
  build: make libtool verbose when making with V=1
  build: support linking with libtool objects/libraries
  build: move dtrace rules to rules.mak
  build: remove CONFIG_SMARTCARD
  libcacard: require libtool to build it
  libcacard: prepare to use -y trick in the Makefile
  libcacard: use per-target variable definitions
  libcacard: add list of exported symbols
  libcacard: rewrite Makefile in non-recursive style
  libcacard: link vscclient to dynamic library
  libcacard: list oslib-obj-y file explicitly
  build: rename oslib-obj-y to util-obj-y
  build: move util-obj-y to libqemuutil.a
  build: move files away from tools-obj-y, common-obj-y, user-obj-y
  build: move libqemuutil.a components to util/
  build: move qobject files to qobject/ and libqemuutil.a
  build: consolidate multiple variables into universal-obj-y
  build: move QAPI definitions for QEMU out of qapi-obj-y
  build: move base QAPI files to libqemuutil.a
  build: move version-obj-y to the generic LINK rule
  build: remove coroutine-obj-y
  build: fold trace-obj-y into libqemuutil.a
  build: improve quiet output for .stp rules

 .gitignore                                         |    8 +-
 Makefile                                           |   71 +-
 Makefile.objs                                      |  172 +----
 Makefile.target                                    |   17 +-
 block/iscsi.c                                      |   27 +
 blockdev.c                                         |  118 +++
 configure                                          |   85 +--
 exec.c                                             |    2 +-
 fsdev/Makefile.objs                                |    1 +
 fsdev/qemu-fsdev-dummy.c                           |    7 -
 fsdev/qemu-fsdev-opts.c                            |   85 ++
 fsdev/qemu-fsdev.c                                 |    8 -
 hw/Makefile.objs                                   |    2 +-
 hw/qdev-monitor.c                                  |   51 ++
 hw/usb/Makefile.objs                               |    2 +-
 include/qemu/config-file.h                         |    5 -
 include/sysemu/sysemu.h                            |    8 +
 include/trace.h                                    |    6 +
 libcacard/Makefile                                 |   62 +-
 libcacard/libcacard.syms                           |   77 ++
 monitor.c                                          |   22 +
 net/net.c                                          |   26 +
 qapi/Makefile.objs                                 |    8 +-
 qemu-char.c                                        |   72 ++
 qemu-config.c                                      |  894 --------------------
 qemu-tool.c                                        |  115 ---
 qemu-user.c                                        |   37 -
 qobject/Makefile.objs                              |    3 +
 json-lexer.c => qobject/json-lexer.c               |    0
 json-parser.c => qobject/json-parser.c             |    0
 json-streamer.c => qobject/json-streamer.c         |    0
 qbool.c => qobject/qbool.c                         |    0
 qdict.c => qobject/qdict.c                         |    0
 qerror.c => qobject/qerror.c                       |    0
 qfloat.c => qobject/qfloat.c                       |    0
 qint.c => qobject/qint.c                           |    0
 qjson.c => qobject/qjson.c                         |    0
 qlist.c => qobject/qlist.c                         |    0
 qstring.c => qobject/qstring.c                     |    0
 qom/Makefile.objs                                  |    6 +-
 rules.mak                                          |   20 +-
 scripts/tracetool/backend/dtrace.py                |    2 +-
 scripts/tracetool/format/h.py                      |    6 +-
 stubs/Makefile.objs                                |   13 +
 stubs/clock-warp.c                                 |    7 +
 stubs/cpu-get-clock.c                              |    7 +
 stubs/cpu-get-icount.c                             |    9 +
 stubs/get-vm-name.c                                |    7 +
 stubs/iothread-lock.c                              |   10 +
 stubs/migr-blocker.c                               |   10 +
 stubs/mon-is-qmp.c                                 |    7 +
 stubs/mon-print-filename.c                         |    6 +
 stubs/mon-printf.c                                 |   10 +
 stubs/mon-protocol-event.c                         |    6 +
 stubs/mon-set-error.c                              |    8 +
 stubs/slirp.c                                      |   17 +
 stubs/vm-stop.c                                    |    7 +
 tests/Makefile                                     |   48 +-
 trace/Makefile.objs                                |   58 ++
 ui/spice-core.c                                    |   84 ++
 util/Makefile.objs                                 |   10 +
 acl.c => util/acl.c                                |    0
 aes.c => util/aes.c                                |    0
 bitmap.c => util/bitmap.c                          |    0
 bitops.c => util/bitops.c                          |    0
 cache-utils.c => util/cache-utils.c                |    0
 compatfd.c => util/compatfd.c                      |    0
 cutils.c => util/cutils.c                          |    0
 envlist.c => util/envlist.c                        |    0
 error.c => util/error.c                            |    0
 .../event_notifier-posix.c                         |    0
 .../event_notifier-win32.c                         |    0
 host-utils.c => util/host-utils.c                  |    0
 iov.c => util/iov.c                                |    0
 module.c => util/module.c                          |    0
 notify.c => util/notify.c                          |    0
 osdep.c => util/osdep.c                            |    0
 oslib-posix.c => util/oslib-posix.c                |    0
 oslib-win32.c => util/oslib-win32.c                |    0
 path.c => util/path.c                              |    0
 util/qemu-config.c                                 |  215 +++++
 qemu-error.c => util/qemu-error.c                  |    0
 qemu-option.c => util/qemu-option.c                |    0
 qemu-progress.c => util/qemu-progress.c            |    0
 qemu-sockets.c => util/qemu-sockets.c              |    0
 qemu-thread-posix.c => util/qemu-thread-posix.c    |    0
 qemu-thread-win32.c => util/qemu-thread-win32.c    |    0
 qemu-timer-common.c => util/qemu-timer-common.c    |    0
 uri.c => util/uri.c                                |    0
 vl.c                                               |  205 +++++
 90 files changed, 1368 insertions(+), 1401 deletions(-)
 create mode 100644 fsdev/qemu-fsdev-opts.c
 create mode 100644 include/trace.h
 create mode 100644 libcacard/libcacard.syms
 delete mode 100644 qemu-config.c
 delete mode 100644 qemu-tool.c
 delete mode 100644 qemu-user.c
 create mode 100644 qobject/Makefile.objs
 rename json-lexer.c => qobject/json-lexer.c (100%)
 rename json-parser.c => qobject/json-parser.c (100%)
 rename json-streamer.c => qobject/json-streamer.c (100%)
 rename qbool.c => qobject/qbool.c (100%)
 rename qdict.c => qobject/qdict.c (100%)
 rename qerror.c => qobject/qerror.c (100%)
 rename qfloat.c => qobject/qfloat.c (100%)
 rename qint.c => qobject/qint.c (100%)
 rename qjson.c => qobject/qjson.c (100%)
 rename qlist.c => qobject/qlist.c (100%)
 rename qstring.c => qobject/qstring.c (100%)
 create mode 100644 stubs/clock-warp.c
 create mode 100644 stubs/cpu-get-clock.c
 create mode 100644 stubs/cpu-get-icount.c
 create mode 100644 stubs/get-vm-name.c
 create mode 100644 stubs/iothread-lock.c
 create mode 100644 stubs/migr-blocker.c
 create mode 100644 stubs/mon-is-qmp.c
 create mode 100644 stubs/mon-print-filename.c
 create mode 100644 stubs/mon-printf.c
 create mode 100644 stubs/mon-protocol-event.c
 create mode 100644 stubs/mon-set-error.c
 create mode 100644 stubs/slirp.c
 create mode 100644 stubs/vm-stop.c
 create mode 100644 trace/Makefile.objs
 create mode 100644 util/Makefile.objs
 rename acl.c => util/acl.c (100%)
 rename aes.c => util/aes.c (100%)
 rename bitmap.c => util/bitmap.c (100%)
 rename bitops.c => util/bitops.c (100%)
 rename cache-utils.c => util/cache-utils.c (100%)
 rename compatfd.c => util/compatfd.c (100%)
 rename cutils.c => util/cutils.c (100%)
 rename envlist.c => util/envlist.c (100%)
 rename error.c => util/error.c (100%)
 rename event_notifier-posix.c => util/event_notifier-posix.c (100%)
 rename event_notifier-win32.c => util/event_notifier-win32.c (100%)
 rename host-utils.c => util/host-utils.c (100%)
 rename iov.c => util/iov.c (100%)
 rename module.c => util/module.c (100%)
 rename notify.c => util/notify.c (100%)
 rename osdep.c => util/osdep.c (100%)
 rename oslib-posix.c => util/oslib-posix.c (100%)
 rename oslib-win32.c => util/oslib-win32.c (100%)
 rename path.c => util/path.c (100%)
 create mode 100644 util/qemu-config.c
 rename qemu-error.c => util/qemu-error.c (100%)
 rename qemu-option.c => util/qemu-option.c (100%)
 rename qemu-progress.c => util/qemu-progress.c (100%)
 rename qemu-sockets.c => util/qemu-sockets.c (100%)
 rename qemu-thread-posix.c => util/qemu-thread-posix.c (100%)
 rename qemu-thread-win32.c => util/qemu-thread-win32.c (100%)
 rename qemu-timer-common.c => util/qemu-timer-common.c (100%)
 rename uri.c => util/uri.c (100%)

             reply	other threads:[~2012-12-21 16:06 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-21 16:05 Paolo Bonzini [this message]
2012-12-21 16:05 ` [Qemu-devel] [PATCH 01/27] qemu-option: move standard option definitions out of qemu-config.c Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 02/27] stubs: fully replace qemu-tool.c and qemu-user.c Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 03/27] build: make libtool verbose when making with V=1 Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 04/27] build: support linking with libtool objects/libraries Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 05/27] build: move dtrace rules to rules.mak Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 06/27] build: remove CONFIG_SMARTCARD Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 07/27] libcacard: fix missing symbol in libcacard.so Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 08/27] libcacard: require libtool to build it Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 09/27] libcacard: prepare to use -y trick in the Makefile Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 10/27] libcacard: use per-target variable definitions Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 11/27] libcacard: add list of exported symbols Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 12/27] libcacard: rewrite Makefile in non-recursive style Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 13/27] libcacard: link vscclient to dynamic library Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 14/27] libcacard: list oslib-obj-y file explicitly Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 15/27] build: rename oslib-obj-y to util-obj-y Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 16/27] build: move util-obj-y to libqemuutil.a Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 17/27] build: move files away from tools-obj-y, common-obj-y, user-obj-y Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 18/27] build: move libqemuutil.a components to util/ Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 19/27] build: move qobject files to qobject/ and libqemuutil.a Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 20/27] build: consolidate multiple variables into universal-obj-y Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 21/27] build: move QAPI definitions for QEMU out of qapi-obj-y Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 22/27] build: move base QAPI files to libqemuutil.a Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 23/27] build: move version-obj-y to the generic LINK rule Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 24/27] build: remove coroutine-obj-y Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 25/27] build: Use separate makefile for "trace/" Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 26/27] build: fold trace-obj-y into libqemuutil.a Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 27/27] build: improve quiet output for .stp rules Paolo Bonzini
2012-12-21 20:14 ` [Qemu-devel] [PATCH 00/27] More source reorganization and build system TLC Lluís Vilanova
2012-12-22 14:04   ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1356105948-13216-1-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=alevy@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vilanova@ac.upc.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).