Skip to contentSkip to conversation

Makefile: Fix config-devices.mak not regenerated when Kconfig updated

PATCH In review Philippe Mathieu-Daudé 3 participants 3 messages Nov 5, 2019 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Makefile: Fix config-devices.mak not regenerated when Kconfig updated

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)

---
v2:
Simplify using the wildcard() function instead of calling sed (danpb)

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 branch_modifying_kconfig
  $ make i386-softmmu/all
  $ make clean
  $ git checkout prev_branch
  $ make clean
  $ make i386-softmmu/all
    # error

If OK, I plan to include this fix in the "hw/i386/pc: Split PIIX3 southbridge from i440FX northbridge" pull request.

---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Makefile +2 -1
index 0e994a275d..f4fca08cd7 100644
@@ -384,7 +384,8 @@ 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 \
+                   $(wildcard $(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
Signature · 1 line
2.21.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 38 lines · 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)

---
v2:
Simplify using the wildcard() function instead of calling sed (danpb)

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 branch_modifying_kconfig
  $ make i386-softmmu/all
  $ make clean
  $ git checkout prev_branch
  $ make clean
  $ make i386-softmmu/all
    # error

If OK, I plan to include this fix in the "hw/i386/pc: Split PIIX3 southbridge from i440FX northbridge" pull request.

---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Makefile +0 -0
index 0e994a275d..f4fca08cd7 100644

Makefile MINIKCONF_ARGS = \ · line 391

Quoted 9 lines
Makefile +2 -1
@@ -384,7 +384,8 @@ 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 \
+                   $(wildcard $(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
Reviewed-by on v2 1/1
#2 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 26 lines · 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)

---
v2:
Simplify using the wildcard() function instead of calling sed (danpb)

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 branch_modifying_kconfig
  $ make i386-softmmu/all
  $ make clean
  $ git checkout prev_branch
  $ make clean
  $ make i386-softmmu/all
    # error
Quoted 5 lines

If OK, I plan to include this fix in the "hw/i386/pc: Split PIIX3 southbridge from i440FX northbridge" pull request.

---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Regards,
Daniel

Signature · 3 lines
|: 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 :|