Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MeQBj-0007Cu-3B for qemu-devel@nongnu.org; Fri, 21 Aug 2009 05:13:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MeQBd-00070B-7G for qemu-devel@nongnu.org; Fri, 21 Aug 2009 05:13:33 -0400 Received: from [199.232.76.173] (port=55059 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeQBd-0006zn-06 for qemu-devel@nongnu.org; Fri, 21 Aug 2009 05:13:29 -0400 From: Juan Quintela In-Reply-To: <4A8E605B.4050807@gnu.org> (Paolo Bonzini's message of "Fri, 21 Aug 2009 10:52:43 +0200") References: <8321db3e7d3b04a58a07b77256f5c11fad54c1dd.1250810973.git.quintela@redhat.com> <4A8E605B.4050807@gnu.org> Date: Fri, 21 Aug 2009 11:11:08 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 03/14] configure stellaris device only for arm softmmu List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org Paolo Bonzini wrote: >> # What drivers should we compile >> ssi_bus=no >> +stellaris=no > > What about calling these CONFIG_SSI CONFIG_STELLARIS etc. already in > configure, and initializing them with > > : ${CONFIG_SSI=n} > : ${CONFIG_STELLARIS=n} > >> @@ -2236,6 +2238,10 @@ if test "$ssi_bus" = "yes" ; then >> echo "CONFIG_SSI=y">> $config_host_mak >> fi >> >> +if test "$stellaris" = "yes" ; then >> + echo "CONFIG_STELLARIS=y">> $config_host_mak >> +fi > > Then you can: > > 1) save duplication using > > for i in CONFIG_SSI CONFIG_STELLARIS; do > case \$$i in > if test "$config_var" = y; then > echo "$i=y">> $config_host_mak > fi > done > > 2) allow the user to force your choice by setting environment > variables when calling configure (not sure how useful this is). > > Otherwise, looks nice! I would do the other way around :) I.e. always print CONFIG_STELLARIS=y or CONFIG_STELLARIS=n That will move from 3 lines to 1 line. About the big problem, is that in configure, we have 2 kinds of variables: - configure variables: usually lowercase - variables for build system: usually uppercase Notice that current code does a mess at distinguishing them, it _mainly_ is the way I have described. About your way, perhaps itis a better idea, to _always_ use the configure names, that way we don't have to "translate" from one name to the other. Later, Juan.