qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Makefile: Fix config-devices.mak not regenerated when Kconfig updated
@ 2019-11-04  9:55 Philippe Mathieu-Daudé
  2019-11-05 14:55 ` Daniel P. Berrangé
  2019-11-05 14:56 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-11-04  9:55 UTC (permalink / raw)
  To: Paolo Bonzini, Peter Maydell, qemu-devel
  Cc: Aleksandar Markovic, Thomas Huth, Philippe Mathieu-Daudé

When hw/$DIR/Kconfig is changed, the corresponding generated
hw/$DIR/config-devices.mak is not being updated.
Fix this by including all the hw/*/Kconfig files to the prerequisite
names of the rule generating the config-devices.mak files.

Fixes: e0e312f3525a (build: switch to Kconfig)
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
If OK, I plan to include this fix in the "hw/i386/pc: Split PIIX3
southbridge from i440FX northbridge" pull request.
---
 Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 0e994a275d..c1461b21e8 100644
--- a/Makefile
+++ b/Makefile
@@ -384,7 +384,10 @@ MINIKCONF_ARGS = \
     CONFIG_LINUX=$(CONFIG_LINUX) \
     CONFIG_PVRDMA=$(CONFIG_PVRDMA)
 
-MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig
+MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig \
+                   $(patsubst %,$(SRC_PATH)/hw/%,$(shell sed -ne \
+                                                    's/source \(.*\)/\1/p' \
+                                                    < $(SRC_PATH)/hw/Kconfig))
 MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py \
 
 $(SUBDIR_DEVICES_MAK): %/config-devices.mak: default-configs/%.mak $(MINIKCONF_INPUTS) $(BUILD_DIR)/config-host.mak
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Makefile: Fix config-devices.mak not regenerated when Kconfig updated
  2019-11-04  9:55 [PATCH] Makefile: Fix config-devices.mak not regenerated when Kconfig updated Philippe Mathieu-Daudé
@ 2019-11-05 14:55 ` Daniel P. Berrangé
  2019-11-05 15:07   ` Philippe Mathieu-Daudé
  2019-11-05 14:56 ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 4+ messages in thread
From: Daniel P. Berrangé @ 2019-11-05 14:55 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Aleksandar Markovic, Paolo Bonzini, Thomas Huth, qemu-devel,
	Peter Maydell

On Mon, Nov 04, 2019 at 10:55:30AM +0100, Philippe Mathieu-Daudé wrote:
> When hw/$DIR/Kconfig is changed, the corresponding generated
> hw/$DIR/config-devices.mak is not being updated.
> Fix this by including all the hw/*/Kconfig files to the prerequisite
> names of the rule generating the config-devices.mak files.
> 
> Fixes: e0e312f3525a (build: switch to Kconfig)
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> If OK, I plan to include this fix in the "hw/i386/pc: Split PIIX3
> southbridge from i440FX northbridge" pull request.
> ---
>  Makefile | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 0e994a275d..c1461b21e8 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -384,7 +384,10 @@ MINIKCONF_ARGS = \
>      CONFIG_LINUX=$(CONFIG_LINUX) \
>      CONFIG_PVRDMA=$(CONFIG_PVRDMA)
>  
> -MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig
> +MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig \
> +                   $(patsubst %,$(SRC_PATH)/hw/%,$(shell sed -ne \
> +                                                    's/source \(.*\)/\1/p' \
> +                                                    < $(SRC_PATH)/hw/Kconfig))

Why can't we use the simpler wildcard statement:

   $(wildcard $(SRC_PATH)/hw/*/Kconfig)

instead of reading the file names from the hw/Kconfig file ?

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Makefile: Fix config-devices.mak not regenerated when Kconfig updated
  2019-11-04  9:55 [PATCH] Makefile: Fix config-devices.mak not regenerated when Kconfig updated Philippe Mathieu-Daudé
  2019-11-05 14:55 ` Daniel P. Berrangé
@ 2019-11-05 14:56 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-11-05 14:56 UTC (permalink / raw)
  To: Paolo Bonzini, Peter Maydell, QEMU Developers
  Cc: Aleksandar Markovic, Thomas Huth

