From 1196c4ebdfff92632077aab216d864152a063536 Mon Sep 17 00:00:00 2001 From: "Peter A. Jonsson" <jonsson.peter.a@gmail.com> Date: Mon, 18 Apr 2022 13:03:09 +0200 Subject: [PATCH] Makefile: use hashbang in Python scripts Execute Python scripts directly so they use the specified interpreter + parameters in the first line. This aligns the behavior between running Python scripts through make and manually in the shell. --- Makefile.embedded | 2 +- arch/platform/jn516x/Makefile.jn516x | 2 +- arch/platform/zoul/Makefile.zoul | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.embedded b/Makefile.embedded index ff948d89b8..a4b84fc289 100644 --- a/Makefile.embedded +++ b/Makefile.embedded @@ -39,7 +39,7 @@ login: $(SERIAL_DUMP_BIN) ### Targets using tools/motelist ### CONTIKI_NG_MOTELIST_DIR = $(CONTIKI_NG_TOOLS_DIR)/motelist -CONTIKI_NG_MOTELIST = python $(CONTIKI_NG_MOTELIST_DIR)/motelist.py +CONTIKI_NG_MOTELIST = $(CONTIKI_NG_MOTELIST_DIR)/motelist.py .PHONY: motelist-all diff --git a/arch/platform/jn516x/Makefile.jn516x b/arch/platform/jn516x/Makefile.jn516x index d3e605532a..dd754735aa 100644 --- a/arch/platform/jn516x/Makefile.jn516x +++ b/arch/platform/jn516x/Makefile.jn516x @@ -180,7 +180,7 @@ LDFLAGS += -Wl,--defsym=_stack_origin=_ram_top ######################################################################## -MOTELIST = python $(CONTIKI)/tools/jn516x/mote-list.py +MOTELIST = $(CONTIKI)/tools/jn516x/mote-list.py # Check if we are running under Windows ifeq ($(HOST_OS),Windows) diff --git a/arch/platform/zoul/Makefile.zoul b/arch/platform/zoul/Makefile.zoul index 0ad2ba6357..730fa1a37f 100644 --- a/arch/platform/zoul/Makefile.zoul +++ b/arch/platform/zoul/Makefile.zoul @@ -47,7 +47,7 @@ MODULES += $(CONTIKI_NG_STORAGE_DIR)/cfs BSL = $(CONTIKI_NG_TOOLS_DIR)/cc2538-bsl/cc2538-bsl.py -MOTES := $(shell python $(CONTIKI_NG_TOOLS_DIR)/motelist/motelist.py --omit-header \ +MOTES := $(shell $(CONTIKI_NG_TOOLS_DIR)/motelist/motelist.py --omit-header \ | grep $(MOTELIST_ZOLERTIA) | cut -f1 -d " ") ### If PORT is defined, override to keep backward compatibility -- GitLab