From 991d1c285a011cf8b139d5cd3299aa87f735cbc6 Mon Sep 17 00:00:00 2001 From: William Vallet Date: Fri, 8 Aug 2025 11:04:03 +0200 Subject: [PATCH] Fix compilation issue on macOS --- Makefile.rules | 6 +----- Makefile.standard_app | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Makefile.rules b/Makefile.rules index a9fc87f2e..e916aa73c 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -40,11 +40,7 @@ endif endif endif -define uniq = - $(eval seen :=) - $(foreach _,$1,$(if $(filter $_,${seen}),,$(eval seen += $_))) - ${seen} -endef +uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))) define check_duplicate = $(eval LIST := $(sort $(foreach file_h, $(notdir $1), $(notdir $(shell find $2 -name $(file_h)))))) diff --git a/Makefile.standard_app b/Makefile.standard_app index 6a7ee9746..6ed60178a 100644 --- a/Makefile.standard_app +++ b/Makefile.standard_app @@ -174,7 +174,7 @@ endif ifneq ($(DISABLE_STANDARD_WEBUSB), 1) APP_WEBUSB_URL ?= "" - WEBUSB_URL_SIZE_B = $(shell echo -n $(APP_WEBUSB_URL) | wc -c) + WEBUSB_URL_SIZE_B = $(shell echo -n $(APP_WEBUSB_URL) | wc -c | xargs) WEBUSB_URL=$(shell echo -n $(APP_WEBUSB_URL) | sed -e "s/./\\\'\0\\\',/g") DEFINES += HAVE_WEBUSB WEBUSB_URL_SIZE_B=$(WEBUSB_URL_SIZE_B) WEBUSB_URL=$(WEBUSB_URL) endif