On Mon, Nov 4, 2019 at 10:55 AM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
>
> When hw/$DIR/Kconfig is changed, the corresponding generated
> hw/$DIR/config-devices.mak is not being updated.
> Fix this by including all the hw/*/Kconfig files to the prerequisite
> names of the rule generating the config-devices.mak files.

You can see this tread where Peter reported the failure:
https://lists.gnu.org/archive/html/qemu-devel/2019-11/msg00125.html

How to reproduce:

  $  git checkout next_branch
  $  make i386-softmmu/all
  $  git checkout prev_branch
  $ make clean
  $ make i386-softmmu/all
    # error
  $  make print-MINIKCONF_INPUTS

> Fixes: e0e312f3525a (build: switch to Kconfig)
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> If OK, I plan to include this fix in the "hw/i386/pc: Split PIIX3
> southbridge from i440FX northbridge" pull request.
> ---
>  Makefile | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 0e994a275d..c1461b21e8 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -384,7 +384,10 @@ MINIKCONF_ARGS = \
>      CONFIG_LINUX=$(CONFIG_LINUX) \
>      CONFIG_PVRDMA=$(CONFIG_PVRDMA)
>
> -MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig
> +MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig \
> +                   $(patsubst %,$(SRC_PATH)/hw/%,$(shell sed -ne \
> +                                                    's/source \(.*\)/\1/p' \
> +                                                    < $(SRC_PATH)/hw/Kconfig))
>  MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py \
>
>  $(SUBDIR_DEVICES_MAK): %/config-devices.mak: default-configs/%.mak $(MINIKCONF_INPUTS) $(BUILD_DIR)/config-host.mak
> --
> 2.21.0
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Makefile: Fix config-devices.mak not regenerated when Kconfig updated
  2019-11-05 14:55 ` Daniel P. Berrangé
@ 2019-11-05 15:07   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-11-05 15:07 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Aleksandar Markovic, Paolo Bonzini, Thomas Huth, qemu-devel,
	Peter Maydell

On 11/5/19 3:55 PM, Daniel P. Berrangé wrote:
> On Mon, Nov 04, 2019 at 10:55:30AM +0100, Philippe Mathieu-Daudé wrote:
>> When hw/$DIR/Kconfig is changed, the corresponding generated
>> hw/$DIR/config-devices.mak is not being updated.
>> Fix this by including all the hw/*/Kconfig files to the prerequisite
>> names of the rule generating the config-devices.mak files.
>>
>> Fixes: e0e312f3525a (build: switch to Kconfig)
>> Reported-by: Peter Maydell <peter.maydell@linaro.org>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> If OK, I plan to include this fix in the "hw/i386/pc: Split PIIX3
>> southbridge from i440FX northbridge" pull request.
>> ---
>>   Makefile | 5 ++++-
>>   1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/Makefile b/Makefile
>> index 0e994a275d..c1461b21e8 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -384,7 +384,10 @@ MINIKCONF_ARGS = \
>>       CONFIG_LINUX=$(CONFIG_LINUX) \
>>       CONFIG_PVRDMA=$(CONFIG_PVRDMA)
>>   
>> -MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig
>> +MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig \
>> +                   $(patsubst %,$(SRC_PATH)/hw/%,$(shell sed -ne \
>> +                                                    's/source \(.*\)/\1/p' \
>> +                                                    < $(SRC_PATH)/hw/Kconfig))
> 
> Why can't we use the simpler wildcard statement:
> 
>     $(wildcard $(SRC_PATH)/hw/*/Kconfig)
> 
> instead of reading the file names from the hw/Kconfig file ?

You might have uncommited Kconfig files, but this shouldn't be a 
problem, make is only interested in checking the modification time of 
these files.

Thanks for reviewing, I'll respin.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-11-05 15:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-04  9:55 [PATCH] Makefile: Fix config-devices.mak not regenerated when Kconfig updated Philippe Mathieu-Daudé
2019-11-05 14:55 ` Daniel P. Berrangé
2019-11-05 15:07   ` Philippe Mathieu-Daudé
2019-11-05 14:56 ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).