This is a patch to fix bug #2248, which was reported by Kio. The bug report is here:
https://sourceforge.net/p/sdcc/bugs/2248/
Basically, there were a few places in sdcc/device/non-free/lib/Makefile.in that were creating directories or copying files even if the corresponding PIC14 or PIC16 port was disabled. I made a new variable called ENABLED_PORTS which will just be a subset of "pic14 pic16" and used that in a few places to achieve this.
I tested that the expected files get installed when the PIC14/PIC16 ports are both disabled and when they are both enabled.
My last patch was made with "git format-patch" and I just realized it might not be compatible with SVN. I'd be interested to know if it works for you, but if it doesn't here is another file that should work better. I will have to investigate this more later; I would definitely like to be able to include my name and a commit message when I sent patches but I'm not sure how.
Applied in reversion #9199.