diff mbox series

[XEN,2/2] xen/build: use the correct kconfig makefile

Message ID 20200512175206.20314-3-stewart.hildebrand@dornerworks.com (mailing list archive)
State New, archived
Headers show
Series xen/build: fix kconfig errors during config merge | expand

Commit Message

Stewart Hildebrand May 12, 2020, 5:52 p.m. UTC
This resolves the following observed error:

#
# merged configuration written to .config (needs make)
#
make -f /path/to/xen/xen/../xen/Makefile olddefconfig
make[2]: Entering directory '/path/to/xen/xen'
make[2]: *** No rule to make target 'olddefconfig'.  Stop.
make[2]: Leaving directory '/path/to/xen/xen'
tools/kconfig/Makefile:95: recipe for target 'custom.config' failed

Signed-off-by: Stewart Hildebrand <stewart.hildebrand@dornerworks.com>

---
It's possible there are other places where the Makefile path will need
to be changed. This just happened to be the one that failed for me.
---
 xen/tools/kconfig/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Anthony PERARD May 15, 2020, 2:51 p.m. UTC | #1
On Tue, May 12, 2020 at 01:52:06PM -0400, Stewart Hildebrand wrote:
> This resolves the following observed error:
> 
> #
> # merged configuration written to .config (needs make)
> #
> make -f /path/to/xen/xen/../xen/Makefile olddefconfig
> make[2]: Entering directory '/path/to/xen/xen'
> make[2]: *** No rule to make target 'olddefconfig'.  Stop.
> make[2]: Leaving directory '/path/to/xen/xen'
> tools/kconfig/Makefile:95: recipe for target 'custom.config' failed

That commit message is kind of misleading, as the command run which
lead to the error isn't written. Could you expand the commit message to
include the problematic command ran? Something like:
    Running `make custom.config` fails with:
    ...

> Signed-off-by: Stewart Hildebrand <stewart.hildebrand@dornerworks.com>
> 
> ---
> It's possible there are other places where the Makefile path will need
> to be changed. This just happened to be the one that failed for me.

The two other locations that calls back on the main Makefile aren't
usable by Xen, they would lead to another error anyway. So fixing the
only %.config is good enough.

> ---
>  xen/tools/kconfig/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/tools/kconfig/Makefile b/xen/tools/kconfig/Makefile
> index fd37f4386a..f39521a0ed 100644
> --- a/xen/tools/kconfig/Makefile
> +++ b/xen/tools/kconfig/Makefile
> @@ -94,7 +94,7 @@ configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/c
>  %.config: $(obj)/conf
>  	$(if $(call configfiles),, $(error No configuration exists for this target on this architecture))
>  	$(Q)$(CONFIG_SHELL) $(srctree)/tools/kconfig/merge_config.sh -m .config $(configfiles)
> -	$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
> +	$(Q)$(MAKE) -f $(srctree)/tools/kconfig/Makefile.kconfig olddefconfig

Well, the issue would be with $(srctree)/Makefile, but I don't think
that can be fixed right now. So that change is good for now.


With the commit message adjusted:
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>

Thanks,
diff mbox series

Patch

diff --git a/xen/tools/kconfig/Makefile b/xen/tools/kconfig/Makefile
index fd37f4386a..f39521a0ed 100644
--- a/xen/tools/kconfig/Makefile
+++ b/xen/tools/kconfig/Makefile
@@ -94,7 +94,7 @@  configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/c
 %.config: $(obj)/conf
 	$(if $(call configfiles),, $(error No configuration exists for this target on this architecture))
 	$(Q)$(CONFIG_SHELL) $(srctree)/tools/kconfig/merge_config.sh -m .config $(configfiles)
-	$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
+	$(Q)$(MAKE) -f $(srctree)/tools/kconfig/Makefile.kconfig olddefconfig
 
 PHONY += kvmconfig
 kvmconfig: kvm_guest.config