Global automakers are planning to spend more than half a trillion dollars on electric vehicles and batteries through 2030, according to a Reuters analysis, boosting investments aimed at luring car buyers away from fossil-fuel vehicles and meeting increasingly tough decarbonization targets.