Automakers are trumpeting their long-term intentions to forsake gasoline engines for electric motors. Big Oil hears the message and is taking halting steps to adjust its business model to survive in an era when gasoline sales could start drying up.

Full-electric and plug-in hybrid vehicles are projected to account for more than half of global light-vehicle sales, or more than 60 million vehicles, by 2040, according to Bloomberg New Energy Finance. That poses an existential threat to today's vehicle fuel providers.

As a hedge, the oil industry is making early and relatively inexpensive investments in electrified-vehicle charging infrastructure and technology to get ahead of potential disruption.

Royal Dutch Shell in January said it had agreed to buy Greenlots, a Los Angeles EV charging and energy management company.

The Greenlots acquisition "clearly signals Shell's entry into the U.S. EV charging market," the energy conglomerate said in emailed responses to questions from Automotive News.

"The U.S. is a core market," Shell said. "It offers potential for a fully integrated value chain — from generation, to power marketing, and end-use."

The oil giant is likely to make more such deals. Shell's New Energies business, which is handling the Greenlots acquisition, said it plans to spend $1 billion to $2 billion a year through 2020 on commercial opportunities, including electric vehicle charging infrastructure.

"A mosaic of different fuels will be needed to meet growing demand for transport in a low-carbon energy future," Shell said.

Shell is not alone in its EV infrastructure ambitions. Competitor Chevron is an investor in ChargePoint, a major charging network provider in the U.S. Meanwhile, BP is gobbling up charging networks in Europe.