build: remove tools to find arduino

This commit is contained in:
Lucas De Marchi 2015-11-03 12:22:34 -02:00 committed by Andrew Tridgell
parent dd784189a1
commit 5c29703732
2 changed files with 0 additions and 74 deletions

View File

@ -1,22 +0,0 @@
#!/bin/sh
# find arduino version
ARDUINO=$1
if test -f $ARDUINO/lib/version.txt; then
# arduino 1.0 uses this file
ver=$(head -1 $ARDUINO/lib/version.txt | cut -c1-4)
# cope with pre 1.0 versions
leading=$(echo $ver | cut -c1)
if [ "$leading" = "0" ]; then
echo $ver
exit 0
fi
major=$(echo $ver | cut -d. -f1)
minor=$(echo $ver | cut -d. -f2)
v=$(expr $major \* 100 + $minor)
echo $v
elif test -f $ARDUINO/revisions.txt; then
ARDUINO_VER=$(head -1 $ARDUINO/revisions.txt | cut -d' ' -f 2)
else
echo "UNKNOWN"
fi

View File

@ -1,52 +0,0 @@
#
# Find Arduino, if not explicitly specified
#
ifeq ($(ARDUINO),)
#
# List locations that might be valid ARDUINO settings
#
ifeq ($(SYSTYPE),Darwin)
# use Spotlight to find Arduino.app
ARDUINO_QUERY = 'kMDItemContentType == com.apple.application-bundle && kMDItemFSName == Arduino.app'
ARDUINOS := $(addsuffix /Contents/Resources/Java,$(shell mdfind -literal $(ARDUINO_QUERY)))
ifeq ($(ARDUINOS),)
$(error ERROR: Spotlight cannot find Arduino on your system.)
endif
endif
ifeq ($(SYSTYPE),Linux)
ARDUINO_SEARCHPATH = /usr/share/arduino* /usr/local/share/arduino*
ARDUINOS := $(wildcard $(ARDUINO_SEARCHPATH))
endif
ifneq ($(findstring CYGWIN, $(SYSTYPE)),)
# Most of the following commands are simply to deal with whitespaces in the path
# Read the "Program Files" system directory from the windows registry
PROGRAM_FILES := $(shell cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/ProgramFilesDir)
# Convert the path delimiters to /
PROGRAM_FILES := $(shell cygpath -m ${PROGRAM_FILES})
# Escape the space with a backslash
PROGRAM_FILES := $(shell echo $(PROGRAM_FILES) | sed s/\ /\\\\\ / )
# Use DOS paths because they do not contain spaces
PROGRAM_FILES := $(shell cygpath -d ${PROGRAM_FILES})
# Convert the path delimiters to /
PROGRAM_FILES := $(subst \,/,$(PROGRAM_FILES))
# Search for an Arduino instalation in a couple of paths
ARDUINO_SEARCHPATH := c:/arduino* $(PROGRAM_FILES)/arduino*
ARDUINOS := $(wildcard $(ARDUINO_SEARCHPATH))
endif
#
# Pick the first option if more than one candidate is found.
#
ARDUINO := $(firstword $(ARDUINOS))
ifeq ($(ARDUINO),)
$(error ERROR: Cannot find Arduino on this system, please specify on the commandline with ARDUINO=<path> or on the config.mk file)
endif
ifneq ($(words $(ARDUINOS)),1)
$(warning WARNING: More than one copy of Arduino was found, using $(ARDUINO))
endif
endif