amperka / ino

Command line toolkit for working with Arduino hardware
http://inotool.org
MIT License
1.08k stars 233 forks source link

Ignore `src` directories when traversing libraries #214

Open zerowidth opened 9 years ago

zerowidth commented 9 years ago

This PR is a fix for the issue with Arduino 1.5.8 installs causing problems with builds: make: execvp: /bin/sh: Argument list too long, seen in #111, #119, #121, and #168.

Somehow, src directories are being added to the Resources/Java/libraries path in the Arduino.app distribution. For example (two lines out of thousands):

/Applications/Arduino.app/Contents/Resources/Java/libraries/WiFi/extras/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/include/ipv4/lwip
/Applications/Arduino.app/Contents/Resources/Java/libraries/WiFi/extras/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/include/lwip

This generates a remarkably enormous Makefile, because of all the -I <libpath> arguments, none of which are needed, and of course it won't run properly either.

This PR fixes it by adding src to the excludes argument to list_subdirs.

c00kiemon5ter commented 9 years ago

I am getting the same Argument list too long and I can confirm that this patch fixes the problem.

I am using Mac OS X Yosemite 10.10.1 with Arduino 1.5.8 and latest ino from git.

jgarbers commented 9 years ago

Also can confirm this patch fixes the problem on Arduino 1.6.0 and Yosemite 10.10.2.

boneskull commented 9 years ago

see #226 ?

tmk commented 9 years ago

Thanks for sharing.

With arduino 1.6.0 and this fix I got this error at line #include <LiquidCrystal.h>: fatal error: LiquidCrystal.h: No such file or directory

The file is located here and this patch excludes this. arduino-1.6.0/libraries/LiquidCrystal/src/LiquidCrystal.h

It was no problem with #226 fix. I'm using Ubuntu 14.10.