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:
Felix Ruess
2011-10-28 11:30:18 +02:00
parent 8034bcb209
commit 0b9922c690
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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
+1 -1
View File
@@ -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