From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDuki-0007Lz-W2 for qemu-devel@nongnu.org; Mon, 26 Aug 2013 07:14:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VDuka-00066a-00 for qemu-devel@nongnu.org; Mon, 26 Aug 2013 07:14:32 -0400 Received: from mail-qe0-x22f.google.com ([2607:f8b0:400d:c02::22f]:59145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDukZ-00066P-Tg for qemu-devel@nongnu.org; Mon, 26 Aug 2013 07:14:23 -0400 Received: by mail-qe0-f47.google.com with SMTP id b4so1647248qen.20 for ; Mon, 26 Aug 2013 04:14:23 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <521B388B.9070806@redhat.com> Date: Mon, 26 Aug 2013 13:14:19 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1377471536-12423-1-git-send-email-akoskovacs@gmx.com> <1377471536-12423-47-git-send-email-akoskovacs@gmx.com> In-Reply-To: <1377471536-12423-47-git-send-email-akoskovacs@gmx.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 46/47] configure: Generate Kconfig.targets with --target-list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?w4Frb3MgS292w6Fjcw==?= Cc: qemu-devel@nongnu.org Il 26/08/2013 00:58, Ákos Kovács ha scritto: > Signed-off-by: Ákos Kovács > --- > configure | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/configure b/configure > index 18fa608..353c0cb 100755 > --- a/configure > +++ b/configure > @@ -4288,6 +4288,7 @@ case "$target_name" in > ;; > sparc64) > TARGET_BASE_ARCH=sparc > + kconfig_subdirs="$kconfig_subdirs sparc64" > ;; > sparc32plus) > TARGET_ARCH=sparc64 > @@ -4311,6 +4312,7 @@ if [ "$TARGET_BASE_ARCH" = "" ]; then > TARGET_BASE_ARCH=$TARGET_ARCH > fi > > +kconfig_subdirs="$kconfig_subdirs $TARGET_BASE_ARCH" > symlink "$source_path/Makefile.target" "$target_dir/Makefile" > > upper() { > @@ -4494,6 +4496,15 @@ echo "QEMU_CFLAGS+=$cflags" >> $config_target_mak > > done # for target in $targets > > +# Generate Kconfig.targets > +kconfig_targets="Kconfig.targets" > +kconfig_subdirs=$(echo $kconfig_subdirs | tr ' ' '\n' | sort -u | tr '\n' ' ') > +echo "# Automatically generated by configure - do not modify" > $kconfig_targets > + > +for i in $kconfig_subdirs ; do > + echo "source \"hw/$i/Kconfig\"" >> $kconfig_targets > +done > + > if [ "$pixman" = "internal" ]; then > echo "config-host.h: subdir-pixman" >> $config_host_mak > fi > There is one issue that we have not solved yet here (pointed out by Peter Maydell on IRC). Right now, the presence of a file in default-configs/ is used to check if a target name is correct. We need to figure out a different way to do the same thing. This needs to cover both softmmu and user targets. For softmmu, perhaps there should be a hw/boards/ directory with a subdirectory for each target. "source hw/i386/Kconfig" (for Kconfig) or "obj-y += ../i386/" can be used to recurse back to a common directory from there. For linux-user, the problem is that we don't have anything to configure with Kconfig---so no reason to have a Kconfig file or a directory structure with one directory per target. Paolo