From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iojrv-0001A3-IG for qemu-devel@nongnu.org; Sun, 04 Nov 2007 13:06:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iojrs-00019q-4R for qemu-devel@nongnu.org; Sun, 04 Nov 2007 13:06:42 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iojrr-00019n-Ul for qemu-devel@nongnu.org; Sun, 04 Nov 2007 13:06:39 -0500 Received: from relay01.mx.bawue.net ([193.7.176.67]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Iojrr-0005cC-Bx for qemu-devel@nongnu.org; Sun, 04 Nov 2007 13:06:39 -0500 Date: Sun, 4 Nov 2007 18:06:35 +0000 From: Thiemo Seufer Subject: Re: [Qemu-devel] How to split vl.h Message-ID: <20071104180635.GB9363@networkno.de> References: <4729B592.5080006@bellard.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org Blue Swirl wrote: > On 11/1/07, Fabrice Bellard wrote: > > Blue Swirl wrote: > > > Hi, > > > > > > With the automatic dependency rule installed, modifying vl.h causes > > > all files to be recompiled. This is of course the correct action, but > > > it's a major slowdown for development too. > > > > There must be an option in the Makefile to disable the automatic > > dependency check. > > > > > How should we split vl.h into smaller pieces? Give each device a > > > header file, like m48t59? What about other stuff exported from vl.c? > > > > The net result is that you will have dozens of header files with only > > one line in them as most devices only export one function. > > I have another solution: include all architecture specific files from > the main file. This actually makes the compilation faster and the > resulting binary is smaller (maybe faster). I it a solution? You always end up with the worst case of recompiling everything now. > Changing the architecture > specific code needs no changes to vl.h, just a recompile of sun4m.c, > but this is instantaneous on my machine. Automatic dependencies also > handle this case. I guess some may find this style pretty ugly. It is ugly. You basically re-invented gcc's -combine option but without avoiding the namespace problem of a single file scope. Thiemo