To me, the M5 is very good value for money, but no BMW can touch Porsche in terms of brand value, recognition and engineering excellence. Everything depends on the size of your wallet. 

On the other hand, as you noted - new Pana is coming within a year (but maybe later where we are), so it could be a difficult choice if you are not completely into Porsches. Then go with the M5 and save some money (and time)...

Good luck.