In Makefiles there is a nice command, called filter-out. This command takes 2 Arguments: first, the needle you want to filter out, second the haystack where it is in. This was exactly what I needed. But everytime I tried it, it returned an empty string. The solution was too easy… make doesn’t complain if you write it with an underscore instead of a hyphen - and in makepp its written with a dash, so you will also get good looking Google results :-)
Thanks to Philip on gnu.make.bugs for pointing this out.