arduino/Arduino — pull request #1250 by giseburt (2013-01-27 19:51:57+00:00)
Title: Include library paths used by libraries in the compiler search path.

This pull fixes a case where libraries that a sketch uses indirectly (other libraries is uses require them) need to be included directly in order to compile.

It is necessary to #include a library's file in your sketch in order for the IDE to add that library's path to the compiler command line. This patch searches the files that are included as well, adding dependent libraries to the search path. This removes then need to directly #include indirectly used libraries.

The upside is that this will not break any existing code. The workaround that's needed now will continue to work, but will simply become unnecessary.

An example, in the Adafruit SSD1331 OLED driver test sketch (https://github.com/adafruit/Adafruit-SSD1331-OLED-Driver-Library-for-Arduino/blob/master/examples/test/test.pde) contains this code:

```c++
#include
#include
#include
```

With this pull, only the directly relevant library to the sketch is needed to be added, and so it could be simplified to:

```c++
#include
```

The library itself includes those files, and so the IDE is able to locate them and add them to the include path. Of course, the old code will continue to work as well.