Ah, thanks Ray!
Ok, I've got a hack, but not a clean solution:
According to the link,
...the IDE scans the sketch for all headers that match files residing in the libraries folder, then it simply copies the library source files into the temporary location along with the sketch.
It looks like the IDE dumps everything in the custom library's directory though into the temporary folder.
Ok, so here's the hack: In my case, to include the SPI library in a sketch, I copy/pasted SPI.h
(header only) from Arduino's Github repo and put it in the same directory as my custom library.
Then, in my custom library header, I added
, and the IDE went and found the real SPI source and included it.
I'm not completely sure why this works, if the library only scans for headers in the sketch, according to the link above....
So, this won't hold up against time if new functions are added to the SPI library, or if the names are changed.
Is there a better way to work around this?