From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4B33C4727E for ; Wed, 30 Sep 2020 12:50:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8D5B120657 for ; Wed, 30 Sep 2020 12:50:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728496AbgI3Mug (ORCPT ); Wed, 30 Sep 2020 08:50:36 -0400 Received: from mx2.suse.de ([195.135.220.15]:54866 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725776AbgI3Mug (ORCPT ); Wed, 30 Sep 2020 08:50:36 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 29CA0AF26; Wed, 30 Sep 2020 12:50:35 +0000 (UTC) Subject: Re: [PATCH v4 02/12] meson: Allow optional target/${ARCH}/Kconfig To: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Cc: qemu-devel@nongnu.org, Thomas Huth , Paolo Bonzini , Richard Henderson , Fam Zheng , Peter Maydell , kvm@vger.kernel.org, =?UTF-8?Q?Alex_Benn=c3=a9e?= , qemu-arm@nongnu.org, Richard Henderson References: <20200929224355.1224017-1-philmd@redhat.com> <20200929224355.1224017-3-philmd@redhat.com> From: Claudio Fontana Message-ID: <19b1318a-f9be-5808-760b-ba7748d48267@suse.de> Date: Wed, 30 Sep 2020 14:50:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200929224355.1224017-3-philmd@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On 9/30/20 12:43 AM, Philippe Mathieu-Daudé wrote: > Extend the generic Meson script to pass optional target Kconfig > file to the minikconf script. > > Signed-off-by: Philippe Mathieu-Daudé > --- > We could use fs.exists() but is_file() is more specific > (can not be a directory). > > Cc: Paolo Bonzini > Cc: Claudio Fontana > --- > meson.build | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/meson.build b/meson.build > index d36dd085b5..9ab5d514d7 100644 > --- a/meson.build > +++ b/meson.build > @@ -529,6 +529,7 @@ kconfig_external_symbols = [ > ] > ignored = ['TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_DIRS'] > > +fs = import('fs') > foreach target : target_dirs > config_target = keyval.load(meson.current_build_dir() / target / 'config-target.mak') > > @@ -569,8 +570,13 @@ foreach target : target_dirs > endforeach > > config_devices_mak = target + '-config-devices.mak' > + target_kconfig = 'target' / config_target['TARGET_BASE_ARCH'] / 'Kconfig' > + minikconf_input = ['default-configs' / target + '.mak', 'Kconfig'] > + if fs.is_file(target_kconfig) > + minikconf_input += [target_kconfig] > + endif > config_devices_mak = configure_file( > - input: ['default-configs' / target + '.mak', 'Kconfig'], > + input: minikconf_input, > output: config_devices_mak, > depfile: config_devices_mak + '.d', > capture: true, > I can't say I understand it, but the general idea seems right to me. Ciao, Claudio