diff mbox series

[XEN,v7,29/51] build: add an other explicite rules to not build $(XEN_ROOT)/.config

Message ID 20210824105038.1257926-30-anthony.perard@citrix.com (mailing list archive)
State New, archived
Headers show
Series xen: Build system improvements, now with out-of-tree build! | expand

Commit Message

Anthony PERARD Aug. 24, 2021, 10:50 a.m. UTC
GNU Make will try to rebuild every Makefile included with the
"include" directive, so everytime Config.mk is used, make will try to
build ".config". This would normally not be an issue, unless we happen
to have a rules which match. This is the case with Kconfig in xen/.

While we had a workaround in "xen/Makefile", this ".config" files
becomes an issue again in "xen/tools/kconfig/Makefile". It has a
target "%.config".

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 xen/Rules.mk | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Jan Beulich Oct. 11, 2021, 2:29 p.m. UTC | #1
On 24.08.2021 12:50, Anthony PERARD wrote:
> GNU Make will try to rebuild every Makefile included with the
> "include" directive, so everytime Config.mk is used, make will try to
> build ".config". This would normally not be an issue, unless we happen
> to have a rules which match. This is the case with Kconfig in xen/.
> 
> While we had a workaround in "xen/Makefile", this ".config" files
> becomes an issue again in "xen/tools/kconfig/Makefile". It has a
> target "%.config".

"we had" sounds like we don't have such anymore, but I don't think I've
seen it go away. I'm also not convinced working around an isolated issue
in xen/tools/kconfig/Makefile is appropriate to be done by adding stuff
to Rules.mk.

Jan
diff mbox series

Patch

diff --git a/xen/Rules.mk b/xen/Rules.mk
index a62c761be8d1..f1043a78a332 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -11,6 +11,10 @@  __build:
 -include $(BASEDIR)/include/config/auto.conf
 
 include $(XEN_ROOT)/Config.mk
+
+# Don't try to remake this file included by Config.mk.
+$(XEN_ROOT)/.config: ;
+
 include $(BASEDIR)/scripts/Kbuild.include
 
 ifndef obj