From c010f59b8c61312ee4c96b3553159f86db1113e7 Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Thu, 17 Oct 2019 09:51:49 +0200 Subject: [PATCH] Makefile.include: remove repeated OS declaration - OS := $(shell uname) is already declared in `Makefile.include` re-declaring it means it will be re-evalauted multiple times uselessly. --- Makefile.include | 2 +- boards/common/remote/Makefile.include | 1 - boards/openmote-b/Makefile.include | 1 - makefiles/tools/bossa.inc.mk | 1 - makefiles/tools/serial.inc.mk | 1 - 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile.include b/Makefile.include index 02f5d81f07..3878d92b6b 100644 --- a/Makefile.include +++ b/Makefile.include @@ -103,7 +103,7 @@ CLEAN = $(filter clean, $(MAKECMDGOALS)) include $(RIOTMAKE)/utils/variables.mk include $(RIOTMAKE)/utils/strings.mk -# get host operating system +# OS is always needed so use simple variable expansion so only evaluated once OS := $(shell uname) # set python path, e.g. for tests diff --git a/boards/common/remote/Makefile.include b/boards/common/remote/Makefile.include index 4d5c2a9944..4e3cf15fed 100644 --- a/boards/common/remote/Makefile.include +++ b/boards/common/remote/Makefile.include @@ -2,7 +2,6 @@ export PROGRAMMER ?= cc2538-bsl ifeq ($(PROGRAMMER),cc2538-bsl) - OS := $(shell uname) ifeq ($(OS),Linux) PORT_BSL ?= $(PORT_LINUX) else ifeq ($(OS),Darwin) diff --git a/boards/openmote-b/Makefile.include b/boards/openmote-b/Makefile.include index 5f37a86536..d88914ce57 100644 --- a/boards/openmote-b/Makefile.include +++ b/boards/openmote-b/Makefile.include @@ -6,7 +6,6 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*))) export PROGRAMMER ?= cc2538-bsl ifeq ($(PROGRAMMER),cc2538-bsl) - OS := $(shell uname) ifeq ($(OS),Linux) PORT_BSL ?= $(PORT_LINUX) else ifeq ($(OS),Darwin) diff --git a/makefiles/tools/bossa.inc.mk b/makefiles/tools/bossa.inc.mk index 725ba1583d..5297f0ff18 100644 --- a/makefiles/tools/bossa.inc.mk +++ b/makefiles/tools/bossa.inc.mk @@ -5,7 +5,6 @@ FFLAGS ?= -p $(PORT) -e -i -w -v -b -R $(FLASHFILE) # some arduino boards need to toggle the serial interface a little bit to get # them ready for flashing... ifneq (,$(BOSSA_ARDUINO_PREFLASH)) - OS := $(shell uname) ifeq ($(OS),Linux) STTY_FLAG = -F else ifeq ($(OS),Darwin) diff --git a/makefiles/tools/serial.inc.mk b/makefiles/tools/serial.inc.mk index 84144166e0..c6934b0618 100644 --- a/makefiles/tools/serial.inc.mk +++ b/makefiles/tools/serial.inc.mk @@ -1,5 +1,4 @@ # set default port depending on operating system -OS := $(shell uname) ifeq ($(OS),Linux) PORT ?= $(call ensure_value,$(PORT_LINUX),No port set) else ifeq ($(OS),Darwin)