amperka/ino — pull request #214 by zerowidth (2014-12-04 03:21:36+00:00)
Title: Ignore `src` directories when traversing libraries

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 at least #111 #119 #121 #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 ` 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`.