Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] Complain loudly if BR2_GLOBAL_PATCH_DIR does not exit
@ 2014-10-21  8:42 Michal Sojka
  2014-10-21 16:58 ` Yann E. MORIN
  2014-10-24 23:58 ` Peter Korsgaard
  0 siblings, 2 replies; 10+ messages in thread
From: Michal Sojka @ 2014-10-21  8:42 UTC (permalink / raw)
  To: buildroot

If the BR2_GLOBAL_PATCH_DIR is misspelled in the .config or if somebody
renamed the existing directory with patches, buildroot happily builds
everything but without the patches. As this can lead to surprising
results, it is better to fail and give a user a message that
BR2_GLOBAL_PATCH_DIR is wrongly configured.

Signed-off-by: Michal Sojka <sojka@merica.cz>
---
 package/pkg-generic.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 259ee02..46d92aa 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -162,6 +162,11 @@ $(BUILD_DIR)/%/.stamp_patched:
 	$(Q)touch $@
 	@$(call step_end,patch)
 
+# Check that all directories specified in BR2_GLOBAL_PATCH_DIR exist.
+$(foreach dir,$(call qstrip,$(BR2_GLOBAL_PATCH_DIR)),\
+	$(if $(wildcard $(dir)),,\
+		$(error BR2_GLOBAL_PATCH_DIR contains nonexistent directory $(dir))))
+
 # Configure
 $(BUILD_DIR)/%/.stamp_configured:
 	@$(call step_start,configure)
-- 
2.1.1

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

end of thread, other threads:[~2014-10-24 23:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-21  8:42 [Buildroot] [PATCH] Complain loudly if BR2_GLOBAL_PATCH_DIR does not exit Michal Sojka
2014-10-21 16:58 ` Yann E. MORIN
2014-10-22 11:26   ` Maxime Hadjinlian
2014-10-22 11:43     ` Michal Sojka
2014-10-22 11:54       ` Maxime Hadjinlian
2014-10-22 14:01         ` Michal Sojka
2014-10-22 14:26           ` Maxime Hadjinlian
2014-10-22 16:35         ` Arnout Vandecappelle
2014-10-23 17:41           ` Maxime Hadjinlian
2014-10-24 23:58 ` Peter Korsgaard

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