[Qemu-devel] [PATCH] Makefile: Fix inclusion of the config-devices.mak.d Kconfig dependencies

Thomas Huth posted 1 patch 4 years, 10 months ago
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test checkpatch passed
Test asan passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190510082057.9104-1-thuth@redhat.com
Makefile               | 2 +-
configure              | 2 +-
docs/devel/kconfig.rst | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
[Qemu-devel] [PATCH] Makefile: Fix inclusion of the config-devices.mak.d Kconfig dependencies
Posted by Thomas Huth 4 years, 10 months ago
The Makefile tries to include device Kconfig dependencies via

 -include $(SUBDIR_DEVICES_MAK_DEP)

and thus expects files that match *-softmmu/config-devices.mak.d ...
However, the minikconf script currently generates files a la
"*-softmmu-config.devices.mak.d" instead, so the dependency files
simply got ignored so far. For example, after a "touch hw/arm/Kconfig",
the arm-softmmu/config-devices.mak file is currently not re-generated.
Fix it by putting the dependency files in the *-softmmu folders now.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 Makefile               | 2 +-
 configure              | 2 +-
 docs/devel/kconfig.rst | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index a971247cac..d878767066 100644
--- a/Makefile
+++ b/Makefile
@@ -350,7 +350,7 @@ endif
 # This has to be kept in sync with Kconfig.host.
 MINIKCONF_ARGS = \
     $(CONFIG_MINIKCONF_MODE) \
-    $@ $*-config.devices.mak.d $< $(MINIKCONF_INPUTS) \
+    $@ $*/config-devices.mak.d $< $(MINIKCONF_INPUTS) \
     CONFIG_KVM=$(CONFIG_KVM) \
     CONFIG_SPICE=$(CONFIG_SPICE) \
     CONFIG_IVSHMEM=$(CONFIG_IVSHMEM) \
diff --git a/configure b/configure
index 63f312bd1f..8999698bc2 100755
--- a/configure
+++ b/configure
@@ -1832,7 +1832,7 @@ exit 0
 fi
 
 # Remove old dependency files to make sure that they get properly regenerated
-rm -f *-config-devices.mak.d
+rm -f */config-devices.mak.d
 
 if test -z "$python"
 then
diff --git a/docs/devel/kconfig.rst b/docs/devel/kconfig.rst
index cce146f87d..d6f8eb0977 100644
--- a/docs/devel/kconfig.rst
+++ b/docs/devel/kconfig.rst
@@ -299,7 +299,7 @@ and also listed as follows in the top-level Makefile's ``MINIKCONF_ARGS``
 variable::
 
     MINIKCONF_ARGS = \
-      $@ $*-config.devices.mak.d $< $(MINIKCONF_INPUTS) \
+      $@ $*/config-devices.mak.d $< $(MINIKCONF_INPUTS) \
       CONFIG_KVM=$(CONFIG_KVM) \
       CONFIG_SPICE=$(CONFIG_SPICE) \
       CONFIG_TPM=$(CONFIG_TPM) \
-- 
2.21.0


Re: [Qemu-devel] [PATCH] Makefile: Fix inclusion of the config-devices.mak.d Kconfig dependencies
Posted by Paolo Bonzini 4 years, 10 months ago
On 10/05/19 03:20, Thomas Huth wrote:
> The Makefile tries to include device Kconfig dependencies via
> 
>  -include $(SUBDIR_DEVICES_MAK_DEP)
> 
> and thus expects files that match *-softmmu/config-devices.mak.d ...
> However, the minikconf script currently generates files a la
> "*-softmmu-config.devices.mak.d" instead, so the dependency files
> simply got ignored so far. For example, after a "touch hw/arm/Kconfig",
> the arm-softmmu/config-devices.mak file is currently not re-generated.
> Fix it by putting the dependency files in the *-softmmu folders now.
> 
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  Makefile               | 2 +-
>  configure              | 2 +-
>  docs/devel/kconfig.rst | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index a971247cac..d878767066 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -350,7 +350,7 @@ endif
>  # This has to be kept in sync with Kconfig.host.
>  MINIKCONF_ARGS = \
>      $(CONFIG_MINIKCONF_MODE) \
> -    $@ $*-config.devices.mak.d $< $(MINIKCONF_INPUTS) \
> +    $@ $*/config-devices.mak.d $< $(MINIKCONF_INPUTS) \
>      CONFIG_KVM=$(CONFIG_KVM) \
>      CONFIG_SPICE=$(CONFIG_SPICE) \
>      CONFIG_IVSHMEM=$(CONFIG_IVSHMEM) \
> diff --git a/configure b/configure
> index 63f312bd1f..8999698bc2 100755
> --- a/configure
> +++ b/configure
> @@ -1832,7 +1832,7 @@ exit 0
>  fi
>  
>  # Remove old dependency files to make sure that they get properly regenerated
> -rm -f *-config-devices.mak.d
> +rm -f */config-devices.mak.d
>  
>  if test -z "$python"
>  then
> diff --git a/docs/devel/kconfig.rst b/docs/devel/kconfig.rst
> index cce146f87d..d6f8eb0977 100644
> --- a/docs/devel/kconfig.rst
> +++ b/docs/devel/kconfig.rst
> @@ -299,7 +299,7 @@ and also listed as follows in the top-level Makefile's ``MINIKCONF_ARGS``
>  variable::
>  
>      MINIKCONF_ARGS = \
> -      $@ $*-config.devices.mak.d $< $(MINIKCONF_INPUTS) \
> +      $@ $*/config-devices.mak.d $< $(MINIKCONF_INPUTS) \
>        CONFIG_KVM=$(CONFIG_KVM) \
>        CONFIG_SPICE=$(CONFIG_SPICE) \
>        CONFIG_TPM=$(CONFIG_TPM) \
> 

Queued, thanks.

Paolo