During the last years of WW-II the Germans were making “synthetic” fuels from coal after supplies of oil from Romania were disrupted by Allied bombing.
After the aparthied boycotts, South Africa went the coal to oil route.
It ain’t too sexy and has a lot of opposition, but it is there and can be done.