From caa09e2faec7ea555d9d2071fb0216116a645ebf Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 15 Dec 2021 20:48:53 +0100 Subject: [PATCH 1/2] Makefile: remove duplicate GLUON_RELEASE entry from GLUON_VARS --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 760335a2..c8f03f6f 100644 --- a/Makefile +++ b/Makefile @@ -70,7 +70,7 @@ GLUON_VARS = \ GLUON_VERSION GLUON_SITE_VERSION \ GLUON_RELEASE GLUON_REGION GLUON_MULTIDOMAIN GLUON_AUTOREMOVE GLUON_DEBUG GLUON_MINIFY GLUON_DEPRECATED \ GLUON_DEVICES GLUON_TARGETSDIR GLUON_PATCHESDIR GLUON_TMPDIR GLUON_IMAGEDIR GLUON_PACKAGEDIR GLUON_DEBUGDIR \ - GLUON_SITEDIR GLUON_RELEASE GLUON_AUTOUPDATER_BRANCH GLUON_AUTOUPDATER_ENABLED GLUON_LANGS GLUON_BASE_FEEDS \ + GLUON_SITEDIR GLUON_AUTOUPDATER_BRANCH GLUON_AUTOUPDATER_ENABLED GLUON_LANGS GLUON_BASE_FEEDS \ GLUON_TARGET BOARD SUBTARGET unexport $(GLUON_VARS) From 286d07b35f7e23c7e4d67ee103a67154a96a95cc Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 15 Dec 2021 20:59:26 +0100 Subject: [PATCH 2/2] Makefile: error earlier when site.mk is missing The site.mk target was only evaluated after the whole makefile was parsed. This caused the GLUON_DEPRECATED error to be emitted first (hiding the more helpful message that no site config was found) on Gluon 2021.1.x, where GLUON_DEPRECATED is used in a toplevel if in targets.mk. By moving the check from recipe context to the toplevel, we ensure that it is evaluated during parsing. --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c8f03f6f..676aa06d 100644 --- a/Makefile +++ b/Makefile @@ -19,8 +19,9 @@ escape = '$(subst ','\'',$(1))' GLUON_SITEDIR ?= site $(eval $(call mkabspath,GLUON_SITEDIR)) -$(GLUON_SITEDIR)/site.mk: - $(error No site configuration was found. Please check out a site configuration to $(GLUON_SITEDIR)) +ifeq ($(realpath $(GLUON_SITEDIR)/site.mk),) +$(error No site configuration was found. Please check out a site configuration to $(GLUON_SITEDIR)) +endif include $(GLUON_SITEDIR)/site.mk