diff --git a/Makefile b/Makefile index 57a28e7..adba525 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ DESTDIR=/ -PREFIX=/usr/local +PREFIX=/usr all: @# do nothing yet diff --git a/ino/commands/build.py b/ino/commands/build.py index 94f1d58..34b2b8e 100644 --- a/ino/commands/build.py +++ b/ino/commands/build.py @@ -246,7 +246,7 @@ def recursive_inc_lib_flags(self, libdirs): flags = SpaceList() for d in libdirs: flags.append('-I' + d) - flags.extend('-I' + subd for subd in list_subdirs(d, recursive=True, exclude=['examples'])) + flags.extend('-I' + subd for subd in list_subdirs(d, recursive=False, exclude=['examples'])) return flags def _scan_dependencies(self, dir, lib_dirs, inc_flags): diff --git a/ino/environment.py b/ino/environment.py index 0a725e9..0b451ce 100644 --- a/ino/environment.py +++ b/ino/environment.py @@ -1,5 +1,5 @@ # -*- coding: utf-8; -*- - +from __future__ import print_function import argparse from collections import OrderedDict from collections import namedtuple @@ -78,6 +78,12 @@ class Environment(dict): arduino_dist_dir_guesses.insert(0, '/cygdrive/c/Progra~2/Arduino') arduino_dist_dir_guesses.insert(0, '/cygdrive/c/Progra~3/Arduino') arduino_dist_dir_guesses.insert(0, '/cygdrive/c/Progra~4/Arduino') + elif platform.system().startswith('MSYS_NT'): + arduino_dist_dir_guesses.insert(0, '/c/Progra~1/Arduino') + arduino_dist_dir_guesses.insert(0, '/c/Progra~2/Arduino') + arduino_dist_dir_guesses.insert(0, '/c/Progra~3/Arduino') + arduino_dist_dir_guesses.insert(0, '/c/Progra~4/Arduino') + # arduino_dist_dir_guesses.insert(0, '/c/Program Files/Arduino') elif platform.system() == 'Windows': arduino_dist_dir_guesses.insert(0, 'c:\\Arduino') arduino_dist_dir_guesses.insert(0, 'c:\\Progra~1\\Arduino') @@ -152,7 +158,7 @@ def _find(self, key, items, places, human_name, join, multi): if key in self: return self[key] - human_name = human_name or key + human_name = human_name or key or 'Null' # make sure search on current directy first #places.insert(0,'.') @@ -162,7 +168,7 @@ def _find(self, key, items, places, human_name, join, multi): places = map(os.path.expanduser, places) glob_places = itertools.chain.from_iterable(glob(os.path.abspath(p)) for p in places) - + print('Searching for', human_name, '...', end='') test_func = os.path.isfile if join else os.path.exists results = []