mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
Call xargs with option -r (--no-run-if-empty) so that when the toolchain is not found, dirname does not complain about a missing operand
This commit is contained in:
@@ -65,7 +65,7 @@ OCAML=$(shell which ocaml)
|
||||
OCAMLRUN=$(shell which ocamlrun)
|
||||
|
||||
# try to find the paparazzi multilib toolchain
|
||||
TOOLCHAIN_DIR=$(shell find -L /opt/paparazzi/arm-multilib ~/sat -maxdepth 1 -type d -name arm-none-eabi 2>/dev/null | head -n 1 | xargs dirname )
|
||||
TOOLCHAIN_DIR=$(shell find -L /opt/paparazzi/arm-multilib ~/sat -maxdepth 1 -type d -name arm-none-eabi 2>/dev/null | head -n 1 | xargs -r dirname )
|
||||
ifneq ($(TOOLCHAIN_DIR),)
|
||||
#found the compiler from the paparazzi multilib package
|
||||
ARMGCC=$(TOOLCHAIN_DIR)/bin/arm-none-eabi-gcc
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ SRC_ARCH = arch/lpc21
|
||||
|
||||
# Programs location
|
||||
# try to find the paparazzi multilib toolchain
|
||||
TOOLCHAIN_DIR=$(shell find -L /opt/paparazzi/arm-multilib ~/sat -maxdepth 1 -type d -name arm-none-eabi 2>/dev/null | head -n 1 | xargs dirname )
|
||||
TOOLCHAIN_DIR=$(shell find -L /opt/paparazzi/arm-multilib ~/sat -maxdepth 1 -type d -name arm-none-eabi 2>/dev/null | head -n 1 | xargs -r dirname )
|
||||
|
||||
#
|
||||
# found the new paparazzi toolchain, use it
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ OPT = s
|
||||
#OPT = 0
|
||||
|
||||
# Programs location
|
||||
TOOLCHAIN_DIR=$(shell find -L /opt/paparazzi/arm-multilib ~/sat /opt/paparazzi/stm32 -maxdepth 1 -type d -name arm-none-eabi 2>/dev/null | head -n 1 | xargs dirname )
|
||||
TOOLCHAIN_DIR=$(shell find -L /opt/paparazzi/arm-multilib ~/sat /opt/paparazzi/stm32 -maxdepth 1 -type d -name arm-none-eabi 2>/dev/null | head -n 1 | xargs -r dirname )
|
||||
GCC_BIN_DIR=$(TOOLCHAIN_DIR)/bin
|
||||
GCC_LIB_DIR=$(TOOLCHAIN_DIR)/arm-none-eabi/lib
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ DATE = $$(date +%Y%m%d)
|
||||
|
||||
# Tool definitions
|
||||
# try to find the paparazzi multilib toolchain
|
||||
TOOLCHAIN_DIR=$(shell find -L /opt/paparazzi/arm-multilib ~/sat -maxdepth 1 -type d -name arm-none-eabi 2>/dev/null | head -n 1 | xargs dirname )
|
||||
TOOLCHAIN_DIR=$(shell find -L /opt/paparazzi/arm-multilib ~/sat -maxdepth 1 -type d -name arm-none-eabi 2>/dev/null | head -n 1 | xargs -r dirname )
|
||||
|
||||
#
|
||||
# found the new paparazzi toolchain, use it
|
||||
|
||||
Reference in New Issue
Block a user