Paolo Bonzini <pbonz...@redhat.com> writes: > Il 14/09/2012 15:36, Peter Maydell ha scritto: >> On 14 September 2012 14:17, Paolo Bonzini <pbonz...@redhat.com> wrote: >>> here is a proposal for moving around 150 C files currently in the >>> toplevel directory to separate, well-delimited subdirectories. >> >> No general objection (though some specific comments below). However >> I think it would be helpful if you could provide some descriptions of >> how your new subdirectories are defined. Otherwise the "well-delimited" >> bit is largely in your head and future new files aren't likely to >> respect it except by accident :-) > > Good question. I just tried to use some taste, so well-delimited is a > bit of a lie. I mostly care that sysemu/, tools/, qga/ and user/ are > well-delimited, i.e. executables do not have sources from other > executables' directories, and similarly common/ is just for emulators. > >>> Header >>> files would be moved for now in include/, preparing for subsequent >>> reorganization of headers. >> >> Just in include/, or in include/qemu/ ? (IIRC Anthony was hoping >> to only move cleaned-up headers in there?) > > I dislike include/qemu, for the same reason I dislike qemu-*. :)
It's good to put includes in a single direction such that you can do -Iinclude and then: #include "qemu/foo.h" Which is better than: #include "foo.h" Because the later can create confusion/conflict with system headers whereas the former is (hopefully) completely unambiguous. > Moving to include/ would be to clean up the top-level directory, withour > touching the source code. If something can be moved directly to one of > the new source directories, that's also fine but I don't have high > hopes. I actually thinking moving to -Iinclude is a Good Thing for now because it avoids touching a bunch of .c files. In the longer term, we should continue to clean up headers and move them into qemu/ though. Regards, Anthony Liguori