Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] prevent recursion in %_defconfig rules
@ 2014-01-07 16:22 Jérémy Rosen
  2014-01-13  8:52 ` Jeremy Rosen
  2014-01-17 17:52 ` Yann E. MORIN
  0 siblings, 2 replies; 14+ messages in thread
From: Jérémy Rosen @ 2014-01-07 16:22 UTC (permalink / raw)
  To: buildroot

Signed-off-by: J?r?my Rosen <jeremy.rosen@openwide.fr>

---
The following command, run from a clean buildroot checkout

make O=.. BR2_EXTERNAL=.. raspberrypi_defconfig

cause the following output, and makes stop :


make: *** Pas de r?gle pour fabriquer la cible ? /home/rosen/tmp/buildroot/
configs/../configs/../configs/../configs/<lots more >/../configs/
raspberrypi_defconfig ?, n?cessaire pour ? /home/rosen/tmp/buildroot/
configs/../configs/../configs/<lots more>/../configs/
raspberrypi_defconfig ?. Arr?t.

The problem is that the buildroot makefile has two rules to generate
%_defconfig: One that depends on $(TOPDIR)/configs/%_defconfig and the
other one that depends on $(BR2_EXTERNAL)/configs/%_defconfig.

When one rule checks for the file, the other rule becomes an implicit rule
for the dependancy causing an infinite cross-recursion.

By overriding the implicit rule, we prevent the infinite recursion.
---
 Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Makefile b/Makefile
index 4320e7b..41d641c 100644
--- a/Makefile
+++ b/Makefile
@@ -760,10 +760,14 @@ defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@$(COMMON_CONFIG_ENV) $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
 
+$(TOPDIR)/configs/%_defconfig:;
+
 %_defconfig: $(BUILD_DIR)/buildroot-config/conf $(BR2_EXTERNAL)/configs/%_defconfig outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@$(COMMON_CONFIG_ENV) $< --defconfig=$(BR2_EXTERNAL)/configs/$@ $(CONFIG_CONFIG_IN)
 
+$(BR2_EXTERNAL)/configs/%_defconfig:;
+
 savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@$(COMMON_CONFIG_ENV) $< \
-- 
1.8.5.2

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

end of thread, other threads:[~2014-01-22 14:16 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-07 16:22 [Buildroot] [PATCH] prevent recursion in %_defconfig rules Jérémy Rosen
2014-01-13  8:52 ` Jeremy Rosen
2014-01-13  8:59   ` Peter Korsgaard
2014-01-17 17:52 ` Yann E. MORIN
2014-01-17 18:09   ` Yann E. MORIN
2014-01-17 19:54     ` Yann E. MORIN
2014-01-20  8:03       ` Jeremy Rosen
2014-01-20  8:13         ` Jeremy Rosen
2014-01-20 18:31           ` Yann E. MORIN
2014-01-20 22:58           ` Romain Naour
2014-01-20 23:58             ` Yann E. MORIN
2014-01-21  8:44               ` Jeremy Rosen
2014-01-21 18:38                 ` Yann E. MORIN
2014-01-22 14:16                   ` Jeremy Rosen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox