From b4caa7f7663ec24c854002f3f37a3e46354ed318 Mon Sep 17 00:00:00 2001
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Tue, 11 Jul 2017 04:43:52 +0200
Subject: [PATCH] build: make GLUON_FEATURES error handling compatible with
 older Make versions

.SHELLSTATUS was not available before Make 4.2.
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 8403981e7..fa6b9404d 100644
--- a/Makefile
+++ b/Makefile
@@ -77,8 +77,8 @@ list-targets: FORCE
 
 GLUON_DEFAULT_PACKAGES := -odhcpd -ppp -ppp-mod-pppoe -wpad-mini gluon-core ip6tables hostapd-mini
 
-GLUON_FEATURE_PACKAGES := $(shell scripts/features.sh '$(GLUON_FEATURES)')
-ifneq ($(.SHELLSTATUS),0)
+GLUON_FEATURE_PACKAGES := $(shell scripts/features.sh '$(GLUON_FEATURES)' || echo '__ERROR__')
+ifneq ($(filter __ERROR__,$(GLUON_FEATURE_PACKAGES)),)
 $(error Error while evaluating GLUON_FEATURES)
 endif
 
-- 
GitLab