From 4c4ca215455579bb70f07998a30bbf06443a1bd7 Mon Sep 17 00:00:00 2001
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Fri, 30 Oct 2015 20:06:09 +0100
Subject: [PATCH] build: fix creation of opkg key when BUILDDIR hasn't been
 created yet

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

diff --git a/Makefile b/Makefile
index 890fdfc86..caea217b7 100644
--- a/Makefile
+++ b/Makefile
@@ -217,7 +217,7 @@ prepare-early: FORCE
 
 create-key: prepare-early
 	[ -s $(GLUON_OPKG_KEY) -a -s $(GLUON_OPKG_KEY).pub ] || \
-		$(STAGING_DIR_HOST)/bin/usign -G -s $(GLUON_OPKG_KEY) -p $(GLUON_OPKG_KEY).pub -c "Gluon opkg key"
+		mkdir -p $$(dirname $(GLUON_OPKG_KEY)) && $(STAGING_DIR_HOST)/bin/usign -G -s $(GLUON_OPKG_KEY) -p $(GLUON_OPKG_KEY).pub -c "Gluon opkg key"
 
 include $(GLUONDIR)/targets/targets.mk
 
-- 
GitLab