mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 10:28:29 -04:00
Fix Arduino version detection on some systems
This commit is contained in:
parent
0d2527daf1
commit
d327bdde80
@ -305,7 +305,14 @@ LIBOBJS := $(SKETCHLIBOBJS) $(ARDUINOLIBOBJS)
|
||||
# Pull the Arduino version from the revisions.txt file
|
||||
#
|
||||
# XXX can we count on this? If not, what?
|
||||
ARDUINO_VERS := $(shell expr `head -1 $(ARDUINO)/lib/version.txt | cut -d ' ' -f 2`)
|
||||
ARDUINO_VERS := $(shell expr `head -1 $(ARDUINO)/revisions.txt | cut -d ' ' -f 2`)
|
||||
# If the version is not a number, try it again, using another file
|
||||
ifneq ($(ARDUINO_VERS),$(shell echo $(ARDUINO_VERS) | sed 's/[^0-9]*//g'))
|
||||
ARDUINO_VERS := $(shell expr `head -1 $(ARDUINO)/lib/version.txt | cut -d ' ' -f 2`)
|
||||
endif
|
||||
ifneq ($(ARDUINO_VERS),$(shell echo $(ARDUINO_VERS) | sed 's/[^0-9]*//g'))
|
||||
$(warning Could not determine Arduino version)
|
||||
endif
|
||||
|
||||
# Find the hardware directory to use
|
||||
HARDWARE_DIR := $(firstword $(wildcard $(SKETCHBOOK)/hardware/$(HARDWARE) \
|
||||
|
Loading…
Reference in New Issue
Block a user